refactoring db section: new html formating

This commit is contained in:
Serghey Rodin 2012-09-17 13:45:36 +03:00
commit e4d1350569
11 changed files with 677 additions and 492 deletions

View file

@ -67,7 +67,6 @@ top_panel($user,$TAB);
$db_types = json_decode(implode('', $output), true); $db_types = json_decode(implode('', $output), true);
unset($output); unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_add_db.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');
unset($_SESSION['error_msg']); unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']); unset($_SESSION['ok_msg']);

View file

@ -68,7 +68,6 @@ top_panel($user,$TAB);
} }
} }
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_edit_db.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_db.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_db.html');
unset($_SESSION['error_msg']); unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']); unset($_SESSION['ok_msg']);

View file

@ -13,24 +13,16 @@ top_panel($user,$TAB);
// Data // Data
if ($_SESSION['user'] == 'admin') { if ($_SESSION['user'] == 'admin') {
exec (VESTA_CMD."v_list_databases $user json", $output, $return_var); exec (VESTA_CMD."v_list_databases $user json", $output, $return_var);
check_error($return_var);
$data = json_decode(implode('', $output), true); $data = json_decode(implode('', $output), true);
$data = array_reverse($data); $data = array_reverse($data);
unset($output); unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_db.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html');
} else { } else {
exec (VESTA_CMD."v_list_databases $user json", $output, $return_var); exec (VESTA_CMD."v_list_databases $user json", $output, $return_var);
check_error($return_var);
$data = json_decode(implode('', $output), true); $data = json_decode(implode('', $output), true);
$data = array_reverse($data); $data = array_reverse($data);
unset($output); unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/menu_db.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_db.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_db.html');
} }

View file

@ -1,101 +1,167 @@
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() { <table class="sub-menu" style="background: white;">
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; <tr>
var string_length = 10; <td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Adding Database</b></a>
var randomstring = ''; <?php
for (var i=0; i<string_length; i++) { if (!empty($_SESSION['error_msg'])) {
var rnum = Math.floor(Math.random() * chars.length); echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
randomstring += chars.substring(rnum,rnum+1); } else {
} if (!empty($_SESSION['ok_msg'])) {
document.v_add_user.v_password.value = randomstring; echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
} }
</script> }
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects" name="v_add_db" method="post">
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_db.v_password.value = randomstring;
}
</script>
<table class='data'> <table class='data'>
<tr class="data-add"> <tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150"> <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1"> <table class="data-col1">
<tr><td style="padding: 18 0 4 18;"></td></tr> <tr><td style="padding: 18 0 4 18;"></td></tr>
</table> </table>
</td> </td>
<td class="data-dotted" width="830px" style="vertical-align:top;"> <td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr> <table width="830px">
<td></td> <tr>
</tr></table> <td></td>
<table class="data-col2" width="600px"> </tr>
<form method="post" name="v_add_user"> </table>
<tr><td style="padding: 10 0 0 2px; color:99a7af;" >Prefix "<?php echo $user."_"; ?>" will be automaticaly added to database name and database user</td></tr> <table class="data-col2" width="600px">
<tr><td class="add-text" style="padding: 10 0 0 2px;">Database</td></tr> <tr>
<tr><td><input type="text" size="20" class="add-input" name="v_database" <?php if (!empty($v_database)) echo "value=".$v_database; ?>></td></tr> <td style="padding: 10 0 0 2px; color:99a7af;" >
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Username</td></tr> Prefix "<?php echo $user."_"; ?>" will be automaticaly added to database name and database user
<tr><td></span><input type="text" size="20" class="add-input" name="v_dbuser" <?php if (!empty($v_dbuser)) echo "value=".$v_dbuser; ?>></tr> </td>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr> </tr>
<tr><td><input type="text" size="20" class="add-input" name="v_password"></td></tr> <tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Type</td></tr> <td class="add-text" style="padding: 10 0 0 2px;">
<tr><td><select class="add-list" name="v_type"> Database
<?php </td>
foreach ($db_types as $key => $value) { </tr>
echo "\t\t\t\t<option value=\"".$value."\""; <tr>
if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected'; <td>
echo ">".$value."</option>\n"; <input type="text" size="20" class="add-input" name="v_database" <?php if (!empty($v_database)) echo "value=".$v_database; ?>>
} </td>
?> </tr>
</select></td></tr> <tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Charset</td></tr> <td class="add-text" style="padding: 10px 0 0 2px;">
<tr><td><select class="add-list" name="v_charset"> Username
<option value=big5 <?php if ((!empty($v_charset)) && ( $v_charset == 'big5')) echo 'selected';?> >big5</option> </td>
<option value=dec8 <?php if ((!empty($v_charset)) && ( $v_charset == 'dec8')) echo 'selected';?> >dec8</option> </tr>
<option value=cp850 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp850')) echo 'selected';?> >cp850</option> <tr>
<option value=hp8 <?php if ((!empty($v_charset)) && ( $v_charset == 'hp8')) echo 'selected';?> >hp8</option> <td>
<option value=koi8r <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8r')) echo 'selected';?> >koi8r</option> <input type="text" size="20" class="add-input" name="v_dbuser" <?php if (!empty($v_dbuser)) echo "value=".$v_dbuser; ?>>
<option value=latin1 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin1')) echo 'selected';?> >latin1</option> </td>
<option value=latin2 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin2')) echo 'selected';?> >latin2</option> </tr>
<option value=swe7 <?php if ((!empty($v_charset)) && ( $v_charset == 'swe7')) echo 'selected';?> >swe7</option> <tr>
<option value=ascii <?php if ((!empty($v_charset)) && ( $v_charset == 'ascii')) echo 'selected';?> >ascii</option> <td class="add-text" style="padding: 10px 0 0 2px;">
<option value=ujis <?php if ((!empty($v_charset)) && ( $v_charset == 'ujis')) echo 'selected';?> >ujis</option> Password <a href="javascript:randomString();" class="genpass">generate</a>
<option value=sjis <?php if ((!empty($v_charset)) && ( $v_charset == 'sjis')) echo 'selected';?> >sjis</option> </td>
<option value=hebrew <?php if ((!empty($v_charset)) && ( $v_charset == 'hebrew')) echo 'selected';?> >hebrew</option> </tr>
<option value=tis620 <?php if ((!empty($v_charset)) && ( $v_charset == 'tis620')) echo 'selected';?> >tis620</option> <tr>
<option value=euckr <?php if ((!empty($v_charset)) && ( $v_charset == 'euckr')) echo 'selected';?> >euckr</option> <td>
<option value=koi8u <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8u')) echo 'selected';?> >koi8u</option> <input type="text" size="20" class="add-input" name="v_password">
<option value=gb2312 <?php if ((!empty($v_charset)) && ( $v_charset == 'gb2312')) echo 'selected';?> >gb2312</option> </td>
<option value=greek <?php if ((!empty($v_charset)) && ( $v_charset == 'greek')) echo 'selected';?> >greek</option> </tr>
<option value=cp1250 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1250')) echo 'selected';?> >cp1250</option> <tr>
<option value=gbk <?php if ((!empty($v_charset)) && ( $v_charset == 'gbk')) echo 'selected';?> >gbk</option> <td class="add-text" style="padding: 10 0 0 2px;">
<option value=latin5 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin5')) echo 'selected';?> >latin5</option> Type
<option value=armscii8 <?php if ((!empty($v_charset)) && ( $v_charset == 'armscii8')) echo 'selected';?> >armscii8</option> </td>
<option value=utf8 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8')) echo 'selected';?> <?php if (empty($v_charset)) echo 'selected';?> >utf8</option> </tr>
<option value=ucs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'ucs2')) echo 'selected';?> >ucs2</option> <tr>
<option value=cp866 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp866')) echo 'selected';?> >cp866</option> <td>
<option value=keybcs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'keybcs2')) echo 'selected';?> >keybcs2</option> <select class="add-list" name="v_type">
<option value=macce <?php if ((!empty($v_charset)) && ( $v_charset == 'macce')) echo 'selected';?> >macce</option> <?php
<option value=macroman <?php if ((!empty($v_charset)) && ( $v_charset == 'macroman')) echo 'selected';?> >macroman</option> foreach ($db_types as $key => $value) {
<option value=cp852 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp852')) echo 'selected';?> >cp852</option> echo "\t\t\t\t<option value=\"".$value."\"";
<option value=latin7 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin7')) echo 'selected';?> >latin7</option> if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected';
<option value=cp1251 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1251')) echo 'selected';?> >cp1251</option> echo ">".$value."</option>\n";
<option value=cp1256 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1256')) echo 'selected';?> >cp1256</option> }
<option value=cp1257 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1257')) echo 'selected';?> >cp1257</option> ?>
<option value=binary <?php if ((!empty($v_charset)) && ( $v_charset == 'binary')) echo 'selected';?> >binary</option> </select>
<option value=geostd8 <?php if ((!empty($v_charset)) && ( $v_charset == 'geostd8')) echo 'selected';?> >geostd8</option> </td>
<option value=cp932 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp932')) echo 'selected';?> >cp932</option> </tr>
<option value=eucjpms <?php if ((!empty($v_charset)) && ( $v_charset == 'eucjpms')) echo 'selected';?> >eucjpms</option> <tr>
</td></tr> <td class="add-text" style="padding: 10 0 0 2px;">
Charset
<tr><td style="padding: 24px 0 0 0;"> </td>
<input type="submit" name="ok" value="OK" class="add-button"></form> </tr>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/db/'"> <tr>
</td></tr> <td>
</table> <select class="add-list" name="v_charset">
</td> <option value=big5 <?php if ((!empty($v_charset)) && ( $v_charset == 'big5')) echo 'selected';?> >big5</option>
</tr> <option value=dec8 <?php if ((!empty($v_charset)) && ( $v_charset == 'dec8')) echo 'selected';?> >dec8</option>
</table> <option value=cp850 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp850')) echo 'selected';?> >cp850</option>
<option value=hp8 <?php if ((!empty($v_charset)) && ( $v_charset == 'hp8')) echo 'selected';?> >hp8</option>
<option value=koi8r <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8r')) echo 'selected';?> >koi8r</option>
<option value=latin1 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin1')) echo 'selected';?> >latin1</option>
<option value=latin2 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin2')) echo 'selected';?> >latin2</option>
<option value=swe7 <?php if ((!empty($v_charset)) && ( $v_charset == 'swe7')) echo 'selected';?> >swe7</option>
<option value=ascii <?php if ((!empty($v_charset)) && ( $v_charset == 'ascii')) echo 'selected';?> >ascii</option>
<option value=ujis <?php if ((!empty($v_charset)) && ( $v_charset == 'ujis')) echo 'selected';?> >ujis</option>
<option value=sjis <?php if ((!empty($v_charset)) && ( $v_charset == 'sjis')) echo 'selected';?> >sjis</option>
<option value=hebrew <?php if ((!empty($v_charset)) && ( $v_charset == 'hebrew')) echo 'selected';?> >hebrew</option>
<option value=tis620 <?php if ((!empty($v_charset)) && ( $v_charset == 'tis620')) echo 'selected';?> >tis620</option>
<option value=euckr <?php if ((!empty($v_charset)) && ( $v_charset == 'euckr')) echo 'selected';?> >euckr</option>
<option value=koi8u <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8u')) echo 'selected';?> >koi8u</option>
<option value=gb2312 <?php if ((!empty($v_charset)) && ( $v_charset == 'gb2312')) echo 'selected';?> >gb2312</option>
<option value=greek <?php if ((!empty($v_charset)) && ( $v_charset == 'greek')) echo 'selected';?> >greek</option>
<option value=cp1250 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1250')) echo 'selected';?> >cp1250</option>
<option value=gbk <?php if ((!empty($v_charset)) && ( $v_charset == 'gbk')) echo 'selected';?> >gbk</option>
<option value=latin5 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin5')) echo 'selected';?> >latin5</option>
<option value=armscii8 <?php if ((!empty($v_charset)) && ( $v_charset == 'armscii8')) echo 'selected';?> >armscii8</option>
<option value=utf8 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8')) echo 'selected';?> <?php if (empty($v_charset)) echo 'selected';?> >utf8</option>
<option value=ucs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'ucs2')) echo 'selected';?> >ucs2</option>
<option value=cp866 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp866')) echo 'selected';?> >cp866</option>
<option value=keybcs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'keybcs2')) echo 'selected';?> >keybcs2</option>
<option value=macce <?php if ((!empty($v_charset)) && ( $v_charset == 'macce')) echo 'selected';?> >macce</option>
<option value=macroman <?php if ((!empty($v_charset)) && ( $v_charset == 'macroman')) echo 'selected';?> >macroman</option>
<option value=cp852 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp852')) echo 'selected';?> >cp852</option>
<option value=latin7 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin7')) echo 'selected';?> >latin7</option>
<option value=cp1251 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1251')) echo 'selected';?> >cp1251</option>
<option value=cp1256 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1256')) echo 'selected';?> >cp1256</option>
<option value=cp1257 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1257')) echo 'selected';?> >cp1257</option>
<option value=binary <?php if ((!empty($v_charset)) && ( $v_charset == 'binary')) echo 'selected';?> >binary</option>
<option value=geostd8 <?php if ((!empty($v_charset)) && ( $v_charset == 'geostd8')) echo 'selected';?> >geostd8</option>
<option value=cp932 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp932')) echo 'selected';?> >cp932</option>
<option value=eucjpms <?php if ((!empty($v_charset)) && ( $v_charset == 'eucjpms')) echo 'selected';?> >eucjpms</option>
</select>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="ok" value="OK" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/db/'">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View file

@ -1,58 +1,129 @@
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() { <table class="sub-menu" style="background: white;">
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; <tr>
var string_length = 10; <td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Editing Database</b></a>
var randomstring = ''; <?php
for (var i=0; i<string_length; i++) { if (!empty($_SESSION['error_msg'])) {
var rnum = Math.floor(Math.random() * chars.length); echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
randomstring += chars.substring(rnum,rnum+1); } else {
} if (!empty($_SESSION['ok_msg'])) {
document.v_add_user.v_password.value = randomstring; echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
} }
</script> }
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects" name="v_edit_db" method="post">
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_edit_db.v_password.value = randomstring;
}
</script>
<table class='data'> <table class='data'>
<tr class="data-add"> <tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150"> <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1"> <table class="data-col1">
<tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr> <tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr>
<tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr> <tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr>
<tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr> <tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
</table> </table>
</td> </td>
<td class="data-dotted" width="830px" style="vertical-align:top;"> <td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr> <table width="830px">
<td></td> <tr>
</tr></table> <td></td>
<table class="data-col2" width="600px"> </tr>
<form method="post" name="v_add_user"> </table>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Database</td></tr> <table class="data-col2" width="600px">
<tr><td><input type="text" size="20" class="add-input" name="v_database" <?php if (!empty($v_database)) echo "value=".$v_database; ?> disabled></td></tr> <tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Username</td></tr> <td class="add-text" style="padding: 10 0 0 2px;">
<tr><td></span><input type="text" size="20" class="add-input" name="v_dbuser" <?php if (!empty($v_dbuser)) echo "value=".$v_dbuser; ?> disabled></tr> Database
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr> </td>
<tr><td><input type="text" size="20" class="add-input" name="v_password" <?php if (!empty($v_password)) echo "value=".$v_password; ?>></td></tr> </tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Type</td></tr> <tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_type" <?php if (!empty($v_type)) echo "value=".$v_type; ?> disabled></tr> <td>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Host</td></tr> <input type="text" size="20" class="add-input" name="v_database" <?php if (!empty($v_database)) echo "value=".$v_database; ?> disabled>
<tr><td></span><input type="text" size="20" class="add-input" name="v_host" <?php if (!empty($v_host)) echo "value=".$v_host; ?> disabled></tr> </td>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Charset</td></tr> </tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_charset" <?php if (!empty($v_charset)) echo "value=".$v_charset; ?> disabled></tr> <tr>
<tr><td style="padding: 24px 0 0 0;"> <td class="add-text" style="padding: 10px 0 0 2px;">
<input type="submit" name="save" value="Save" class="add-button"></form> Username
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/db/'"> </td>
</td></tr> </tr>
</table> <tr>
</td> <td>
</tr> <input type="text" size="20" class="add-input" name="v_dbuser" <?php if (!empty($v_dbuser)) echo "value=".$v_dbuser; ?> disabled>
</table> </td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
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; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Type
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_type" <?php if (!empty($v_type)) echo "value=".$v_type; ?> disabled>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Host
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_host" <?php if (!empty($v_host)) echo "value=".$v_host; ?> disabled>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Charset
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_charset" <?php if (!empty($v_charset)) echo "value=".$v_charset; ?> disabled>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="save" value="Save" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/db/'">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View file

@ -1,138 +1,201 @@
<table class='data'>
<?php <table class="sub-menu" style="background: white;">
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]); <tr>
foreach ($data as $key => $value) { <td style="padding: 12px 0 8px 6px">
++$i; <div style="float:left">
if ($data[$key]['SUSPENDED'] == 'yes') { <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/db/'"> Add Database </button>
$status = 'suspended'; </div>
$spnd_action = 'unsuspend' ; <div style="text-align: right; float: right;">
} else { <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
$status = 'active'; <button> Search </button>
$spnd_action = 'suspend' ; </div>
} <div style="float:left; padding-left: 26px;">
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin"; <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/"; <select style="margin:0 2px 0 0px;" >
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin"; <option>apply to selected</option>
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/"; <option>rebuild</option>
?> <option>update counters</option>
<option>suspend</option>
<option>unsuspend</option>
<tr class="data-row"> <option>delete</option>
<script type="text/javascript"> </select>
$(function(){ <button style="width:27px;"> </button>
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({ </div>
modal: true, </td>
autoOpen: false, </tr>
width: 360, </table>
buttons: { </td>
"Ok": function(event, ui) { </tr>
location.href = '/<?php echo $spnd_action ?>/db/?database=<?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/db/?database=<?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>
<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><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>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
<td class="data-controls" width="126px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo $db_admin_link; ?>" target="_blank"> open <?php echo $db_admin ?> </a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/db/?database=<?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 "$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 ?> <b><?php echo "$key" ?></b> database?</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 <b><?php echo "$key" ?></b> database?</p>
</div>
</td>
</tr></table>
<table class="data-col2" width="830px">
<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: 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:#c7d5b3;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div></div></td></tr>
</table> </table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr><td class="counter-name">User: </td><td class="counter-value"><?php echo $data[$key]['DBUSER'] ?></td></tr>
<tr><td class="counter-name">Host: </td><td class="counter-value"><?php echo $data[$key]['HOST'] ?></td></tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr><td class="counter-name">Charset:</td><td class="counter-value"><?php echo $data[$key]['CHARSET'] ?></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<form id="vstobjects">
<table class='data'>
<?php
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/";
?>
<tr class="data-row">
<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 ?>/db/?database=<?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/db/?database=<?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>
<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><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>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="126px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo $db_admin_link; ?>" target="_blank"> open <?php echo $db_admin ?> </a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/db/?database=<?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 "$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 ?> <b><?php echo "$key" ?></b> database?</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 <b><?php echo "$key" ?></b> database?</p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<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: 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:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr>
<td class="counter-name">
User:
</td>
<td class="counter-value">
<?php echo $data[$key]['DBUSER'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Host:
</td>
<td class="counter-value">
<?php echo $data[$key]['HOST'] ?>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name">
Charset:
</td>
<td class="counter-value">
<?php echo $data[$key]['CHARSET'] ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
<?php <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
}
?> <table class="data-count">
</table> <tr>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?> <td width="160px"></td>
<table class="data-count"> <td>
<tr> <?php
<td> if ( $i == 1) {
<?php echo "1 database ";
if ( $i == 1) { } else {
echo "1 database "; echo "$i databases ";
} else { }
echo "$i databases "; ?>
} </td>
?> </tr>
</td> </table>
</tr> </form>
</table>
</form> <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Adding Database</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,41 +0,0 @@
<?php
if (!empty($_SESSION['error_msg'])) {
?>
<script type="text/javascript">
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-message" title="Error">
<p><?php echo $_SESSION['error_msg'] ?>.</p>
</div>
<?php
unset($_SESSION['error_msg']);
}
?>
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/db/'">Add Database</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>rebuild</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Editing Database</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,113 +1,194 @@
<table class='data'>
<?php <table class="sub-menu" style="background: white;">
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]); <tr>
foreach ($data as $key => $value) { <td style="padding: 12px 0 8px 6px">
++$i; <div style="float:left">
if ($data[$key]['SUSPENDED'] == 'yes') { <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/db/'"> Add Database </button>
$status = 'suspended'; </div>
$spnd_action = 'unsuspend' ; <div style="text-align: right; float: right;">
} else { <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
$status = 'active'; <button> Search </button>
$spnd_action = 'suspend' ; </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;" >
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/"; <option>apply to selected</option>
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/"; <option>rebuild</option>
?> <option>update counters</option>
<option>suspend</option>
<option>unsuspend</option>
<tr class="data-row"> <option>delete</option>
<script type="text/javascript"> </select>
$(function(){ <button style="width:27px;"> </button>
$('#delete_dialog_<?php echo "$i" ?>').dialog({ </div>
modal: true, </td>
autoOpen: false, </tr>
width: 360, </table>
buttons: { </td>
"Ok": function(event, ui) { </tr>
location.href = '/delete/db/?database=<?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>
<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><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>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
<td class="data-controls" width="120px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo $db_admin_link; ?>" target="_blank"> open web admin</a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/db/?database=<?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>
<div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> database?</p>
</div>
</td>
</tr></table>
<table class="data-col2" width="830px">
<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: 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:#c7d5b3;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div></div></td></tr>
</table> </table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr><td class="counter-name">User: </td><td class="counter-value"><?php echo $data[$key]['DBUSER'] ?></td></tr>
<tr><td class="counter-name">Host: </td><td class="counter-value"><?php echo $data[$key]['HOST'] ?></td></tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr><td class="counter-name">Charset:</td><td class="counter-value"><?php echo $data[$key]['CHARSET'] ?></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<form id="vstobjects">
<table class='data'>
<?php
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/";
?>
<tr class="data-row">
<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 ?>/db/?database=<?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/db/?database=<?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>
<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><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>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="126px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo $db_admin_link; ?>" target="_blank"> open <?php echo $db_admin ?> </a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/db/?database=<?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>
<div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> database?</p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<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: 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:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr>
<td class="counter-name">
User:
</td>
<td class="counter-value">
<?php echo $data[$key]['DBUSER'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Host:
</td>
<td class="counter-value">
<?php echo $data[$key]['HOST'] ?>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name">
Charset:
</td>
<td class="counter-value">
<?php echo $data[$key]['CHARSET'] ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
<?php <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
}
?> <table class="data-count">
</table> <tr>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?> <td width="160px"></td>
<table class="data-count"> <td>
<tr> <?php
<td> if ( $i == 1) {
<?php echo "1 database ";
if ( $i == 1) { } else {
echo "1 database "; echo "$i databases ";
} else { }
echo "$i databases "; ?>
} </td>
?> </tr>
</td> </table>
</tr> </form>
</table>
</form> <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/db/'">Add Database</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">