mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
Multiftp support
This commit is contained in:
parent
ff9cb08425
commit
f42face68d
5 changed files with 1094 additions and 670 deletions
|
@ -42,7 +42,7 @@
|
|||
document.v_add_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom() {
|
||||
function FTPrandom(elm) {
|
||||
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
|
@ -50,7 +50,7 @@
|
|||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_add_web.v_ftp_password.value = ftprandomstring;
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
|
@ -75,7 +75,7 @@
|
|||
<td class="data-dotted">
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 24px 0 0 0;">
|
||||
<td class="vst-text step-top">
|
||||
<?php print __('Domain');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -85,7 +85,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('IP address');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -107,34 +107,24 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('DNS Support');?>
|
||||
<td class="vst-text input-label">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_dns" <?php if (empty($v_dns)) echo "checked=yes"; ?>> <?php print __('DNS Support');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_dns" <?php if (empty($v_dns)) echo "checked=yes"; ?>>
|
||||
<td class="vst-text input-label">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_mail" <?php if (empty($v_mail)) echo "checked=yes"; ?>> <?php print __('Mail Support');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Mail Support');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_mail" <?php if (empty($v_mail)) echo "checked=yes"; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="step-top vst-text" style="/*padding: 32px 0 20px 0;*/">
|
||||
<a href="javascript:elementHideShow('advtable');" class="vst-advanced"><?php print __('Advanced options');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Aliases');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -144,25 +134,20 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Proxy Support');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if ($v_proxy !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||
<td class="vst-text step-top" >
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if ($v_proxy !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');"> <?php print __('Proxy Support');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if ($v_proxy == 'off') { echo 'none';} else {echo 'block';}?>;" id="proxytable" >
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label step-left">
|
||||
<?php print __('Proxy Extentions');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpeg, jpg, png, gif, bmp, ico, svg, tif, tiff, css, js, htm, html, ttf, otf, webp, woff, txt, csv, rtf, doc, docx, xls, xlsx, ppt, pptx, odf, odp, ods, odt, pdf, psd, ai, eot, eps, ps, zip, tar, tgz, gz, rar, bz2, 7z, aac, m4a, mp3, mp4, ogg, wav, wma, 3gp, avi, flv, m4v, mkv, mov, mp4, mpeg, mpg, wmv, exe, iso, dmg, swf'; } ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -170,26 +155,21 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('SSL Support');?> /
|
||||
<td class="step-top vst-text">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if($v_ssl == 'yes' || $v_ssl == 'on') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label> /
|
||||
<a class="generate" target="_blank" href="/generate/ssl/"><?php print __('Generate CSR') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if (empty($v_ssl)) { echo 'none';} else {echo 'block';}?>;" id="ssltable">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label step-left">
|
||||
<?php print __('SSL Home Directory');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<select class="vst-list" name="v_ssl_home">
|
||||
<option value='same' <?php if ($v_ssl_home == 'same') echo "selected";?>>
|
||||
public_html
|
||||
|
@ -201,32 +181,32 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label step-left">
|
||||
<?php print __('SSL Certificate');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<textarea size="20" class="vst-textinput" name="v_ssl_crt"><?php if (!empty($v_ssl_crt)) echo $v_ssl_crt; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label step-left">
|
||||
<?php print __('SSL Key');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<textarea size="20" class="vst-textinput" name="v_ssl_key"><?php if (!empty($v_ssl_key)) echo $v_ssl_key; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label step-left">
|
||||
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<textarea size="20" class="vst-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo $v_ssl_ca; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -234,7 +214,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text step-top">
|
||||
<?php print __('Web Statistics');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -256,20 +236,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Statistics Authorization');?>
|
||||
<td class="vst-text input-label">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"> <?php print __('Statistics Authorization');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v-add-web-domain-stats-user">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Username');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -279,73 +254,104 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password; ?> id="v_password">
|
||||
<input type="text" size="20" class="vst-input password" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password; ?> id="v_password">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Additional FTP Account');?>
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp)) echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_additional_ftp_accounts(this)"> <?php print __('Additional FTP Account');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp)) echo "checked=yes" ?> onclick="javascript:elementHideShow('ftptable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" id="ftptable" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="vst-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="vst-input" name="v_ftp_email" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($v_ftp_users as $i => $ftp_user): ?>
|
||||
<?php
|
||||
$v_ftp_user = $ftp_user['v_ftp_user'];
|
||||
$v_ftp_password = $ftp_user['v_ftp_password'];
|
||||
$v_ftp_path = $ftp_user['v_ftp_path'];
|
||||
$v_ftp_email = $ftp_user['v_ftp_email'];
|
||||
$v_ftp_pre_path = $ftp_user['v_ftp_pre_path'];
|
||||
?>
|
||||
<table <?php echo (!empty($v_ftp)) ? "style='display: block'" : "style='display:none;'" ?> class="ftptable ftptable-nrm" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('FTP') ?> #<span class="ftp-user-number"><?php print $i + 1; ?></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)">(<?php print __('remove') ?>)</a>
|
||||
<input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[<?php print $i ?>][delete]" value="0" />
|
||||
<input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[<?php print $i ?>][is_new]" value="<?php print $ftp_user['is_new'] ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" <?php print $ftp_user['is_new'] != 1 ? 'disabled="disabled"' : '' ?> name="v_ftp_user[<?php print $i ?>][v_ftp_user]" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[<?php print $i ?>][v_ftp_password]" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Path');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="<?php print !empty($v_ftp_pre_path) ? $v_ftp_pre_path : '/'; ?>">
|
||||
<input type="text" class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path]" <?php if (!empty($v_ftp_path)) echo "value=".$v_ftp_path; ?>>
|
||||
<br /><span class="ftp-path-prefix"><?php print $v_ftp_pre_path ?></span><span class="ftp-path-value v-ftp-path-hint"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input" name="v_ftp_user[<?php print $i ?>][v_ftp_email]" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-top v-add-new-user step-bottom" style="display: none;">
|
||||
<a class="additional-control" onClick="App.Actions.WEB.add_ftp_user_form()"><?php print __('Add one more FTP Account');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
<td style="padding: 33px 0 0 0;" width="116px">
|
||||
<td class="step-top" width="116px">
|
||||
<input type="submit" name="ok" value="<?php print __('Add');?>" class="button">
|
||||
</td>
|
||||
<td style="padding: 33px 0 0 0;">
|
||||
<td class="step-top">
|
||||
<input type="button" class="button" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -354,7 +360,71 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div id="templates" class="hidden">
|
||||
<table class="ftptable ftptable-nrm" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('FTP') ?> #<span class="ftp-user-number"></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)">(<?php print __('remove') ?>)</a>
|
||||
<input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[%INDEX%][delete]" value="0" />
|
||||
<input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[%INDEX%][is_new]" value="1" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_ftp_user[%INDEX%][v_ftp_user]" value="">
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[%INDEX%][v_ftp_password]" value="">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Path');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="">
|
||||
<input type="text" class="vst-input v-ftp-path" name="v_ftp_user[%INDEX%][v_ftp_path]" value="">
|
||||
<br /><span class="ftp-path-prefix"><?php print $v_ftp_pre_path_new_user ?></span><span class="ftp-path-value v-ftp-path-hint"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input" name="v_ftp_user[%INDEX%][v_ftp_email]" value="">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
GLOBAL.FTP_USER_PREFIX = '<?php echo $user; ?>_';
|
||||
GLOBAL.FTP_USER_PREFIX = '<?php echo $user; ?>_';
|
||||
GLOBAL.FTP_USER_PREPATH = '<?php echo $v_ftp_user_prepath; ?>';
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
$(elm).removeAttr('disabled');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/pages/add.web.js"></script>
|
||||
|
|
|
@ -10,12 +10,15 @@
|
|||
<tr>
|
||||
<td style="padding: 20px 10px;" ><a class="name"><b><?php print __('Editing Domain');?></b></a>
|
||||
<?php
|
||||
if (!empty($_SESSION['ok_msg'])) {
|
||||
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
|
||||
}
|
||||
if (!empty($_SESSION['error_msg'])) {
|
||||
echo "<span class=\"vst-error\"> → ".$_SESSION['error_msg']."</span>";
|
||||
} else {
|
||||
if (!empty($_SESSION['ok_msg'])) {
|
||||
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
|
||||
}
|
||||
}
|
||||
if (!empty($_SESSION['flash_error_msg'])) {
|
||||
echo " / <span class=\"vst-error\"> FTP USER ".$_SESSION['flash_error_msg']."</span>";
|
||||
unset($_SESSION['flash_error_msg']);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
@ -36,7 +39,7 @@
|
|||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom() {
|
||||
function FTPrandom(elm) {
|
||||
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
|
@ -44,7 +47,8 @@
|
|||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_edit_web.v_ftp_password.value = ftprandomstring;
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
|
@ -72,7 +76,7 @@
|
|||
<td class="data-dotted">
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 24px 0 0 0;">
|
||||
<td class="vst-text step-top">
|
||||
<?php print __('Domain');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -82,7 +86,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('IP Address');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -105,7 +109,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Aliases');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -115,7 +119,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Web Template');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -136,20 +140,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Proxy Support');?>
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');"> <?php print __('Proxy Support');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Proxy Template');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -173,7 +172,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Proxy Extensions');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -186,21 +185,16 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('SSL Support');?> /
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label> /
|
||||
<a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;" id="ssltable">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Home Directory');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -218,7 +212,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Certificate');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -228,7 +222,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Key');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -238,7 +232,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -251,7 +245,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text step-top">
|
||||
<?php print __('Web Statistics');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -273,20 +267,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Statistics Authorization');?>
|
||||
<td class="vst-text input-label">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"><?php print __('Statistics Authorization');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v-add-web-domain-stats-user">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Username');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -296,80 +285,106 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password; ?> id="v_password">
|
||||
<input type="text" size="20" class="vst-input password" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password; ?> id="v_password">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Additional FTP Account');?>
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp_user)) echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_additional_ftp_accounts(this)"> <?php print __('Additional FTP Account');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('ftptable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" id="ftptable" name="v_add_domain_ftp">
|
||||
|
||||
<?php foreach ($v_ftp_users as $i => $ftp_user): ?>
|
||||
<?php
|
||||
$v_ftp_user = $ftp_user['v_ftp_user'];
|
||||
$v_ftp_password = $ftp_user['v_ftp_password'];
|
||||
$v_ftp_path = $ftp_user['v_ftp_path'];
|
||||
$v_ftp_email = $ftp_user['v_ftp_email'];
|
||||
$v_ftp_pre_path = $ftp_user['v_ftp_pre_path'];
|
||||
?>
|
||||
<table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" class="ftptable ftptable-nrm" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Username');?>
|
||||
<?php if (empty($v_ftp_user)) echo '<br><span style="font-size: 10pt; color:#777;">' . __('Prefix will be automaticaly added to username',$user."_") . '</span>' ?>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('FTP') ?> #<span class="ftp-user-number"><?php print $i + 1; ?></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)">(<?php print __('remove') ?>)</a>
|
||||
<input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[<?php print $i ?>][delete]" value="0" />
|
||||
<input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[<?php print $i ?>][is_new]" value="<?php print $ftp_user['is_new'] ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user;?>>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" <?php print $ftp_user['is_new'] != 1 ? 'disabled="disabled"' : '' ?> name="v_ftp_user[<?php print $i ?>][v_ftp_user]" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate"><?php print __('generate');?></a>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="vst-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password;?>>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[<?php print $i ?>][v_ftp_password]" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (empty($v_ftp_user)) {
|
||||
echo '';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Path');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="vst-input" name="v_ftp_email" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
<td class="step-left">
|
||||
<input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="<?php print !empty($v_ftp_pre_path) ? $v_ftp_pre_path : '/'; ?>">
|
||||
<input type="text" class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path]" <?php if (!empty($v_ftp_path)) echo "value=".($v_ftp_path[0] != '/' ? '/' : '').$v_ftp_path; ?>>
|
||||
<br /><span class="ftp-path-prefix"><?php print $v_ftp_pre_path ?></span><span class="ftp-path-value v-ftp-path-hint"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php if ($ftp_user['is_new'] == 1): ?>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input" name="v_ftp_user[<?php print $i ?>][v_ftp_email]" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="add-new-ftp-user-button" style="<?php print !empty($v_ftp_user) ? '' : 'display:none;' ?>">
|
||||
<td class="vst-text step-top v-add-new-user step-bottom">
|
||||
<a class="additional-control" onClick="App.Actions.WEB.add_ftp_user_form()"><?php print __('Add one more FTP Account');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
<td style="padding: 24px 0 0 0;" width="116px">
|
||||
<td class="step-top" width="116px">
|
||||
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
|
||||
</td>
|
||||
<td style="padding: 24px 0 0 0;">
|
||||
<td class="step-top">
|
||||
<input type="button" class="button" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -378,7 +393,74 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div id="templates" class="hidden">
|
||||
<table class="ftptable ftptable-nrm" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('FTP') ?> #<span class="ftp-user-number"></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)">(<?php print __('remove') ?>)</a>
|
||||
<input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[%INDEX%][delete]" value="0" />
|
||||
<input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[%INDEX%][is_new]" value="1" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_ftp_user[%INDEX%][v_ftp_user]" value="">
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[%INDEX%][v_ftp_password]" value="">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Path');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="">
|
||||
<input type="text" class="vst-input v-ftp-path" name="v_ftp_user[%INDEX%][v_ftp_path]" value="">
|
||||
<br /><span class="ftp-path-prefix"><?php print $v_ftp_pre_path_new_user ?></span><span class="ftp-path-value v-ftp-path-hint"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input" name="v_ftp_user[%INDEX%][v_ftp_email]" value="">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
GLOBAL.FTP_USER_PREFIX = '<?php echo $user; ?>_';
|
||||
$('#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);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/pages/edit.web.js"></script>
|
||||
|
||||
|
|
|
@ -10,12 +10,15 @@
|
|||
<tr>
|
||||
<td style="padding: 20px 10px;" ><a class="name"><b><?php print __('Editing Domain');?></b></a>
|
||||
<?php
|
||||
if (!empty($_SESSION['ok_msg'])) {
|
||||
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
|
||||
}
|
||||
if (!empty($_SESSION['error_msg'])) {
|
||||
echo "<span class=\"vst-error\"> → ".$_SESSION['error_msg']."</span>";
|
||||
} else {
|
||||
if (!empty($_SESSION['ok_msg'])) {
|
||||
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
|
||||
}
|
||||
}
|
||||
if (!empty($_SESSION['flash_error_msg'])) {
|
||||
echo "<br /><span class=\"vst-error\"> → ".$_SESSION['flash_error_msg']."</span>";
|
||||
unset($_SESSION['flash_error_msg']);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
@ -36,7 +39,7 @@
|
|||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom() {
|
||||
function FTPrandom(elm) {
|
||||
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
|
@ -44,7 +47,8 @@
|
|||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_edit_web.v_ftp_password.value = ftprandomstring;
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
|
@ -72,7 +76,7 @@
|
|||
<td class="data-dotted">
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 24px 0 0 0;">
|
||||
<td class="vst-text step-top">
|
||||
<?php print __('Domain');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -82,7 +86,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('IP Address');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -105,7 +109,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Aliases');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -115,17 +119,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Proxy Support');?>
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');"> <?php print __('Proxy Support');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
|
@ -141,21 +140,16 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('SSL Support');?> /
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes' || $v_ssl == 'on') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label> /
|
||||
<a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;" id="ssltable">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Home Directory');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -164,7 +158,7 @@
|
|||
<select class="vst-list" name="v_ssl_home">
|
||||
|
||||
<option value='same' <?php if ($v_ssl_home == 'same') echo "selected";?>>
|
||||
public_html
|
||||
public_html
|
||||
</option>
|
||||
<option value='single' <?php if ($v_ssl_home == 'single') echo "selected";?>>
|
||||
public_shtml
|
||||
|
@ -173,7 +167,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Certificate');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -183,7 +177,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Key');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -193,7 +187,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -206,7 +200,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text step-top">
|
||||
<?php print __('Web Statistics');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -228,20 +222,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Statistics Authorization');?>
|
||||
<td class="vst-text input-label">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"> <?php print __('Statistics Authorization');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="step-left">
|
||||
<table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v-add-web-domain-stats-user">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Username');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -251,7 +240,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -264,67 +253,95 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Additional FTP Account');?>
|
||||
<td class="vst-text step-top">
|
||||
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp_user)) echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_additional_ftp_accounts(this)"> <?php print __('Additional FTP Account');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('ftptable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" id="ftptable" name="v_add_domain_ftp">
|
||||
|
||||
|
||||
|
||||
<?php foreach ($v_ftp_users as $i => $ftp_user): ?>
|
||||
<?php
|
||||
$v_ftp_user = $ftp_user['v_ftp_user'];
|
||||
$v_ftp_password = $ftp_user['v_ftp_password'];
|
||||
$v_ftp_path = $ftp_user['v_ftp_path'];
|
||||
$v_ftp_email = $ftp_user['v_ftp_email'];
|
||||
$v_ftp_pre_path = $ftp_user['v_ftp_pre_path'];
|
||||
?>
|
||||
<table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" class="ftptable ftptable-nrm" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Username');?>
|
||||
<?php if (empty($v_ftp_user)) echo '<br><span style="font-size: 10pt; color:#777;">' . __('Prefix will be automaticaly added to username',$user."_") . '</span>' ?>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('FTP') ?> #<span class="ftp-user-number"><?php print $i + 1; ?></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)">(<?php print __('remove') ?>)</a>
|
||||
<input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[<?php print $i ?>][delete]" value="0" />
|
||||
<input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[<?php print $i ?>][is_new]" value="<?php print $ftp_user['is_new'] ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user;?>>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" <?php print $ftp_user['is_new'] != 1 ? 'disabled="disabled"' : '' ?> name="v_ftp_user[<?php print $i ?>][v_ftp_user]" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate"><?php print __('generate');?></a>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="vst-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password;?>>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[<?php print $i ?>][v_ftp_password]" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (empty($v_ftp_user)) {
|
||||
echo '';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text" style="padding: 12px 0 0 0;">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Path');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="vst-input" name="v_ftp_email" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
<td class="step-left">
|
||||
<input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="<?php print !empty($v_ftp_pre_path) ? $v_ftp_pre_path : '/'; ?>">
|
||||
<input type="text" class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path]" <?php if (!empty($v_ftp_path)) echo "value=".($v_ftp_path[0] != '/' ? '/' : '').$v_ftp_path; ?>>
|
||||
<br /><span class="ftp-path-prefix"><?php print $v_ftp_pre_path ?></span><span class="ftp-path-value v-ftp-path-hint"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php if ($ftp_user['is_new'] == 1): ?>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input" name="v_ftp_user[<?php print $i ?>][v_ftp_email]" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="add-new-ftp-user-button" style="<?php print !empty($v_ftp_user) ? '' : 'display:none;' ?>">
|
||||
<td class="vst-text step-top v-add-new-user step-bottom">
|
||||
<a class="additional-control" onClick="App.Actions.WEB.add_ftp_user_form()"><?php print __('Add one more FTP Account');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
<td style="padding: 24px 0 0 0;" width="116px">
|
||||
<td class="step-top" width="116px">
|
||||
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
|
||||
</td>
|
||||
<td style="padding: 24px 0 0 0;">
|
||||
<td class="step-top">
|
||||
<input type="button" class="button" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -333,7 +350,73 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div id="templates" class="hidden">
|
||||
<table class="ftptable ftptable-nrm" name="v_add_domain_ftp">
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('FTP') ?> #<span class="ftp-user-number"></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)">(<?php print __('remove') ?>)</a>
|
||||
<input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[%INDEX%][delete]" value="0" />
|
||||
<input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[%INDEX%][is_new]" value="1" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?php print __('Prefix will be automaticaly added to username',$user."_");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_ftp_user[%INDEX%][v_ftp_user]" value="">
|
||||
<small class="hint"></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print __('generate');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[%INDEX%][v_ftp_password]" value="">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Path');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="">
|
||||
<input type="text" class="vst-input v-ftp-path" name="v_ftp_user[%INDEX%][v_ftp_path]" value="">
|
||||
<br /><span class="ftp-path-prefix"><?php print $v_ftp_pre_path_new_user ?></span><span class="ftp-path-value v-ftp-path-hint"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Send FTP credentials to email');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" class="vst-input" name="v_ftp_user[%INDEX%][v_ftp_email]" value="">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
GLOBAL.FTP_USER_PREFIX = '<?php echo $user; ?>_';
|
||||
$('#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);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/pages/edit.web.js"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue