Serghey Rodin 13 лет назад
Родитель
Сommit
48bf7d875e

+ 49 - 0
web/suspend/web/index.php

@@ -0,0 +1,49 @@
+<?php
+// Init
+//error_reporting(NULL);
+ob_start();
+session_start();
+$TAB = 'USER';
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+// Header
+include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
+
+// Panel
+top_panel($user,$TAB);
+
+// Are you admin?
+if ($_SESSION['user'] == 'admin') {
+
+    // Cancel
+    if (!empty($_POST['back'])) {
+        header("Location: /list/user/");
+    }
+
+    // Ok
+    if (!empty($_GET['user'])) {
+        $v_username = escapeshellarg($_GET['user']);
+        exec (VESTA_CMD."v_suspend_user ".$v_username, $output, $return_var);
+        if ($return_var != 0) {
+            $error = implode('<br>', $output);
+            if (empty($error)) $error = 'Error: vesta did not return any output.';
+            $_SESSION['error_msg'] = $error;
+        } else {
+            $_SESSION['ok_msg'] = "OK: user <b>".$_GET[user]."</b> has been suspended.";
+                unset($v_lname);
+        }
+        unset($output);
+
+    include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_suspend_user.html');
+    include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/suspend_user.html');
+    unset($_SESSION['error_msg']);
+    unset($_SESSION['ok_msg']);
+
+    } else {
+        header("Location: /list/user/");
+    }
+
+}
+
+// Footer
+include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

+ 1 - 1
web/templates/admin/add_user.html

@@ -27,7 +27,7 @@ document.v_add_user.v_password.value = randomstring;
             <tr><td class="add-text" style="padding: 10 0 0 2px;">Username</td></tr>
             <tr><td><input type="text" size="20" class="add-input" name="v_username" <?php if (!empty($v_username)) echo "value=".$v_username;  ?> ></tr>
             <tr><td class="add-text" style="padding: 10px 0 0 2px;">
-                Password <a onclick="randomString();" class="genpass">generate</a></td></tr>
+                Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr>
             <tr><td><input type="text" size="20" class="add-input" name="v_password"</tr>
             <tr><td class="add-text" style="padding: 10px 0 0 2px;">Email</td></tr>
             <tr><td><input type="text" size="20" class="add-input" name="v_email" <?php if (!empty($v_email)) echo "value=".$v_email; ?>></tr>

+ 1 - 1
web/templates/admin/edit_user.html

@@ -28,7 +28,7 @@ document.v_edit_user.v_password.value = randomstring;
             <tr><td class="add-text" style="padding: 10 0 0 2px;">Username</td></tr>
             <tr><td><input type="text" size="20" class="add-input" name="v_user" <?php if (!empty($v_username)) echo "value=".$v_username;  ?> disabled> <input type="hidden" name="v_username" <?php if (!empty($v_username)) echo "value=".$v_username;  ?>></tr>
             <tr><td class="add-text" style="padding: 10px 0 0 2px;">
-                Password <a href="#" onclick="randomString();" class="genpass">generate</a></td></tr>
+                Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr>
             <tr><td><input type="text" size="20" class="add-input" name="v_password" <?php if (!empty($v_password)) echo "value=".$v_password;  ?>></tr>
             <tr><td class="add-text" style="padding: 10px 0 0 2px;">Email</td></tr>
             <tr><td><input type="text" size="20" class="add-input" name="v_email" <?php if (!empty($v_email)) echo "value=".$v_email; ?>></tr>

+ 1 - 1
web/templates/admin/edit_web.html

@@ -107,7 +107,7 @@
             <tr><td><table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v_add_web_domain_stats_user"><tr>
                 <tr><td class="add-text" style="padding: 9px 0 0 2px;">Web Statistics Username</td></tr>
                 <tr><td><input type="text" size="20" class="add-input" name="v_stats_user" <?php if (!empty($v_stats_user)) echo "value=".$v_stats_user;  ?>></tr>
