From be7d7f8a01ebf297d09fcea72dea1766af50aa7c Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 08 Jul 2009 12:27:47 -0400
Subject: [PATCH] Separated clients and resellers and Fixed FS#775 - Client can choose the servers for it's client
---
interface/web/client/lib/module.conf.php | 32
interface/web/client/reseller_edit.php | 216 +++
interface/web/client/templates/client_edit_limits.htm | 4
interface/web/client/templates/resellers_list.htm | 62 +
interface/web/admin/form/server.tform.php | 4
interface/web/client/form/client.tform.php | 1458 ++++++++++++------------
interface/web/admin/templates/server_config_list.htm | 90
interface/web/client/reseller_list.php | 55
interface/web/client/lib/lang/en.lng | 3
interface/web/client/lib/lang/en_reseller.lng | 93 +
interface/web/client/lib/lang/en_resellers_list.lng | 9
interface/web/client/list/reseller.list.php | 87 +
interface/lib/classes/validate_reseller.inc.php | 47
interface/web/client/templates/reseller_edit_limits.htm | 171 +++
interface/lib/classes/custom_datasource.inc.php | 26
interface/web/admin/templates/server_list.htm | 126 +-
interface/web/client/client_list.php | 1
interface/web/client/form/reseller.tform.php | 733 ++++++++++++
interface/web/client/reseller_del.php | 81 +
interface/web/client/templates/reseller_edit_address.htm | 101 +
20 files changed, 2,546 insertions(+), 853 deletions(-)
diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php
index d89991f..52cd8b7 100644
--- a/interface/lib/classes/custom_datasource.inc.php
+++ b/interface/lib/classes/custom_datasource.inc.php
@@ -64,6 +64,32 @@
}
+ function client_servers($field, $record) {
+ global $app, $conf;
+
+ $server_type = $field['name'];
+
+ if($_SESSION["s"]["user"]["typ"] == 'user') {
+ // Get the limits of the client
+ $client_group_id = $_SESSION["s"]["user"]["default_group"];
+ $sql = "SELECT $server_type as server_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id";
+ $client = $app->db->queryOneRecord($sql);
+ $sql = "SELECT server_id,server_name FROM server WHERE server_id = ".$client['server_id'];
+ } else {
+ $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name";
+ }
+ $records = $app->db->queryAllRecords($sql);
+ $records_new = array();
+ if(is_array($records)) {
+ foreach($records as $rec) {
+ $key = $rec['server_id'];
+ $records_new[$key] = $rec['server_name'];
+ }
+ }
+ return $records_new;
+ }
+
+
}
diff --git a/interface/lib/classes/validate_reseller.inc.php b/interface/lib/classes/validate_reseller.inc.php
new file mode 100644
index 0000000..5453905
--- /dev/null
+++ b/interface/lib/classes/validate_reseller.inc.php
@@ -0,0 +1,47 @@
+<?php
+
+/*
+Copyright (c) 2007 - 2009, Till Brehm, projektfarm Gmbh
+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.
+*/
+
+class validate_reseller {
+
+ /*
+ Validator function to check if a given cron command is in correct form (url only).
+ */
+ function limit_client($field_name, $field_value, $validator) {
+ global $app;
+
+ if($field_value <= 0) {
+ return $app->tform->lng('limit_client_error_positive');
+ } else {
+ return '';
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/interface/web/admin/form/server.tform.php b/interface/web/admin/form/server.tform.php
index 80b672e..87b1c18 100644
--- a/interface/web/admin/form/server.tform.php
+++ b/interface/web/admin/form/server.tform.php
@@ -122,7 +122,7 @@
)
);
-
+/*
$form["tabs"]['config'] = array (
'title' => "Config",
'width' => 100,
@@ -146,6 +146,6 @@
##################################
)
);
-
+*/
?>
\ No newline at end of file
diff --git a/interface/web/admin/templates/server_config_list.htm b/interface/web/admin/templates/server_config_list.htm
index d6584b6..f635cad 100644
--- a/interface/web/admin/templates/server_config_list.htm
+++ b/interface/web/admin/templates/server_config_list.htm
@@ -1,50 +1,40 @@
-<h2><tmpl_var name="list_head_txt"></h2>
-<p><tmpl_var name="list_desc_txt"></p>
-
-<div class="panel panel_list_server_config">
-
- <div class="pnl_toolsarea">
- <fieldset><legend>Tools</legend>
- <div class="buttons">
- <button class="iconstxt icoAdd" type="button" onClick="loadContent('admin/server_config_edit.php');">
- <span>{tmpl_var name="add_new_record_txt"}</span>
- </button>
- </div>
- </fieldset>
- </div>
-
- <div class="pnl_listarea">
- <fieldset><legend><tmpl_var name="list_head_txt"></legend>
- <table class="list">
- <thead>
- <tr>
- <th class="tbl_col_server_name" scope="col"><tmpl_var name="server_name_txt"></th>
- <th class="tbl_col_buttons" scope="col"> </th>
- </tr>
- <tr>
- <td class="tbl_col_server_name"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td>
- <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/server_config_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
- </tr>
- </thead>
- <tbody>
- <tmpl_loop name="records">
- <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
- <td class="tbl_col_server_name"><a href="#" onClick="loadContent('admin/server_config_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_name"}</a></td>
- <td class="tbl_col_buttons">
- <div class="buttons icons16">
- <a class="icons16 icoDelete" href="javascript: del_record('admin/server_config_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
- </div>
- </td>
- </tr>
- </tmpl_loop>
- </tbody>
- <tfoot>
- <tr>
- <td class="tbl_footer tbl_paging" colspan="2"><tmpl_var name="paging"></td>
- </tr>
- </tfoot>
- </table>
- </fieldset>
- </div>
-
-</div>
+<h2><tmpl_var name="list_head_txt"></h2>
+<p><tmpl_var name="list_desc_txt"></p>
+
+<div class="panel panel_list_server_config">
+
+ <div class="pnl_listarea">
+ <fieldset><legend><tmpl_var name="list_head_txt"></legend>
+ <table class="list">
+ <thead>
+ <tr>
+ <th class="tbl_col_server_name" scope="col"><tmpl_var name="server_name_txt"></th>
+ <th class="tbl_col_buttons" scope="col"> </th>
+ </tr>
+ <tr>
+ <td class="tbl_col_server_name"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td>
+ <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/server_config_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
+ </tr>
+ </thead>
+ <tbody>
+ <tmpl_loop name="records">
+ <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
+ <td class="tbl_col_server_name"><a href="#" onClick="loadContent('admin/server_config_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_name"}</a></td>
+ <td class="tbl_col_buttons">
+ <div class="buttons icons16">
+ <a class="icons16 icoDelete" href="javascript: del_record('admin/server_config_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
+ </div>
+ </td>
+ </tr>
+ </tmpl_loop>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="tbl_footer tbl_paging" colspan="2"><tmpl_var name="paging"></td>
+ </tr>
+ </tfoot>
+ </table>
+ </fieldset>
+ </div>
+
+</div>
diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm
index b0ca262..7163843 100644
--- a/interface/web/admin/templates/server_list.htm
+++ b/interface/web/admin/templates/server_list.htm
@@ -1,68 +1,58 @@
-<h2><tmpl_var name="list_head_txt"></h2>
-<p><tmpl_var name="list_desc_txt"></p>
-
-<div class="panel panel_list_server">
-
- <div class="pnl_toolsarea">
- <fieldset><legend>Tools</legend>
- <div class="buttons">
- <button class="iconstxt icoAdd" type="button" onClick="loadContent('admin/server_edit.php');">
- <span>{tmpl_var name="add_new_record_txt"}</span>
- </button>
- </div>
- </fieldset>
- </div>
-
- <div class="pnl_listarea">
- <fieldset><legend><tmpl_var name="list_head_txt"></legend>
- <table class="list">
- <thead>
- <tr>
- <th class="tbl_col_server_name" scope="col"><tmpl_var name="server_name_txt"></th>
- <th class="tbl_col_mail_server" scope="col"><tmpl_var name="mail_server_txt"></th>
- <th class="tbl_col_web_server" scope="col"><tmpl_var name="web_server_txt"></th>
- <th class="tbl_col_dns_server" scope="col"><tmpl_var name="dns_server_txt"></th>
- <th class="tbl_col_file_server" scope="col"><tmpl_var name="file_server_txt"></th>
- <th class="tbl_col_db_server" scope="col"><tmpl_var name="db_server_txt"></th>
- <th class="tbl_col_vserver_server" scope="col"><tmpl_var name="vserver_server_txt"></th>
- <th class="tbl_col_buttons" scope="col"> </th>
- </tr>
- <tr>
- <td class="tbl_col_server_name"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td>
- <td class="tbl_col_mail_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_mail_server'}</select></td>
- <td class="tbl_col_web_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_web_server'}</select></td>
- <td class="tbl_col_dns_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_dns_server'}</select></td>
- <td class="tbl_col_file_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_file_server'}</select></td>
- <td class="tbl_col_db_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_db_server'}</select></td>
- <td class="tbl_col_vserver_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_vserver_server'}</select></td>
- <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/server_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
- </tr>
- </thead>
- <tbody>
- <tmpl_loop name="records">
- <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
- <td class="tbl_col_server_name"><a href="#" onClick="loadContent('admin/server_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_name"}</a></td>
- <td class="tbl_col_mail_server">{tmpl_var name="mail_server"}</td>
- <td class="tbl_col_web_server">{tmpl_var name="web_server"}</td>
- <td class="tbl_col_dns_server">{tmpl_var name="dns_server"}</td>
- <td class="tbl_col_file_server">{tmpl_var name="file_server"}</td>
- <td class="tbl_col_db_server">{tmpl_var name="db_server"}</td>
- <td class="tbl_col_vserver_server">{tmpl_var name="vserver_server"}</td>
- <td class="tbl_col_buttons">
- <div class="buttons icons16">
- <a class="icons16 icoDelete" href="javascript: del_record('admin/server_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
- </div>
- </td>
- </tr>
- </tmpl_loop>
- </tbody>
- <tfoot>
- <tr>
- <td class="tbl_footer tbl_paging" colspan="8"><tmpl_var name="paging"></td>
- </tr>
- </tfoot>
- </table>
- </fieldset>
- </div>
-
-</div>
+<h2><tmpl_var name="list_head_txt"></h2>
+<p><tmpl_var name="list_desc_txt"></p>
+
+<div class="panel panel_list_server">
+
+ <div class="pnl_listarea">
+ <fieldset><legend><tmpl_var name="list_head_txt"></legend>
+ <table class="list">
+ <thead>
+ <tr>
+ <th class="tbl_col_server_name" scope="col"><tmpl_var name="server_name_txt"></th>
+ <th class="tbl_col_mail_server" scope="col"><tmpl_var name="mail_server_txt"></th>
+ <th class="tbl_col_web_server" scope="col"><tmpl_var name="web_server_txt"></th>
+ <th class="tbl_col_dns_server" scope="col"><tmpl_var name="dns_server_txt"></th>
+ <th class="tbl_col_file_server" scope="col"><tmpl_var name="file_server_txt"></th>
+ <th class="tbl_col_db_server" scope="col"><tmpl_var name="db_server_txt"></th>
+ <th class="tbl_col_vserver_server" scope="col"><tmpl_var name="vserver_server_txt"></th>
+ <th class="tbl_col_buttons" scope="col"> </th>
+ </tr>
+ <tr>
+ <td class="tbl_col_server_name"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td>
+ <td class="tbl_col_mail_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_mail_server'}</select></td>
+ <td class="tbl_col_web_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_web_server'}</select></td>
+ <td class="tbl_col_dns_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_dns_server'}</select></td>
+ <td class="tbl_col_file_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_file_server'}</select></td>
+ <td class="tbl_col_db_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_db_server'}</select></td>
+ <td class="tbl_col_vserver_server"><select name="search_active" onChange="submitForm('pageForm','admin/server_list.php');">{tmpl_var name='search_vserver_server'}</select></td>
+ <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/server_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
+ </tr>
+ </thead>
+ <tbody>
+ <tmpl_loop name="records">
+ <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
+ <td class="tbl_col_server_name"><a href="#" onClick="loadContent('admin/server_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_name"}</a></td>
+ <td class="tbl_col_mail_server">{tmpl_var name="mail_server"}</td>
+ <td class="tbl_col_web_server">{tmpl_var name="web_server"}</td>
+ <td class="tbl_col_dns_server">{tmpl_var name="dns_server"}</td>
+ <td class="tbl_col_file_server">{tmpl_var name="file_server"}</td>
+ <td class="tbl_col_db_server">{tmpl_var name="db_server"}</td>
+ <td class="tbl_col_vserver_server">{tmpl_var name="vserver_server"}</td>
+ <td class="tbl_col_buttons">
+ <div class="buttons icons16">
+ <a class="icons16 icoDelete" href="javascript: del_record('admin/server_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
+ </div>
+ </td>
+ </tr>
+ </tmpl_loop>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="tbl_footer tbl_paging" colspan="8"><tmpl_var name="paging"></td>
+ </tr>
+ </tfoot>
+ </table>
+ </fieldset>
+ </div>
+
+</div>
diff --git a/interface/web/client/client_list.php b/interface/web/client/client_list.php
index 84eb799..590da21 100644
--- a/interface/web/client/client_list.php
+++ b/interface/web/client/client_list.php
@@ -18,6 +18,7 @@
$app->uses('listform_actions');
$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
+$app->listform_actions->SQLExtWhere = "limit_client = 0";
$app->listform_actions->onLoad();
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 4cc9dd5..323a5f4 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -1,730 +1,730 @@
-<?php
-
-/*
- Form Definition
-
- Tabledefinition
-
- Datatypes:
- - INTEGER (Forces the input to Int)
- - DOUBLE
- - CURRENCY (Formats the values to currency notation)
- - VARCHAR (no format check, maxlength: 255)
- - TEXT (no format check)
- - DATE (Dateformat, automatic conversion to timestamps)
-
- Formtype:
- - TEXT (Textfield)
- - TEXTAREA (Textarea)
- - PASSWORD (Password textfield, input is not shown when edited)
- - SELECT (Select option field)
- - RADIO
- - CHECKBOX
- - CHECKBOXARRAY
- - FILE
-
- VALUE:
- - Wert oder Array
-
- Hint:
- The ID field of the database table is not part of the datafield definition.
- The ID field must be always auto incement (int or bigint).
-
-
-*/
-
-$form["title"] = "Client";
-$form["description"] = "";
-$form["name"] = "client";
-$form["action"] = "client_edit.php";
-$form["db_table"] = "client";
-$form["db_table_idx"] = "client_id";
-$form["db_history"] = "yes";
-$form["tab_default"] = "address";
-$form["list_default"] = "client_list.php";
-$form["auth"] = 'yes';
-
-$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
-$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
-$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
-$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
-$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
-
-//* Languages
-$language_list = array();
-$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
-while ($file = @readdir ($handle)) {
- if ($file != '.' && $file != '..') {
- if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') {
- $tmp = substr($file, 0, 2);
- $language_list[$tmp] = $tmp;
- }
- }
-}
-
-$form["tabs"]['address'] = array (
- 'title' => "Address",
- 'width' => 100,
- 'template' => "templates/client_edit_address.htm",
- 'fields' => array (
- ##################################
- # Begin Datatable fields
- ##################################
- 'company_name' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'contact_name' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'contact_error_empty'),
- ),
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'username' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'username_error_empty'),
- 1 => array ( 'type' => 'CUSTOM',
- 'class' => 'validate_client',
- 'function' => 'username_unique',
- 'errmsg'=> 'username_error_unique'),
- 2 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-\_]{0,64}$/',
- 'errmsg'=> 'username_error_regex'),
- ),
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'password' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'PASSWORD',
- 'encryption'=> 'CRYPT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'language' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'default' => $conf["language"],
- 'value' => $language_list,
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'usertheme' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'default' => 'default',
- 'value' => array('default' => 'default'),
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'street' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'zip' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'city' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'state' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'country' => array (
- 'datatype' => 'VARCHAR',
-
- 'formtype' => 'SELECT',
- 'default' => 'DE',
- 'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
- 'keyfield'=> 'iso',
- 'valuefield'=> 'printable_name'
- ),
- 'value' => ''
- ),
- 'telephone' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'mobile' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'fax' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'email' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'internet' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => 'http://',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'icq' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
- ),
- 'notes' => array (
- 'datatype' => 'TEXT',
- 'formtype' => 'TEXTAREA',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '',
- 'maxlength' => '',
- 'rows' => '10',
- 'cols' => '30'
- ),
- ##################################
- # END Datatable fields
- ##################################
- )
-);
-
-$form["tabs"]['limits'] = array (
- 'title' => "Limits",
- 'width' => 80,
- 'template' => "templates/client_edit_limits.htm",
- 'fields' => array (
- ##################################
- # Begin Datatable fields
- ##################################
- 'template_master' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'SELECT',
- 'default' => '1',
- 'datasource' => array ( 'type' => 'CUSTOM',
- 'class'=> 'custom_datasource',
- 'function'=> 'master_templates'
- ),
- 'value' => ''
- ),
- 'template_additional' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- ),
- 'default_mailserver' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'SELECT',
- 'default' => '1',
- 'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND {AUTHSQL} ORDER BY server_name',
- 'keyfield'=> 'server_id',
- 'valuefield'=> 'server_name'
- ),
- 'value' => ''
- ),
- 'limit_maildomain' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_maildomain_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailbox' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailbox_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailalias' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailalias_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailforward' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailforward_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailcatchall' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailcatchall_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailrouting' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailrouting_error_notint'),
- ),
- 'default' => '0',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailfilter' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailfilter_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_fetchmail' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailfetchmail_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_mailquota' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_mailquota_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_spamfilter_wblist' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_spamfilter_user' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_spamfilter_user_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_spamfilter_policy' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_spamfilter_policy_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'default_webserver' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'SELECT',
- 'default' => '1',
- 'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT server_id,server_name FROM server WHERE web_server = 1 AND {AUTHSQL} ORDER BY server_name',
- 'keyfield'=> 'server_id',
- 'valuefield'=> 'server_name'
- ),
- 'value' => ''
- ),
- 'limit_web_domain' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_web_domain_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'web_php_options' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'CHECKBOXARRAY',
- 'default' => '',
- 'separator' => ',',
- 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP')
- ),
- 'limit_web_aliasdomain' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_web_aliasdomain_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_web_subdomain' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_web_subdomain_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_ftp_user' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_ftp_user_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_shell_user' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_shell_user_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'ssh_chroot' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'CHECKBOXARRAY',
- 'default' => '',
- 'separator' => ',',
- 'value' => array('no' => 'None', 'jailkit' => 'Jailkit')
- ),
- 'default_dnsserver' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'SELECT',
- 'default' => '1',
- 'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT server_id,server_name FROM server WHERE dns_server = 1 AND {AUTHSQL} ORDER BY server_name',
- 'keyfield'=> 'server_id',
- 'valuefield'=> 'server_name'
- ),
- 'value' => ''
- ),
- 'limit_dns_zone' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_dns_zone_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_dns_record' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_dns_record_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_client' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_client_error_notint'),
- ),
- 'default' => '0',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'default_dbserver' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'SELECT',
- 'default' => '1',
- 'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT server_id,server_name FROM server WHERE db_server = 1 AND {AUTHSQL} ORDER BY server_name',
- 'keyfield'=> 'server_id',
- 'valuefield'=> 'server_name'
- ),
- 'value' => ''
- ),
- 'limit_database' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_database_error_notint'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_cron' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_cron_error_notint'),
- ),
- 'default' => '0',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- 'limit_cron_type' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'default' => '',
- 'value' => array('full' => 'Full Cron','chrooted' => 'Chrooted Cron','url' => 'URL Cron')
- ),
- 'limit_cron_frequency' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
- 'errmsg'=> 'limit_cron_error_frequency'),
- ),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
- ##################################
- # END Datatable fields
- ##################################
- )
-);
-
-/*
-$form["tabs"]['ipaddress'] = array (
- 'title' => "IP Addresses",
- 'width' => 100,
- 'template' => "templates/client_edit_ipaddress.htm",
- 'fields' => array (
- ##################################
- # Beginn Datatable fields
- ##################################
- 'ip_address' => array (
- 'datatype' => 'TEXT',
- 'formtype' => 'CHECKBOXARRAY',
- 'default' => '',
- 'value' => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'),
- 'separator' => ';'
- ),
- ##################################
- # ENDE Datatable fields
- ##################################
- )
-);
-*/
-
-
+<?php
+
+/*
+ Form Definition
+
+ Tabledefinition
+
+ Datatypes:
+ - INTEGER (Forces the input to Int)
+ - DOUBLE
+ - CURRENCY (Formats the values to currency notation)
+ - VARCHAR (no format check, maxlength: 255)
+ - TEXT (no format check)
+ - DATE (Dateformat, automatic conversion to timestamps)
+
+ Formtype:
+ - TEXT (Textfield)
+ - TEXTAREA (Textarea)
+ - PASSWORD (Password textfield, input is not shown when edited)
+ - SELECT (Select option field)
+ - RADIO
+ - CHECKBOX
+ - CHECKBOXARRAY
+ - FILE
+
+ VALUE:
+ - Wert oder Array
+
+ Hint:
+ The ID field of the database table is not part of the datafield definition.
+ The ID field must be always auto incement (int or bigint).
+
+
+*/
+
+$form["title"] = "Client";
+$form["description"] = "";
+$form["name"] = "client";
+$form["action"] = "client_edit.php";
+$form["db_table"] = "client";
+$form["db_table_idx"] = "client_id";
+$form["db_history"] = "yes";
+$form["tab_default"] = "address";
+$form["list_default"] = "client_list.php";
+$form["auth"] = 'yes';
+
+$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
+$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
+$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
+
+//* Languages
+$language_list = array();
+$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
+while ($file = @readdir ($handle)) {
+ if ($file != '.' && $file != '..') {
+ if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') {
+ $tmp = substr($file, 0, 2);
+ $language_list[$tmp] = $tmp;
+ }
+ }
+}
+
+$form["tabs"]['address'] = array (
+ 'title' => "Address",
+ 'width' => 100,
+ 'template' => "templates/client_edit_address.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'company_name' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'contact_name' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'contact_error_empty'),
+ ),
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'username' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'username_error_empty'),
+ 1 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_client',
+ 'function' => 'username_unique',
+ 'errmsg'=> 'username_error_unique'),
+ 2 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[\w\.\-\_]{0,64}$/',
+ 'errmsg'=> 'username_error_regex'),
+ ),
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'password' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'PASSWORD',
+ 'encryption'=> 'CRYPT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'language' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => $conf["language"],
+ 'value' => $language_list,
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'usertheme' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => 'default',
+ 'value' => array('default' => 'default'),
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'street' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'zip' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'city' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'state' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'country' => array (
+ 'datatype' => 'VARCHAR',
+
+ 'formtype' => 'SELECT',
+ 'default' => 'DE',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
+ 'keyfield'=> 'iso',
+ 'valuefield'=> 'printable_name'
+ ),
+ 'value' => ''
+ ),
+ 'telephone' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'mobile' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'fax' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'email' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'internet' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => 'http://',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'icq' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'notes' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXTAREA',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '',
+ 'maxlength' => '',
+ 'rows' => '10',
+ 'cols' => '30'
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
+ )
+);
+
+$form["tabs"]['limits'] = array (
+ 'title' => "Limits",
+ 'width' => 80,
+ 'template' => "templates/client_edit_limits.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'template_master' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'master_templates'
+ ),
+ 'value' => ''
+ ),
+ 'template_additional' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ ),
+ 'default_mailserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'client_servers'
+ ),
+ 'value' => '',
+ 'name' => 'default_mailserver'
+ ),
+ 'limit_maildomain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_maildomain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailbox' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailbox_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailalias' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailalias_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailforward' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailforward_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailcatchall' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailcatchall_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailrouting' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailrouting_error_notint'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailfilter' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailfilter_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_fetchmail' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailfetchmail_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailquota' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailquota_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_spamfilter_wblist' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_spamfilter_user' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_spamfilter_user_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_spamfilter_policy' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_spamfilter_policy_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'default_webserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'client_servers'
+ ),
+ 'value' => '',
+ 'name' => 'default_webserver'
+ ),
+ 'limit_web_domain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_web_domain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'web_php_options' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'default' => '',
+ 'separator' => ',',
+ 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP')
+ ),
+ 'limit_web_aliasdomain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_web_aliasdomain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_web_subdomain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_web_subdomain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_ftp_user' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_ftp_user_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_shell_user' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_shell_user_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'ssh_chroot' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'default' => '',
+ 'separator' => ',',
+ 'value' => array('no' => 'None', 'jailkit' => 'Jailkit')
+ ),
+ 'default_dnsserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'client_servers'
+ ),
+ 'value' => '',
+ 'name' => 'default_dnsserver'
+ ),
+ 'limit_dns_zone' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_dns_zone_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_dns_record' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_dns_record_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_client' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_client_error_notint'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'default_dbserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'client_servers'
+ ),
+ 'value' => '',
+ 'name' => 'default_dbserver'
+ ),
+ 'limit_database' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_database_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_cron' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_cron_error_notint'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_cron_type' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => '',
+ 'value' => array('full' => 'Full Cron','chrooted' => 'Chrooted Cron','url' => 'URL Cron')
+ ),
+ 'limit_cron_frequency' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_cron_error_frequency'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
+ )
+);
+
+/*
+$form["tabs"]['ipaddress'] = array (
+ 'title' => "IP Addresses",
+ 'width' => 100,
+ 'template' => "templates/client_edit_ipaddress.htm",
+ 'fields' => array (
+ ##################################
+ # Beginn Datatable fields
+ ##################################
+ 'ip_address' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'default' => '',
+ 'value' => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'),
+ 'separator' => ';'
+ ),
+ ##################################
+ # ENDE Datatable fields
+ ##################################
+ )
+);
+*/
+
+
?>
\ No newline at end of file
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
new file mode 100644
index 0000000..d069e00
--- /dev/null
+++ b/interface/web/client/form/reseller.tform.php
@@ -0,0 +1,733 @@
+<?php
+
+/*
+ Form Definition
+
+ Tabledefinition
+
+ Datatypes:
+ - INTEGER (Forces the input to Int)
+ - DOUBLE
+ - CURRENCY (Formats the values to currency notation)
+ - VARCHAR (no format check, maxlength: 255)
+ - TEXT (no format check)
+ - DATE (Dateformat, automatic conversion to timestamps)
+
+ Formtype:
+ - TEXT (Textfield)
+ - TEXTAREA (Textarea)
+ - PASSWORD (Password textfield, input is not shown when edited)
+ - SELECT (Select option field)
+ - RADIO
+ - CHECKBOX
+ - CHECKBOXARRAY
+ - FILE
+
+ VALUE:
+ - Wert oder Array
+
+ Hint:
+ The ID field of the database table is not part of the datafield definition.
+ The ID field must be always auto incement (int or bigint).
+
+
+*/
+
+$form["title"] = "Reseller";
+$form["description"] = "";
+$form["name"] = "reseller";
+$form["action"] = "reseller_edit.php";
+$form["db_table"] = "client";
+$form["db_table_idx"] = "client_id";
+$form["db_history"] = "yes";
+$form["tab_default"] = "address";
+$form["list_default"] = "reseller_list.php";
+$form["auth"] = 'yes';
+
+$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
+$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
+$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
+
+//* Languages
+$language_list = array();
+$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
+while ($file = @readdir ($handle)) {
+ if ($file != '.' && $file != '..') {
+ if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') {
+ $tmp = substr($file, 0, 2);
+ $language_list[$tmp] = $tmp;
+ }
+ }
+}
+
+$form["tabs"]['address'] = array (
+ 'title' => "Address",
+ 'width' => 100,
+ 'template' => "templates/reseller_edit_address.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'company_name' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'contact_name' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'contact_error_empty'),
+ ),
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'username' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'username_error_empty'),
+ 1 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_client',
+ 'function' => 'username_unique',
+ 'errmsg'=> 'username_error_unique'),
+ 2 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[\w\.\-\_]{0,64}$/',
+ 'errmsg'=> 'username_error_regex'),
+ ),
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'password' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'PASSWORD',
+ 'encryption'=> 'CRYPT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'language' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => $conf["language"],
+ 'value' => $language_list,
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'usertheme' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => 'default',
+ 'value' => array('default' => 'default'),
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'street' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'zip' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'city' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'state' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'country' => array (
+ 'datatype' => 'VARCHAR',
+
+ 'formtype' => 'SELECT',
+ 'default' => 'DE',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
+ 'keyfield'=> 'iso',
+ 'valuefield'=> 'printable_name'
+ ),
+ 'value' => ''
+ ),
+ 'telephone' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'mobile' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'fax' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'email' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'internet' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => 'http://',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'icq' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'notes' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXTAREA',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '',
+ 'maxlength' => '',
+ 'rows' => '10',
+ 'cols' => '30'
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
+ )
+);
+
+$form["tabs"]['limits'] = array (
+ 'title' => "Limits",
+ 'width' => 80,
+ 'template' => "templates/reseller_edit_limits.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'template_master' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'master_templates'
+ ),
+ 'value' => ''
+ ),
+ 'template_additional' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ ),
+ 'default_mailserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND {AUTHSQL} ORDER BY server_name',
+ 'keyfield'=> 'server_id',
+ 'valuefield'=> 'server_name'
+ ),
+ 'value' => ''
+ ),
+ 'limit_maildomain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_maildomain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailbox' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailbox_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailalias' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailalias_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailforward' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailforward_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailcatchall' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailcatchall_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailrouting' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailrouting_error_notint'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailfilter' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailfilter_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_fetchmail' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailfetchmail_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_mailquota' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_mailquota_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_spamfilter_wblist' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_spamfilter_user' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_spamfilter_user_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_spamfilter_policy' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_spamfilter_policy_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'default_webserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT server_id,server_name FROM server WHERE web_server = 1 AND {AUTHSQL} ORDER BY server_name',
+ 'keyfield'=> 'server_id',
+ 'valuefield'=> 'server_name'
+ ),
+ 'value' => ''
+ ),
+ 'limit_web_domain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_web_domain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'web_php_options' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'default' => '',
+ 'separator' => ',',
+ 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP')
+ ),
+ 'limit_web_aliasdomain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_web_aliasdomain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_web_subdomain' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_web_subdomain_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_ftp_user' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_ftp_user_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_shell_user' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_shell_user_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'ssh_chroot' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'default' => '',
+ 'separator' => ',',
+ 'value' => array('no' => 'None', 'jailkit' => 'Jailkit')
+ ),
+ 'default_dnsserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT server_id,server_name FROM server WHERE dns_server = 1 AND {AUTHSQL} ORDER BY server_name',
+ 'keyfield'=> 'server_id',
+ 'valuefield'=> 'server_name'
+ ),
+ 'value' => ''
+ ),
+ 'limit_dns_zone' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_dns_zone_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_dns_record' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_dns_record_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_client' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_client_error_notint'),
+ 1 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_reseller',
+ 'function' => 'limit_client'),
+ ),
+ 'default' => '1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'default_dbserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT server_id,server_name FROM server WHERE db_server = 1 AND {AUTHSQL} ORDER BY server_name',
+ 'keyfield'=> 'server_id',
+ 'valuefield'=> 'server_name'
+ ),
+ 'value' => ''
+ ),
+ 'limit_database' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_database_error_notint'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_cron' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_cron_error_notint'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'limit_cron_type' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => '',
+ 'value' => array('full' => 'Full Cron','chrooted' => 'Chrooted Cron','url' => 'URL Cron')
+ ),
+ 'limit_cron_frequency' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'errmsg'=> 'limit_cron_error_frequency'),
+ ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
+ )
+);
+
+/*
+$form["tabs"]['ipaddress'] = array (
+ 'title' => "IP Addresses",
+ 'width' => 100,
+ 'template' => "templates/client_edit_ipaddress.htm",
+ 'fields' => array (
+ ##################################
+ # Beginn Datatable fields
+ ##################################
+ 'ip_address' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'default' => '',
+ 'value' => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'),
+ 'separator' => ';'
+ ),
+ ##################################
+ # ENDE Datatable fields
+ ##################################
+ )
+);
+*/
+
+
+?>
\ No newline at end of file
diff --git a/interface/web/client/lib/lang/en.lng b/interface/web/client/lib/lang/en.lng
index af8ccc2..e384def 100644
--- a/interface/web/client/lib/lang/en.lng
+++ b/interface/web/client/lib/lang/en.lng
@@ -6,4 +6,7 @@
$wb['Edit Client'] = 'Edit Client';
$wb['Clients'] = 'Clients';
$wb['Edit Client-Templates'] = 'Edit Client-Templates';
+$wb['Add Reseller'] = 'Add Reseller';
+$wb['Edit Reseller'] = 'Edit Reseller';
+$wb['Resellers'] = 'Resellers';
?>
\ No newline at end of file
diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng
new file mode 100644
index 0000000..906fd44
--- /dev/null
+++ b/interface/web/client/lib/lang/en_reseller.lng
@@ -0,0 +1,93 @@
+<?php
+$wb["limit_maildomain_txt"] = 'Max. number of email domains';
+$wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
+$wb["limit_mailalias_txt"] = 'Max. number of email aliases';
+$wb["limit_mailforward_txt"] = 'Max. number of email forwarders';
+$wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
+$wb["limit_mailrouting_txt"] = 'Max. number of email routes';
+$wb["limit_mailfilter_txt"] = 'Max. number of email filters';
+$wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts';
+$wb["limit_mailquota_txt"] = 'Mailbox quota';
+$wb["limit_spamfilter_wblist_txt"] = 'Max. number of spamfilter white / blacklist filters';
+$wb["limit_spamfilter_user_txt"] = 'Max. number of spamfilter users';
+$wb["limit_spamfilter_policy_txt"] = 'Max. number of spamfilter policys';
+$wb["default_mailserver_txt"] = 'Default Mailserver';
+$wb["company_name_txt"] = 'Company name';
+$wb["contact_name_txt"] = 'Contact name';
+$wb["username_txt"] = 'Username';
+$wb["password_txt"] = 'Password';
+$wb["password_strength_txt"] = 'Password strength';
+$wb["language_txt"] = 'Language';
+$wb["usertheme_txt"] = 'Theme';
+$wb["street_txt"] = 'Street';
+$wb["zip_txt"] = 'ZIP';
+$wb["city_txt"] = 'City';
+$wb["state_txt"] = 'State';
+$wb["country_txt"] = 'Country';
+$wb["telephone_txt"] = 'Telephone';
+$wb["mobile_txt"] = 'Mobile';
+$wb["fax_txt"] = 'Fax';
+$wb["email_txt"] = 'Email';
+$wb["internet_txt"] = 'Internet';
+$wb["icq_txt"] = 'ICQ';
+$wb["notes_txt"] = 'Notes';
+$wb["company_txt"] = 'Company';
+$wb["title_txt"] = 'Title';
+$wb["firstname_txt"] = 'Firstname';
+$wb["surname_txt"] = 'Surname';
+$wb["limit_domain_txt"] = 'limit_domain';
+$wb["limit_subdomain_txt"] = 'limit_subdomain';
+$wb["limit_webquota_txt"] = 'limit_webquota';
+$wb["limit_database_txt"] = 'limit_database';
+$wb["limit_cron_txt"] = 'Max. number of cron jobs';
+$wb["limit_cron_type_txt"] = 'Max. type of cron jobs (chrooted and full implies url)';
+$wb["limit_cron_frequency_txt"] = 'Min. delay between executions';
+$wb["ip_address_txt"] = 'ip_address';
+$wb["limit_client_error_notint"] = 'Client Limit is not a number.';
+$wb["firstname_error_empty"] = 'Firstname is empty.';
+$wb["contact_error_empty"] = 'Contact name is empty.';
+$wb["default_webserver_txt"] = 'Default Webserver';
+$wb["limit_web_domain_txt"] = 'Max. number of web domains';
+$wb["limit_web_aliasdomain_txt"] = 'Max. number of web aliasdomains';
+$wb["limit_web_subdomain_txt"] = 'Max. number of web subdomains';
+$wb["limit_ftp_user_txt"] = 'Max. number of FTP users';
+$wb["default_dnsserver_txt"] = 'Default DNS Server';
+$wb["limit_dns_zone_txt"] = 'Max. number of DNS zones';
+$wb["limit_dns_record_txt"] = 'Max. number DNS records';
+$wb["limit_shell_user_txt"] = 'Max. number of Shell users';
+$wb["limit_client_txt"] = 'Max. number of Clients';
+$wb["username_error_empty"] = 'Username is empty.';
+$wb["username_error_unique"] = 'The username must be unique.';
+$wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.';
+$wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.';
+$wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.';
+$wb["limit_mailforward_error_notint"] = 'The email forward limit must be a number.';
+$wb["limit_mailcatchall_error_notint"] = 'The email catchall limit must be a number.';
+$wb["limit_mailrouting_error_notint"] = 'The email routing limit must be a number.';
+$wb["limit_mailfilter_error_notint"] = 'The email filter limit must be a number.';
+$wb["limit_mailfetchmail_error_notint"] = 'The fetchmail limit must be a number.';
+$wb["limit_mailquota_error_notint"] = 'The email quota limit must be a number.';
+$wb["limit_spamfilter_wblist_error_notint"] = 'The spamfilter white / blacklist limit must be a number.';
+$wb["limit_spamfilter_user_error_notint"] = 'The spamfilter user limit must be a number.';
+$wb["limit_spamfilter_policy_error_notint"] = 'The spamfilter policy limit must be a number.';
+$wb["limit_web_domain_error_notint"] = 'The website limit must be a number.';
+$wb["limit_web_aliasdomain_error_notint"] = 'The website alias domain limit must be a number.';
+$wb["limit_web_subdomain_error_notint"] = 'The website subdomain limit must be a number.';
+$wb["limit_ftp_user_error_notint"] = 'The ftp user limit must be a number.';
+$wb["limit_shell_user_error_notint"] = 'The shell user limit must be a number.';
+$wb["limit_dns_zone_error_notint"] = 'The dns zone limit must be a number.';
+$wb["limit_dns_zone_error_notint"] = 'The dns record limit must be a number.';
+$wb["limit_client_error_notint"] = 'The sub client limit must be a number.';
+$wb["default_dbserver_txt"] = 'Default Database Server';
+$wb["limit_database_txt"] = 'Max. number of Databases';
+$wb["limit_database_error_notint"] = 'The database limit must be a number.';
+$wb["limit_cron_error_notint"] = 'The cron limit must be a number.';
+$wb["limit_cron_error_frequency"] = 'The cron frequency limit must be a number.';
+$wb["username_error_regex"] = 'The Username contains invalid chracaters.';
+$wb["template_master_txt"] = 'Master template';
+$wb["template_additional_txt"] = 'Addon template';
+$wb["ssh_chroot_txt"] = 'SSH-Chroot Options';
+$wb["web_php_options_txt"] = 'PHP Options';
+$wb["limit_client_error"] = 'The max. number of clients is reached.';
+$wb["limit_client_error_positive"] = 'The number of clients must be > 0';
+?>
diff --git a/interface/web/client/lib/lang/en_resellers_list.lng b/interface/web/client/lib/lang/en_resellers_list.lng
new file mode 100644
index 0000000..523a467
--- /dev/null
+++ b/interface/web/client/lib/lang/en_resellers_list.lng
@@ -0,0 +1,9 @@
+<?php
+$wb["list_head_txt"] = 'Resellers';
+$wb["client_id_txt"] = 'ID';
+$wb["company_name_txt"] = 'Company name';
+$wb["contact_name_txt"] = 'Contact name';
+$wb["city_txt"] = 'City';
+$wb["country_txt"] = 'Country';
+$wb["add_new_record_txt"] = 'Add new reseller';
+?>
\ No newline at end of file
diff --git a/interface/web/client/lib/module.conf.php b/interface/web/client/lib/module.conf.php
index 4d9a0ce..cc4347b 100644
--- a/interface/web/client/lib/module.conf.php
+++ b/interface/web/client/lib/module.conf.php
@@ -28,4 +28,36 @@
$module["nav"][] = array( 'title' => 'Clients',
'open' => 1,
'items' => $items);
+
+unset($items);
+
+
+if($_SESSION["s"]["user"]["typ"] == 'admin'){
+
+$items[] = array( 'title' => "Add Reseller",
+ 'target' => 'content',
+ 'link' => 'client/reseller_edit.php');
+
+$items[] = array( 'title' => "Edit Reseller",
+ 'target' => 'content',
+ 'link' => 'client/reseller_list.php');
+
+$module["nav"][] = array( 'title' => 'Resellers',
+ 'open' => 1,
+ 'items' => $items);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
?>
\ No newline at end of file
diff --git a/interface/web/client/list/reseller.list.php b/interface/web/client/list/reseller.list.php
new file mode 100644
index 0000000..39b8ecc
--- /dev/null
+++ b/interface/web/client/list/reseller.list.php
@@ -0,0 +1,87 @@
+<?php
+
+/*
+ Datatypes:
+ - INTEGER
+ - DOUBLE
+ - CURRENCY
+ - VARCHAR
+ - TEXT
+ - DATE
+*/
+
+
+
+// Name of the list
+$liste["name"] = "resellers";
+
+// Database table
+$liste["table"] = "client";
+
+// Index index field of the database table
+$liste["table_idx"] = "client_id";
+
+// Search Field Prefix
+$liste["search_prefix"] = "search_";
+
+// Records per page
+$liste["records_per_page"] = 15;
+
+// Script File of the list
+$liste["file"] = "reseller_list.php";
+
+// Script file of the edit form
+$liste["edit_file"] = "reseller_edit.php";
+
+// Script File of the delete script
+$liste["delete_file"] = "reseller_del.php";
+
+// Paging Template
+$liste["paging_tpl"] = "templates/paging.tpl.htm";
+
+// Enable authe
+$liste["auth"] = "yes";
+
+
+/*****************************************************
+* Suchfelder
+*****************************************************/
+
+$liste["item"][] = array( 'field' => "company_name",
+ 'datatype' => "VARCHAR",
+ 'formtype' => "TEXT",
+ 'op' => "like",
+ 'prefix' => "%",
+ 'suffix' => "%",
+ 'width' => "",
+ 'value' => "");
+
+$liste["item"][] = array( 'field' => "contact_name",
+ 'datatype' => "VARCHAR",
+ 'formtype' => "TEXT",
+ 'op' => "like",
+ 'prefix' => "%",
+ 'suffix' => "%",
+ 'width' => "",
+ 'value' => "");
+
+$liste["item"][] = array( 'field' => "city",
+ 'datatype' => "VARCHAR",
+ 'formtype' => "TEXT",
+ 'op' => "like",
+ 'prefix' => "%",
+ 'suffix' => "%",
+ 'width' => "",
+ 'value' => "");
+
+$liste["item"][] = array( 'field' => "country",
+ 'datatype' => "VARCHAR",
+ 'formtype' => "TEXT",
+ 'op' => "like",
+ 'prefix' => "%",
+ 'suffix' => "%",
+ 'width' => "",
+ 'value' => "");
+
+
+?>
\ No newline at end of file
diff --git a/interface/web/client/reseller_del.php b/interface/web/client/reseller_del.php
new file mode 100644
index 0000000..8ee40a5
--- /dev/null
+++ b/interface/web/client/reseller_del.php
@@ -0,0 +1,81 @@
+<?php
+
+/*
+Copyright (c) 2005 - 2009, Till Brehm, projektfarm Gmbh
+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
+******************************************/
+
+$list_def_file = "list/reseller.list.php";
+$tform_def_file = "form/reseller.tform.php";
+
+/******************************************
+* End Form configuration
+******************************************/
+
+require_once('../../lib/config.inc.php');
+require_once('../../lib/app.inc.php');
+
+//* Check permissions for module
+$app->auth->check_module_permissions('client');
+
+if($_SESSION["s"]["user"]["typ"] != 'admin') die('Access only for administrators.');
+
+$app->uses('tpl,tform');
+$app->load('tform_actions');
+
+class page_action extends tform_actions {
+ function onAfterDelete() {
+ global $app, $conf;
+
+ $client_id = intval($this->dataRecord['client_id']);
+
+ if($client_id > 0) {
+ // TODO: Delete all records (sub-clients, mail, web, etc....) of this client.
+
+ // remove the group of the client from the resellers group
+ $parent_client_id = intval($this->dataRecord['parent_client_id']);
+ $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = $parent_client_id");
+ $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id");
+ $app->auth->remove_group_from_user($parent_user['userid'],$client_group['groupid']);
+
+ // delete the group of the client
+ $app->db->query("DELETE FROM sys_group WHERE client_id = $client_id");
+
+ // delete the sys user(s) of the client
+ $app->db->query("DELETE FROM sys_user WHERE client_id = $client_id");
+ }
+
+ }
+}
+
+$page = new page_action;
+$page->onDelete()
+
+?>
\ No newline at end of file
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
new file mode 100644
index 0000000..bbbdd39
--- /dev/null
+++ b/interface/web/client/reseller_edit.php
@@ -0,0 +1,216 @@
+<?php
+/*
+Copyright (c) 2005 - 2009, Till Brehm, projektfarm Gmbh
+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/reseller.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('Access only for administrators.');
+
+// Loading classes
+$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
+
+class page_action extends tform_actions {
+
+
+ function onShowNew() {
+ global $app, $conf;
+
+ // we will check only users, not admins
+ if($_SESSION["s"]["user"]["typ"] == 'user') {
+
+ // Get the limits of the client
+ $client_group_id = $_SESSION["s"]["user"]["default_group"];
+ $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+
+ // Check if the user may add another website.
+ if($client["limit_client"] >= 0) {
+ $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = $client_group_id");
+ if($tmp["number"] >= $client["limit_client"]) {
+ $app->error($app->tform->wordbook["limit_client_txt"]);
+ }
+ }
+ }
+
+ parent::onShowNew();
+ }
+
+
+ function onSubmit() {
+ global $app, $conf;
+
+ // we will check only users, not admins
+ if($_SESSION["s"]["user"]["typ"] == 'user' && $this->id == 0) {
+
+ // Get the limits of the client
+ $client_group_id = $_SESSION["s"]["user"]["default_group"];
+ $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+
+ // Check if the user may add another website.
+ if($client["limit_client"] >= 0) {
+ $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = $client_group_id");
+ if($tmp["number"] >= $client["limit_client"]) {
+ $app->error($app->tform->wordbook["limit_client_txt"]);
+ }
+ }
+ }
+
+ parent::onSubmit();
+ }
+
+
+ function onShowEnd() {
+
+ global $app;
+
+ $sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a'";
+ $tpls = $app->db->queryAllRecords($sql);
+ $option = '';
+ $tpl = array();
+ foreach($tpls as $item){
+ $option .= '<option value="' . $item['template_id'] . '|' . $item['template_name'] . '">' . $item['template_name'] . '</option>';
+ $tpl[$item['template_id']] = $item['template_name'];
+ }
+ $app->tpl->setVar('tpl_add_select',$option);
+
+ $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id;
+ $result = $app->db->queryOneRecord($sql);
+ $tplAdd = explode("/", $result['template_additional']);
+ $text = '';
+ foreach($tplAdd as $item){
+ if (trim($item) != ''){
+ if ($text != '') $text .= '<br />';
+ $text .= $tpl[$item];
+ }
+ }
+
+ $app->tpl->setVar('template_additional_list', $text);
+
+ parent::onShowEnd();
+
+ }
+
+ /*
+ This function is called automatically right after
+ the data was successful inserted in the database.
+ */
+ function onAfterInsert() {
+ global $app;
+ // Create the group for the reseller
+ $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".mysql_real_escape_string($this->dataRecord["username"])."','',".$this->id.")", 'groupid');
+ $groups = $groupid;
+
+ $username = $app->db->quote($this->dataRecord["username"]);
+ $password = $app->db->quote($this->dataRecord["password"]);
+ $modules = ISPC_INTERFACE_MODULES_ENABLED;
+ if($this->dataRecord["limit_client"] > 0) $modules .= ',client';
+ $startmodule = 'mail';
+ $usertheme = $app->db->quote($this->dataRecord["usertheme"]);
+ $type = 'user';
+ $active = 1;
+ $language = $app->db->quote($this->dataRecord["language"]);
+
+ // Create the controlpaneluser for the reseller
+ $sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id)
+ VALUES ('$username',md5('$password'),'$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")";
+ $app->db->query($sql);
+
+ //* set the number of clients to 1
+ $app->db->query("UPDATE client SET limit_client = 1 WHERE client_id = ".$this->id);
+
+ /* If there is a client-template, process it */
+ applyClientTemplates($this->id);
+
+ parent::onAfterInsert();
+ }
+
+
+ /*
+ This function is called automatically right after
+ the data was successful updated in the database.
+ */
+ function onAfterUpdate() {
+ global $app;
+
+ // username changed
+ if(isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
+ $username = $app->db->quote($this->dataRecord["username"]);
+ $client_id = $this->id;
+ $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";
+ $app->db->query($sql);
+
+ $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = $client_id");
+ $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']);
+ unset($tmp);
+ }
+
+ // password changed
+ if(isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
+ $password = $app->db->quote($this->dataRecord["password"]);
+ $client_id = $this->id;
+ $sql = "UPDATE sys_user SET passwort = md5('$password') WHERE client_id = $client_id";
+ $app->db->query($sql);
+ }
+
+ // reseller status changed
+ if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != $this->oldDataRecord["limit_client"]) {
+ $modules = ISPC_INTERFACE_MODULES_ENABLED;
+ if($this->dataRecord["limit_client"] > 0) $modules .= ',client';
+ $modules = $app->db->quote($modules);
+ $client_id = $this->id;
+ $sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id";
+ $app->db->query($sql);
+ }
+ /*
+ * If there is a client-template, process it */
+ applyClientTemplates($this->id);
+
+ parent::onAfterUpdate();
+ }
+}
+
+$page = new page_action;
+$page->onLoad();
+
+?>
\ No newline at end of file
diff --git a/interface/web/client/reseller_list.php b/interface/web/client/reseller_list.php
new file mode 100644
index 0000000..4d2a462
--- /dev/null
+++ b/interface/web/client/reseller_list.php
@@ -0,0 +1,55 @@
+<?php
+/*
+Copyright (c) 2005 - 2009, Till Brehm, projektfarm Gmbh
+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.
+*/
+
+require_once('../../lib/config.inc.php');
+require_once('../../lib/app.inc.php');
+
+/******************************************
+* Begin Form configuration
+******************************************/
+
+$list_def_file = "list/reseller.list.php";
+
+/******************************************
+* End Form configuration
+******************************************/
+
+//* Check permissions for module
+$app->auth->check_module_permissions('client');
+
+if($_SESSION["s"]["user"]["typ"] != 'admin') die('Access only for administrators.');
+
+$app->uses('listform_actions');
+
+$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
+$app->listform_actions->SQLExtWhere = "limit_client > 0";
+$app->listform_actions->onLoad();
+
+
+?>
\ No newline at end of file
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index 2085141..ee5ab67 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -142,10 +142,6 @@
<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'}
diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm
new file mode 100644
index 0000000..493a930
--- /dev/null
+++ b/interface/web/client/templates/reseller_edit_address.htm
@@ -0,0 +1,101 @@
+<h2><tmpl_var name="list_head_txt"></h2>
+<p><tmpl_var name="list_desc_txt"></p>
+
+<div class="panel panel_client">
+
+ <div class="pnl_formsarea">
+ <fieldset class="inlineLabels"><legend>Address</legend>
+ <div class="ctrlHolder">
+ <label for="company_name">{tmpl_var name='company_name_txt'}</label>
+ <input name="company_name" id="company_name" value="{tmpl_var name='company_name'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="contact_name">{tmpl_var name='contact_name_txt'}</label>
+ <input name="contact_name" id="contact_name" value="{tmpl_var name='contact_name'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="username">{tmpl_var name='username_txt'}</label>
+ <input name="username" id="username" value="{tmpl_var name='username'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="password">{tmpl_var name='password_txt'}</label>
+ <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value)" />
+ </div>
+ <div class="ctrlHolder">
+ <p class="label">{tmpl_var name='password_strength_txt'}</p>
+ <div id="passBar"></div>
+ <p class="formHint"><span id="passText"> </span></p>
+ </div>
+ <div class="ctrlHolder">
+ <label for="language">{tmpl_var name='language_txt'}</label>
+ <select name="language" id="language" class="selectInput withicons">
+ {tmpl_var name='language'}
+ </select>
+ </div>
+ <div class="ctrlHolder">
+ <label for="usertheme">{tmpl_var name='usertheme_txt'}</label>
+ <select name="usertheme" id="usertheme" class="selectInput">
+ {tmpl_var name='usertheme'}
+ </select>
+ </div>
+ <div class="ctrlHolder">
+ <label for="street">{tmpl_var name='street_txt'}</label>
+ <input name="street" id="street" value="{tmpl_var name='street'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="zip">{tmpl_var name='zip_txt'}</label>
+ <input name="zip" id="zip" value="{tmpl_var name='zip'}" size="10" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="city">{tmpl_var name='city_txt'}</label>
+ <input name="city" id="city" value="{tmpl_var name='city'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="state">{tmpl_var name='state_txt'}</label>
+ <input name="state" id="state" value="{tmpl_var name='state'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="country">{tmpl_var name='country_txt'}</label>
+ <select name="country" id="country" class="selectInput withicons">
+ {tmpl_var name='country'}
+ </select>
+ </div>
+ <div class="ctrlHolder">
+ <label for="telephone">{tmpl_var name='telephone_txt'}</label>
+ <input name="telephone" id="telephone" value="{tmpl_var name='telephone'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="mobile">{tmpl_var name='mobile_txt'}</label>
+ <input name="mobile" id="mobile" value="{tmpl_var name='mobile'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="fax">{tmpl_var name='fax_txt'}</label>
+ <input name="fax" id="fax" value="{tmpl_var name='fax'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="email">{tmpl_var name='email_txt'}</label>
+ <input name="email" id="email" value="{tmpl_var name='email'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="internet">{tmpl_var name='internet_txt'}</label>
+ <input name="internet" id="internet" value="{tmpl_var name='internet'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="icq">{tmpl_var name='icq_txt'}</label>
+ <input name="icq" id="icq" value="{tmpl_var name='icq'}" size="30" maxlength="255" type="text" class="textInput" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="notes">{tmpl_var name='notes_txt'}</label>
+ <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea>
+ </div>
+ </fieldset>
+
+ <input type="hidden" name="id" value="{tmpl_var name='id'}">
+
+ <div class="buttonHolder buttons">
+ <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','client/reseller_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
+ <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('client/reseller_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
+ </div>
+ </div>
+
+</div>
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm
new file mode 100644
index 0000000..7e027e4
--- /dev/null
+++ b/interface/web/client/templates/reseller_edit_limits.htm
@@ -0,0 +1,171 @@
+<h2><tmpl_var name="list_head_txt"></h2>
+<p><tmpl_var name="list_desc_txt"></p>
+
+<div class="panel panel_client">
+
+ <div class="pnl_formsarea">
+ <fieldset class="inlineLabels"><legend>Limits</legend>
+<tmpl_if name="is_admin">
+ <div class="ctrlHolder">
+ <label for="template_master">{tmpl_var name='template_master_txt'}</label>
+ <select name="template_master" id="template_master" class="selectInput">
+ {tmpl_var name='template_master'}
+ </select>
+ </div>
+ <div class="ctrlHolder">
+ <label for="template_additional">{tmpl_var name='template_additional_txt'}</label>
+ <select name="tpl_add_select" id="tpl_add_select" class="selectInput">
+ {tmpl_var name='tpl_add_select'}
+ </select>
+ <span id="template_additional_list">{tmpl_var name='template_additional_list'}</span>
+ <input type="hidden" id="template_additional" name="template_additional" value="{tmpl_var name='template_additional'}">
+ </div>
+ <div class="ctrlHolder">
+
+ </div>
+</tmpl_if>
+ <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'}
+ </select>
+ </div>
+ <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" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailbox">{tmpl_var name='limit_mailbox_txt'}</label>
+ <input name="limit_mailbox" id="limit_mailbox" value="{tmpl_var name='limit_mailbox'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailalias">{tmpl_var name='limit_mailalias_txt'}</label>
+ <input name="limit_mailalias" id="limit_mailalias" value="{tmpl_var name='limit_mailalias'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailforward">{tmpl_var name='limit_mailforward_txt'}</label>
+ <input name="limit_mailforward" id="limit_mailforward" value="{tmpl_var name='limit_mailforward'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailcatchall">{tmpl_var name='limit_mailcatchall_txt'}</label>
+ <input name="limit_mailcatchall" id="limit_mailcatchall" value="{tmpl_var name='limit_mailcatchall'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailrouting">{tmpl_var name='limit_mailrouting_txt'}</label>
+ <input name="limit_mailrouting" id="limit_mailrouting" value="{tmpl_var name='limit_mailrouting'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailfilter">{tmpl_var name='limit_mailfilter_txt'}</label>
+ <input name="limit_mailfilter" id="limit_mailfilter" value="{tmpl_var name='limit_mailfilter'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_fetchmail">{tmpl_var name='limit_fetchmail_txt'}</label>
+ <input name="limit_fetchmail" id="limit_fetchmail" value="{tmpl_var name='limit_fetchmail'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_mailquota">{tmpl_var name='limit_mailquota_txt'}</label>
+ <input name="limit_mailquota" id="limit_mailquota" value="{tmpl_var name='limit_mailquota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> MB
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_spamfilter_wblist">{tmpl_var name='limit_spamfilter_wblist_txt'}</label>
+ <input name="limit_spamfilter_wblist" id="limit_spamfilter_wblist" value="{tmpl_var name='limit_spamfilter_wblist'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <label for="limit_spamfilter_user">{tmpl_var name='limit_spamfilter_user_txt'}</label>
+ <input name="limit_spamfilter_user" id="limit_spamfilter_user" value="{tmpl_var name='limit_spamfilter_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
+ </div>
+ <div class="ctrlHolder">
+ <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="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">
+ <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="default_dnsserver">{tmpl_var name='default_dnsserver_txt'}</label>
+ <select name="default_dnsserver" id="default_dnsserver" class="selectInput">
+ {tmpl_var name='default_dnsserver'}
+ </select>
+ </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_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>
+ </fieldset>
+
+ <input type="hidden" name="id" value="{tmpl_var name='id'}">
+
+ <div class="buttonHolder buttons">
+ <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','client/reseller_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
+ <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('client/reseller_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
+ </div>
+ </div>
+
+</div>
diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm
new file mode 100644
index 0000000..4f15202
--- /dev/null
+++ b/interface/web/client/templates/resellers_list.htm
@@ -0,0 +1,62 @@
+<h2><tmpl_var name="list_head_txt"></h2>
+<p><tmpl_var name="list_desc_txt"></p>
+
+<div class="panel panel_list_clients">
+
+ <div class="pnl_toolsarea">
+ <fieldset><legend>Tools</legend>
+ <div class="buttons">
+ <button class="iconstxt icoAdd" type="button" onClick="loadContent('client/client_edit.php');">
+ <span>{tmpl_var name="add_new_record_txt"}</span>
+ </button>
+ </div>
+ </fieldset>
+ </div>
+
+ <div class="pnl_listarea">
+ <fieldset><legend><tmpl_var name="list_head_txt"></legend>
+ <table class="list">
+ <thead>
+ <tr>
+ <th class="tbl_col_client_id" scope="col"><tmpl_var name="client_id_txt"></th>
+ <th class="tbl_col_company_name" scope="col"><tmpl_var name="company_name_txt"></th>
+ <th class="tbl_col_contact_name" scope="col"><tmpl_var name="contact_name_txt"></th>
+ <th class="tbl_col_city" scope="col"><tmpl_var name="city_txt"></th>
+ <th class="tbl_col_country" scope="col"><tmpl_var name="country_txt"></th>
+ <th class="tbl_col_country" scope="col"> </th>
+ </tr>
+ <tr>
+ <td class="tbl_col_client_id"><input type="text" name="search_client_id" value="{tmpl_var name='search_client_id'}" /></td>
+ <td class="tbl_col_company_name"><input type="text" name="search_company_name" value="{tmpl_var name='search_company_name'}" /></td>
+ <td class="tbl_col_contact_name"><input type="text" name="search_contact_name" value="{tmpl_var name='search_contact_name'}" /></td>
+ <td class="tbl_col_city"><input type="text" name="search_city" value="{tmpl_var name='search_city'}" /></td>
+ <td class="tbl_col_country"><input type="text" name="search_country" value="{tmpl_var name='search_country'}" /></td>
+ <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','client/reseller_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
+ </tr>
+ </thead>
+ <tbody>
+ <tmpl_loop name="records">
+ <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
+ <td class="tbl_col_client_id"><a href="#" onClick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="client_id"}</a></td>
+ <td class="tbl_col_company_name"><a href="#" onClick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="company_name"}</a></td>
+ <td class="tbl_col_contact_name"><a href="#" onClick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="contact_name"}</a></td>
+ <td class="tbl_col_city"><a href="#" onClick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="city"}</a></td>
+ <td class="tbl_col_country"><a href="#" onClick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="country"}</a></td>
+ <td class="tbl_col_buttons">
+ <div class="buttons icons16">
+ <a class="icons16 icoDelete" href="javascript: del_record('client/reseller_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
+ </div>
+ </td>
+ </tr>
+ </tmpl_loop>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
+ </tr>
+ </tfoot>
+ </table>
+ </fieldset>
+ </div>
+
+</div>
--
Gitblit v1.9.1