LE template for user accounts

This commit is contained in:
Serghey Rodin 2016-11-14 15:54:32 +02:00
commit 5a5a528874

View file

@ -7,7 +7,7 @@
echo "<span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<span class=\"vst-ok\"> → ".htmlentities($_SESSION['ok_msg'])."</span>";
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
}
}
?>
@ -65,15 +65,10 @@
<td>
<select class="vst-list" name="v_ip">
<?php
foreach ($ips as $key => $value) {
$display_ip = $key;
if (!empty($value['NAT'])) $display_ip = $value['NAT'];
$skey = "'".$display_ip."'";
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($display_ip)."\"";
if ((!empty($v_ip)) && ( $display_ip == $v_ip ) || ( $skey == $v_ip )){
echo ' selected';
}
echo ">".htmlentities($display_ip)."</option>\n";
foreach ($ips as $ip => $value) {
$display_ip = htmlentities(empty($value['NAT']) ? $ip : "{$value['NAT']}");
$ip_selected = ((!empty($v_ip) && $ip == $v_ip) || $v_ip == "'{$ip}'") ? 'selected' : '';
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{$ip}\" {$ip_selected}>{$display_ip}</option>\n";
}
?>
</select>
@ -89,39 +84,20 @@
<textarea size="20" class="vst-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo htmlentities($v_aliases); ?></textarea>
</td>
</tr>
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
<tr>
<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 class="step-left">
<table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
<tr>
<td class="vst-text input-label">
<?php print __('Proxy Extensions');?>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo htmlentities($v_proxy_ext);} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
</td>
</tr>
</table>
</td>
</tr>
<?php echo ""; }?>
<tr>
<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>
<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>
</td>
</tr>
<tr>
<td class="step-left">
<table style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;" id="ssltable">
<tr>
<td class="input-label vst-text">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_letsencrypt" <?php if($v_letsencrypt == 'yes' || $v_letencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> <?php print __('Lets Encrypt Support');?></label>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('SSL Home Directory');?>
</td>
@ -142,6 +118,7 @@
<tr>
<td class="vst-text input-label">
<?php print __('SSL Certificate');?>
<span id="generate-csr"> / <a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a></span>
</td>
</tr>
<tr>
@ -169,11 +146,11 @@
<textarea size="20" class="vst-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo htmlentities($v_ssl_ca); ?></textarea>
</td>
</tr>
<?
if ($v_ssl != 'no' ) { ?>
<tr>
<td>
<table class="additional-info">
<?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
<tr>
<td>
<?=__('SUBJECT')?>:
@ -215,6 +192,7 @@
<td class="details">
<?=$v_ssl_signature?>
</td>
</tr>
<tr>
<td>
<?=__('PUB_KEY')?>:
@ -234,6 +212,7 @@
</table>
</td>
</tr>
<? } // if ssl is enabled ?>
</table>
</td>
</tr>
@ -259,12 +238,12 @@
</select>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<tr class="stats-auth" style="<? if ($v_stats == 'none') { ?>display:none<? } ?>">
<td class="vst-text input-label step-left">
<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>
<tr class="stats-auth">
<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>
@ -309,7 +288,7 @@
<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 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)">(<?=__('delete') ?>)</a>
<?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)">(<?=__('delete')?>)</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 htmlentities($ftp_user['is_new']) ?>" />
</td>
@ -345,8 +324,8 @@
<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) ? htmlentities($v_ftp_pre_path) : '/'; ?>">
<input type="hidden" class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path_prev]" <?php if (!empty($v_ftp_path)) echo "value=".($v_ftp_path[0] != '/' ? '/' : '').htmlentities($v_ftp_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] != '/' ? '/' : '').htmlentities($v_ftp_path); ?>>
<input type="hidden" class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path_prev]" <?php if (!empty($v_ftp_path)) echo "value=".($v_ftp_path[0] != '/' ? '/' : '').htmlentities($v_ftp_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] != '/' ? '/' : '').htmlentities($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>
@ -445,7 +424,6 @@
</table>
</div>
</div>
<script>
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user.'_')?>;
</script>