-                <tr><td class="add-text" style="padding: 10px 0 0 2px;">Web Statistics Password <a onclick="randomString();" class="genpass">generate</a></td></tr>
+                <tr><td class="add-text" style="padding: 10px 0 0 2px;">Web Statistics Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr>
                 <tr><td><input type="text" size="20" class="add-input" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password;  ?> id="v_password"></tr>
             </td></tr></tr></table>
             <tr><td style="padding: 24px 0 0 0;">

+ 2 - 2
web/templates/admin/list_backup.html

@@ -31,11 +31,11 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 0 0"> <?php echo $data[$key]['TYPE'] ?></td></tr>
+                        <tr><td class="counter-name" style="padding: 2px 0 0 0"> <?php echo $data[$key]['TYPE'] ?></td></tr>
                         <tr><td class="chart1">Run Time: <?php echo humanize_time($data[$key]['RUNTIME']) ?> </td></tr>
                         <tr><td class="chart1">Backup Size: <?php echo humanize_usage($data[$key]['SIZE']) ?> </td></tr>
                     </table>

+ 1 - 2
web/templates/admin/list_cron.html

@@ -35,8 +35,7 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="800px">
-            <tr><td colspan=5 class="cron" style="padding: 0 0 0 4;"><?php echo $data[$key]['CMD'] ?></td></tr>
-
+            <tr><td colspan=5 class="cron" style="padding: 0 0 0 4px;"><b><?php echo $data[$key]['CMD'] ?></b></td></tr>
             <tr>
                 <td style="vertical-align:top;"  width="80px">
                     <table>

+ 3 - 3
web/templates/admin/list_db.html

@@ -35,12 +35,12 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 6 0">[<?php echo $data[$key]['TYPE'] ?>] database</td></tr>
-                        <tr><td class="chart1">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
+                        <tr><td class="counter-name" style="padding: 2px 0 4px 2px">[<?php echo $data[$key]['TYPE'] ?>] database</td></tr>
+                        <tr><td class="chart1" style="padding: 0px 0 0px 2px">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
                             <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
                     </table>
                 </td>

+ 3 - 3
web/templates/admin/list_dns.html

@@ -32,12 +32,12 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 0 0;"><?php echo $data[$key]['IP'] ?></td>
-                        <tr><td class="counter-name" style="padding: 0 0 20 0">[<?php echo $data[$key]['TPL'] ?>] template</td></tr>
+                        <tr><td class="counter-name" style="padding: 2px 0 0 2px;"><?php echo $data[$key]['IP'] ?></td>
+                        <tr><td class="counter-name" style="padding: 0 0 20px 2px">[<?php echo $data[$key]['TPL'] ?>] template</td></tr>
                     </table>
                 </td>
                 <td style="vertical-align:top;" width="250">

+ 1 - 1
web/templates/admin/list_dns_rec.html

