Flatta and Diman fixes

This commit is contained in:
Serghey Rodin 2016-07-06 13:53:03 +03:00
commit 3bed87ba15
98 changed files with 5260 additions and 3031 deletions

View file

@ -104,10 +104,10 @@
<td>
<select class="vst-list" name="v_host">
<?php
foreach ($db_hosts as $key => $value) {
echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($key)."\"";
if ((!empty($v_host)) && ( $key == $v_host )) echo ' selected';
echo ">".htmlentities($key)."</option>";
foreach ($db_hosts as $value) {
echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
if ((!empty($v_host)) && ( $value == $v_host )) echo ' selected';
echo ">".htmlentities($value)."</option>";
}
?>
</select>
@ -187,25 +187,7 @@
</form>
</div>
<?php insert_scripts(); ?>
<script>
function elementHideShow(elementToHideOrShow){
var el = document.getElementById(elementToHideOrShow);
el.style.display = el.style.display === 'none' ? 'block' : 'none';
}
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.substr(rnum, 1);
}
document.v_add_db.v_password.value = randomstring;
}
GLOBAL.DB_USER_PREFIX = <?=json_encode($user.'_')?>;
GLOBAL.DB_DBNAME_PREFIX = <?=json_encode($user.'_')?>;
</script>
<script src="/js/pages/add.db.js"></script>