ftimme
2012-04-26 02820e15a35ead7c2c42b7ca8a7b68b983a58169
- Added expandable subsections to client, client template, and reseller limits.
10 files modified
662 ■■■■■ changed files
interface/web/client/client_template_edit.php 194 ●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/de_client.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/de_client_template.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/de_reseller.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/en_client.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/en_client_template.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/en_reseller.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/client/templates/client_edit_limits.htm 146 ●●●●● patch | view | raw | blame | history
interface/web/client/templates/client_template_edit_limits.htm 126 ●●●●● patch | view | raw | blame | history
interface/web/client/templates/reseller_edit_limits.htm 160 ●●●●● patch | view | raw | blame | history
interface/web/client/client_template_edit.php
@@ -1,97 +1,97 @@
<?php
/*
Copyright (c) 2007-2010, Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
      may be used to endorse or promote products derived from this software without
      specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$tform_def_file = "form/client_template.tform.php";
/******************************************
* End Form configuration
******************************************/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
require_once('tools.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('client');
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
// Loading classes
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
class page_action extends tform_actions {
    function onBeforeUpdate() {
        global $app;
        if(isset($this->dataRecord['template_type'])) {
            //* Check if the template_type has been changed
            $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id);
            if($rec['template_type'] != $this->dataRecord['template_type']) {
                //* Add a error message and switch back to old server
                $app->tform->errorMessage .= $app->lng('The template type can not be changed.');
                $this->dataRecord['template_type'] = $rec['template_type'];
            }
            unset($rec);
        }
    }
    /*
     This function is called automatically right after
     the data was successful updated in the database.
    */
    function onAfterUpdate() {
        global $app;
        /*
         * the template has changed. apply the new data to all clients
         */
        if ($this->dataRecord["template_type"] == 'm'){
            $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id;
        } else {
            $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . '/%"';
        }
        $clients = $app->db->queryAllRecords($sql);
        if (is_array($clients)){
            foreach ($clients as $client){
                applyClientTemplates($client['client_id']);
            }
        }
    }
}
$page = new page_action;
$page->onLoad();
?>
<?php
/*
Copyright (c) 2007-2010, Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
      may be used to endorse or promote products derived from this software without
      specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$tform_def_file = "form/client_template.tform.php";
/******************************************
* End Form configuration
******************************************/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
require_once('tools.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('client');
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
// Loading classes
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
class page_action extends tform_actions {
    function onBeforeUpdate() {
        global $app;
        if(isset($this->dataRecord['template_type'])) {
            //* Check if the template_type has been changed
            $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id);
            if($rec['template_type'] != $this->dataRecord['template_type']) {
                //* Add a error message and switch back to old server
                $app->tform->errorMessage .= $app->lng('The template type can not be changed.');
                $this->dataRecord['template_type'] = $rec['template_type'];
            }
            unset($rec);
        }
    }
    /*
     This function is called automatically right after
     the data was successful updated in the database.
    */
    function onAfterUpdate() {
        global $app;
        /*
         * the template has changed. apply the new data to all clients
         */
        if ($this->dataRecord["template_type"] == 'm'){
            $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id;
        } else {
            $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%'";
        }
        $clients = $app->db->queryAllRecords($sql);
        if (is_array($clients)){
            foreach ($clients as $client){
                applyClientTemplates($client['client_id']);
            }
        }
    }
}
$page = new page_action;
$page->onLoad();
?>
interface/web/client/lib/lang/de_client.lng
@@ -111,4 +111,10 @@
$wb['bank_name_txt'] = 'Bank';
$wb['bank_account_iban_txt'] = 'IBAN';
$wb['bank_account_swift_txt'] = 'BIC';
$wb["web_limits_txt"] = 'Web-Limits';
$wb["email_limits_txt"] = 'Email-Limits';
$wb["database_limits_txt"] = 'Datenbank-Limits';
$wb["cron_job_limits_txt"] = 'Cron Job-Limits';
$wb["dns_limits_txt"] = 'DNS-Limits';
$wb["virtualization_limits_txt"] = 'Virtualisierungs-Limits';
?>
interface/web/client/lib/lang/de_client_template.lng
@@ -69,4 +69,10 @@
$wb['web_php_options_txt'] = 'PHP Options';
$wb['template_type_txt'] = 'Template type';
$wb['template_name_txt'] = 'Template name';
$wb["web_limits_txt"] = 'Web-Limits';
$wb["email_limits_txt"] = 'Email-Limits';
$wb["database_limits_txt"] = 'Datenbank-Limits';
$wb["cron_job_limits_txt"] = 'Cron Job-Limits';
$wb["dns_limits_txt"] = 'DNS-Limits';
$wb["virtualization_limits_txt"] = 'Virtualisierungs-Limits';
?>
interface/web/client/lib/lang/de_reseller.lng
@@ -106,4 +106,10 @@
$wb['limit_openvz_vm_error_notint'] = 'The virtual server limit must be a number.';
$wb['web_php_options_notempty'] = 'No PHP option(s) selected. Select at least one PHP option.';
$wb['ssh_chroot_notempty'] = 'No SSH chroot option selected. Select at least one SSH option.';
$wb["web_limits_txt"] = 'Web-Limits';
$wb["email_limits_txt"] = 'Email-Limits';
$wb["database_limits_txt"] = 'Datenbank-Limits';
$wb["cron_job_limits_txt"] = 'Cron Job-Limits';
$wb["dns_limits_txt"] = 'DNS-Limits';
$wb["virtualization_limits_txt"] = 'Virtualisierungs-Limits';
?>
interface/web/client/lib/lang/en_client.lng
@@ -114,4 +114,10 @@
$wb["bank_name_txt"] = 'Bank name';
$wb["bank_account_iban_txt"] = 'IBAN';
$wb["bank_account_swift_txt"] = 'BIC / Swift';
$wb["web_limits_txt"] = 'Web Limits';
$wb["email_limits_txt"] = 'Email Limits';
$wb["database_limits_txt"] = 'Database Limits';
$wb["cron_job_limits_txt"] = 'Cron Job Limits';
$wb["dns_limits_txt"] = 'DNS Limits';
$wb["virtualization_limits_txt"] = 'Virtualization Limits';
?>
interface/web/client/lib/lang/en_client_template.lng
@@ -70,4 +70,10 @@
$wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
$wb["ssh_chroot_txt"] = 'SSH-Chroot Options';
$wb["web_php_options_txt"] = 'PHP Options';
$wb["web_limits_txt"] = 'Web Limits';
$wb["email_limits_txt"] = 'Email Limits';
$wb["database_limits_txt"] = 'Database Limits';
$wb["cron_job_limits_txt"] = 'Cron Job Limits';
$wb["dns_limits_txt"] = 'DNS Limits';
$wb["virtualization_limits_txt"] = 'Virtualization Limits';
?>
interface/web/client/lib/lang/en_reseller.lng
@@ -108,4 +108,10 @@
$wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
$wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.';
$wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.';
$wb["web_limits_txt"] = 'Web Limits';
$wb["email_limits_txt"] = 'Email Limits';
$wb["database_limits_txt"] = 'Database Limits';
$wb["cron_job_limits_txt"] = 'Cron Job Limits';
$wb["dns_limits_txt"] = 'DNS Limits';
$wb["virtualization_limits_txt"] = 'Virtualization Limits';
?>
interface/web/client/templates/client_edit_limits.htm
@@ -35,6 +35,61 @@
                    &nbsp;
                </div>
            </tmpl_if>
            <div class="subsectiontoggle"><span class="showing"></span>{tmpl_var name='web_limits_txt'}<em class="showing"></em></div>
            <div>
            <div class="ctrlHolder">
                <label for="default_webserver">{tmpl_var name='default_webserver_txt'}</label>
                <select name="default_webserver" id="default_webserver" class="selectInput">
                    {tmpl_var name='default_webserver'}
                </select>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label>
                <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label>
                <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="ctrlHolder">
                <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label>
                <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='web_php_options_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='web_php_options'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
                <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label>
                <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label>
                <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label>
                <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='ssh_chroot_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='ssh_chroot'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label>
                <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='email_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="default_mailserver">{tmpl_var name='default_mailserver_txt'}</label>
                <select name="default_mailserver" id="default_mailserver" class="selectInput">
@@ -97,52 +152,39 @@
                <label for="limit_spamfilter_policy">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                <input name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='database_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="default_webserver">{tmpl_var name='default_webserver_txt'}</label>
                <select name="default_webserver" id="default_webserver" class="selectInput">
                    {tmpl_var name='default_webserver'}
                <label for="default_dbserver">{tmpl_var name='default_dbserver_txt'}</label>
                <select name="default_dbserver" id="default_dbserver" class="selectInput">
                    {tmpl_var name='default_dbserver'}
                </select>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label>
                <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
                <label for="limit_database">{tmpl_var name='limit_database_txt'}</label>
                <input name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='cron_job_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label>
                <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
                <label for="limit_cron">{tmpl_var name='limit_cron_txt'}</label>
                <input name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='web_php_options_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='web_php_options'}
                </div>
            </div>
                <label for="limit_cron_type">{tmpl_var name='limit_cron_type_txt'}</label>
                <select name="limit_cron_type" id="limit_cron_type" class="selectInput formLengthHalf">
                    {tmpl_var name='limit_cron_type'}
                </select>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
                <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
                <label for="limit_cron_frequency">{tmpl_var name='limit_cron_frequency_txt'}</label>
                <input name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label>
                <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label>
                <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label>
                <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='ssh_chroot_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='ssh_chroot'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label>
                <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='dns_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="default_dnsserver">{tmpl_var name='default_dnsserver_txt'}</label>
                <select name="default_dnsserver" id="default_dnsserver" class="selectInput">
@@ -161,34 +203,9 @@
                <label for="limit_dns_record">{tmpl_var name='limit_dns_record_txt'}</label>
                <input name="limit_dns_record" id="limit_dns_record" value="{tmpl_var name='limit_dns_record'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="default_dbserver">{tmpl_var name='default_dbserver_txt'}</label>
                <select name="default_dbserver" id="default_dbserver" class="selectInput">
                    {tmpl_var name='default_dbserver'}
                </select>
            </div>
            <div class="ctrlHolder">
                <label for="limit_database">{tmpl_var name='limit_database_txt'}</label>
                <input name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_cron">{tmpl_var name='limit_cron_txt'}</label>
                <input name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_cron_type">{tmpl_var name='limit_cron_type_txt'}</label>
                <select name="limit_cron_type" id="limit_cron_type" class="selectInput formLengthHalf">
                    {tmpl_var name='limit_cron_type'}
                </select>
            </div>
            <div class="ctrlHolder">
                <label for="limit_cron_frequency">{tmpl_var name='limit_cron_frequency_txt'}</label>
                <input name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label>
                <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='virtualization_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_openvz_vm">{tmpl_var name='limit_openvz_vm_txt'}</label>
                <input name="limit_openvz_vm" id="limit_openvz_vm" value="{tmpl_var name='limit_openvz_vm'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
@@ -199,6 +216,7 @@
                    {tmpl_var name='limit_openvz_vm_template_id'}
                </select>
            </div>
            </div>
        </fieldset>
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
interface/web/client/templates/client_template_edit_limits.htm
@@ -5,6 +5,55 @@
    <div class="pnl_formsarea">
        <fieldset class="inlineLabels"><legend>Limits</legend>
            <div class="subsectiontoggle"><span class="showing"></span>{tmpl_var name='web_limits_txt'}<em class="showing"></em></div>
            <div>
            <div class="ctrlHolder">
                <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label>
                <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label>
                <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="ctrlHolder">
                <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label>
                <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='web_php_options_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='web_php_options'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
                <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label>
                <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label>
                <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label>
                <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='ssh_chroot_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='ssh_chroot'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label>
                <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='email_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_maildomain">{tmpl_var name='limit_maildomain_txt'}</label>
                <input name="limit_maildomain" id="limit_maildomain" value="{tmpl_var name='limit_maildomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
