mirror of
https://github.com/myvesta/vesta
synced 2025-07-16 10:03:23 -07:00
[js, php] permsions fixes, date format
This commit is contained in:
parent
0e0d6b6656
commit
5c87dfb2dd
14 changed files with 1356 additions and 147 deletions
|
@ -6,6 +6,8 @@ App.Ajax.request('MAIN.about', {}, function(reply) {
|
|||
App.Settings.VestaAbout.version_name = reply.data.version_name;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('document').ready(function() {
|
||||
try {
|
||||
App.Utils.detectBrowser();
|
||||
|
|
|
@ -378,8 +378,8 @@ App.Actions.save_form = function(evt) {
|
|||
else { // OLD ITEM, UPDATING IT
|
||||
var source = $(elm).find('.source').val();
|
||||
var values = App.Helpers.getFormValues(elm);
|
||||
if(App.Validate.form(values, $('#'+elm_id))) {
|
||||
App.Model.update(values, source, elm);
|
||||
if(App.Validate.form(values, $('#'+elm_id))) {
|
||||
App.Model.update(values, source, elm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,10 +112,11 @@ App.HTML.Build.user_form = function (options, id) {
|
|||
} else {
|
||||
tpl.set(':NS', '');
|
||||
}
|
||||
|
||||
tpl = App.HTML.setTplKeys(tpl, options, true);
|
||||
tpl = App.HTML.Build.user_selects(tpl, options);
|
||||
tpl = App.HTML.toggle_suspended_form(tpl, options);
|
||||
if (options.REPORTS_ENABLED == 'yes') {
|
||||
if (options.REPORTS_ENABLED == 'yes' || options.REPORTS_ENABLED == 'on') {
|
||||
tpl.set(':CHECKED', 'checked="checked"');
|
||||
} else {
|
||||
tpl.set(':CHECKED', '');
|
||||
|
@ -177,10 +178,13 @@ App.HTML.Build.web_domain_form = function (options, id) {
|
|||
tpl = App.HTML.setTplKeys(tpl, options, true);
|
||||
tpl = App.HTML.Build.web_domain_selects(tpl, options);
|
||||
tpl = App.HTML.toggle_suspended_form(tpl, options);
|
||||
if (options.CGI == 'yes' || !in_edit) {
|
||||
|
||||
if (options.CGI == 'yes' || options.CGI == 'on' || !in_edit) {
|
||||
tpl.set(':CHECKED_CGI', 'checked="checked"');
|
||||
}
|
||||
if (options.ELOG == 'yes') {
|
||||
|
||||
|
||||
if (options.ELOG == 'yes' || options.ELOG == 'on') {
|
||||
tpl.set(':CHECKED_ELOG', 'checked="checked"');
|
||||
}
|
||||
if (options.STATS_LOGIN.trim() != '') {
|
||||
|
@ -212,6 +216,9 @@ App.HTML.Build.web_domain_form = function (options, id) {
|
|||
tpl.set(':SSL_CA', '');
|
||||
}
|
||||
|
||||
tpl.set(':DNS_DOMAIN_ALSO', in_edit? 'hidden' : '');
|
||||
|
||||
|
||||
return tpl.finalize();
|
||||
}
|
||||
|
||||
|
@ -290,16 +297,12 @@ App.HTML.Build.ip_entry = function (o) {
|
|||
|
||||
return tpl.finalize();
|
||||
}
|
||||
App.HTML.Build.dns_entry = function (o, is_new) {
|
||||
App.HTML.Build.dns_entry = function (o) {
|
||||
var tpl = App.Templates.get('ENTRY', 'dns');
|
||||
tpl = App.HTML.setTplKeys(tpl, o);
|
||||
var ip = o.IP.split('.');
|
||||
tpl.set(':IP', ip.join('<span class="dot">.</span>'));
|
||||
tpl.set(':CHECKED', '');
|
||||
if (is_new) {
|
||||
var now = new Date();
|
||||
tpl.set(':DATE', now.format("d.mm.yyyy"));
|
||||
}
|
||||
tpl.set(':TPL_VAL', o.TPL);
|
||||
tpl = App.HTML.toggle_suspended_entry(tpl, o);
|
||||
|
||||
|
@ -354,7 +357,8 @@ App.HTML.Build.user_entry = function (o, key) {
|
|||
tpl.set(':NS', ns_custom.finalize());
|
||||
}
|
||||
tpl = App.HTML.Build.user_web_tpl(tpl, o);
|
||||
tpl.set(':REPORTS_ENABLED', o.REPORTS_ENABLED == 'yes' ? 'enabled' : 'DISABLED');
|
||||
|
||||
tpl.set(':REPORTS_ENABLED', o.REPORTS_ENABLED == 'yes' || o.REPORTS_ENABLED == 'on' ? 'enabled' : 'DISABLED');
|
||||
if (o.U_DISK_PERCENTAGE > 100) {
|
||||
var tpl_over = App.Templates.get('over_bar', 'general');
|
||||
var difference = parseInt(o.U_DISK_PERCENTAGE, 10) - 100;
|
||||
|
|
|
@ -4,14 +4,27 @@ App.Pages.init = function()
|
|||
App.Ajax.request('MAIN.getInitial', {}, function(reply) {
|
||||
App.Env.initialParams = reply.data;
|
||||
App.Helpers.updateInitial();
|
||||
if (!App.Env.initialParams.auth_user.admin) {
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
if (!App.Env.initialParams.auth_user.admin) {
|
||||
var head= document.getElementsByTagName('head')[0];
|
||||
var script= document.createElement('script');
|
||||
script.type= 'text/javascript';
|
||||
script.src= App.Helpers.generateUrl('js/user_templates.js?'+Math.random());
|
||||
head.appendChild(script);
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
var head= document.getElementsByTagName('head')[0];
|
||||
var script= document.createElement('script');
|
||||
script.type= 'text/javascript';
|
||||
script.src= App.Helpers.generateUrl('js/templates.js?'+Math.random());
|
||||
head.appendChild(script);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
App.Pages.prepareHTML();
|
||||
|
@ -45,6 +58,8 @@ App.Pages.prepareHTML = function()
|
|||
|
||||
App.Pages.DNS.showSubform = function(ref)
|
||||
{
|
||||
fb.log('loading');
|
||||
return;
|
||||
App.Helpers.showLoading();
|
||||
var data = ref.find('.source:first').val();
|
||||
App.Ajax.request('DNS.getListRecords', {
|
||||
|
|
|
@ -144,14 +144,14 @@ App.Templates.html = {
|
|||
</select>\
|
||||
<span class="context-settings do_action_view_dns_template_settings">View template settings</span>\
|
||||
</div>\
|
||||
<!-- div class="form-row cc">\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">TTL:</label>\
|
||||
<input type="text" value="~!:TTL~!" name="TTL" class="text-field ttl-field rule-required rule-numeric">\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">SOA:</label>\
|
||||
<input type="text" value="~!:SOA~!" name="SOA" class="text-field rule-required rule-ns">\
|
||||
</div -->\
|
||||
</div>\
|
||||
<div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
|
||||
|
@ -474,9 +474,9 @@ App.Templates.html = {
|
|||
<span class="prop-value">~!:FULLNAME~!</span>\
|
||||
</span>\ </div>\
|
||||
<div class="user-details-box">\
|
||||
<!-- span class="prop-box prop-box_group-values cc user-details do_action_login_as">\
|
||||
<span class="prop-box prop-box_group-values cc user-details do_action_login_as">\
|
||||
<span class="prop-value login-as do_action_login_as">login as</span>\
|
||||
</span -->\
|
||||
</span>\
|
||||
<span class="prop-box prop-box_group-values cc user-details">\
|
||||
<span class="prop-title">email:</span>\
|
||||
<span class="group-values">\
|
||||
|
@ -650,10 +650,10 @@ App.Templates.html = {
|
|||
<select name="STAT" class="styled">~!:STAT_OPTIONS~!</select>\
|
||||
</div>\
|
||||
<div class="stats-settings">\
|
||||
<div class="form-row cc">\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">Password Protection:</label>\
|
||||
<input id="stats-auth-enable" type="checkbox" name="STATS_AUTH" ~!:stats_auth_checked~!="" value="~!:STATS_AUTH~!" class="styled do_action_toggle_stats_block">\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row stats-block ~!:ACTIVE_LOGIN~! cc">\
|
||||
<label for="#" class="field-label">stats login:</label>\
|
||||
<input type="text" class="text-field rule-statslogin" name="STATS_LOGIN" value="~!:STATS_LOGIN~!">\
|
||||
|
@ -715,7 +715,7 @@ App.Templates.html = {
|
|||
</div>\
|
||||
</div>\
|
||||
</div><!-- Mail options -->\
|
||||
<div class="form-row cc">\
|
||||
<div class="form-row cc ~!:DNS_DOMAIN_ALSO~!">\
|
||||
<label for="#" class="field-label">Create DNS domain also:</label>\
|
||||
<input type="checkbox" value="" name="DNS_DOMAIN" class="styled">\
|
||||
</div>\
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
alert('User templates loaded');
|
||||
App.Templates.html = {
|
||||
help: {
|
||||
DNS_form: ['<h1>Some Things You Just Can\'t Explain</h1>\
|
||||
|
@ -36,7 +35,8 @@ App.Templates.html = {
|
|||
select_option: ['<option ~!:SELECTED~! value="~!:VALUE~!">~!:TEXT~!</option>'],
|
||||
error_elm: ['<div class="error-box">~!:ERROR~!</div>'],
|
||||
SUSPENDED_TPL_NOT_SUSPENDED : ['<span class="ip-status-info ip-enabled-status"><span class="ip-status-text">enabled</span></span>'],
|
||||
SUSPENDED_TPL_SUSPENDED : ['<span class="ip-status-info ip-suspended-status"><span class="ip-status-text">suspended</span></span>']
|
||||
SUSPENDED_TPL_SUSPENDED : ['<span class="ip-status-info ip-suspended-status"><span class="ip-status-text">suspended</span></span>'],
|
||||
DELETE_ACTION: ['<span class="delete-btn do_action_delete_entry">Delete</span>']
|
||||
},
|
||||
popup: {
|
||||
error: ['<div class="error"><center><h1 style="color: red;">Important: An Error Has Occured.</h1><hr></center> Something went wrong and some of your actions can be not saved in system. Mostly, it happens when you have network connection errors.<br>, However, please notify us about the situation. It would be helpfull if you will write us approximate time the error occured and last actions you were performing. You send your petition on <a href="mail_to">this email: BLABLA</a>,<br><br><center><span style="color: rgb(92, 92, 92);">Sorry for inconvinience. (We recommend you to reload the page)</span></center></div>'],
|
||||
|
@ -88,11 +88,11 @@ App.Templates.html = {
|
|||
<form id="login-form" method="post" action="#" class="auth">\
|
||||
<div class="form-row cc">\
|
||||
<label for="email" class="field-label">Login</label>\
|
||||
<input type="text" tabindex="1" id="authorize-login" autocomplete="on" class="field-text">\
|
||||
<input type="text" tabindex="1" id="authorize-login" autocomplete="on" class="field-text" name="login">\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="password" class="field-label">Password</label>\
|
||||
<input type="password" tabindex="2" id="authorize-password" autocomplete="on" class="field-text">\
|
||||
<input type="password" tabindex="2" id="authorize-password" autocomplete="on" class="field-text" name="password">\
|
||||
</div>\
|
||||
<div id="auth-error" class="error-box hidden"></div>\
|
||||
<div class="form-row last-row cc">\
|
||||
|
@ -138,20 +138,20 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="form-row dns-template-box cc">\
|
||||
<label for="#" class="field-label">Template:</label>\
|
||||
<span class="select" id="selecttemplate">~!:TPL_DEFAULT_VALUE~!</span>\
|
||||
<span class="select" id="selecttemplate">~!:TPL_DEFAULT_VALUE~! t </span>\
|
||||
<select name="TPL" class="styled tpl-item">\
|
||||
~!:TPL~!\
|
||||
</select>\
|
||||
<span class="context-settings do_action_view_dns_template_settings">View template settings</span>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">TTL:</label>\
|
||||
<input type="text" value="~!:TTL~!" name="TTL" class="text-field ttl-field rule-required rule-numeric">\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">SOA:</label>\
|
||||
<input type="text" value="~!:SOA~!" name="SOA" class="text-field rule-required rule-ns">\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
|
||||
|
@ -159,7 +159,7 @@ App.Templates.html = {
|
|||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
<span class="delete-btn do_action_delete_entry">Delete</span>\
|
||||
~!:DELETE_ACTION~!\
|
||||
</div>\
|
||||
</div>'
|
||||
],
|
||||
|
@ -241,7 +241,7 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">value:</label>\
|
||||
<input type="text" value="~!:RECORD_VALUE~!" name="RECORD_VALUE" class="text-field">\
|
||||
</div>\
|
||||
<div class="delete-record do_action_delete_subentry"></div>\
|
||||
<!-- div class="delete-record do_action_delete_subentry"></div -->\
|
||||
</div>']
|
||||
},
|
||||
ip: {
|
||||
|
@ -286,14 +286,14 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">Associated DNS Name:</label>\
|
||||
<input type="text" name="NAME" value="~!:NAME~!" class="text-field rule-domain">\
|
||||
</div>\
|
||||
<div class="form-row suspended cc">\
|
||||
<!-- div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND"/>\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
<span class="delete-btn do_action_delete_entry">Delete</span>\
|
||||
~!:DELETE_ACTION~!\
|
||||
</div>\
|
||||
</div>\
|
||||
'],
|
||||
|
@ -303,7 +303,7 @@ App.Templates.html = {
|
|||
<input type="hidden" class="source" name="source" value=\'~!:source~!\' />\
|
||||
<input type="hidden" class="target" name="target" value="" />\
|
||||
<div class="row-actions-box cc">\
|
||||
<div class="check-this"></div>\
|
||||
<div class="check-this check-control"></div>\
|
||||
<div class="row-operations">\
|
||||
~!:SUSPENDED_TPL~!\
|
||||
</div>\
|
||||
|
@ -320,14 +320,14 @@ App.Templates.html = {
|
|||
<span class="prop-title">netmask:</span>\
|
||||
<span class="prop-value">~!:NETMASK~!</span>\
|
||||
</span>\
|
||||
<span class="prop-box">\
|
||||
<span class="prop-title">interface:</span>\
|
||||
<span class="prop-value">~!:INTERFACE~!</span>\
|
||||
</span>\
|
||||
<span class="prop-box">\
|
||||
<span class="prop-title">name:</span>\
|
||||
<span class="prop-value">~!:NAME~!</span>\
|
||||
</span>\
|
||||
<span class="prop-box">\
|
||||
<span class="prop-title">interface:</span>\
|
||||
<span class="prop-value">~!:INTERFACE~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
<div class="ip-props-additional">\
|
||||
<span class="prop-box">\
|
||||
|
@ -341,7 +341,7 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="ip-props-ext">\
|
||||
<span class="prop-box">\
|
||||
<span class="prop-title">sys users:</span>\
|
||||
<span class="prop-title">users:</span>\
|
||||
<span class="prop-value">~!:U_SYS_USERS~!</span>\
|
||||
</span>\
|
||||
<span class="prop-box">\
|
||||
|
@ -362,7 +362,7 @@ App.Templates.html = {
|
|||
user: {
|
||||
WEB_TPL_MINIMIZED: ['~!:WEB_TPL_MINI~!\
|
||||
<span class="group-switcher">\
|
||||
<span class="group-values-count do_action_view_full_ns_list">~!:MORE_NUMBER~! more</span>\
|
||||
<span class="group-values-count do_action_view_full_web_templates">~!:MORE_NUMBER~! more</span>\
|
||||
</span><span class="hidden ns-full-list"><span class="group-values">~!:WEB_TPL_FULL~!</span></span>'],
|
||||
WEB_TPL: ['<span class="prop-value">~!:NAME~!</span>'],
|
||||
NS_MINIMIZED: ['~!:NS_MINI~!\
|
||||
|
@ -378,7 +378,7 @@ App.Templates.html = {
|
|||
PLUS_ONE_NS: ['<div class="form-row cc do_action_add_form_ns additional-ns-add">\
|
||||
<a href="javascript:void(0);" class="add-ns do_action_add_form_ns">\
|
||||
<i class="icon do_action_add_form_ns"> </i>\
|
||||
<span class="btn-title do_action_add_form_ns">Add additional NS</span>\
|
||||
<span class="btn-title do_action_add_form_ns">Add additional Name Server</span>\
|
||||
</a>\
|
||||
</div>'],
|
||||
ENTRIES_WRAPPER: ['<div class="users-list items-list">~!:content~!</div>'],
|
||||
|
@ -403,7 +403,7 @@ App.Templates.html = {
|
|||
~!:PACKAGE_OPTIONS~!\
|
||||
</select>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<div class="form-row shell-entry cc">\
|
||||
<label for="#" class="field-label">Shell:</label>\
|
||||
<select class="styled disabled" name="SHELL">\
|
||||
~!:SHELL_OPTIONS~!\
|
||||
|
@ -432,11 +432,11 @@ App.Templates.html = {
|
|||
<input type="text" name="LNAME" class="text-field rule-abc rule-required" value="~!:LNAME~!">\
|
||||
</div>\
|
||||
<div class="form-row ns-entry cc">\
|
||||
<label for="#" class="field-label">NameServer #1:</label>\
|
||||
<label for="#" class="field-label">Name Server #1:</label>\
|
||||
<input type="text" value="~!:NS1~!" name="NS1" class="text-field rule-required rule-ns">\
|
||||
</div>\
|
||||
<div class="form-row ns-entry cc">\
|
||||
<label for="#" class="field-label">NameServer #2:</label>\
|
||||
<label for="#" class="field-label">Name Server #2:</label>\
|
||||
<input type="text" value="~!:NS2~!" name="NS2" class="text-field rule-required rule-ns">\
|
||||
</div>\
|
||||
~!:NS~!\
|
||||
|
@ -447,7 +447,7 @@ App.Templates.html = {
|
|||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
<span class="delete-btn do_action_delete_entry">Delete</span>\
|
||||
~!:DELETE_ACTION~!\
|
||||
</div>\
|
||||
</div>'],
|
||||
ENTRY: ['<div class="row user-details-row ~!:SUSPENDED_CLASS~!">\
|
||||
|
@ -470,16 +470,13 @@ App.Templates.html = {
|
|||
<span class="nickname do_action_edit">~!:LOGIN_NAME~!</span>\
|
||||
<!-- span class="role">(~!:ROLE~!)</span -->\
|
||||
</span>\
|
||||
<span class="prop-box template-box">\
|
||||
<span class="prop-title">package:</span>\
|
||||
<span class="prop-value do_action_view_template_info">~!:PACKAGE~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
<div class="user-details-box">\
|
||||
<span class="prop-box user-name">\
|
||||
<span class="prop-title">name:</span>\
|
||||
<span class="prop-value">~!:FULLNAME~!</span>\
|
||||
</span>\
|
||||
</span>\ </div>\
|
||||
<div class="user-details-box">\
|
||||
<!-- span class="prop-box prop-box_group-values cc user-details do_action_login_as">\
|
||||
<span class="prop-value login-as do_action_login_as">login as</span>\
|
||||
</span -->\
|
||||
<span class="prop-box prop-box_group-values cc user-details">\
|
||||
<span class="prop-title">email:</span>\
|
||||
<span class="group-values">\
|
||||
|
@ -487,9 +484,14 @@ App.Templates.html = {
|
|||
<span class="prop-value user-reports">(reports ~!:REPORTS_ENABLED~!)</span>\
|
||||
</span>\
|
||||
</span>\
|
||||
<span class="prop-box template-box">\
|
||||
<span class="prop-title">package:</span>\
|
||||
<span class="prop-value do_action_view_template_info">~!:PACKAGE~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
</div>\
|
||||
<!-- disk usage block -->\
|
||||
\
|
||||
<!-- stats block -->\
|
||||
\
|
||||
<div class="b-stats-box">\
|
||||
<div class="stats-box-title">stats</div> \
|
||||
|
@ -507,24 +509,27 @@ App.Templates.html = {
|
|||
<div class="max-size">~!:DISK_QUOTA~! <span class="units">~!:DISK_QUOTA_MEASURE_2~!</span></div>\
|
||||
</div>\
|
||||
</div><!-- // disk usage block -->\
|
||||
</div>\
|
||||
\
|
||||
<div class="b-usage-box2 bandwidth-box zz-22 cc">\
|
||||
<span class="prop-title">bandwidth:</span>\
|
||||
<div class="usage-box">\
|
||||
<div class="value-box ~!:OVER_DRAFT_VALUE_2~!">\
|
||||
<div class="graph">\
|
||||
<span style="left:~!:U_BANDWIDTH_PERCENTAGE_2~!%;" class="value">~!:U_BANDWIDTH_PERCENTAGE~!% <span class="value-size">(~!:U_BANDWIDTH~! ~!:BANDWIDTH_MEASURE~!)</span></span>\
|
||||
<span style="width:~!:U_BANDWIDTH_PERCENTAGE_3~!%;" class="bar"></span>\
|
||||
~!:OVER_BAR_2~!\
|
||||
<div class="b-usage-box2 bandwidth-box cc">\
|
||||
<span class="prop-title">bandwidth:</span>\
|
||||
<div class="usage-box">\
|
||||
<div class="value-box ~!:OVER_DRAFT_VALUE_2~!">\
|
||||
<div class="graph">\
|
||||
<span style="left:~!:U_BANDWIDTH_PERCENTAGE_2~!%;" class="value">~!:U_BANDWIDTH_PERCENTAGE~!% <span class="value-size">(~!:U_BANDWIDTH~! ~!:BANDWIDTH_MEASURE~!)</span></span>\
|
||||
<span style="width:~!:U_BANDWIDTH_PERCENTAGE_3~!%;" class="bar"></span>\
|
||||
~!:OVER_BAR_2~!\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="max-size">~!:BANDWIDTH~! <span class="units">~!:BANDWIDTH_MEASURE_2~!</span></div>\
|
||||
</div>\
|
||||
<div class="max-size">~!:BANDWIDTH~! <span class="units">~!:BANDWIDTH_MEASURE_2~!</span></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div><!-- // stats block -->\
|
||||
\
|
||||
</div>\
|
||||
<div class="props-additional">\
|
||||
<span class="prop-box webdomains-box">\
|
||||
<span class="prop-title">web domains:</span>\
|
||||
<span class="prop-value">~!:U_WEB_DOMAINS~! (~!:WEB_DOMAINS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box websl-box">\
|
||||
<span class="prop-title">web ssl:</span>\
|
||||
<span class="prop-value">~!:U_WEB_SSL~! (~!:WEB_SSL~!)</span>\
|
||||
|
@ -543,6 +548,37 @@ App.Templates.html = {
|
|||
<span class="prop-title">databases:</span>\
|
||||
<span class="prop-value">~!:U_DATABASES~! (~!:DATABASES~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box ip-box">\
|
||||
<span class="prop-title">Dedicated IP\'s:</span>\
|
||||
<span class="prop-value">~!:IP_OWNED~!</span>\
|
||||
</span>\
|
||||
<span class="prop-box cron-box">\
|
||||
<span class="prop-title">cron jobs:</span>\
|
||||
<span class="prop-value">~!:U_CRON_JOBS~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
<div class="props-ext">\
|
||||
<span class="prop-box maildomains-box">\
|
||||
<span class="prop-title">mail domains:</span>\
|
||||
<span class="prop-value">~!:U_MAIL_DOMAINS~! (~!:MAIL_DOMAINS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box mailboxes-box">\
|
||||
<span class="prop-title">mail accounts:</span>\
|
||||
<span class="prop-value">~!:MAIL_BOXES~! per domain</span>\
|
||||
</span>\
|
||||
<span class="prop-box mailfwds-box">\
|
||||
<span class="prop-title">mail forwarders:</span>\
|
||||
<span class="prop-value">~!:MAIL_FORWARDERS~! per domain</span>\
|
||||
</span>\
|
||||
<span class="prop-box dnsdomains-box">\
|
||||
<span class="prop-title">dns domains:</span>\
|
||||
<span class="prop-value">~!:U_DNS_DOMAINS~! (~!:DNS_DOMAINS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box prop-box_group-values cc ns-list-box">\
|
||||
<span class="prop-title">name servers:</span>\
|
||||
<span class="group-values">\
|
||||
~!:NS~!</span>\
|
||||
</span>\
|
||||
<span class="prop-box shell-box">\
|
||||
<span class="prop-title">shell:</span>\
|
||||
<span class="prop-value">~!:SHELL~!</span>\
|
||||
|
@ -550,35 +586,7 @@ App.Templates.html = {
|
|||
<span class="prop-box backups-box">\
|
||||
<span class="prop-title">backups:</span>\
|
||||
<span class="prop-value">retention ~!:BACKUPS~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
<div class="props-ext">\
|
||||
<span class="prop-box mailboxes-box">\
|
||||
<span class="prop-title">mailboxes:</span>\
|
||||
<span class="prop-value">~!:U_MAIL_BOXES~! (~!:MAIL_BOXES~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box mailfwds-box">\
|
||||
<span class="prop-title">mail forwarders:</span>\
|
||||
<span class="prop-value">~!:U_MAIL_FORWARDERS~! (~!:MAIL_FORWARDERS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box maildomains-box">\
|
||||
<span class="prop-title">mail domains:</span>\
|
||||
<span class="prop-value">~!:U_MAIL_DOMAINS~! (~!:MAIL_DOMAINS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box webdomains-box">\
|
||||
<span class="prop-title">web domains:</span>\
|
||||
<span class="prop-value">~!:U_WEB_DOMAINS~! (~!:WEB_DOMAINS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box dnsdomains-box">\
|
||||
<span class="prop-title">dns domains:</span>\
|
||||
<span class="prop-value">~!:U_DNS_DOMAINS~! (~!:DNS_DOMAINS~!)</span>\
|
||||
</span>\
|
||||
<span class="prop-box prop-box_group-values cc ns-list-box">\
|
||||
<span class="prop-title">ns list:</span>\
|
||||
<span class="group-values">\
|
||||
~!:NS~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
</span>\ </div>\
|
||||
</div><!-- // .row-details -->\
|
||||
</div>']
|
||||
},
|
||||
|
@ -633,6 +641,10 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">Domain Aliases:</label>\
|
||||
<textarea name="ALIAS" class="textarea rule-alias">~!:ALIAS~!</textarea>\
|
||||
</div>\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">Nginx extensions:</label>\
|
||||
<textarea name="NGINX_EXT" class="textarea rule-list">~!:NGINX_EXT~!</textarea>\
|
||||
</div -->\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Statistics:</label>\
|
||||
<select name="STAT" class="styled">~!:STAT_OPTIONS~!</select>\
|
||||
|
@ -652,13 +664,18 @@ App.Templates.html = {
|
|||
<span class="generate-pwd do_action_generate_pass">Generate</span>\
|
||||
</div>\
|
||||
</div><!-- // stats settings -->\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">SSL Support:</label>\
|
||||
<input type="checkbox" name="SSL" class="styled" ~!:ssl_checked~!="" value="~!SSL~!">\
|
||||
</div -->\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">SSL Document Root:</label>\
|
||||
<input type="text" name="SSL_HOME" class="text-field" value="~!:SSL_HOME~!">\
|
||||
<label for="#" class="field-label">SSL Support:</label>\
|
||||
<input type="checkbox" name="SSL" class="styled do_action_toggle_ssl_support ssl_support" ~!:ssl_checked~! value="~!SSL~!">\
|
||||
</div>\
|
||||
<div class="form-row cc ssl-crtfct-box">\
|
||||
<label for="#" class="field-label">SSL Shared DocRoot:</label>\
|
||||
<input type="checkbox" name="SSL_HOME" class="styled" ~!:ssl_home_checked~! value="~!SSL_HOME~!">\
|
||||
</div>\
|
||||
<div class="form-row ssl-crtfct-box cc">\
|
||||
<label for="#" class="field-label">SSL Crtificate: <span class="remark">(upload file or paste as text)</span></label>\
|
||||
<span class="ssl-cert-input-dummy">...</span>\
|
||||
<textarea name="SSL_CRT" class="textarea ssl-cert">~!:SSL_CRT~!</textarea>\
|
||||
</div>\
|
||||
<div class="form-row ssl-crtfct-box cc">\
|
||||
<label for="#" class="field-label">SSL Certificate Key: <span class="remark">(upload file or paste as text)</span></label>\
|
||||
|
@ -666,9 +683,9 @@ App.Templates.html = {
|
|||
<textarea name="SSL_KEY" class="textarea ssl-key">~!:SSL_KEY~!</textarea>\
|
||||
</div>\
|
||||
<div class="form-row ssl-crtfct-box cc">\
|
||||
<label for="#" class="field-label">SSL Crtificate: <span class="remark">(upload file or paste as text)</span></label>\
|
||||
<span class="ssl-cert-input-dummy">...</span>\
|
||||
<textarea name="SSL_CERT" class="textarea ssl-cert">~!:SSL_CERT~!</textarea>\
|
||||
<label for="#" class="field-label">SSL Certificate CA: <span class="remark">(upload file or paste as text)</span></label>\
|
||||
<span class="ssl-ca-input-dummy">...</span>\
|
||||
<textarea name="SSL_CA" class="textarea ssl-key">~!:SSL_CA~!</textarea>\
|
||||
</div>\
|
||||
</div><!-- // advanced options -->\
|
||||
</div>\
|
||||
|
@ -680,7 +697,7 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="sub_section hidden">\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">create dns domain:</label>\
|
||||
<label for="#" class="field-label">create DNS domain:</label>\
|
||||
<input type="checkbox" value="~!:DNS~!" ~!:CHECKED_DNS~! name="DNS" class="styled">\
|
||||
</div>\
|
||||
</div><!-- DNS options -->\
|
||||
|
@ -698,10 +715,14 @@ App.Templates.html = {
|
|||
</div>\
|
||||
</div>\
|
||||
</div><!-- Mail options -->\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Create DNS domain also:</label>\
|
||||
<input type="checkbox" value="" name="DNS_DOMAIN" class="styled">\
|
||||
</div>\
|
||||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
<span class="delete-btn do_action_delete_entry">Delete</span>\
|
||||
~!:DELETE_ACTION~!\
|
||||
</div>\
|
||||
</div>'],
|
||||
ENTRIES_WRAPPER: ['<div class="domains-list items-list">~!:content~!</div>'],
|
||||
|
@ -720,7 +741,6 @@ App.Templates.html = {
|
|||
<div class="row-details cc">\
|
||||
<div class="names">\
|
||||
<strong class="domain-name primary do_action_edit">~!:DOMAIN~!</strong>\
|
||||
<span class="alias-title">Alias:</span>\
|
||||
~!:ALIAS~!\
|
||||
</div>\
|
||||
<div class="props-main">\
|
||||
|
@ -731,6 +751,8 @@ App.Templates.html = {
|
|||
<span class="prop-value tpl-item do_action_view_template_settings">~!:TPL~!</span>\
|
||||
</span>\
|
||||
</div>\
|
||||
\
|
||||
<!-- stats block -->\
|
||||
<div class="b-stats-box">\
|
||||
<div class="stats-box-title">stats</div> \
|
||||
<!-- disk usage block -->\
|
||||
|
@ -747,9 +769,8 @@ App.Templates.html = {
|
|||
<div class="max-size">~!:DISK_QUOTA~! <span class="units">~!:DISK_QUOTA_MEASURE_2~!</span></div>\
|
||||
</div>\
|
||||
</div><!-- // disk usage block -->\
|
||||
</div>\
|
||||
\
|
||||
<div class="b-usage-box2 bandwidth-box cc">\
|
||||
<!-- bandwidth block -->\
|
||||
<div class="b-usage-box2 bandwidth-box cc">\
|
||||
<span class="prop-title">bandwidth:</span>\
|
||||
<div class="usage-box">\
|
||||
<div class="value-box ~!:OVER_DRAFT_VALUE_2~!">\
|
||||
|
@ -761,7 +782,9 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="max-size">~!:BANDWIDTH~! <span class="units">~!:BANDWIDTH_MEASURE_2~!</span></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div><!-- // bandwidth block -->\
|
||||
</div><!-- // stats block -->\
|
||||
\
|
||||
</div>\
|
||||
<div class="props-additional">\
|
||||
<span class="prop-box php-box">\
|
||||
|
@ -792,9 +815,9 @@ App.Templates.html = {
|
|||
<span class="prop-box nginx-box">\
|
||||
<span class="prop-title">nginx:</span>\
|
||||
<span class="prop-value">~!:NGINX~!</span>\
|
||||
<span class="nginx-ext-list">extension list</span>\
|
||||
<span class="nginx-ext-list do_action_view_nginx_extensions">extension list</span>\
|
||||
</span>\
|
||||
</div> \
|
||||
</div>\
|
||||
</div><!-- // .row-details -->\
|
||||
</div>']
|
||||
},
|
||||
|
@ -823,12 +846,12 @@ App.Templates.html = {
|
|||
<select name="TYPE" class="styled">~!:TYPE_OPTIONS~!</select>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Name:</label>\
|
||||
<label for="#" class="field-label">DB name:</label>\
|
||||
<input type="text" class="text-field" name="DB" value="~!:DB~!">\
|
||||
</div>\
|
||||
<div class="db-credentials ">\
|
||||
<div class="form-row cc user">\
|
||||
<label for="#" class="field-label">Username</label>\
|
||||
<label for="#" class="field-label">Username:</label>\
|
||||
<input type="text" name="USER" class="text-field" value="~!:USER~!">\
|
||||
</div>\
|
||||
<div class="form-row pwd-box cc psw">\
|
||||
|
@ -837,10 +860,14 @@ App.Templates.html = {
|
|||
<span class="generate-pwd do_action_generate_pass">Generate</span>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="form-row hidden cc">\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Host:</label>\
|
||||
<select name="HOST" class="styled">~!:HOST_OPTIONS~!</select>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Character Set:</label>\
|
||||
<select name="CHARSET" class="styled">~!:CHARSET_OPTIONS~!</select>\
|
||||
</div>\
|
||||
<div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
|
||||
|
@ -848,7 +875,7 @@ App.Templates.html = {
|
|||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
<span class="delete-btn do_action_delete_entry">Delete</span>\
|
||||
~!:DELETE_ACTION~!\
|
||||
</div>\
|
||||
</div>'],
|
||||
ENTRY: ['<div class="row db-details-row ~!:SUSPENDED_CLASS~!">\
|
||||
|
@ -884,7 +911,11 @@ App.Templates.html = {
|
|||
<span class="add-db-user do_action_add_db_user">Add user</span>\
|
||||
</div>\
|
||||
<div class="props-ext">\
|
||||
<span class="backup-db do_action_backup_db">backup</span>\
|
||||
<!-- span class="backup-db do_action_backup_db">backup</span-->\
|
||||
<span class="prop-box">\
|
||||
<span class="prop-title">Character Set:</span>\
|
||||
<span class="prop-value">~!:CHARSET~!</span>\
|
||||
</span>\
|
||||
<!-- disk usage block -->\
|
||||
<div class="b-usage-box disk-usage cc">\
|
||||
<div class="usage-box">\
|
||||
|
@ -958,7 +989,7 @@ App.Templates.html = {
|
|||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
<span class="delete-btn do_action_delete_entry">Delete</span>\
|
||||
~!:DELETE_ACTION~!\
|
||||
</div>\
|
||||
</div>'],
|
||||
ENTRIES_WRAPPER: ['<div class="cron-list">~!:content~!</div>'],
|
||||
|
@ -1044,13 +1075,13 @@ App.Templates.html = {
|
|||
<a class="backup-url" href="return alert(\'Not available at the time\');">download</a>\
|
||||
</div>\
|
||||
<div class="props-ext">\
|
||||
<div class="backup-actions">\
|
||||
<!-- div class="backup-actions">\
|
||||
<a class="backup-actions-url restore-url" href="return alert(\'Not available at the time\');">restore</a>\
|
||||
<a class="backup-actions-url detailed-restore-url" href="return alert(\'Not available at the time\');">\
|
||||
<span class="detailed-restore-title">detailed</span>\
|
||||
<span class="detailed-restore-ext">restore</span>\
|
||||
</a>\
|
||||
</div>\
|
||||
</div -->\
|
||||
</div> \
|
||||
</div><!-- // .row-details -->\
|
||||
</div><!-- // .row 1 -->']
|
||||
|
|
1151
web/js/user_templates_old.js
Normal file
1151
web/js/user_templates_old.js
Normal file
File diff suppressed because it is too large
Load diff
|
@ -31,7 +31,7 @@ class CRON extends AjaxHandler
|
|||
'MONTH' => $record['MONTH'],
|
||||
'WDAY' => $record['WDAY'],
|
||||
'SUSPEND' => $record['SUSPEND'],
|
||||
'DATE' => date(Config::get('ui_date_format', strtotime($record['DATE']))),
|
||||
'DATE' => $record['DATE'], //date(Config::get('ui_date_format', strtotime($record['DATE']))),
|
||||
'JOB' => $id
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class DB extends AjaxHandler
|
|||
'DISK' => 2024,
|
||||
'CHARSET' => strtolower($record['CHARSET']),
|
||||
'SUSPEND' => $record['SUSPEND'],
|
||||
'DATE' => date(Config::get('ui_date_format', strtotime($record['DATE'])))
|
||||
'DATE' => $record['DATE']// date(Config::get('ui_date_format', strtotime($record['DATE'])))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class DNS extends AjaxHandler
|
|||
'EXP' => $details['EXP'],
|
||||
'SOA' => $details['SOA'],
|
||||
'SUSPEND' => $details['SUSPEND'],
|
||||
'DATE' => date(Config::get('ui_date_format', strtotime($details['DATE'])))
|
||||
'DATE' => $details['DATE'] // date(Config::get('ui_date_format', strtotime($details['DATE'])))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class IP extends AjaxHandler
|
|||
$reply[] = array_merge(
|
||||
array(
|
||||
'IP_ADDRESS' => $ip,
|
||||
'DATE' => date(Config::get('ui_date_format', strtotime($details['DATE'])))
|
||||
'DATE' => $details['DATE'] //date(Config::get('ui_date_format', strtotime($details['DATE'])))
|
||||
), $details);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,12 +23,10 @@ class USER extends AjaxHandler
|
|||
return self::getUserExecute($request);
|
||||
}
|
||||
|
||||
|
||||
$reply = array();
|
||||
$result = Vesta::execute(Vesta::V_LIST_SYS_USERS, array(Config::get('response_type')));
|
||||
|
||||
foreach ($result['data'] as $user => $details) {
|
||||
$nses = $this->getNS($user, $details);
|
||||
$user_details = array(
|
||||
"FNAME" => $details['FNAME'],
|
||||
"LNAME" => $details['LNAME'],
|
||||
|
@ -50,7 +48,7 @@ class USER extends AjaxHandler
|
|||
"WEB_TPL" => $details['WEB_TPL'],
|
||||
"SUSPEND" => $details['SUSPENDED'],
|
||||
"CONTACT" => $details['CONTACT'],
|
||||
"REPORTS" => $details['REPORTS'],
|
||||
// "REPORTS" => $details['REPORTS'],
|
||||
"REPORTS_ENABLED" => $details['REPORTS'],
|
||||
"IP_OWNED" => $details['IP_OWNED'],
|
||||
"U_DIR_DISK" => $details['U_DIR_DISK'],
|
||||
|
@ -68,6 +66,7 @@ class USER extends AjaxHandler
|
|||
"IP_OWNED" => $details['IP_OWNED'],
|
||||
"NGINX_EXT" => $details['"NGINX_EXT']
|
||||
);
|
||||
$nses = $this->getNS($user, $details);
|
||||
$reply[$user] = array_merge($user_details, $nses);
|
||||
// $reply[$user] = $user_details;
|
||||
}
|
||||
|
@ -119,7 +118,9 @@ class USER extends AjaxHandler
|
|||
"IP_OWNED" => $details['IP_OWNED'],
|
||||
"DATE" => $details['DATE']
|
||||
);
|
||||
$reply[$user] = $user_details;
|
||||
$nses = $this->getNS($user, $details);
|
||||
$reply[$user] = array_merge($user_details, $nses);
|
||||
// $reply[$user] = $user_details;
|
||||
}
|
||||
|
||||
return $this->reply(TRUE, $reply);
|
||||
|
@ -230,8 +231,6 @@ class USER extends AjaxHandler
|
|||
}
|
||||
}
|
||||
|
||||
$reports_result = $this->setUserReports($_USER, $_new['REPORTS_ENABLED']);
|
||||
|
||||
if (!empty($_new['PASSWORD']) && $_new['PASSWORD'] != Vesta::SAME_PASSWORD) {
|
||||
$result = array();
|
||||
$result = Vesta::execute(Vesta::V_CHANGE_SYS_USER_PASSWORD, array('USER' => $_USER, 'PASSWORD' => $_new['PASSWORD']));
|
||||
|
@ -265,7 +264,7 @@ class USER extends AjaxHandler
|
|||
$result = Vesta::execute(Vesta::V_ADD_SYS_USER_REPORTS, array('USER' => $_USER));
|
||||
}
|
||||
else{
|
||||
$result = Vesta::execute(Vesta::V_ADD_SYS_USER_REPORTS, array('USER' => $_USER));
|
||||
$result = Vesta::execute(Vesta::V_DEL_SYS_USER_REPORTS, array('USER' => $_USER));
|
||||
}
|
||||
if (!$result['status']) {
|
||||
$this->status = FALSE;
|
||||
|
@ -274,27 +273,34 @@ class USER extends AjaxHandler
|
|||
}
|
||||
|
||||
// Set SHELL
|
||||
$this->setShell($_USER, $_new['SHELL']);
|
||||
if($_new['SHELL'] != $_old['SHELL']){
|
||||
$this->setShell($_USER, $_new['SHELL']);
|
||||
}
|
||||
|
||||
$this->setNSentries($_USER, $_new);
|
||||
if($_new[NS1].' '.$_new[NS2].' '.$_new[NS3].' '.$_new[NS4].' '.$_new[NS5].' '.$_new[NS6].' '.$_new[NS7].' '.$_new[NS8] !=
|
||||
$_old[NS1].' '.$_old[NS2].' '.$_old[NS3].' '.$_old[NS4].' '.$_old[NS5].' '.$_old[NS6].' '.$_old[NS7].' '.$_old[NS8]){
|
||||
$this->setNSentries($_USER, $_new);
|
||||
}
|
||||
|
||||
$names = array(
|
||||
'USER' => $_USER,
|
||||
'FNAME' => $_new['FNAME'],
|
||||
'LNAME' => $_new['LNAME']
|
||||
);
|
||||
if($_new['FNAME'] != $_old['FNAME'] || $_new['LNAME'] != $_old['LNAME']){
|
||||
$names = array(
|
||||
'USER' => $_USER,
|
||||
'FNAME' => $_new['FNAME'],
|
||||
'LNAME' => $_new['LNAME']
|
||||
);
|
||||
|
||||
$result = Vesta::execute(Vesta::V_CHANGE_SYS_USER_NAME, $names);
|
||||
if (!$result['status']) {
|
||||
$this->status = FALSE;
|
||||
$this->errors['NAMES'] = array($result['error_code'] => $result['error_message']);
|
||||
}
|
||||
$result = Vesta::execute(Vesta::V_CHANGE_SYS_USER_NAME, $names);
|
||||
if (!$result['status']) {
|
||||
$this->status = FALSE;
|
||||
$this->errors['NAMES'] = array($result['error_code'] => $result['error_message']);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->status) {
|
||||
Vesta::execute(Vesta::V_CHANGE_SYS_USER_PASSWORD, array('USER' => $_USER, 'PASSWORD' => $_old['PASSWORD']));
|
||||
Vesta::execute(Vesta::V_CHANGE_SYS_USER_PACKAGE, array('USER' => $_USER, 'PACKAGE' => $_old['PACKAGE']));
|
||||
Vesta::execute(Vesta::V_CHANGE_SYS_USER_CONTACT, array('USER' => $_USER, 'EMAIL' => $_old['EMAIL']));
|
||||
Vesta::execute(Vesta::V_CHANGE_SYS_USER_NS, array('USER' => $_USER, 'NS1' => $_old['NS1'], 'NS2' => $_old['NS2']));
|
||||
// Vesta::execute(Vesta::V_CHANGE_SYS_USER_NS, array('USER' => $_USER, 'NS1' => $_old['NS1'], 'NS2' => $_old['NS2']));
|
||||
Vesta::execute(Vesta::V_CHANGE_SYS_USER_SHELL, array('USER' => $_USER, 'SHELL' => $_old['SHELL']));
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class WEB_DOMAIN extends AjaxHandler
|
|||
'NGINX' => $record['NGINX'],
|
||||
'NGINX_EXT' => $record['NGINX_EXT'],
|
||||
'SUSPEND' => $record['SUSPEND'], // == 'yes' ? 'on' : 'off',
|
||||
'DATE' => date(Config::get('ui_date_format', strtotime($record['DATE'])))
|
||||
'DATE' => $record['DATE'] //date(Config::get('ui_date_format', strtotime($record['DATE'])))
|
||||
);
|
||||
$web_details['STAT'] == '' ? $web_details['STAT'] = 'none' : true;
|
||||
|
||||
|
|
|
@ -7,6 +7,6 @@ sudo_path = /usr/bin/sudo
|
|||
vesta_functions_path = /usr/local/vesta/bin/
|
||||
|
||||
; common
|
||||
ui_date_format = 'd.m.Y'
|
||||
ui_date_format = 'Y-m-d'
|
||||
; session
|
||||
session_dirname = 'vesta_sessions'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue