This commit is contained in:
Alan Garcia 2011-02-01 18:03:29 +00:00
parent 46510d79e5
commit 3cbccf5bce
3 changed files with 33 additions and 25 deletions

View File

@ -101,31 +101,35 @@ for($i=0;$i<$r["nsub"];$i++) {
$col=3-$col; $col=3-$col;
?> ?>
<tr class="lst<?php echo $col; ?>"> <tr class="lst<?php echo $col; ?>">
<?php if ( $r['sub'][$i]['web_action'] =='DELETE') { echo "<td colspan=2 />"; } else { ?>
<td class="center"> <td class="center">
<div class="ina"><a href="dom_subedit.php?domain=<?php echo urlencode($r["name"]) ?>&amp;sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>&amp;type=<?php echo urlencode($r["sub"][$i]["type"]) ?>&amp;value=<?php echo urlencode($r["sub"][$i]['dest'])?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div> <div class="ina"><a href="dom_subedit.php?domain=<?php echo urlencode($r["name"]) ?>&amp;sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>&amp;type=<?php echo urlencode($r["sub"][$i]["type"]) ?>&amp;value=<?php echo urlencode($r["sub"][$i]['dest'])?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div>
</td><td class="center"> </td><td class="center">
<div class="ina"><a href="dom_subdel.php?domain=<?php echo urlencode($r["name"]) ?>&amp;sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>&amp;type=<?php echo urlencode($r["sub"][$i]["type"]) ?>&amp;value=<?php echo urlencode($r["sub"][$i]['dest'])?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div> <div class="ina"><a href="dom_subdel.php?domain=<?php echo urlencode($r["name"]) ?>&amp;sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>&amp;type=<?php echo urlencode($r["sub"][$i]["type"]) ?>&amp;value=<?php echo urlencode($r["sub"][$i]['dest'])?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div>
</td> </td>
<?php } // end IF ==DELETE ?>
<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> <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>
<td><?php __($r['sub'][$i]['type_desc']);?></td> <td><?php __($r['sub'][$i]['type_desc']);?></td>
<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> <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>
<td><?php <td><?php
switch ($r['sub'][$i]['enable']) { if ( $r['sub'][$i]['web_action'] !='DELETE') {
case 'ENABLED': switch ($r['sub'][$i]['enable']) {
__("Enabled"); case 'ENABLED':
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=disable'>";__("Disable");echo "</a>"; __("Enabled");
break; echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=disable'>";__("Disable");echo "</a>";
case 'ENABLE': break;
__("Activation pending"); case 'ENABLE':
break; __("Activation pending");
case 'DISABLED': break;
__("Disabled"); case 'DISABLED':
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=enable'>";__("Enable");echo "</a>"; __("Disabled");
break; echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=enable'>";__("Enable");echo "</a>";
case 'DISABLE': break;
__("Desactivation pending"); case 'DISABLE':
break; __("Desactivation pending");
break;
}
}?></td> }?></td>
<td><?php <td><?php
switch ($r['sub'][$i]['web_action']) { switch ($r['sub'][$i]['web_action']) {

View File

@ -864,7 +864,11 @@ class m_dom {
} }
// Re-create the one we want // Re-create the one we want
$db->query("insert into sub_domaines (compte,domaine,sub,valeur,type,web_action) values ('$cuid','$dom','$sub','$dest','$type','UPDATE');"); if (! $db->query("insert into sub_domaines (compte,domaine,sub,valeur,type,web_action) values ('$cuid','$dom','$sub','$dest','$type','UPDATE');") ) {
echo "query failed: ".$db->Error;
return false;
}
// Tell to update the DNS file // Tell to update the DNS file
$db->query("update domaines set dns_action='UPDATE' where domaine='$dom';"); $db->query("update domaines set dns_action='UPDATE' where domaine='$dom';");

View File

@ -15,13 +15,13 @@ Include /var/alternc/apache-vhost/vhosts_all.conf
<VirtualHost *:80> <VirtualHost *:80>
# ***ALTERNC_ALIASES*** # ***ALTERNC_ALIASES***
Alias /icons/ /usr/share/apache/icons/ Alias /icons/ /usr/share/apache/icons/
UseCanonicalName Off UseCanonicalName Off
VirtualDocumentRoot /var/alternc/dns/%-2.1/%0 VirtualDocumentRoot /var/alternc/dns/%-2.1/%0
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
CustomLog /var/log/apache2/access.log alternc CustomLog /var/log/apache2/access.log alternc
</VirtualHost> </VirtualHost>
<Directory /var/alternc> <Directory /var/alternc>
@ -32,12 +32,12 @@ Include /var/alternc/apache-vhost/vhosts_all.conf
php_admin_flag safe_mode_gid on php_admin_flag safe_mode_gid on
php_admin_flag safe_mode on php_admin_flag safe_mode on
php_admin_value disable_functions chmod,chown,chgrp,link,symlink php_admin_value disable_functions chmod,chown,chgrp,link,symlink
php_admin_value safe_mode_exec_dir /var/alternc/exec.usr php_admin_value safe_mode_exec_dir /var/alternc/exec.usr
php_admin_value disable_functions chgrp,link,symlink php_admin_value disable_functions chgrp,link,symlink
php_admin_flag enable_dl off php_admin_flag enable_dl off
php_admin_value upload_tmp_dir /var/alternc/tmp php_admin_value upload_tmp_dir /var/alternc/tmp
php_admin_value sendmail_path /usr/lib/alternc/sendmail php_admin_value sendmail_path /usr/lib/alternc/sendmail
</Directory> </Directory>
<Directory /usr/share/phpmyadmin> <Directory /usr/share/phpmyadmin>