Просмотр исходного кода

added backup/cron/db/ip/package bulk operations

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

+ 23 - 0
web/bulk/backup/index.php

@@ -0,0 +1,23 @@
+<?php
+// Init
+error_reporting(NULL);
+ob_start();
+session_start();
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+$backup = $_POST['backup'];
+$action = $_POST['action'];
+
+switch ($action) {
+    case 'delete': $cmd='v_delete_user_backup';
+        break;
+    default: header("Location: /list/backup/"); exit;
+}
+
+foreach ($backup as $value) {
+    $value = escapeshellarg($value);
+    exec (VESTA_CMD.$cmd." ".$user." ".$value, $output, $return_var);
+}
+
+header("Location: /list/backup/");

+ 40 - 0
web/bulk/cron/index.php

@@ -0,0 +1,40 @@
+<?php
+// Init
+error_reporting(NULL);
+ob_start();
+session_start();
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+$job = $_POST['job'];
+$action = $_POST['action'];
+
+if ($_SESSION['user'] == 'admin') {
+    switch ($action) {
+        case 'delete': $cmd='v_delete_cron_job';
+            break;
+        case 'suspend': $cmd='v_suspend_cron_job';
+            break;
+        case 'unsuspend': $cmd='v_unsuspend_cron_job';
+            break;
+        default: header("Location: /list/cron/"); exit;
+    }
+} else {
+    switch ($action) {
+        case 'delete': $cmd='v_delete_cron_job';
+            break;
+        default: header("Location: /list/cron/"); exit;
+    }
+}
+
+foreach ($job as $value) {
+    $value = escapeshellarg($value);
+    exec (VESTA_CMD.$cmd." ".$user." ".$value." no", $output, $return_var);
+    $restart = 'yes';
+}
+
+if (!empty($restart)) {
+    exec (VESTA_CMD."v_restart_cron", $output, $return_var);
+}
+
+header("Location: /list/cron/");

+ 35 - 0
web/bulk/db/index.php

@@ -0,0 +1,35 @@
+<?php
+// Init
+error_reporting(NULL);
+ob_start();
+session_start();
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+$database = $_POST['database'];
+$action = $_POST['action'];
+
+if ($_SESSION['user'] == 'admin') {
+    switch ($action) {
+        case 'delete': $cmd='v_delete_database';
+            break;
+        case 'suspend': $cmd='v_suspend_database';
+            break;
+        case 'unsuspend': $cmd='v_unsuspend_database';
+            break;
+        default: header("Location: /list/db/"); exit;
+    }
+} else {
+    switch ($action) {
+        case 'delete': $cmd='v_delete_database';
+            break;
+        default: header("Location: /list/db/"); exit;
+    }
+}
+
+foreach ($database as $value) {
+    $value = escapeshellarg($value);
+    exec (VESTA_CMD.$cmd." ".$user." ".$value, $output, $return_var);
+}
+
+header("Location: /list/db/");

+ 29 - 0
web/bulk/ip/index.php

@@ -0,0 +1,29 @@
+<?php
+// Init
+error_reporting(NULL);
+ob_start();
+session_start();
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+$ip = $_POST['ip'];
+$action = $_POST['action'];
+
+if ($_SESSION['user'] == 'admin') {
+    switch ($action) {
+        case 'delete': $cmd='v_delete_sys_ip';
+            break;
+        default: header("Location: /list/ip/"); exit;
+    }
+} else {
+    header("Location: /list/ip/");
+    exit;
+}
+
+foreach ($ip as $value) {
+    $value = escapeshellarg($value);
+    exec (VESTA_CMD.$cmd." ".$value, $output, $return_var);
+}
+
+
+header("Location: /list/ip/");

+ 2 - 2
web/bulk/mail/index.php

@@ -53,7 +53,7 @@ if (empty($account)) {
     foreach ($domain as $value) {
         // Mail
         $value = escapeshellarg($value);
-        exec (VESTA_CMD.$cmd." ".$user." ".$value." no", $output, $return_var);
+        exec (VESTA_CMD.$cmd." ".$user." ".$value, $output, $return_var);
         $restart = 'yes';
     }
 } else {
@@ -61,7 +61,7 @@ if (empty($account)) {
         // Mail Account
         $value = escapeshellarg($value);
         $dom = escapeshellarg($domain);
-        exec (VESTA_CMD.$cmd." ".$user." ".$dom." ".$value." no", $output, $return_var);
+        exec (VESTA_CMD.$cmd." ".$user." ".$dom." ".$value, $output, $return_var);
         $restart = 'yes';
     }
 }

+ 30 - 0
web/bulk/package/index.php

@@ -0,0 +1,30 @@
+<?php
+// Init
+error_reporting(NULL);
+ob_start();
+session_start();
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+$package = $_POST['package'];
+$action = $_POST['action'];
+
+if ($_SESSION['user'] == 'admin') {
+    switch ($action) {
+        case 'delete': $cmd='v_delete_user_package';
+            break;
+        default: header("Location: /list/package/"); exit;
+    }
+} else {
+    header("Location: /list/package/");
+    exit;
+}
+
+foreach ($package as $value) {
+    $value = escapeshellarg($value);
+    exec (VESTA_CMD.$cmd." ".$value, $output, $return_var);
+    $restart = 'yes';
+}
+
+
+header("Location: /list/package/");

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

@@ -1,25 +1,24 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" > Create Backup </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/backup/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
-                                                    <option>suspend</option>
-                                                    <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -28,7 +27,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class="data">
 
                             <?php
@@ -88,7 +87,7 @@
                             <tr class="data-row">
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-active"><b>active</b></td></tr>
                                     </table>
@@ -219,6 +218,7 @@
                             ?> 
     
                         </table>
+                        </form>
 
                         <table class="data-count">
                             <tr>
@@ -234,5 +234,5 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>
 

+ 13 - 11
web/templates/admin/list_cron.html

@@ -1,24 +1,25 @@
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/cron/'"> Add Cron Job </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/cron/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
                                                     <option>suspend</option>
                                                     <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -27,7 +28,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
 
                             <?php
@@ -83,7 +84,7 @@
                                 </script>
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="job[]" value="<?php echo $data[$key]['JOB'] ?>" ></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
                                     </table>
@@ -196,6 +197,7 @@
                                 }
                             ?>
                         </table>
+                        </from>
 
                         <table class="data-count">
                             <tr>
@@ -211,5 +213,5 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>
 

+ 13 - 11
web/templates/admin/list_db.html

@@ -1,25 +1,26 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/db/'"> Add Database </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/db/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
                                                     <option>suspend</option>
                                                     <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -28,7 +29,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
                             <?php
                                 list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
@@ -87,7 +88,7 @@
                                 </script>
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="database[]" value="<?php echo $key ?>" ></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
                                     </table>
@@ -177,6 +178,7 @@
                                 }
                             ?>
                         </table>
+                        </form>
 
                         <table class="data-count">
                             <tr>
@@ -192,4 +194,4 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>

+ 14 - 15
web/templates/admin/list_ip.html

@@ -1,25 +1,24 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/ip/'"> Add IP </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/ip/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
-                                                    <option>suspend</option>
-                                                    <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -28,7 +27,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
 
                             <?php
@@ -61,7 +60,7 @@
                             <tr class="data-row">
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="ip[]" value="<?php echo $key ?>"></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-active"><b>active</b></td></tr>
                                     </table>
@@ -70,7 +69,7 @@
                                     <table width="830px">
                                         <tr>
                                             <td></td>
-                                            <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/ip/?ip=<?php echo "$key" ?>"> edit</a></td>
+                                            <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/ip/?ip=<?php echo $key ?>"> edit</a></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>
@@ -139,8 +138,8 @@
                             <?php
                                 }
                             ?> 
-
                         </table>
+                        </form>
 
                         <table class="data-count">
                             <tr>
@@ -156,4 +155,4 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>

+ 7 - 5
web/templates/admin/list_log.html

@@ -1,12 +1,14 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 16px">
+                                        <td style="padding: 12px 0 0 16px">
                                             <div style="float:left">
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                         </td>
                                     </tr>
@@ -15,7 +17,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
 
                             <?php
@@ -66,4 +68,4 @@
                             </td>
                         </tr>
                     </table>
-                </form>
+                </div>

+ 13 - 13
web/templates/admin/list_packages.html

@@ -1,25 +1,24 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/package/'"> Add Package </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/package/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
-                                                    <option>suspend</option>
-                                                    <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -28,7 +27,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
 
                             <?php
@@ -60,7 +59,7 @@
                                 </script>
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="package[]" value="<?php echo $key ?>"></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-active"><b>active</b></td></tr>
                                     </table>
@@ -219,6 +218,7 @@
                             }
                         ?>
                     </table>
+                    </form>
 
                     <table class="data-count">
                         <tr>
@@ -234,4 +234,4 @@
                             </td>
                         </tr>
                     </table>
-                </form>
+                </div>

+ 7 - 5
web/templates/admin/list_rrd.html

@@ -1,7 +1,7 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 16px">
+                                        <td style="padding: 12px 0 0 16px">
                                             <div style="float:left">
                                                 <a class="add" <?php if ((empty($_GET['period'])) || ($_GET['period'] == 'daily')) echo "style='color: #34536A'" ?> href="?period=daily">Daily</a>
                                                 <a class="add" <?php if ($_GET['period'] == 'weekly') echo "style='color: #34536A'" ?> href="?period=weekly">Weekly</a>
@@ -9,8 +9,10 @@
                                                 <a class="add" <?php if ($_GET['period'] == 'yearly') echo "style='color: #34536A'" ?> href="?period=yearly">Yearly</a>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                         </td>
                                     </tr>
@@ -19,7 +21,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
                             <?php
                                 if (empty($_GET['period'])) {
@@ -68,4 +70,4 @@
                             }
                         ?> 
                     </table>
-                </form>
+                </div>

+ 7 - 5
web/templates/admin/list_stats.html

@@ -1,12 +1,14 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 16px">
+                                        <td style="padding: 12px 0 0 16px">
                                             <div style="float:left">
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                         </td>
                                     </tr>
@@ -15,7 +17,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
 
                             <?php
@@ -199,5 +201,5 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>
 

+ 13 - 13
web/templates/user/list_cron.html

@@ -1,24 +1,23 @@
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/cron/'"> Add Cron Job </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/cron/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
-                                                    <option>suspend</option>
-                                                    <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -27,7 +26,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
 
                             <?php
@@ -66,7 +65,7 @@
                                 </script>
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="job[]" value="<?php echo $data[$key]['JOB'] ?>" ></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
                                     </table>
@@ -172,6 +171,7 @@
                                 }
                             ?>
                         </table>
+                        </form>
 
                         <table class="data-count">
                             <tr>
@@ -187,5 +187,5 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>
 

+ 13 - 13
web/templates/user/list_db.html

@@ -1,25 +1,24 @@
 
                                 <table class="sub-menu" style="background: white;">
                                     <tr>
-                                        <td style="padding: 12px 0 8px 6px">
+                                        <td style="padding: 12px 0 0 6px">
                                             <div style="float:left">
                                                 <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/db/'"> Add Database </button>
                                             </div>
                                             <div style="text-align: right; float: right;">
-                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
-                                                <button> Search </button>
+                                                <form action="/search/" method="get" >
+                                                <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;" name="q">
+                                                <input type="submit" name="search" value="Search" class="button" style="font-size: 12px;">
+                                                </form>
                                             </div>
                                             <div style="float:left; padding-left: 26px;">
-                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
-                                                <select style="margin:0 2px 0 0px;" >
+                                                <form action="/bulk/db/" method="post" id="objects">
+                                                <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> toggle all </a>
+                                                <select style="margin:0 2px 0 0px;" name="action">
                                                     <option>apply to selected</option>
-                                                    <option>rebuild</option>
-                                                    <option>update counters</option>
-                                                    <option>suspend</option>
-                                                    <option>unsuspend</option>
                                                     <option>delete</option>
                                                 </select>
-                                                <button style="width:27px;"> › </button>
+                                                <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px;">
                                             </div>
                                         </td>
                                     </tr>
@@ -28,7 +27,7 @@
                         </tr>
                     </table>
 
-                    <form id="vstobjects">
+                    <div id="vstobjects">
                         <table class='data'>
                             <?php
                                 list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
@@ -70,7 +69,7 @@
                                 </script>
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
-                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
+                                        <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="database[]" value="<?php echo $key ?>" ></td></tr>
                                         <tr><td><a class="data-date" title="<?php echo  $data[$key]['DATE']."  ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
                                         <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
                                     </table>
@@ -153,6 +152,7 @@
                                 }
                             ?>
                         </table>
+                        </form>
 
                         <table class="data-count">
                             <tr>
@@ -168,4 +168,4 @@
                                 </td>
                             </tr>
                         </table>
-                    </form>
+                    </div>