From 59118c7c296fd8f0224f39404320223ac6f31762 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Fri, 11 May 2012 07:14:55 -0400 Subject: [PATCH] - Added further tables to global search. - Added translations to global search. --- interface/web/client/form/reseller.tform.php | 178 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 160 insertions(+), 18 deletions(-) diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index 4cfb52d..fe38159 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -29,6 +29,11 @@ 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). + + Search: + - searchable = 1 or searchable = 2 include the field in the search + - searchable = 1: this field will be the title of the search result + - searchable = 2: this field will be included in the description of the search result */ @@ -49,6 +54,17 @@ $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 + +//* Load themes +$themes_list = array(); +$handle = @opendir(ISPC_THEMES_PATH); +while ($file = @readdir ($handle)) { + if (substr($file, 0, 1) != '.') { + if(@is_dir(ISPC_THEMES_PATH."/$file")) { + $themes_list[$file] = $file; + } + } +} //* Languages $language_list = array(); @@ -79,7 +95,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'contact_name' => array ( 'datatype' => 'VARCHAR', @@ -93,7 +110,20 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 1 + ), + 'customer_no' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '', + 'searchable' => 2 ), 'username' => array ( 'datatype' => 'VARCHAR', @@ -104,7 +134,11 @@ 'class' => 'validate_client', 'function' => 'username_unique', 'errmsg'=> 'username_error_unique'), - 2 => array ( 'type' => 'REGEX', + 2 => array ( 'type' => 'CUSTOM', + 'class' => 'validate_client', + 'function' => 'username_collision', + 'errmsg'=> 'username_error_collision'), + 3 => array ( 'type' => 'REGEX', 'regex' => '/^[\w\.\-\_]{0,64}$/', 'errmsg'=> 'username_error_regex'), ), @@ -114,7 +148,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'password' => array ( 'datatype' => 'VARCHAR', @@ -142,8 +177,8 @@ 'usertheme' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', - 'default' => 'default', - 'value' => array('default' => 'default'), + 'default' => $conf["theme"], + 'value' => $themes_list, 'separator' => '', 'width' => '30', 'maxlength' => '255', @@ -159,7 +194,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'zip' => array ( 'datatype' => 'VARCHAR', @@ -170,7 +206,8 @@ 'width' => '10', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'city' => array ( 'datatype' => 'VARCHAR', @@ -181,7 +218,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'state' => array ( 'datatype' => 'VARCHAR', @@ -192,13 +230,14 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'country' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', - 'default' => 'DE', + 'default' => (isset($conf['language']) ? strtoupper($conf['language']) : ''), 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name', 'keyfield'=> 'iso', @@ -215,7 +254,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'mobile' => array ( 'datatype' => 'VARCHAR', @@ -226,7 +266,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'fax' => array ( 'datatype' => 'VARCHAR', @@ -237,7 +278,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'email' => array ( 'datatype' => 'VARCHAR', @@ -248,7 +290,8 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'internet' => array ( 'datatype' => 'VARCHAR', @@ -259,9 +302,21 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'searchable' => 2 ), 'icq' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' + ), + 'vat_id' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'default' => '', @@ -336,6 +391,20 @@ 'rows' => '', 'cols' => '' ), + 'limit_mailmailinglist' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_mailmailinglist_error_notint'), + ), + 'default' => '-1', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), 'limit_mailbox' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -355,6 +424,20 @@ 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'ISINT', 'errmsg'=> 'limit_mailalias_error_notint'), + ), + 'default' => '-1', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), + 'limit_mailaliasdomain' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_mailaliasdomain_error_notint'), ), 'default' => '-1', 'value' => '', @@ -532,9 +615,12 @@ 'web_php_options' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOXARRAY', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'web_php_options_notempty'), + ), 'default' => '', 'separator' => ',', - 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP') + 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM') ), 'limit_web_aliasdomain' => array ( 'datatype' => 'INTEGER', @@ -595,9 +681,26 @@ 'ssh_chroot' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOXARRAY', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'ssh_chroot_notempty'), + ), 'default' => '', 'separator' => ',', 'value' => array('no' => 'None', 'jailkit' => 'Jailkit') + ), + 'limit_webdav_user' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_webdav_user_error_notint'), + ), + 'default' => '-1', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' ), 'default_dnsserver' => array ( 'datatype' => 'INTEGER', @@ -624,6 +727,20 @@ 'rows' => '', 'cols' => '' ), + 'limit_dns_slave_zone' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_dns_slave_zone_error_notint'), + ), + 'default' => '-1', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), 'limit_dns_record' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -728,6 +845,31 @@ 'rows' => '', 'cols' => '' ), + 'limit_openvz_vm' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_openvz_vm_error_notint'), + ), + 'default' => '0', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), + 'limit_openvz_vm_template_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT template_id,template_name FROM openvz_template WHERE 1 ORDER BY template_name', + 'keyfield'=> 'template_id', + 'valuefield'=> 'template_name' + ), + 'value' => array(0 => ' ') + ), ################################## # END Datatable fields ################################## @@ -758,4 +900,4 @@ */ -?> \ No newline at end of file +?> -- Gitblit v1.9.1