Changeset 2680 for alternc/trunk/bureau/admin/adm_deactivate.php
- Timestamp:
- 04/29/10 12:43:32 (3 years ago)
- File:
-
- 1 edited
-
alternc/trunk/bureau/admin/adm_deactivate.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alternc/trunk/bureau/admin/adm_deactivate.php
r2559 r2680 57 57 <form action="<?=$PHP_SELF?>" method="GET"> 58 58 <input type="hidden" name="uid" value="<?=$uid?>" /> 59 <? __("Redirection URL:") ?> <input type="text" name="redirect" value="http://example.com/" /> 60 <input type="submit" name="submit" value="<?=_("Confirm")?>" /> 59 <? __("Redirection URL:") ?> <input type="text" name="redirect" class="int" value="http://example.com/" /> 60 <input type="submit" name="submit" class="inb" value="<?=_("Confirm")?>" /> 61 <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_list.php'"/> 61 62 </form><?php 62 63 … … 97 98 $dom->unlock(); 98 99 # 2. for each subdomain 99 foreach ($r['sub'] as $k => $sub) { 100 # shortcuts 101 $type = $sub['type']; 102 $dest = $sub['dest']; 103 $sub = $sub['name']; 104 # if it's a real website 105 if ($type == $dom->type_local) { 106 if (!$confirmed) { 107 print "<li>"; 108 if ($sub) { 109 print $sub . '.'; 110 } 111 print "$domain -> $dest</li>"; 112 } else { 100 if (is_array($r['sub'])) { 101 foreach ($r['sub'] as $k => $sub) { 102 # shortcuts 103 $type = $sub['type']; 104 $dest = $sub['dest']; 105 $sub = $sub['name']; 106 # if it's a real website 107 if ($type == $dom->type_local) { 108 if (!$confirmed) { 109 print "<li>"; 110 if ($sub) { 111 print $sub . '.'; 112 } 113 print "$domain -> $dest</li>"; 114 } else { 113 115 114 # 2.1 keep a copy of where it was, in an SQL request 115 $backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest' WHERE `domaine`='$domain' AND sub='$sub';\n"; 116 $backup .= "DELETE FROM `sub_domaines_standby` WHERE domaine='$domain' and sub='$sub';\n"; 117 $backup .= "INSERT INTO sub_domaines_standby (compte,domaine,sub,valeur,type,action) values ('$cuid','$domain','$sub','$dest','$type',1);\n"; // UPDATE 118 119 # 2.2 change the subdomain to redirect to http://spam.koumbit.org/ 120 $dom->lock(); 121 if (!$dom->set_sub_domain($domain, $sub, $dom->type_url, "edit", $redirect)) { 122 print "-- error in $sub.$domain: " . $err->errstr() . "\n"; 116 # 2.1 keep a copy of where it was, in an SQL request 117 $backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest' WHERE `domaine`='$domain' AND sub='$sub';\n"; 118 $backup .= "DELETE FROM `sub_domaines_standby` WHERE domaine='$domain' and sub='$sub';\n"; 119 $backup .= "INSERT INTO sub_domaines_standby (compte,domaine,sub,valeur,type,action) values ('$cuid','$domain','$sub','$dest','$type',1);\n"; // UPDATE 120 121 # 2.2 change the subdomain to redirect to http://spam.koumbit.org/ 122 $dom->lock(); 123 if (!$dom->set_sub_domain($domain, $sub, $dom->type_url, "edit", $redirect)) { 124 print "-- error in $sub.$domain: " . $err->errstr() . "\n"; 125 } 126 $dom->unlock(); 123 127 } 124 $dom->unlock();125 128 } 126 129 }
Note: See TracChangeset
for help on using the changeset viewer.
