mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 04:50:47 -07:00
Move content of .js.html files to .html
This commit is contained in:
parent
61e556ae11
commit
1fa3c4b3fb
43 changed files with 550 additions and 507 deletions
|
@ -95,6 +95,10 @@ function check_return_code($return_var,$output) {
|
|||
}
|
||||
}
|
||||
|
||||
function insert_scripts() {
|
||||
@include_once(dirname(__DIR__) . '/templates/scripts.html');
|
||||
}
|
||||
|
||||
function render_page($user, $TAB, $page) {
|
||||
$__template_dir = dirname(__DIR__) . '/templates/';
|
||||
|
||||
|
@ -115,18 +119,14 @@ function render_page($user, $TAB, $page) {
|
|||
|
||||
// Body
|
||||
if (($_SESSION['user'] !== 'admin') && (@include($__template_dir . "user/$page.html"))) {
|
||||
// User page exists
|
||||
// Use user page
|
||||
$__template_base = $__template_dir . "user/$page";
|
||||
// User page loaded
|
||||
} else {
|
||||
// Not admin or user page doesn't exist
|
||||
// Use admin page
|
||||
$__template_base = $__template_dir . "admin/$page";
|
||||
include($__template_base . '.html');
|
||||
// Load admin page
|
||||
@include($__template_dir . "admin/$page.html");
|
||||
}
|
||||
|
||||
// Footer
|
||||
$JS_FILE = $__template_base . '.js.html';
|
||||
include($__template_dir . 'footer.html');
|
||||
}
|
||||
|
||||
|
|
|
@ -186,3 +186,26 @@
|
|||
</table>
|
||||
</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>
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<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>
|
|
@ -178,3 +178,40 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
})
|
||||
$('.add-ns').show()
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
})
|
||||
$('.add-ns').show()
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -119,3 +119,9 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
GLOBAL.DNS_REC_PREFIX = <?=json_encode($_GET['domain'])?>;
|
||||
</script>
|
||||
<script src="/js/pages/add.dns.record.js"></script>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<script>
|
||||
GLOBAL.DNS_REC_PREFIX = <?=json_encode($_GET['domain'])?>;
|
||||
</script>
|
||||
<script src="/js/pages/add.dns.record.js"></script>
|
|
@ -117,3 +117,11 @@
|
|||
</from>
|
||||
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow) {
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow) {
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
|
@ -84,3 +84,11 @@
|
|||
</table>
|
||||
</from>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow) {
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow) {
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
|
@ -145,3 +145,11 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow) {
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow) {
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
|
@ -180,3 +180,51 @@
|
|||
</table>
|
||||
</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_mail_acc.v_password.value = randomstring;
|
||||
|
||||
if($('input[name=v_password]').attr('type') == 'text')
|
||||
$('#v_password').text(randomstring);
|
||||
else
|
||||
$('#v_password').text(Array(randomstring.length+1).join('*'));
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#v_account').text($('input[name=v_account]').val());
|
||||
$('#v_password').text($('input[name=v_password]').val());
|
||||
|
||||
$('input[name=v_account]').change(function(){
|
||||
$('#v_account').text($(this).val());
|
||||
});
|
||||
|
||||
$('input[name=v_password]').change(function(){
|
||||
if($('input[name=v_password]').attr('type') == 'text')
|
||||
$('#v_password').text($(this).val());
|
||||
else
|
||||
$('#v_password').text(Array($(this).val().length+1).join('*'));
|
||||
});
|
||||
|
||||
$('.toggle-psw-visibility-icon').click(function(){
|
||||
if($('input[name=v_password]').attr('type') == 'text')
|
||||
$('#v_password').text($('input[name=v_password]').val());
|
||||
else
|
||||
$('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="/js/pages/edit.package.js"></script>
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
<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_mail_acc.v_password.value = randomstring;
|
||||
|
||||
if($('input[name=v_password]').attr('type') == 'text')
|
||||
$('#v_password').text(randomstring);
|
||||
else
|
||||
$('#v_password').text(Array(randomstring.length+1).join('*'));
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#v_account').text($('input[name=v_account]').val());
|
||||
$('#v_password').text($('input[name=v_password]').val());
|
||||
|
||||
$('input[name=v_account]').change(function(){
|
||||
$('#v_account').text($(this).val());
|
||||
});
|
||||
|
||||
$('input[name=v_password]').change(function(){
|
||||
if($('input[name=v_password]').attr('type') == 'text')
|
||||
$('#v_password').text($(this).val());
|
||||
else
|
||||
$('#v_password').text(Array($(this).val().length+1).join('*'));
|
||||
});
|
||||
|
||||
$('.toggle-psw-visibility-icon').click(function(){
|
||||
if($('input[name=v_password]').attr('type') == 'text')
|
||||
$('#v_password').text($('input[name=v_password]').val());
|
||||
else
|
||||
$('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="/js/pages/edit.package.js"></script>
|
|
@ -378,3 +378,35 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="/js/pages/add.package.js"></script>
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="/js/pages/add.package.js"></script>
|
|
@ -169,3 +169,23 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#v_email').change(function() {
|
||||
document.getElementById('v_notify').value = document.getElementById('v_email').value;
|
||||
});
|
||||
});
|
||||
|
||||
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_user.v_password.value = randomstring;
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<script>
|
||||
$(function() {
|
||||
$('#v_email').change(function() {
|
||||
document.getElementById('v_notify').value = document.getElementById('v_email').value;
|
||||
});
|
||||
});
|
||||
|
||||
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_user.v_password.value = randomstring;
|
||||
}
|
||||
</script>
|
|
@ -388,3 +388,50 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#v_domain').change(function() {
|
||||
var prefix = 'www.';
|
||||
document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
|
||||
});
|
||||
});
|
||||
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_add_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substr(rnum, 1);
|
||||
}
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
$(elm).removeAttr('disabled');
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user)?>;
|
||||
GLOBAL.FTP_USER_PREPATH = <?=json_encode($v_ftp_user_prepath)?>;
|
||||
</script>
|
||||
<script src="/js/pages/add.web.js"></script>
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
<script>
|
||||
$(function() {
|
||||
$('#v_domain').change(function() {
|
||||
var prefix = 'www.';
|
||||
document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
|
||||
});
|
||||
});
|
||||
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_add_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substr(rnum, 1);
|
||||
}
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
$(elm).removeAttr('disabled');
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user)?>;
|
||||
GLOBAL.FTP_USER_PREPATH = <?=json_encode($v_ftp_user_prepath)?>;
|
||||
</script>
|
||||
<script src="/js/pages/add.web.js"></script>
|
|
@ -124,3 +124,26 @@
|
|||
</table>
|
||||
</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_edit_db.v_password.value = randomstring;
|
||||
}
|
||||
|
||||
GLOBAL.DB_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
GLOBAL.DB_DBNAME_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.db.js"></script>
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<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_edit_db.v_password.value = randomstring;
|
||||
}
|
||||
|
||||
GLOBAL.DB_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
GLOBAL.DB_DBNAME_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.db.js"></script>
|
|
@ -119,3 +119,11 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
|
@ -142,3 +142,11 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
|
@ -141,3 +141,23 @@
|
|||
</table>
|
||||
</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_edit_mail_acc.v_password.value = randomstring;
|
||||
}
|
||||
</script>
|
||||
<script src="/js/pages/edit.mail_acc.js"></script>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<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_edit_mail_acc.v_password.value = randomstring;
|
||||
}
|
||||
</script>
|
||||
<script src="/js/pages/edit.mail_acc.js"></script>
|
|
@ -379,3 +379,36 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script src="/js/pages/edit.package.js"></script>
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script src="/js/pages/edit.package.js"></script>
|
|
@ -767,3 +767,29 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('select[name=v_filemanager]').change(function(){
|
||||
if($(this).val() == 'yes'){
|
||||
$('.filemanager.description').show();
|
||||
} else {
|
||||
$('.filemanager.description').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name=v_sftp]').change(function(){
|
||||
if($(this).val() == 'yes'){
|
||||
$('.sftp.description').show();
|
||||
} else {
|
||||
$('.sftp.description').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<script>
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('select[name=v_filemanager]').change(function(){
|
||||
if($(this).val() == 'yes'){
|
||||
$('.filemanager.description').show();
|
||||
} else {
|
||||
$('.filemanager.description').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name=v_sftp]').change(function(){
|
||||
if($(this).val() == 'yes'){
|
||||
$('.sftp.description').show();
|
||||
} else {
|
||||
$('.sftp.description').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -251,3 +251,46 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
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_edit_user.v_password.value = randomstring;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<script>
|
||||
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_edit_user.v_password.value = randomstring;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -450,3 +450,47 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substr(rnum, 1);
|
||||
}
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
App.Actions.WEB.randomPasswordGenerated && App.Actions.WEB.randomPasswordGenerated(elm);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
var copy_elm = $(elm).clone(true);
|
||||
$(copy_elm).attr('type', 'hidden');
|
||||
$(copy_elm).removeAttr('disabled');
|
||||
$(elm).after(copy_elm);
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.web.js"></script>
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
<script>
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substr(rnum, 1);
|
||||
}
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
App.Actions.WEB.randomPasswordGenerated && App.Actions.WEB.randomPasswordGenerated(elm);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
var copy_elm = $(elm).clone(true);
|
||||
$(copy_elm).attr('type', 'hidden');
|
||||
$(copy_elm).removeAttr('disabled');
|
||||
$(elm).after(copy_elm);
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.web.js"></script>
|
|
@ -1,22 +1,17 @@
|
|||
<?php
|
||||
// Insert script elements if it isn't loaded yet
|
||||
insert_scripts();
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript" src="/js/jquery-1.7.2.min.js?1446554103"></script>
|
||||
<script type="text/javascript" src="/js/jquery.cookie.js?1446554103"></script>
|
||||
<script type="text/javascript" src="/js/jquery-ui-1.8.20.custom.min.js?1467113876"></script>
|
||||
<script type="text/javascript" src="/js/hotkeys.js?1446554103"></script>
|
||||
<script type="text/javascript" src="/js/events.js?1446554103"></script>
|
||||
<script type="text/javascript" src="/js/app.js?1446554103"></script>
|
||||
<script type="text/javascript" src="/js/templates.js?1446554103"></script>
|
||||
<script src="/js/jquery.finder.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hover_menu();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
@include($JS_FILE);
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Dialogs
|
||||
// todo: display all the dialogs?
|
||||
|
||||
if (!empty($_SESSION['look_alert'])):
|
||||
|
|
8
web/templates/scripts.html
Normal file
8
web/templates/scripts.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<script src="/js/jquery-1.7.2.min.js?1446554103"></script>
|
||||
<script src="/js/jquery.cookie.js?1446554103"></script>
|
||||
<script src="/js/jquery-ui-1.8.20.custom.min.js?1467113876"></script>
|
||||
<script src="/js/hotkeys.js?1446554103"></script>
|
||||
<script src="/js/events.js?1446554103"></script>
|
||||
<script src="/js/app.js?1446554103"></script>
|
||||
<script src="/js/templates.js?1446554103"></script>
|
||||
<script src="/js/jquery.finder.js"></script>
|
|
@ -219,3 +219,46 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
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_edit_user.v_password.value = randomstring;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<script>
|
||||
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_edit_user.v_password.value = randomstring;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $('input[name^=v_ns]').length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
$('.add-ns').show();
|
||||
});
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -379,3 +379,47 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
App.Actions.WEB.randomPasswordGenerated && App.Actions.WEB.randomPasswordGenerated(elm);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
var copy_elm = $(elm).clone(true);
|
||||
$(copy_elm).attr('type', 'hidden');
|
||||
$(copy_elm).removeAttr('disabled');
|
||||
$(elm).after(copy_elm);
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.web.js"></script>
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
<script>
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
App.Actions.WEB.randomPasswordGenerated && App.Actions.WEB.randomPasswordGenerated(elm);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
var copy_elm = $(elm).clone(true);
|
||||
$(copy_elm).attr('type', 'hidden');
|
||||
$(copy_elm).removeAttr('disabled');
|
||||
$(elm).after(copy_elm);
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.web.js"></script>
|
Loading…
Add table
Add a link
Reference in a new issue