Changeset 2815
- Timestamp:
- 01/28/11 17:46:32 (2 years ago)
- Location:
- alternc/trunk/bureau
- Files:
-
- 6 edited
-
admin/adm_domstype.php (modified) (2 diffs)
-
admin/adm_domstypedoedit.php (modified) (1 diff)
-
admin/adm_domstypeedit.php (modified) (3 diffs)
-
admin/dom_edit.inc.php (modified) (1 diff)
-
admin/dom_edit.php (modified) (2 diffs)
-
class/m_dom.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alternc/trunk/bureau/admin/adm_domstype.php
r2814 r2815 58 58 <th><?php __("Entry");?></th> 59 59 <th><?php __("Compatibility");?></th> 60 <th><?php __("Enabled ?");?></th> 61 <th><?php __("Only DNS ?");?></th> 62 <th><?php __("Need to be DNS ?");?></th> 60 63 <th><?php __("Edit");?></th> 61 64 </tr> … … 71 74 <td><?php echo $d['entry'];?></td> 72 75 <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> 73 79 <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> 74 80 -
alternc/trunk/bureau/admin/adm_domstypedoedit.php
r2814 r2815 7 7 8 8 9 if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility ) ) {9 if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns) ) { 10 10 die($err->errstr()); 11 11 } else { -
alternc/trunk/bureau/admin/adm_domstypeedit.php
r2814 r2815 42 42 "entry" => array ("request", "string", ""), 43 43 "compatibility" => array ("request", "string", ""), 44 "enable" => array ("request", "boolean", ""), 45 "only_dns" => array ("request", "boolean", ""), 46 "need_dns" => array ("request", "boolean", ""), 44 47 ); 45 48 getFields($fields); … … 68 71 <th><?php __("Description");?></th> 69 72 <td><input name="description" type=text size="30" value="<?php echo $d['description']; ?>" /></td> 70 </tr>73 </tr> 71 74 <tr> 72 75 <th><?php __("Target");?></th> … … 82 85 <th><?php __("Entry");?></th> 83 86 <td><input name="entry" type=text size="30" value="<?php echo $d['entry']; ?>" /></td> 84 </tr>87 </tr> 85 88 <tr> 86 89 <th><?php __("Compatibility");?></th> 87 90 <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"> 91 105 <td colspan="2"> 92 106 <input type="submit" class="inb" name="submit" value="<?php __("Change this domains type"); ?>" /> -
alternc/trunk/bureau/admin/dom_edit.inc.php
r2814 r2815 59 59 <script type="text/javascript"> 60 60 <!-- 61 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.t ype_val_<?php echo $dt['name'];?>');\" value=\" <?php __("Choose a folder..."); ?> \" class=\"bff\">");61 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.t_<?php echo $dt['name'];?>');\" value=\" <?php __("Choose a folder..."); ?> \" class=\"bff\">"); 62 62 // --> 63 63 </script><?php -
alternc/trunk/bureau/admin/dom_edit.php
r2814 r2815 76 76 --> 77 77 <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> 79 79 <?php 80 80 $col=1; … … 90 90 </td> 91 91 <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"]); ?> </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"]); ?> </td> 93 94 </tr> 94 95 <?php } ?> -
alternc/trunk/bureau/class/m_dom.php
r2814 r2815 160 160 } 161 161 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) { 163 163 global $err,$cuid,$db; 164 164 $id=intval($id); … … 168 168 $entry=mysql_real_escape_string($entry); 169 169 $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';"); 171 174 return true; 172 175 } … … 630 633 $r["nsub"]=$db->Record["cnt"]; 631 634 $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)"); 633 636 // Pas de webmail, on le cochera si on le trouve. 634 637 $this->webmail=0; … … 639 642 $r["sub"][$i]["dest"]=$db->Record["valeur"]; 640 643 $r["sub"][$i]["type"]=$db->Record["type"]; 644 $r["sub"][$i]["type_desc"]=$db->Record["type_desc"]; 641 645 /* 642 646 if ($db->Record["type"]==3) { // Webmail … … 686 690 } 687 691 */ 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);"); 689 693 if ($db->num_rows()==0) { 690 694 $err->raise("dom",14); … … 696 700 $r["dest"]=$db->Record["valeur"]; 697 701 $r["type"]=$db->Record["type"]; 702 $r["type_desc"]=$db->Record["type_desc"]; 698 703 $db->free(); 699 704 return $r;
Note: See TracChangeset
for help on using the changeset viewer.
