Changeset 2815


Ignore:
Timestamp:
01/28/11 17:46:32 (2 years ago)
Author:
fufroma
Message:

Qques modifs pour améliorer l'interface

Location:
alternc/trunk/bureau
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/adm_domstype.php

    r2814 r2815  
    5858    <th><?php __("Entry");?></th> 
    5959    <th><?php __("Compatibility");?></th> 
     60    <th><?php __("Enabled ?");?></th> 
     61    <th><?php __("Only DNS ?");?></th> 
     62    <th><?php __("Need to be DNS ?");?></th> 
    6063    <th><?php __("Edit");?></th> 
    6164</tr> 
     
    7174    <td><?php echo $d['entry'];?></td> 
    7275    <td><?php echo $d['compatibility'];?></td> 
     76    <td><?php echo $d['enable']?__("Yes"):__("No");?></td> 
     77    <td><?php echo $d['only_dns']?__("Yes"):__("No");?></td> 
     78    <td><?php echo $d['need_dns']?__("Yes"):__("No");?></td> 
    7379    <td><div class="ina"><a href="adm_domstypeedit.php?name=<?php echo urlencode($d['name']); ?>"><img style="padding-bottom: 5px" src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td> 
    7480 
  • alternc/trunk/bureau/admin/adm_domstypedoedit.php

    r2814 r2815  
    77 
    88 
    9 if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility) ) { 
     9if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns) ) { 
    1010    die($err->errstr()); 
    1111} else { 
  • alternc/trunk/bureau/admin/adm_domstypeedit.php

    r2814 r2815  
    4242    "entry"         => array ("request", "string", ""), 
    4343    "compatibility" => array ("request", "string", ""), 
     44    "enable"        => array ("request", "boolean", ""), 
     45    "only_dns"      => array ("request", "boolean", ""), 
     46    "need_dns"      => array ("request", "boolean", ""), 
    4447); 
    4548getFields($fields); 
     
    6871            <th><?php __("Description");?></th> 
    6972            <td><input name="description" type=text size="30" value="<?php echo $d['description']; ?>" /></td> 
    70         </tr> 
     73      </tr> 
    7174            <tr> 
    7275            <th><?php __("Target");?></th> 
     
    8285            <th><?php __("Entry");?></th> 
    8386            <td><input name="entry" type=text size="30" value="<?php echo $d['entry']; ?>" /></td> 
    84         </tr> 
     87      </tr> 
    8588            <tr> 
    8689            <th><?php __("Compatibility");?></th> 
    8790            <td><input name="compatibility" type=text size="15" value="<?php echo $d['compatibility']; ?>" /></td> 
    88  
    89         </tr> 
    90         <tr class="trbtn"> 
     91      </tr> 
     92            <tr> 
     93            <th><?php __("Enable");?></th> 
     94            <td><input name="enable" type=checkbox value="1" <?php cbox($d['enable']); ?> /></td> 
     95      </tr> 
     96            <tr> 
     97            <th><?php __("Do only a DNS entry");?></th> 
     98            <td><input name="only_dns" type=checkbox value="1" <?php cbox($d['only_dns']); ?> /></td> 
     99      </tr> 
     100            <tr> 
     101            <th><?php __("Need to be the DNS");?></th> 
     102            <td><input name="need_dns" type=checkbox value="1" <?php cbox($d['need_dns']); ?> /></td> 
     103      </tr> 
     104      <tr class="trbtn"> 
    91105          <td colspan="2"> 
    92106             <input type="submit" class="inb" name="submit" value="<?php __("Change this domains type"); ?>" /> 
  • alternc/trunk/bureau/admin/dom_edit.inc.php

    r2814 r2815  
    5959            <script type="text/javascript"> 
    6060            <!-- 
    61             document.write("&nbsp;<input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.type_val_<?php echo $dt['name'];?>');\" value=\" <?php __("Choose a folder..."); ?> \" class=\"bff\">"); 
     61            document.write("&nbsp;<input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.t_<?php echo $dt['name'];?>');\" value=\" <?php __("Choose a folder..."); ?> \" class=\"bff\">"); 
    6262            //  --> 
    6363            </script><?php 
  • alternc/trunk/bureau/admin/dom_edit.php

    r2814 r2815  
    7676 --> 
    7777<table class="tlist"> 
    78 <tr><th colspan="2"><?php __("Actions"); ?></th><th><?php __("Subdomain"); ?></th><th><?php __("Place"); ?></th></tr> 
     78<tr><th colspan="2"><?php __("Actions"); ?></th><th><?php __("Subdomain"); ?></th><th><?php __("Type");?></th><th><?php __("Place"); ?></th></tr> 
    7979<?php 
    8080$col=1; 
     
    9090                </td> 
    9191                <td><a href="http://<?php ecif($r["sub"][$i]["name"],$r["sub"][$i]["name"]."."); echo $r["name"] ?>" target="_blank"><?php ecif($r["sub"][$i]["name"],$r["sub"][$i]["name"]."."); echo $r["name"] ?></a></td> 
    92                 <td><?php echo $r["sub"][$i]['type'] === '0' ? '<a href="bro_main.php?R='.urlencode($r["sub"][$i]["dest"]).'">'.htmlspecialchars($r["sub"][$i]["dest"]).'</a>' : htmlspecialchars($r["sub"][$i]["dest"]); ?>&nbsp;</td> 
     92                <td><?php __($r['sub'][$i]['type_desc']);?></td> 
     93                <td><?php echo $r["sub"][$i]['type'] === 'LOCAL' ? '<a href="bro_main.php?R='.urlencode($r["sub"][$i]["dest"]).'">'.htmlspecialchars($r["sub"][$i]["dest"]).'</a>' : htmlspecialchars($r["sub"][$i]["dest"]); ?>&nbsp;</td> 
    9394        </tr> 
    9495<?php } ?> 
  • alternc/trunk/bureau/class/m_dom.php

    r2814 r2815  
    160160  } 
    161161 
    162   function domains_type_update($name, $description, $target, $entry, $compatibility) { 
     162  function domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns) { 
    163163    global $err,$cuid,$db; 
    164164    $id=intval($id); 
     
    168168    $entry=mysql_real_escape_string($entry); 
    169169    $compatibility=mysql_real_escape_string($compatibility); 
    170     $db->query("UPDATE domaines_type SET description='$description', target='$target', entry='$entry', compatibility='$compatibility' where name='$name';"); 
     170    $enable=intval($enable); 
     171    $only_dns=intval($only_dns); 
     172    $need_dns=intval($need_dns); 
     173    $db->query("UPDATE domaines_type SET description='$description', target='$target', entry='$entry', compatibility='$compatibility', enable=$enable, need_dns=$need_dns, only_dns=$only_dns where name='$name';"); 
    171174    return true; 
    172175  }    
     
    630633    $r["nsub"]=$db->Record["cnt"]; 
    631634    $db->free(); 
    632     $db->query("select * from sub_domaines where compte='$cuid' and domaine='$dom'"); 
     635    $db->query("select sd.*, dt.description as type_desc from sub_domaines sd, domaines_type dt where compte='$cuid' and domaine='$dom' and upper(dt.name)=upper(sd.type)"); 
    633636    // Pas de webmail, on le cochera si on le trouve. 
    634637    $this->webmail=0; 
     
    639642      $r["sub"][$i]["dest"]=$db->Record["valeur"]; 
    640643      $r["sub"][$i]["type"]=$db->Record["type"]; 
     644      $r["sub"][$i]["type_desc"]=$db->Record["type_desc"]; 
    641645/* 
    642646      if ($db->Record["type"]==3) { // Webmail 
     
    686690    } 
    687691*/ 
    688     $db->query("select * from sub_domaines where compte='$cuid' and domaine='$dom' and sub='$sub' and ( length('$type')=0 or type='$type') and (length('$value')=0 or '$value'=valeur);"); 
     692    $db->query("select sd.*, dt.description as type_desc from sub_domaines sd, domaines_type dt where compte='$cuid' and domaine='$dom' and sub='$sub' and ( length('$type')=0 or type='$type') and (length('$value')=0 or '$value'=valeur) and upper(dt.name)=upper(sd.type);"); 
    689693    if ($db->num_rows()==0) { 
    690694      $err->raise("dom",14); 
     
    696700    $r["dest"]=$db->Record["valeur"]; 
    697701    $r["type"]=$db->Record["type"]; 
     702    $r["type_desc"]=$db->Record["type_desc"]; 
    698703    $db->free(); 
    699704    return $r; 
Note: See TracChangeset for help on using the changeset viewer.