@@ -31,7 +31,7 @@ foreach ($data as $key => $value) {
 
         <table class="data-col5" width="780px">
             <tr>
-                <td class="log" style="padding: 0 0 0 4;" width="200"><?php echo $data[$key]['RECORD'] ?></td>
+                <td class="log" style="padding: 0 0 0 4px;" width="200"><b><?php echo $data[$key]['RECORD'] ?></b></td>
                 <td class="log-counter-value" width="80"><?php echo $data[$key]['TYPE'] ?></td>
                 <td class="log-counter-value" width="80"><?php echo $data[$key]['PRIORITY'] ?></td>
                 <td class="log-counter-value" ><?php echo $data[$key]['VALUE'] ?></td>

+ 2 - 2
web/templates/admin/list_ip.html

@@ -20,11 +20,11 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?><i><a class="aliases"><?php echo  $data[$key]['NAME'] ?></i></a></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><i><a class="aliases" style="padding:0 0 0 8px;"><?php echo  $data[$key]['NAME'] ?></i></a></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 2 0"> <?php echo $data[$key]['NETMASK'] ?></td></tr>
+                        <tr><td class="counter-name" style="padding: 2px 0 0 0"> <?php echo $data[$key]['NETMASK'] ?></td></tr>
                         <tr><td class="counter-name"> <?php echo $data[$key]['INTERFACE'] ?> </td></tr>
                     </table>
                 </td>

+ 2 - 2
web/templates/admin/list_mail.html

@@ -36,11 +36,11 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 6 0">catchall > <?php echo $data[$key]['CATCHALL'] ?></td></tr>
+                        <tr><td class="counter-name" style="padding: 2px 0 2px 0">catchall > <?php echo $data[$key]['CATCHALL'] ?></td></tr>
                         <tr><td class="chart1">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
                             <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
                     </table>

+ 7 - 7
web/templates/admin/list_mail_acc.html

@@ -30,24 +30,24 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?> <i><a class="aliases" style="padding: 0 20 0 0"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></i></a></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b> <i><a class="aliases" style="padding: 0 20px 0 4px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></i></a></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 0 0;"><?php echo $data[$key]['IP'] ?></td>
-                        <tr><td class="chart1" style="padding: 0 0 6 0">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
+                        <tr><td class="counter-name" style="padding: 4px 0 0 0;"><?php echo $data[$key]['IP'] ?></td>
+                        <tr><td class="chart1" style="padding: 0 0 2px 0">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
                             <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
                     </table>
                 </td>
-                <td style="vertical-align:top;" width="250">
+                <td style="vertical-align:top;" width="200">
                     <table>
                         <tr><td class="counter-name">Quota:</td><td class="counter-value"><?php echo $data[$key]['QUOTA'] ?></td></tr>
                         <tr><td class="counter-name">Autoreply:</td><td class="counter-value"><?php echo $data[$key]['AUTOREPLY'] ?></td></tr>
                     </table>
                 </td>
-                <td rowspan=4 style="vertical-align:top;" width="300">
-                    <table width="300">
-                        <tr><td colspan="2" class="counter-name">Forward: <a class="nginx-ext" style="padding: 0 12 0 12"><?php echo str_replace(',', ', ', $data[$key]['FWD']) ?></td></tr>
+                <td rowspan=4 style="vertical-align:top;" width="350">
+                    <table width="350">
+                        <tr><td class="counter-name">Forward:</td><td class="counter-value" style="padding: 0 0 0 8px;" ><?php echo str_replace(',', ', ', $data[$key]['FWD']) ?></td></tr>
                     </table>
                 </td>
             </tr>

+ 1 - 1
web/templates/admin/list_rrd.html

@@ -26,7 +26,7 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 4 4;"><?php echo $data[$key]['TITLE'] ?></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 4 4;"><b><?php echo $data[$key]['TITLE'] ?></b></td></tr>
             <tr>
                 <td style="vertical-align:top;" width="630px">
                     <table width="630px">

+ 4 - 4
web/templates/admin/list_stats.html

@@ -19,13 +19,13 @@ foreach ($data as $key => $value) {
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="username" style="padding: 10 0 0 6;"><?php echo date("M Y", strtotime($key))?></td></tr>
+            <tr><td colspan=3 class="username" style="padding: 10 0 0 4px;"><b><?php echo date("M Y", strtotime($key))?></b></td></tr>
             <td style="vertical-align:top;" >
                 <table>
-                    <tr><td colspan=2 class="counter-name"  style="padding: 4px 0px 6px 2px;">[<?php echo $data[$key]['PACKAGE']?>] package</td></tr>
-                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 3;">Bandwidth: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
+                    <tr><td colspan=2 class="counter-name"  style="padding: 2px 0px 6px 2px;">[<?php echo $data[$key]['PACKAGE']?>] package</td></tr>
+                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 2px;">Bandwidth: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
                         <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
-                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 3;">Disk: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
+                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 2px;">Disk: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
                         <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
                     <tr><td colspan=2>
                         <table class="chart2"><tr>

+ 17 - 19
web/templates/admin/list_user.html

@@ -13,7 +13,7 @@ foreach ($data as $key => $value) {
     ?>
 <script type="text/javascript">
     $(function(){
-        $('#<?php echo $spnd_action ?>_dialog_<?php echo "$key" ?>').dialog({
+        $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
             modal: true,
             autoOpen: false,
             width: 360,
@@ -26,12 +26,12 @@ foreach ($data as $key => $value) {
                 }
             }
         });
-        $('#<?php echo $spnd_action ?>_link_<?php echo "$key" ?>').click(function(){
-            $('#<?php echo $spnd_action ?>_dialog_<?php echo "$key" ?>').dialog('open');
+        $('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
+            $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
             return false;
         });
 
-        $('#delete_dialog_<?php echo "$key" ?>').dialog({
+        $('#delete_dialog_<?php echo "$i" ?>').dialog({
             modal: true,
             autoOpen: false,
             width: 360,
@@ -44,14 +44,12 @@ foreach ($data as $key => $value) {
                 }
             }
         });
-        $('#delete_link_<?php echo "$key" ?>').click(function(){
-            $('#delete_dialog_<?php echo "$key" ?>').dialog('open');
+        $('#delete_link_<?php echo "$i" ?>').click(function(){
+            $('#delete_dialog_<?php echo "$i" ?>').dialog('open');
             return false;
         });
-
-
     });
-    </script>
+</script>
 <tr class="data-row">
     <td class="data-dotted" style="padding: 0px 10px 0px 0px">
         <table class="data-col1">
@@ -96,29 +94,29 @@ foreach ($data as $key => $value) {
             <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/user/?user=<?php echo "$key" ?>"> edit</a></td>
             <td class="data-controls" width="80px">
                 <img src="/images/suspend.png" width="7px" height="8px">
-                <a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$key" ?>"> <?php echo $spnd_action ?></a>
-                <div id="<?php echo $spnd_action ?>_dialog_<?php echo "$key" ?>" title="Confirmation">
+                <a href="#" id="<?php echo $spnd_action ?>_link_<?php echo $i ?>"> <?php echo $spnd_action ?></a>
+                <div id="<?php echo $spnd_action ?>_dialog_<?php echo $i ?>" title="Confirmation">
                     <p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <span style="color: #34536A;"><b><?php echo "$key" ?></b></span> user account?</p>
                 </div>
             </td>
             <td class="data-controls" width="70px">
                 <img src="/images/delete.png" width="7px" height="7px">
-                <a href="#" id="delete_link_<?php echo "$key" ?>"> delete</a>
-                <div id="delete_dialog_<?php echo "$key" ?>" title="Confirmation">
+                <a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
+                <div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
                     <p class="counter-value">Are you sure you want to delete <span style="color: #34536A;"><b><?php echo "$key" ?></b></span> user account?</p>
                 </div>
             </td>
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="username" style="padding: 0 0 0 4;"><?php echo $key ?><a class="fullname"><i><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></i></a></td></tr>
+            <tr><td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><i> <?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></i></a></td></tr>
             <td style="vertical-align:top;" >
                 <table>
-                    <tr><td colspan=2 class="counter-name"  style="padding: 4 0 0 0;"><?php echo $data[$key]['CONTACT']?></td></tr>
-                    <tr><td colspan=2 class="counter-name"  style="padding: 0pt 0pt 20px;">[<?php echo $data[$key]['PACKAGE']?>] package</td></tr>
-                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 3;">Bandwidth: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
+                    <tr><td colspan=2 class="counter-name"  style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
+                    <tr><td colspan=2 class="counter-name"  style="padding: 0 0 18px 2px;">[<?php echo $data[$key]['PACKAGE']?>] package</td></tr>
+                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 3px;">Bandwidth: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
                         <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
-                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 3;">Disk: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
+                    <tr><td class="chart1" colspan=2 style="padding: 0 0 0 3[x;">Disk: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
                         <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
                     <tr><td colspan=2>
                         <table class="chart2"><tr>
@@ -134,7 +132,7 @@ foreach ($data as $key => $value) {
                 </table>
             </td>
             <td style="vertical-align:top;" width="300">
-                <table width="300">
+                <table width="320">
                     <tr><td class="counter-name" width="37%">Web Domains:</td>
                     <td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td></tr>
                     <tr><td class="counter-name">Web SSL:</td>

+ 69 - 8
web/templates/admin/list_web.html

@@ -20,7 +20,56 @@ foreach ($data as $key => $value) {
     } else {
         $ssl_home = '';
     }
+    if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
+        $nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
+        $nginx_ext = trim($nginx_ext, ",");
+        $nginx_ext = str_replace(',', ', ', $nginx_ext);
+        $nginx_ext = $nginx_ext.", ...";
+    } else {
+        $nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
+    }
+
     ?>
+<script type="text/javascript">
+    $(function(){
+        $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
+            modal: true,
+            autoOpen: false,
+            width: 360,
+            buttons: {
+                "Ok": function(event, ui) {
+                     location.href = '/<?php echo $spnd_action ?>/web/?domain=<?php echo "$key" ?>';
+                },
+                "Cancel": function() {
+                    $(this).dialog("close");
+                }
+            }
+        });
+        $('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
+            $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
+            return false;
+        });
+
+        $('#delete_dialog_<?php echo "$i" ?>').dialog({
+            modal: true,
+            autoOpen: false,
+            width: 360,
+            buttons: {
+                "Ok": function(event, ui) {
+                     location.href = '/delete/web/?domain=<?php echo "$key" ?>';
+                },
+                "Cancel": function() {
+                    $(this).dialog("close");
+                }
+            }
+        });
+        $('#delete_link_<?php echo "$i" ?>').click(function(){
+            $('#delete_dialog_<?php echo "$i" ?>').dialog('open');
+            return false;
+        });
+
+    });
+</script>
 
 <tr class="data-row">
     <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
@@ -35,20 +84,32 @@ foreach ($data as $key => $value) {
         <table width="830px"><tr>
             <td></td>
             <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/web/?domain=<?php echo "$key" ?>"> edit</a></td>
-            <td class="data-controls" width="80px"><img src="/images/suspend.png" width="7px" height="8px"><a href="#"> <?php echo $spnd_action ?></a></td>
-            <td class="data-controls" width="70px"><img src="/images/delete.png" width="7px" height="7px"><a href="#"> delete</a></td>
+            <td class="data-controls" width="80px">
+                <img src="/images/suspend.png" width="7px" height="8px">
+                <a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
+                <div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
+                    <p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <span style="color: #34536A;"><b><?php echo "$key" ?></b></span> domain?</p>
+                </div>
+            </td>
+            <td class="data-controls" width="70px">
+                <img src="/images/delete.png" width="7px" height="7px">
+                <a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
+                <div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
+                    <p class="counter-value">Are you sure you want to delete <span style="color: #34536A;"><b><?php echo "$key" ?></b></span> domain?</p>
+                </div>
+            </td>
         </tr></table>
 
         <table class="data-col2" width="830px">
-            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4;"><?php echo $key ?> <i><a class="aliases" style="padding: 0 20 0 0"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></i></a></td></tr>
+            <tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b> <i><a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a></i></td></tr>
             <tr>
                 <td style="vertical-align:top;" >
                     <table>
-                        <tr><td class="counter-name" style="padding: 4 0 0 0;"><?php echo $data[$key]['IP'] ?></td>
-                        <tr><td class="counter-name" style="padding: 0 0 6 0">[<?php echo $data[$key]['TPL'] ?>] template</td></tr>
-                        <tr><td class="chart1">Bandwidth: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
+                        <tr><td class="counter-name" style="padding: 2px 0 0 2px;"><?php echo $data[$key]['IP'] ?></td>
+                        <tr><td class="counter-name" style="padding: 0 0 8px 2px">[<?php echo $data[$key]['TPL'] ?>] template</td></tr>
+                        <tr><td class="chart1" style="padding: 0 0 0 2px">Bandwidth: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
                             <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
-                        <tr><td class="chart1">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
+                        <tr><td class="chart1" style="padding: 0 0 0 2px">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
                             <div style="width:160px; height:6px; font-size:0;background-color:#B3CED5;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#629FBB; border-right:1px #629FBB solid;"></div></div></td></tr>
                     </table>
                 </td>
@@ -66,7 +127,7 @@ foreach ($data as $key => $value) {
                         <tr><td class="counter-name" width="40%">SSL Support:</td><td class="counter-value"><?php echo $data[$key]['SSL'] ?></td></tr>
                         <tr><td class="counter-name">SSL Home:</td><td class="counter-value"><?php echo $ssl_home ?></td></tr>
                         <tr><td class="counter-name">Nginx Template:</td><td class="counter-value"><?php echo $data[$key]['NGINX'] ?></td></tr>
-                        <tr><td colspan="2" class="counter-name">Nginx Extentions: <a class="nginx-ext" style="padding: 0 12 0 12"><?php echo str_replace(',', ', ', $data[$key]['NGINX_EXT']) ?></td></tr>
+                        <tr><td class="counter-name">Nginx Extentions:</td><td class="counter-value"><?php echo $nginx_ext ?></td></tr>
                     </table>
                 </td>
             </tr>

+ 40 - 37
web/templates/header.html

@@ -33,7 +33,7 @@ if (!empty($_SESSION['look'])) {
         margin-left: auto;
         margin-right: auto;
         width: 990px;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 10pt;
         text-align: right;
         line-height: 1.4em;
@@ -74,7 +74,7 @@ if (!empty($_SESSION['look'])) {
         margin-left: auto;
         margin-right: auto;
         width: 990px;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 8pt;
         text-align: center;
         vertical-align:top;
@@ -136,7 +136,7 @@ if (!empty($_SESSION['look'])) {
         padding: 20px 0 2px 15px;
         line-height: 1.0em;
         font-size: 9pt;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         color: #2d2d2d;
         background: url(/images/transparent-image.png) no-repeat;
     }
@@ -151,7 +151,7 @@ if (!empty($_SESSION['look'])) {
     }
 
     .nav-link {
-        font-size: 16pt;
+        font-size: 17pt;
         color: #484243;
         font-family: 'Trebuchet MS';
         text-decoration: none;
@@ -168,7 +168,7 @@ if (!empty($_SESSION['look'])) {
     }
 
     .nav-slink {
-        font-size: 16pt;
+        font-size: 17pt;
         color: #8b99a2;
         font-family: 'Trebuchet MS';
         text-decoration: none;
@@ -178,7 +178,7 @@ if (!empty($_SESSION['look'])) {
         margin-left: auto;
         margin-right: auto;
         width: 990px;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 10pt;
         text-align: left;
         vertical-align:top;
@@ -188,7 +188,7 @@ if (!empty($_SESSION['look'])) {
     .add {
         padding: 0 8px 0 3px;
         margin: 0;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         text-decoration: none;
         color: #34536A;
         font-size: 12pt;
@@ -205,7 +205,7 @@ if (!empty($_SESSION['look'])) {
     .counters {
         line-height: 1.4em;
         font-size: 9pt;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         color: #2d2d2d;
         padding: 6px 0 0 0;
         margin: 0;
@@ -214,7 +214,7 @@ if (!empty($_SESSION['look'])) {
 
     .hostname {
         font-size: 8pt;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         text-align: left;
         padding: 0 5;
         color: #cccccc;
@@ -227,7 +227,7 @@ if (!empty($_SESSION['look'])) {
         width: 990px;
 
         color: #e5a907;
-        font-family: Georgia, serif;
+        font-family: Arial, serif;
         font-size: 12pt;
         text-align: left;
         vertical-align:top;
@@ -285,7 +285,7 @@ if (!empty($_SESSION['look'])) {
 
     .data-active {
         font-size: 8pt;
-        font-family: Georgia;
+        font-family: Arial;
         letter-spacing: 0.1em;
         color: #80C376;
         padding: 0 0 13 18;
@@ -293,7 +293,7 @@ if (!empty($_SESSION['look'])) {
 
     .data-suspended {
         font-size: 8pt;
-        font-family: Georgia;
+        font-family: Arial;
         letter-spacing: 0.1em;
         color: #de6c5d;
         padding: 0 0 13 18;
@@ -302,7 +302,7 @@ if (!empty($_SESSION['look'])) {
     .data-controls {
         border-left: 1px solid #E6E6E6;
         font-size: 8pt;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         padding: 2 5 0 5;
         letter-spacing: 0.1em;
     }
@@ -335,46 +335,50 @@ if (!empty($_SESSION['look'])) {
         background: #EBE9DC;
         color: #c69c6d;
         font-size:18 pt;
-        font-family: Georgia;
+        font-family: Arial;
         margin: 22px 0 0 0;
         padding: 0 12px 0 163px;
     }
 
     .chart1 {
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 10pt;
     }
 
     .chart2 {
         color: #484243;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 8pt;
     }
 
     .username {
-        font-family: Arial, Helvetica, sans-serif;
+        color: #555555;
+        font-family: Arial, sans-serif;
         font-size: 16pt;
         line-height: 0.8em;
     }
 
     .domain {
-        font-family: Arial, Helvetica, sans-serif;
+        color: #555555;
+        font-family: Arial, sans-serif;
         font-size: 16pt;
         line-height: 0.8em;
     }
 
     .cron {
-        font-family: Arial, Helvetica, sans-serif;
+        color: #555555;
+        font-family: Arial, sans-serif;
         font-size: 14pt;
     }
 
     .log {
-        font-family: Arial, Helvetica, sans-serif;
+        color: #555555;
+        font-family: Arial, sans-serif;
         font-size: 12pt;
     }
 
     .aliases {
-        font-family: Georgia;
+        font-family: Arial;
         font-size: 12pt;
         color: #5c4d45;
         padding: 0 0 0 8px;
@@ -383,13 +387,12 @@ if (!empty($_SESSION['look'])) {
     .nginx-ext {
         color: black;
         vertical-align:top;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 10pt;
-        line-height: 1.2em;
     }
 
     .fullname {
-        font-family: Georgia;
+        font-family: Arial;
         font-size: 14pt;
         color: #5c4d45;
         padding: 0 0 0 8px;
@@ -398,7 +401,7 @@ if (!empty($_SESSION['look'])) {
     .counter-name {
         vertical-align:top;
         line-height: 1.2em;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 10pt;
         color: #484243;
     }
@@ -406,7 +409,7 @@ if (!empty($_SESSION['look'])) {
     .cron-counter-name {
         vertical-align:top;
         line-height: 0.8em;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 8pt;
         padding: 4 0 0 0;
         color: #484243;
@@ -415,14 +418,14 @@ if (!empty($_SESSION['look'])) {
     .counter-value {
         vertical-align:top;
         line-height: 1.2em;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 10pt;
         color: black;
     }
 
     .log-counter-value {
         vertical-align:top;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 12pt;
         color: #484243;
     }
@@ -430,34 +433,34 @@ if (!empty($_SESSION['look'])) {
     .cron-counter-value {
         vertical-align:top;
         line-height: 1.2em;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 12pt;
         color: #484243;
     }
 
     .add-name {
-        font-family: Georgia;
+        font-family: Arial;
         font-size: 14pt;
         color: #5c4d45;
         padding: 0 0 0 28px;
     }
 
     .add-ok {
-        font-family: Georgia;
+        font-family: Arial;
         font-size: 14pt;
         color: #80C376;
         padding: 0 0 0 6px;
     }
 
     .add-error {
-        font-family: Georgia;
+        font-family: Arial;
         font-size: 14pt;
         color: #de6c5d;
         padding: 0 0 0 6px;
     }
 
     .add-text {
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         font-size: 12pt;
     }
 
@@ -467,7 +470,7 @@ if (!empty($_SESSION['look'])) {
         padding: 4px;
         font-size: 12pt;
         color: #555;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
     }
 
     .add-input {
@@ -475,7 +478,7 @@ if (!empty($_SESSION['look'])) {
         padding: 4px;
         font-size: 14pt;
         color: #555;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
     }
 
     .add-list {
@@ -498,7 +501,7 @@ if (!empty($_SESSION['look'])) {
     .genpass {
         color: #34536A;
         font-size: 8pt;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         padding: 0 5px 0 8px;
         letter-spacing: 0.1em;
         text-decoration: underline;
@@ -511,7 +514,7 @@ if (!empty($_SESSION['look'])) {
     .add-advanced {
         color: #34536A;
         font-size: 10pt;
-        font-family: Arial, Helvetica, sans-serif;
+        font-family: Arial, sans-serif;
         letter-spacing: 0.1em;
     }