@@ -61,62 +110,16 @@
                <label for="limit_spamfilter_policy">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
                <input name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label>
                <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label>
                <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='web_php_options_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='web_php_options'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
                <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label>
                <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label>
                <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label>
                <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='ssh_chroot_txt'}</p>
                <div class="multiField">
                        {tmpl_var name='ssh_chroot'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label>
                <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_dns_zone">{tmpl_var name='limit_dns_zone_txt'}</label>
                <input name="limit_dns_zone" id="limit_dns_zone" value="{tmpl_var name='limit_dns_zone'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_dns_slave_zone">{tmpl_var name='limit_dns_slave_zone_txt'}</label>
                <input name="limit_dns_slave_zone" id="limit_dns_slave_zone" value="{tmpl_var name='limit_dns_slave_zone'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_dns_record">{tmpl_var name='limit_dns_record_txt'}</label>
                <input name="limit_dns_record" id="limit_dns_record" value="{tmpl_var name='limit_dns_record'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='database_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_database">{tmpl_var name='limit_database_txt'}</label>
                <input name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='cron_job_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_cron">{tmpl_var name='limit_cron_txt'}</label>
                <input name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
@@ -131,10 +134,24 @@
                <label for="limit_cron_frequency">{tmpl_var name='limit_cron_frequency_txt'}</label>
                <input name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label>
                <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='dns_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_dns_zone">{tmpl_var name='limit_dns_zone_txt'}</label>
                <input name="limit_dns_zone" id="limit_dns_zone" value="{tmpl_var name='limit_dns_zone'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_dns_slave_zone">{tmpl_var name='limit_dns_slave_zone_txt'}</label>
                <input name="limit_dns_slave_zone" id="limit_dns_slave_zone" value="{tmpl_var name='limit_dns_slave_zone'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            <div class="ctrlHolder">
                <label for="limit_dns_record">{tmpl_var name='limit_dns_record_txt'}</label>
                <input name="limit_dns_record" id="limit_dns_record" value="{tmpl_var name='limit_dns_record'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='virtualization_limits_txt'}<em></em></div>
            <div style="display:none;">
            <div class="ctrlHolder">
                <label for="limit_openvz_vm">{tmpl_var name='limit_openvz_vm_txt'}</label>
                <input name="limit_openvz_vm" id="limit_openvz_vm" value="{tmpl_var name='limit_openvz_vm'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
@@ -145,6 +162,7 @@
                    {tmpl_var name='limit_openvz_vm_template_id'}
                </select>
            </div>
            </div>
        </fieldset>
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
interface/web/client/templates/reseller_edit_limits.htm
@@ -26,7 +26,66 @@
      </div>
</tmpl_if>
-->
        <div class="ctrlHolder">
          <label for="limit_client">{tmpl_var name='limit_client_txt'}</label>
        <input name="limit_client" id="limit_client" value="{tmpl_var name='limit_client'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="subsectiontoggle"><span class="showing"></span>{tmpl_var name='web_limits_txt'}<em class="showing"></em></div>
            <div>
      <div class="ctrlHolder">
          <label for="default_webserver">{tmpl_var name='default_webserver_txt'}</label>
        <select name="default_webserver" id="default_webserver" class="selectInput">
                    {tmpl_var name='default_webserver'}
                </select>
      </div>
      <div class="ctrlHolder">
          <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label>
        <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label>
        <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
      </div>
      <div class="ctrlHolder">
          <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label>
        <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
      </div>
      <div class="ctrlHolder">
                <p class="label">{tmpl_var name='web_php_options_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='web_php_options'}
                    </div>
            </div>
      <div class="ctrlHolder">
          <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
        <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label>
        <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label>
        <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label>
        <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
                <p class="label">{tmpl_var name='ssh_chroot_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='ssh_chroot'}
                    </div>
            </div>
      <div class="ctrlHolder">
                <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label>
                <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
        </div>
        <div class="subsectiontoggle"><span></span>{tmpl_var name='email_limits_txt'}<em></em></div>
            <div style="display:none;">
        <div class="ctrlHolder">
          <label for="default_mailserver">{tmpl_var name='default_mailserver_txt'}</label>
        <select name="default_mailserver" id="default_mailserver" class="selectInput">
                    {tmpl_var name='default_mailserver'}
@@ -88,53 +147,40 @@
          <label for="limit_spamfilter_policy">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
        <input name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
        </div>
        <div class="subsectiontoggle"><span></span>{tmpl_var name='database_limits_txt'}<em></em></div>
            <div style="display:none;">
      <div class="ctrlHolder">
          <label for="default_webserver">{tmpl_var name='default_webserver_txt'}</label>
        <select name="default_webserver" id="default_webserver" class="selectInput">
                    {tmpl_var name='default_webserver'}
          <label for="default_dbserver">{tmpl_var name='default_dbserver_txt'}</label>
        <select name="default_dbserver" id="default_dbserver" class="selectInput">
                    {tmpl_var name='default_dbserver'}
                </select>
      </div>
      <div class="ctrlHolder">
          <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label>
        <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
          <label for="limit_database">{tmpl_var name='limit_database_txt'}</label>
        <input name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label>
        <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
      </div>
        </div>
        <div class="subsectiontoggle"><span></span>{tmpl_var name='cron_job_limits_txt'}<em></em></div>
            <div style="display:none;">
      <div class="ctrlHolder">
                <p class="label">{tmpl_var name='web_php_options_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='web_php_options'}
                    </div>
            </div>
        <label for="limit_cron">{tmpl_var name='limit_cron_txt'}</label>
        <input name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
        <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
        <label for="limit_cron_type">{tmpl_var name='limit_cron_type_txt'}</label>
        <select name="limit_cron_type" id="limit_cron_type" class="selectInput formLengthHalf">
          {tmpl_var name='limit_cron_type'}
        </select>
            </div>
      <div class="ctrlHolder">
          <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label>
        <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label>
        <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label>
        <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
                <p class="label">{tmpl_var name='ssh_chroot_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='ssh_chroot'}
                    </div>
            </div>
      <div class="ctrlHolder">
                <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label>
                <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
        <label for="limit_cron_frequency">{tmpl_var name='limit_cron_frequency_txt'}</label>
        <input name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
        </div>
        <div class="subsectiontoggle"><span></span>{tmpl_var name='dns_limits_txt'}<em></em></div>
            <div style="display:none;">
        <div class="ctrlHolder">
          <label for="default_dnsserver">{tmpl_var name='default_dnsserver_txt'}</label>
        <select name="default_dnsserver" id="default_dnsserver" class="selectInput">
                    {tmpl_var name='default_dnsserver'}
@@ -152,38 +198,9 @@
          <label for="limit_dns_record">{tmpl_var name='limit_dns_record_txt'}</label>
        <input name="limit_dns_record" id="limit_dns_record" value="{tmpl_var name='limit_dns_record'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_client">{tmpl_var name='limit_client_txt'}</label>
        <input name="limit_client" id="limit_client" value="{tmpl_var name='limit_client'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="default_dbserver">{tmpl_var name='default_dbserver_txt'}</label>
        <select name="default_dbserver" id="default_dbserver" class="selectInput">
                    {tmpl_var name='default_dbserver'}
                </select>
      </div>
      <div class="ctrlHolder">
          <label for="limit_database">{tmpl_var name='limit_database_txt'}</label>
        <input name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
        <label for="limit_cron">{tmpl_var name='limit_cron_txt'}</label>
        <input name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
        <label for="limit_cron_type">{tmpl_var name='limit_cron_type_txt'}</label>
        <select name="limit_cron_type" id="limit_cron_type" class="selectInput formLengthHalf">
          {tmpl_var name='limit_cron_type'}
        </select>
            </div>
      <div class="ctrlHolder">
        <label for="limit_cron_frequency">{tmpl_var name='limit_cron_frequency_txt'}</label>
        <input name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
            </div>
      <div class="ctrlHolder">
          <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label>
        <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />&nbsp;MB
      </div>
        </div>
      <div class="subsectiontoggle"><span></span>{tmpl_var name='virtualization_limits_txt'}<em></em></div>
            <div style="display:none;">
      <div class="ctrlHolder">
                <label for="limit_openvz_vm">{tmpl_var name='limit_openvz_vm_txt'}</label>
                <input name="limit_openvz_vm" id="limit_openvz_vm" value="{tmpl_var name='limit_openvz_vm'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
@@ -194,6 +211,7 @@
                    {tmpl_var name='limit_openvz_vm_template_id'}
                </select>
            </div>
        </div>
    </fieldset>
    <input type="hidden" name="id" value="{tmpl_var name='id'}">