|
1 | | -<script type="text/javascript"> |
2 | | - function elementHideShow(elementToHideOrShow) { |
3 | | - var el = document.getElementById(elementToHideOrShow); |
4 | | - if (el.style.display == "block") { |
5 | | - el.style.display = "none"; |
6 | | - } else { |
7 | | - el.style.display = "block"; |
8 | | - } |
9 | | - } |
10 | 1 |
|
11 | | - function randomString() { |
12 | | - var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; |
13 | | - var string_length = 10; |
14 | | - var randomstring = ''; |
15 | | - for (var i=0; i<string_length; i++) { |
16 | | - var rnum = Math.floor(Math.random() * chars.length); |
17 | | - randomstring += chars.substring(rnum,rnum+1); |
18 | | - } |
19 | | - document.v_add_user.v_password.value = randomstring; |
20 | | - } |
21 | | -</script> |
| 2 | + <table class="sub-menu" style="background: white;"> |
| 3 | + <tr> |
| 4 | + <td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Editing Database</b></a> |
| 5 | + <?php |
| 6 | + if (!empty($_SESSION['error_msg'])) { |
| 7 | + echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>"; |
| 8 | + } else { |
| 9 | + if (!empty($_SESSION['ok_msg'])) { |
| 10 | + echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>"; |
| 11 | + } |
| 12 | + } |
| 13 | + ?> |
| 14 | + </td> |
| 15 | + </tr> |
| 16 | + </table> |
| 17 | + </td> |
| 18 | + </tr> |
| 19 | + </table> |
22 | 20 |
|
| 21 | + <form id="vstobjects" name="v_edit_db" method="post"> |
| 22 | + <script type="text/javascript"> |
| 23 | + function elementHideShow(elementToHideOrShow) { |
| 24 | + var el = document.getElementById(elementToHideOrShow); |
| 25 | + if (el.style.display == "block") { |
| 26 | + el.style.display = "none"; |
| 27 | + } else { |
| 28 | + el.style.display = "block"; |
| 29 | + } |
| 30 | + } |
| 31 | + function randomString() { |
| 32 | + var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; |
| 33 | + var string_length = 10; |
| 34 | + var randomstring = ''; |
| 35 | + for (var i=0; i<string_length; i++) { |
| 36 | + var rnum = Math.floor(Math.random() * chars.length); |
| 37 | + randomstring += chars.substring(rnum,rnum+1); |
| 38 | + } |
| 39 | + document.v_edit_db.v_password.value = randomstring; |
| 40 | + } |
| 41 | + </script> |
23 | 42 |
|
24 | | -<table class='data'> |
25 | | -<tr class="data-add"> |
26 | | - <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150"> |
27 | | - <table class="data-col1"> |
28 | | - <tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr> |
29 | | - <tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr> |
30 | | - <tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr> |
31 | | - </table> |
32 | | - </td> |
33 | | - <td class="data-dotted" width="830px" style="vertical-align:top;"> |
34 | | - <table width="830px"><tr> |
35 | | - <td></td> |
36 | | - </tr></table> |
37 | | - <table class="data-col2" width="600px"> |
38 | | - <form method="post" name="v_add_user"> |
39 | | - <tr><td class="add-text" style="padding: 10 0 0 2px;">Database</td></tr> |
40 | | - <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> |
41 | | - <tr><td class="add-text" style="padding: 10px 0 0 2px;">Username</td></tr> |
42 | | - <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> |
43 | | - <tr><td class="add-text" style="padding: 10px 0 0 2px;">Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr> |
44 | | - <tr><td><input type="text" size="20" class="add-input" name="v_password" <?php if (!empty($v_password)) echo "value=".$v_password; ?>></td></tr> |
45 | | - <tr><td class="add-text" style="padding: 10 0 0 2px;">Type</td></tr> |
46 | | - <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> |
47 | | - <tr><td class="add-text" style="padding: 10 0 0 2px;">Host</td></tr> |
48 | | - <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> |
49 | | - <tr><td class="add-text" style="padding: 10 0 0 2px;">Charset</td></tr> |
50 | | - <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> |
51 | | - <tr><td style="padding: 24px 0 0 0;"> |
52 | | - <input type="submit" name="save" value="Save" class="add-button"></form> |
53 | | - <input type="button" class="add-button" value="Cancel" onClick="location.href='/list/db/'"> |
54 | | - </td></tr> |
55 | | - </table> |
56 | | - </td> |
57 | | -</tr> |
58 | | -</table> |
| 43 | + <table class='data'> |
| 44 | + <tr class="data-add"> |
| 45 | + <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150"> |
| 46 | + <table class="data-col1"> |
| 47 | + <tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr> |
| 48 | + <tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr> |
| 49 | + <tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr> |
| 50 | + </table> |
| 51 | + </td> |
| 52 | + <td class="data-dotted" width="830px" style="vertical-align:top;"> |
| 53 | + <table width="830px"> |
| 54 | + <tr> |
| 55 | + <td></td> |
| 56 | + </tr> |
| 57 | + </table> |
| 58 | + <table class="data-col2" width="600px"> |
| 59 | + <tr> |
| 60 | + <td class="add-text" style="padding: 10 0 0 2px;"> |
| 61 | + Database |
| 62 | + </td> |
| 63 | + </tr> |
| 64 | + <tr> |
| 65 | + <td> |
| 66 | + <input type="text" size="20" class="add-input" name="v_database" <?php if (!empty($v_database)) echo "value=".$v_database; ?> disabled> |
| 67 | + </td> |
| 68 | + </tr> |
| 69 | + <tr> |
| 70 | + <td class="add-text" style="padding: 10px 0 0 2px;"> |
| 71 | + Username |
| 72 | + </td> |
| 73 | + </tr> |
| 74 | + <tr> |
| 75 | + <td> |
| 76 | + <input type="text" size="20" class="add-input" name="v_dbuser" <?php if (!empty($v_dbuser)) echo "value=".$v_dbuser; ?> disabled> |
| 77 | + </td> |
| 78 | + </tr> |
| 79 | + <tr> |
| 80 | + <td class="add-text" style="padding: 10px 0 0 2px;"> |
| 81 | + Password <a href="javascript:randomString();" class="genpass">generate</a> |
| 82 | + </td> |
| 83 | + </tr> |
| 84 | + <tr> |
| 85 | + <td> |
| 86 | + <input type="text" size="20" class="add-input" name="v_password" <?php if (!empty($v_password)) echo "value=".$v_password; ?>> |
| 87 | + </td> |
| 88 | + </tr> |
| 89 | + <tr> |
| 90 | + <td class="add-text" style="padding: 10 0 0 2px;"> |
| 91 | + Type |
| 92 | + </td> |
| 93 | + </tr> |
| 94 | + <tr> |
| 95 | + <td> |
| 96 | + <input type="text" size="20" class="add-input" name="v_type" <?php if (!empty($v_type)) echo "value=".$v_type; ?> disabled> |
| 97 | + </td> |
| 98 | + </tr> |
| 99 | + <tr> |
| 100 | + <td class="add-text" style="padding: 10 0 0 2px;"> |
| 101 | + Host |
| 102 | + </td> |
| 103 | + </tr> |
| 104 | + <tr> |
| 105 | + <td> |
| 106 | + <input type="text" size="20" class="add-input" name="v_host" <?php if (!empty($v_host)) echo "value=".$v_host; ?> disabled> |
| 107 | + </td> |
| 108 | + </tr> |
| 109 | + <tr> |
| 110 | + <td class="add-text" style="padding: 10 0 0 2px;"> |
| 111 | + Charset |
| 112 | + </td> |
| 113 | + </tr> |
| 114 | + <tr> |
| 115 | + <td> |
| 116 | + <input type="text" size="20" class="add-input" name="v_charset" <?php if (!empty($v_charset)) echo "value=".$v_charset; ?> disabled> |
| 117 | + </td> |
| 118 | + </tr> |
| 119 | + <tr> |
| 120 | + <td style="padding: 24px 0 0 0;"> |
| 121 | + <input type="submit" name="save" value="Save" class="button"> |
| 122 | + <input type="button" class="button" value="Cancel" onclick="location.href='/list/db/'"> |
| 123 | + </td> |
| 124 | + </tr> |
| 125 | + </table> |
| 126 | + </td> |
| 127 | + </tr> |
| 128 | + </table> |
| 129 | + </form> |
0 commit comments