mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
added additional web ftp accounts
This commit is contained in:
parent
0aba6a267f
commit
7c3419b012
16 changed files with 1117 additions and 353 deletions
|
@ -18,7 +18,20 @@ top_panel($user,$TAB);
|
|||
if (empty($_POST['v_ip'])) $errors[] = 'ip';
|
||||
if ((!empty($_POST['v_ssl'])) && (empty($_POST['v_ssl_crt']))) $errors[] = 'ssl certificate';
|
||||
if ((!empty($_POST['v_ssl'])) && (empty($_POST['v_ssl_key']))) $errors[] = 'ssl key';
|
||||
if ((!empty($_POST['v_aliases'])) || (!empty($_POST['v_elog'])) || (!empty($_POST['v_ssl'])) || (!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key'])) || (!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none') || (empty($_POST['v_nginx']))) $v_adv = 'yes';
|
||||
if ((!empty($_POST['v_stats_user'])) && (empty($_POST['v_stats_password']))) $errors[] = 'stats user password';
|
||||
if ((!empty($_POST['v_ftp_user'])) && (empty($_POST['v_ftp_password']))) $errors[] = 'ftp user password';
|
||||
|
||||
if ((!empty($_POST['v_aliases'])) && ($_POST['v_aliases'] != 'www.'.$_POST['v_domain'])) $v_adv = 'yes';
|
||||
if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
|
||||
if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
|
||||
if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
|
||||
if (empty($_POST['v_nginx'])) $v_adv = 'yes';
|
||||
if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
|
||||
|
||||
$v_nginx_ext = 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, ';
|
||||
$v_nginx_ext .= 'doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, ';
|
||||
$v_nginx_ext .= 'mpeg, flv, html, htm';
|
||||
if ($_POST['v_nginx_ext'] != $v_nginx_ext) $v_adv = 'yes';
|
||||
|
||||
// Protect input
|
||||
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
|
||||
|
@ -38,7 +51,24 @@ top_panel($user,$TAB);
|
|||
$v_ssl_crt = $_POST['v_ssl_crt'];
|
||||
$v_ssl_key = $_POST['v_ssl_key'];
|
||||
$v_ssl_ca = $_POST['v_ssl_ca'];
|
||||
$v_ssl_home = $data[$v_domain]['SSL_HOME'];
|
||||
$v_stats = escapeshellarg($_POST['v_stats']);
|
||||
$v_stats_user = $data[$v_domain]['STATS_USER'];
|
||||
$v_stats_password = $data[$v_domain]['STATS_PASSWORD'];
|
||||
$v_nginx_ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
|
||||
$v_nginx_ext = preg_replace("/,/", " ", $v_nginx_ext);
|
||||
$v_nginx_ext = preg_replace('/\s+/', ' ',$v_nginx_ext);
|
||||
$v_nginx_ext = trim($v_nginx_ext);
|
||||
$v_nginx_ext = str_replace(' ', ", ", $v_nginx_ext);
|
||||
$v_ftp = $_POST['v_ftp'];
|
||||
$v_ftp_user = $_POST['v_ftp_user'];
|
||||
$v_ftp_password = $_POST['v_ftp_password'];
|
||||
$v_ftp_email = $_POST['v_ftp_email'];
|
||||
|
||||
// Validate email
|
||||
if ((!empty($_POST['v_ftp_email'])) && (!filter_var($_POST['v_ftp_email'], FILTER_VALIDATE_EMAIL))) {
|
||||
$_SESSION['error_msg'] = 'Please enter valid email address.';
|
||||
}
|
||||
|
||||
// Check for errors
|
||||
if (!empty($errors[0])) {
|
||||
|
@ -50,7 +80,9 @@ top_panel($user,$TAB);
|
|||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
} else {
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
// Add WEB
|
||||
exec (VESTA_CMD."v_add_web_domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
|
@ -90,43 +122,49 @@ top_panel($user,$TAB);
|
|||
$valiases = trim($valiases);
|
||||
$aliases = explode(" ", $valiases);
|
||||
foreach ($aliases as $alias) {
|
||||
$alias = escapeshellarg($alias);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v_add_web_domain_alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
unset($output);
|
||||
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v_add_dns_on_web_alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
if ($alias == 'www.'.$_POST['v_domain']) {
|
||||
$www_alias = 'yes';
|
||||
} else {
|
||||
$alias = escapeshellarg($alias);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v_add_web_domain_alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
unset($output);
|
||||
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v_add_dns_on_web_alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add ErrorLog
|
||||
if ((!empty($_POST['v_elog'])) && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v_add_web_domain_elog ".$user." ".$v_domain." 'no'", $output, $return_var);
|
||||
if ((empty($www_alias)) && (empty($_SESSION['error_msg']))) {
|
||||
$alias = preg_replace("/^www./i", "", $_POST['v_domain']);
|
||||
$alias = 'www.'.$alias;
|
||||
$alias = escapeshellarg($alias);
|
||||
exec (VESTA_CMD."v_delete_web_domain_alias ".$user." ".$v_domain." ".$alias." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
|
||||
// Add Nginx
|
||||
if (($_POST['v_nginx'] == 'on') && (empty($_SESSION['error_msg']))) {
|
||||
$nginx_ext = "'jpg,jpeg,gif,png,ico,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,tar,wav,bmp,rtf,js,mp3,avi,mpeg,html,htm'";
|
||||
exec (VESTA_CMD."v_add_web_domain_nginx ".$user." ".$v_domain." 'default' ".$nginx_ext." 'no'", $output, $return_var);
|
||||
$ext = str_replace(' ', '', $v_nginx_ext);
|
||||
$ext = escapeshellarg($ext);
|
||||
exec (VESTA_CMD."v_add_web_domain_nginx ".$user." ".$v_domain." 'default' ".$ext." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
|
@ -161,7 +199,8 @@ top_panel($user,$TAB);
|
|||
fclose($fp);
|
||||
}
|
||||
|
||||
exec (VESTA_CMD."v_add_web_domain_ssl ".$user." ".$v_domain." ".$tmpdir." 'same' 'no'", $output, $return_var);
|
||||
$v_ssl_home = escapeshellarg($_POST['v_ssl_home']);
|
||||
exec (VESTA_CMD."v_add_web_domain_ssl ".$user." ".$v_domain." ".$tmpdir." ".$v_ssl_home." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
|
@ -180,6 +219,52 @@ top_panel($user,$TAB);
|
|||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
||||
if ((!empty($_POST['v_stats_user'])) && (empty($_SESSION['error_msg']))) {
|
||||
$v_stats_user = escapeshellarg($_POST['v_stats_user']);
|
||||
$v_stats_password = escapeshellarg($_POST['v_stats_password']);
|
||||
exec (VESTA_CMD."v_add_web_domain_stats_user ".$user." ".$v_domain." ".$v_stats_user." ".$v_stats_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($v_stats_user);
|
||||
unset($v_stats_password);
|
||||
unset($output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add FTP
|
||||
if ((!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
|
||||
$v_ftp_user = escapeshellarg($_POST['v_ftp_user']);
|
||||
$v_ftp_password = escapeshellarg($_POST['v_ftp_password']);
|
||||
exec (VESTA_CMD."v_add_web_domain_ftp ".$user." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if (!empty($v_ftp_email)) {
|
||||
$to = $_POST['v_ftp_email'];
|
||||
$subject = "FTP login credentials";
|
||||
$hostname = exec('hostname');
|
||||
$from = "Vesta Control Panel <noreply@".$hostname.">";
|
||||
$mailtext .= "Your ftp account has been created successfully and is ready to use.\n\n";
|
||||
$mailtext .= "ip: ".$_POST['v_ip']."\n";
|
||||
$mailtext .= "domain: ".$_POST['v_domain']."\n";
|
||||
$mailtext .= "username: ".$user."_".$_POST['v_ftp_user']."\n";
|
||||
$mailtext .= "password: ".$_POST['v_ftp_password']."\n\n";
|
||||
$mailtext .= "--\nVesta Control Panel\n";
|
||||
send_email($to, $subject, $mailtext, $from);
|
||||
unset($v_ftp_email);
|
||||
}
|
||||
}
|
||||
unset($v_ftp);
|
||||
unset($v_ftp_user);
|
||||
unset($v_ftp_password);
|
||||
unset($output);
|
||||
}
|
||||
|
||||
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
|
||||
|
|
|
@ -123,12 +123,17 @@ if ($_SESSION['user'] == 'admin') {
|
|||
|
||||
// Change contact email
|
||||
if (($v_email != $_POST['v_email']) && (empty($_SESSION['error_msg']))) {
|
||||
$v_email = escapeshellarg($_POST['v_email']);
|
||||
exec (VESTA_CMD."v_change_user_contact ".$v_username." ".$v_email, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
// Validate email
|
||||
if (!filter_var($_POST['v_email'], FILTER_VALIDATE_EMAIL)) {
|
||||
$_SESSION['error_msg'] = 'Please enter valid email address.';
|
||||
} else {
|
||||
$v_email = escapeshellarg($_POST['v_email']);
|
||||
exec (VESTA_CMD."v_change_user_contact ".$v_username." ".$v_email, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
|
|
@ -61,6 +61,8 @@ top_panel($user,$TAB);
|
|||
$v_stats = $data[$v_domain]['STATS'];
|
||||
$v_stats_user = $data[$v_domain]['STATS_USER'];
|
||||
if (!empty($v_stats_user)) $v_stats_password = "••••••••";
|
||||
$v_ftp_user = $data[$v_domain]['FTP_USER'];
|
||||
if (!empty($v_ftp_user)) $v_ftp_password = "••••••••";
|
||||
$v_suspended = $data[$v_domain]['SUSPENDED'];
|
||||
if ( $v_suspended == 'yes' ) {
|
||||
$v_status = 'suspended';
|
||||
|
@ -197,30 +199,6 @@ top_panel($user,$TAB);
|
|||
}
|
||||
}
|
||||
|
||||
// Elog
|
||||
if (($v_elog == 'yes') && (empty($_POST['v_elog'])) && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v_delete_web_domain_elog ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
$restart_web = 'yes';
|
||||
$v_elog = 'no';
|
||||
}
|
||||
if (($v_elog == 'no') && (!empty($_POST['v_elog'])) && (empty($_SESSION['error_msg'])) ) {
|
||||
exec (VESTA_CMD."v_add_web_domain_elog ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
$restart_web = 'yes';
|
||||
$v_elog = 'yes';
|
||||
}
|
||||
|
||||
// Nginx
|
||||
if ((!empty($v_nginx)) && (empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v_delete_web_domain_nginx ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||
|
@ -487,6 +465,91 @@ top_panel($user,$TAB);
|
|||
}
|
||||
}
|
||||
|
||||
// FTP Account
|
||||
if ((!empty($v_ftp_user)) && (empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v_delete_web_domain_ftp ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
$v_ftp= '';
|
||||
$v_ftp_user = '';
|
||||
$v_ftp_password = '';
|
||||
}
|
||||
if ((!empty($v_ftp_user)) && (!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
|
||||
if (empty($_POST['v_ftp_user'])) $errors[] = 'ftp user';
|
||||
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp password';
|
||||
if (!empty($errors[0])) {
|
||||
foreach ($errors as $i => $error) {
|
||||
if ( $i == 0 ) {
|
||||
$error_msg = $error;
|
||||
} else {
|
||||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
}
|
||||
if (($v_ftp_user != $_POST['v_ftp_user']) || ($_POST['v_ftp_password'] != "••••••••" ) && (empty($_SESSION['error_msg']))) {
|
||||
$v_ftp_user = preg_replace("/^".$user."_/", "", $_POST['v_ftp_user']);
|
||||
$v_ftp_user = escapeshellarg($v_ftp_user);
|
||||
$v_ftp_password = escapeshellarg($_POST['v_ftp_password']);
|
||||
exec (VESTA_CMD."v_add_web_domain_ftp ".$v_username." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
$v_ftp_user = $user."_".$_POST['v_ftp_user'];
|
||||
$v_ftp_password = "••••••••";
|
||||
}
|
||||
}
|
||||
|
||||
if ((empty($v_ftp_user)) && (!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
|
||||
if ((!empty($_POST['v_ftp_email'])) && (!filter_var($_POST['v_ftp_email'], FILTER_VALIDATE_EMAIL))) $_SESSION['error_msg'] = 'Please enter valid email address.';
|
||||
if (empty($_POST['v_ftp_user'])) $errors[] = 'ftp username';
|
||||
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp password';
|
||||
if (!empty($errors[0])) {
|
||||
foreach ($errors as $i => $error) {
|
||||
if ( $i == 0 ) {
|
||||
$error_msg = $error;
|
||||
} else {
|
||||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$v_ftp_user = escapeshellarg($_POST['v_ftp_user']);
|
||||
$v_ftp_password = escapeshellarg($_POST['v_ftp_password']);
|
||||
exec (VESTA_CMD."v_add_web_domain_ftp ".$v_username." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if (!empty($_POST['v_ftp_email'])) {
|
||||
$to = $_POST['v_ftp_email'];
|
||||
$subject = "FTP login credentials";
|
||||
$hostname = exec('hostname');
|
||||
$from = "Vesta Control Panel <noreply@".$hostname.">";
|
||||
$mailtext .= "Your ftp account has been created successfully and is ready to use.\n\n";
|
||||
$mailtext .= "ip: ".$v_ip."\n";
|
||||
$mailtext .= "domain: ".$_GET['domain']."\n";
|
||||
$mailtext .= "username: ".$user."_".$_POST['v_ftp_user']."\n";
|
||||
$mailtext .= "password: ".$_POST['v_ftp_password']."\n\n";
|
||||
$mailtext .= "--\nVesta Control Panel\n";
|
||||
send_email($to, $subject, $mailtext, $from);
|
||||
unset($v_ftp_email);
|
||||
}
|
||||
}
|
||||
unset($output);
|
||||
$v_ftp_user = $user."_".$_POST['v_ftp_user'];
|
||||
$v_ftp_password = "••••••••";
|
||||
}
|
||||
}
|
||||
|
||||
// Restart web
|
||||
if (!empty($restart_web) && (empty($_SESSION['error_msg']))) {
|
||||
|
|
|
@ -27,7 +27,35 @@
|
|||
</table>
|
||||
|
||||
<form id="vstobjects" name="v_add_web" method="post">
|
||||
<script language="javascript">
|
||||
<script type="text/javascript">
|
||||
$(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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_add_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom() {
|
||||
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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_add_web.v_ftp_password.value = ftprandomstring;
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
if (el.style.display == "block") {
|
||||
|
@ -61,7 +89,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?>>
|
||||
<input type="text" size="20" class="add-input" name="v_domain" id="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -109,129 +137,239 @@
|
|||
<a href="javascript:elementHideShow('advtable');" class="add-advanced">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="add-text" style="padding: 9px 0 0 0px;">
|
||||
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
||||
<td class="add-text" style="padding: 10 0 0 2px;">
|
||||
Domain Aliases
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_aliases" id="v_aliases" ><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Apache Template
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_template">
|
||||
<?php
|
||||
foreach ($templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
|
||||
echo ' selected' ;
|
||||
}
|
||||
if ((empty($v_template)) && ( $value == $template)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo "> ".$value." </option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Nginx Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_nginx" <?php if ($v_nginx !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if ($v_nginx == 'off') { echo 'none';} else {echo 'block';}?>;" id="nginxtable" >
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 0 0 0 2px;">
|
||||
Domain Aliases
|
||||
<td class="add-text" style="padding: 9px 0 0 0;">
|
||||
Nginx Supported Extentions
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Apache Template
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_template">
|
||||
<?php
|
||||
foreach ($templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
|
||||
echo ' selected' ;
|
||||
}
|
||||
if ((empty($v_template)) && ( $value == $template)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo "> ".$value." </option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Error Logging
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_elog" <?php if (!empty($v_elog)) echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Nginx Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_nginx" <?php if (empty($v_nginx)) echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_ssl" <?php if (!empty($v_ssl)) echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Certificate
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_crt"><?php if (!empty($v_ssl_crt)) echo $v_ssl_crt; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Key
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_key"><?php if (!empty($v_ssl_key)) echo $v_ssl_key; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Certificate Authority <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(optional)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo $v_ssl_ca; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistics
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<textarea size="20" class="add-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_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>
|
||||
<tr>
|
||||
<td style="padding: 24px 0 0 0;">
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-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="add-text" style="padding: 9px 0 0 0;">
|
||||
SSL HomeDirectory
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_ssl_home">
|
||||
<option value='same' <?php if ($v_ssl_home == 'same') echo "selected";?>>
|
||||
public_html
|
||||
</option>
|
||||
<option value='single' <?php if ($v_ssl_home == 'single') echo "selected";?>>
|
||||
public_shtml
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
SSL Key
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_key"><?php if (!empty($v_ssl_key)) echo $v_ssl_key; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
SSL Certificate
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_crt"><?php if (!empty($v_ssl_crt)) echo $v_ssl_crt; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
SSL Certificate Authority / Intermediate <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(optional)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo $v_ssl_ca; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistics
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistic Authorization
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<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="add-text" style="padding: 9px 0 0 0;">
|
||||
Web Statistics Username
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_stats_user" <?php if (!empty($v_stats_user)) echo "value=".$v_stats_user; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
Web Statistics Password <a href="javascript:WEBrandom();" class="genpass">generate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" 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="add-text" style="padding: 10px 0 0 2px;">
|
||||
Additional FTP Account
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-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="add-text" style="padding: 10px 0 0 0;">
|
||||
FTP Username<br>
|
||||
<span style="font-size: 10pt; color:#555;">Prefix <?php echo $user."_"; ?> will be automaticaly added to username</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
FTP Password <a href="javascript:FTPrandom();" class="genpass" >generate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="add-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
Send FTP credentials to email
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="add-input" name="v_ftp_email" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="data-col2" width="600px">
|
||||
<tr>
|
||||
<td style="padding: 33px 0 0 0;">
|
||||
<input type="submit" name="ok" value="OK" class="button">
|
||||
<input type="button" class="button" value="Cancel" onclick="<?php echo $back ?>">
|
||||
</td>
|
||||
|
|
|
@ -28,6 +28,28 @@
|
|||
|
||||
<form id="vstobjects" name="v_edit_web" method="post">
|
||||
<script language="javascript">
|
||||
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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom() {
|
||||
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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_edit_web.v_ftp_password.value = ftprandomstring;
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
if (el.style.display == "block") {
|
||||
|
@ -36,16 +58,6 @@
|
|||
el.style.display = "block";
|
||||
}
|
||||
}
|
||||
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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.getElementById('v_password').value = randomstring;
|
||||
}
|
||||
</script>
|
||||
<table class='data'>
|
||||
<tr class="data-add">
|
||||
|
@ -125,16 +137,6 @@
|
|||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Error Logging
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_elog" <?php if ($v_elog == 'yes') echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Nginx Support
|
||||
|
@ -149,7 +151,7 @@
|
|||
<td>
|
||||
<table style="display:<?php if (empty($v_nginx)) { echo 'none';} else {echo 'block';}?> ;" id="nginxtable">
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 9px 0 0 2px;">
|
||||
<td class="add-text" style="padding: 9px 0 0 0;">
|
||||
Nginx Supported Extentions
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -175,7 +177,7 @@
|
|||
<td>
|
||||
<table style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;" id="ssltable">
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 9px 0 0 2px;">
|
||||
<td class="add-text" style="padding: 9px 0 0 0;">
|
||||
SSL HomeDirectory
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -224,35 +226,127 @@
|
|||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Web Statistics</td></tr>
|
||||
<tr><td><select class="add-list" name="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select></td></tr>
|
||||
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Web Statistic Authorization</td></tr>
|
||||
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"> </tr>
|
||||
<tr><td><table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v_add_web_domain_stats_user"><tr>
|
||||
<tr><td class="add-text" style="padding: 9px 0 0 2px;">Web Statistics Username</td></tr>
|
||||
<tr><td><input type="text" size="20" class="add-input" name="v_stats_user" <?php if (!empty($v_stats_user)) echo "value=".$v_stats_user; ?>></tr>
|
||||
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Web Statistics Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr>
|
||||
<tr><td><input type="text" size="20" class="add-input" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password; ?> id="v_password"></tr>
|
||||
</td></tr></tr></table>
|
||||
<tr><td style="padding: 24px 0 0 0;">
|
||||
<input type="submit" class="button" name="save" value="Save"></form>
|
||||
<input type="button" class="button" value="Cancel" onclick="<?php echo $back ?>">
|
||||
</td></tr>
|
||||
</form>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistics
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistic Authorization
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<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="add-text" style="padding: 9px 0 0 2px;">
|
||||
Web Statistics Username
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_stats_user" <?php if (!empty($v_stats_user)) echo "value=".$v_stats_user; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistics Password <a href="javascript:WEBrandom();" class="genpass">generate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" 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="add-text" style="padding: 10px 0 0 2px;">
|
||||
Additional FTP Account
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-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">
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
FTP Username
|
||||
<?php if (empty($v_ftp_user)) echo '<br><span style="font-size: 10pt; color:#555;">Prefix '.$user.'_ will be automaticaly added to username</span>' ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
FTP Password <a href="javascript:FTPrandom();" class="genpass" >generate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="add-input" name="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="add-text" style="padding: 10px 0 0 0;">
|
||||
Send FTP credentials to email
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="add-input" name="v_ftp_email" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 24px 0 0 0;">
|
||||
<input type="submit" class="button" name="save" value="Save">
|
||||
<input type="button" class="button" value="Cancel" onclick="<?php echo $back ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
|
@ -50,6 +50,18 @@
|
|||
} else {
|
||||
$ssl_home = '';
|
||||
}
|
||||
$web_stats='no';
|
||||
if (!empty($data[$key]['STATS'])) {
|
||||
$web_stats=$data[$key]['STATS'];
|
||||
}
|
||||
$ftp_user='no';
|
||||
if (!empty($data[$key]['FTP_USER'])) {
|
||||
$ftp_user=$data[$key]['FTP_USER'];
|
||||
}
|
||||
$nginx_support='no';
|
||||
if (!empty($data[$key]['NGINX'])) {
|
||||
$nginx_support='yes';
|
||||
}
|
||||
if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
|
||||
$nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
|
||||
$nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
|
||||
|
@ -136,30 +148,10 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;" width="250">
|
||||
<td style="vertical-align:top;" width="300">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="counter-name">CGI Support:</td>
|
||||
<td class="counter-value"><?php echo $data[$key]['CGI'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name">Error Log:</td>
|
||||
<td class="counter-value"><?php echo $data[$key]['ELOG'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name">Web Statistics:</td>
|
||||
<td class="counter-value"><?php echo $data[$key]['STATS'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name">Statistics Auth:</td>
|
||||
<td class="counter-value"><?php echo $data[$key]['STATS_AUTH'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||
<table width="300">
|
||||
<tr>
|
||||
<td class="counter-name" width="40%">SSL Support:</td>
|
||||
<td class="counter-name" width="110">SSL Support:</td>
|
||||
<td class="counter-value"><?php echo $data[$key]['SSL'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -167,8 +159,8 @@
|
|||
<td class="counter-value"><?php echo $ssl_home ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name">Nginx Template:</td>
|
||||
<td class="counter-value"><?php echo $data[$key]['NGINX'] ?></td>
|
||||
<td class="counter-name">Nginx Support:</td>
|
||||
<td class="counter-value"><?php echo $nginx_support ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name">Nginx Extentions:</td>
|
||||
|
@ -176,6 +168,18 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td rowspan=4 style="vertical-align:top;" width="240">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="counter-name">Web Statistics: </td>
|
||||
<td class="counter-value"> <?php echo $web_stats ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name"> Additional FTP:</td>
|
||||
<td class="counter-value"> <?php echo $ftp_user ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
@ -27,6 +27,48 @@
|
|||
</table>
|
||||
|
||||
<form id="vstobjects" name="v_add_web" method="post">
|
||||
<script type="text/javascript">
|
||||
$(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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_add_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom() {
|
||||
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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_add_web.v_ftp_password.value = ftprandomstring;
|
||||
document.v_add_web.v_stats_password.value = randomstring;
|
||||
}
|
||||
|
||||
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.substring(rnum,rnum+1);
|
||||
}
|
||||
document.v_add_web.v_ftp_password.value = randomstring;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script language="javascript">
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
|
@ -61,7 +103,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?>>
|
||||
<input type="text" size="20" class="add-input" name="v_domain" id="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -109,106 +151,216 @@
|
|||
<a href="javascript:elementHideShow('advtable');" class="add-advanced">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="add-text" style="padding: 9px 0 0 0px;">
|
||||
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
||||
<td class="add-text" style="padding: 10 0 0 2px;">
|
||||
Domain Aliases
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_aliases" id="v_aliases" ><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Nginx Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_nginx" <?php if ($v_nginx !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="display:<?php if ($v_nginx == 'off') { echo 'none';} else {echo 'block';}?>;" id="nginxtable" >
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 0 0 0 2px;">
|
||||
Domain Aliases
|
||||
<td class="add-text" style="padding: 9px 0 0 0;">
|
||||
Nginx Supported Extentions
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Error Logging
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_elog" <?php if (!empty($v_elog)) echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Nginx Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_nginx" <?php if (empty($v_nginx)) echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_ssl" <?php if (!empty($v_ssl)) echo "checked=yes" ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Certificate
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_crt"><?php if (!empty($v_ssl_crt)) echo $v_ssl_crt; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Key
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_key"><?php if (!empty($v_ssl_key)) echo $v_ssl_key; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Certificate Authority <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(optional)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo $v_ssl_ca; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistics
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<textarea size="20" class="add-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_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>
|
||||
<tr>
|
||||
<td style="padding: 24px 0 0 0;">
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
SSL Support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-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="add-text" style="padding: 9px 0 0 0;">
|
||||
SSL HomeDirectory
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_ssl_home">
|
||||
<option value='same' <?php if ($v_ssl_home == 'same') echo "selected";?>>
|
||||
public_html
|
||||
</option>
|
||||
<option value='single' <?php if ($v_ssl_home == 'single') echo "selected";?>>
|
||||
public_shtml
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
SSL Key
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_key"><?php if (!empty($v_ssl_key)) echo $v_ssl_key; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
SSL Certificate
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_crt"><?php if (!empty($v_ssl_crt)) echo $v_ssl_crt; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
SSL Certificate Authority / Intermediate <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(optional)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea size="20" class="add-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo $v_ssl_ca; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistics
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="add-list" name="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 2px;">
|
||||
Web Statistic Authorization
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<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="add-text" style="padding: 9px 0 0 0;">
|
||||
Web Statistics Username
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_stats_user" <?php if (!empty($v_stats_user)) echo "value=".$v_stats_user; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
Web Statistics Password <a href="javascript:WEBrandom();" class="genpass">generate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" 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="add-text" style="padding: 10px 0 0 2px;">
|
||||
Additional FTP Account
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" size="20" class="add-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="add-text" style="padding: 10px 0 0 0;">
|
||||
FTP Username<br>
|
||||
<span style="font-size: 10pt; color:#555;">Prefix <?php echo $user."_"; ?> will be automaticaly added to username</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="add-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
FTP Password <a href="javascript:FTPrandom();" class="genpass" >generate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="add-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="add-text" style="padding: 10px 0 0 0;">
|
||||
Send FTP credentials to email
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="add-input" name="v_ftp_email" <?php if (!empty($v_ftp_email)) echo "value=".$v_ftp_email; ?>>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="data-col2" width="600px">
|
||||
<tr>
|
||||
<td style="padding: 33px 0 0 0;">
|
||||
<input type="submit" name="ok" value="OK" class="button">
|
||||
<input type="button" class="button" value="Cancel" onclick="<?php echo $back ?>">
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue