diff --git a/interface/web/admin/form/tpl_default-v2_admin.tform.php b/interface/web/admin/form/tpl_default-v2_admin.tform.php new file mode 100644 index 0000000000000000000000000000000000000000..0d1786b4d790e46230970eb9786aeb07a622a6ff --- /dev/null +++ b/interface/web/admin/form/tpl_default-v2_admin.tform.php @@ -0,0 +1,194 @@ +<?php + +/* +Copyright (c) 2007, 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. +*/ + +/* + Form Definition + + Tabellendefinition + + Datentypen: + - INTEGER (Wandelt Ausdrücke in Int um) + - DOUBLE + - CURRENCY (Formatiert Zahlen nach Währungsnotation) + - VARCHAR (kein weiterer Format Check) + - TEXT (kein weiterer Format Check) + - DATE (Datumsformat, Timestamp Umwandlung) + + Formtype: + - TEXT (normales Textfeld) + - TEXTAREA (normales Textfeld) + - PASSWORD (Feldinhalt wird nicht angezeigt) + - SELECT (Gibt Werte als option Feld aus) + - RADIO + - CHECKBOX + - FILE + + VALUE: + - Wert oder Array + + Hinweis: + Das ID-Feld ist nicht bei den Table Values einzufügen. + + +*/ + +$form["title"] = "tpl_default-v2_admin_head_txt"; +$form["description"] = "tpl_default-v2_admin_desc_txt"; +$form["name"] = "tpl_default-v2_admin"; +$form["action"] = "tpl_default-v2_admin.php"; +$form["db_table"] = "server_php"; +$form["db_table_idx"] = "server_php_id"; +$form["db_history"] = "yes"; +$form["tab_default"] = "php_name"; +$form["list_default"] = "server_php_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 + +$form["tabs"]['php_name'] = array ( + 'title' => "Name", + 'width' => 80, + 'template' => "templates/server_php_name_edit.htm", + 'fields' => array ( + ################################## + # Beginn Datenbankfelder + ################################## + 'server_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', + 'keyfield'=> 'server_id', + 'valuefield'=> 'server_name' + ), + 'value' => '' + ), + 'client_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name", + 'keyfield'=> 'client_id', + 'valuefield'=> 'name' + ), + 'value' => array(0 => ' ') + ), + 'name' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'validators' => array(0 => array('type' => 'NOTEMPTY', + 'errmsg' => 'server_php_name_error_empty'), + ), + 'default' => '', + 'value' => '', + 'separator' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datenbankfelder + ################################## + ) +); + +$form["tabs"]['php_fastcgi'] = array( + 'title' => "FastCGI Settings", + 'width' => 80, + 'template' => "templates/server_php_fastcgi_edit.htm", + 'fields' => array( + ################################## + # Begin Datatable fields + ################################## + 'php_fastcgi_binary' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'php_fastcgi_ini_dir' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datatable fields + ################################## + ) +); + +$form["tabs"]['php_fpm'] = array( + 'title' => "PHP-FPM Settings", + 'width' => 80, + 'template' => "templates/server_php_fpm_edit.htm", + 'fields' => array( + ################################## + # Begin Datatable fields + ################################## + 'php_fpm_init_script' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'php_fpm_ini_dir' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'php_fpm_pool_dir' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datatable fields + ################################## + ) +); +?> \ No newline at end of file diff --git a/interface/web/admin/form/tpl_default_admin.tform.php b/interface/web/admin/form/tpl_default_admin.tform.php new file mode 100644 index 0000000000000000000000000000000000000000..78fd0ed420989ecea845d0319a65dbac2417cb28 --- /dev/null +++ b/interface/web/admin/form/tpl_default_admin.tform.php @@ -0,0 +1,194 @@ +<?php + +/* +Copyright (c) 2007, 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. +*/ + +/* + Form Definition + + Tabellendefinition + + Datentypen: + - INTEGER (Wandelt Ausdrücke in Int um) + - DOUBLE + - CURRENCY (Formatiert Zahlen nach Währungsnotation) + - VARCHAR (kein weiterer Format Check) + - TEXT (kein weiterer Format Check) + - DATE (Datumsformat, Timestamp Umwandlung) + + Formtype: + - TEXT (normales Textfeld) + - TEXTAREA (normales Textfeld) + - PASSWORD (Feldinhalt wird nicht angezeigt) + - SELECT (Gibt Werte als option Feld aus) + - RADIO + - CHECKBOX + - FILE + + VALUE: + - Wert oder Array + + Hinweis: + Das ID-Feld ist nicht bei den Table Values einzufügen. + + +*/ + +$form["title"] = "tpl_default_admin_head_txt"; +$form["description"] = "tpl_default_admin_desc_txt"; +$form["name"] = "tpl_default_admin"; +$form["action"] = "tpl_default_admin.php"; +$form["db_table"] = "server_php"; +$form["db_table_idx"] = "server_php_id"; +$form["db_history"] = "yes"; +$form["tab_default"] = "php_name"; +$form["list_default"] = "server_php_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 + +$form["tabs"]['php_name'] = array ( + 'title' => "Name", + 'width' => 80, + 'template' => "templates/server_php_name_edit.htm", + 'fields' => array ( + ################################## + # Beginn Datenbankfelder + ################################## + 'server_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', + 'keyfield'=> 'server_id', + 'valuefield'=> 'server_name' + ), + 'value' => '' + ), + 'client_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name", + 'keyfield'=> 'client_id', + 'valuefield'=> 'name' + ), + 'value' => array(0 => ' ') + ), + 'name' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'validators' => array(0 => array('type' => 'NOTEMPTY', + 'errmsg' => 'server_php_name_error_empty'), + ), + 'default' => '', + 'value' => '', + 'separator' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datenbankfelder + ################################## + ) +); + +$form["tabs"]['php_fastcgi'] = array( + 'title' => "FastCGI Settings", + 'width' => 80, + 'template' => "templates/server_php_fastcgi_edit.htm", + 'fields' => array( + ################################## + # Begin Datatable fields + ################################## + 'php_fastcgi_binary' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'php_fastcgi_ini_dir' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datatable fields + ################################## + ) +); + +$form["tabs"]['php_fpm'] = array( + 'title' => "PHP-FPM Settings", + 'width' => 80, + 'template' => "templates/server_php_fpm_edit.htm", + 'fields' => array( + ################################## + # Begin Datatable fields + ################################## + 'php_fpm_init_script' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'php_fpm_ini_dir' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'php_fpm_pool_dir' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datatable fields + ################################## + ) +); +?> \ No newline at end of file diff --git a/interface/web/admin/lib/interface.d/default-v2.menu.php b/interface/web/admin/lib/interface.d/default-v2.menu.php deleted file mode 100644 index 921e9168cc9a74612a2d06e1db5b7b9927629177..0000000000000000000000000000000000000000 --- a/interface/web/admin/lib/interface.d/default-v2.menu.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -$items[] = array( 'title' => 'Default-v2 Theme', - 'target' => 'content', - 'link' => 'admin/default-v2_settings.php', - 'html_id' => 'default-v2_settings'); -?> diff --git a/interface/web/admin/lib/interface.d/tpl_default-v2.menu.php b/interface/web/admin/lib/interface.d/tpl_default-v2.menu.php new file mode 100644 index 0000000000000000000000000000000000000000..d14f37040bf9e9f4a3d44307d9430176f87d2884 --- /dev/null +++ b/interface/web/admin/lib/interface.d/tpl_default-v2.menu.php @@ -0,0 +1,7 @@ +<?php + +$items[] = array( 'title' => 'Default-v2 Theme', + 'target' => 'content', + 'link' => 'admin/tpl_default-v2_admin.php', + 'html_id' => 'tpl_default-v2_admin'); +?> diff --git a/interface/web/admin/lib/interface.d/tpl_default.menu.php b/interface/web/admin/lib/interface.d/tpl_default.menu.php new file mode 100644 index 0000000000000000000000000000000000000000..64f50081341d4f7bac38909a5872a547a9d838c9 --- /dev/null +++ b/interface/web/admin/lib/interface.d/tpl_default.menu.php @@ -0,0 +1,7 @@ +<?php + +$items[] = array( 'title' => 'Default Theme', + 'target' => 'content', + 'link' => 'admin/tpl_default_admin.php', + 'html_id' => 'tpl_default_admin'); +?> diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng index 9c3e9b1da6318ce7a8ffe875902297f0b83a7dd1..82e46d822253d8a64f54a890184276331b56e13f 100644 --- a/interface/web/admin/lib/lang/ar_system_config.lng +++ b/interface/web/admin/lib/lang/ar_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edit these values carefully! Do not remove the prefixes on a systems with more then one client.'; $wb['dbname_prefix_txt'] = 'Database name prefix'; $wb['dbuser_prefix_txt'] = 'Database user prefix'; diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng index 601f272017da73082658784b78ee265b2d1f4306..2ef1369b6a0119cf9fe40ab9c203393f24eb45ce 100644 --- a/interface/web/admin/lib/lang/br_system_config.lng +++ b/interface/web/admin/lib/lang/br_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edite estes valores com cuidado! Não remova os prefixos em um sistema com mais de um cliente!!'; $wb['dbname_prefix_txt'] = 'Prefixo Nome do Banco de Dados'; $wb['dbuser_prefix_txt'] = 'Prefixo Usuário do Banco de Dados'; diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng index 5056d666dcbca9d4229b55eee2290ff8eed139cc..1f4ddcfa4c3213aa7a4cdec60079716618de523f 100644 --- a/interface/web/admin/lib/lang/cz_system_config.lng +++ b/interface/web/admin/lib/lang/cz_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Upravujte tyto údaje opatrne! Neodstraňujte prefixy na systémech s vÃce, než jednÃm klientem.'; $wb['dbname_prefix_txt'] = 'Prefix názvu databáze'; $wb['dbuser_prefix_txt'] = 'Prefix uživatele databáze'; diff --git a/interface/web/admin/lib/lang/de_remote_user_list.lng b/interface/web/admin/lib/lang/de_remote_user_list.lng index 15e5190a4f76285ccaaca9847787c8c42eaa0e40..f51f1d119aaa8907582c7f1e2298ed472b2f49bb 100644 --- a/interface/web/admin/lib/lang/de_remote_user_list.lng +++ b/interface/web/admin/lib/lang/de_remote_user_list.lng @@ -2,6 +2,6 @@ $wb['list_head_txt'] = 'Remote-Benutzer'; $wb['list_desc_txt'] = ''; $wb['add_new_record_txt'] = 'Neuen Benutzer hinzufügen'; -$wb['parent_remote_userid_txt'] = 'ID'; +$wb['parent_remote_userid_txt'] = 'User ID'; $wb['username_txt'] = 'Benutzername'; ?> diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng index 11fb1f7f04f09a6e872500978bff16f5a56572f5..7c0f6078be220e936d4debbd9a67d9ab8ca1db0f 100644 --- a/interface/web/admin/lib/lang/de_system_config.lng +++ b/interface/web/admin/lib/lang/de_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Bearbeiten Sie diese Werte sorgfältig! Entfernen Sie die Prefixe nicht auf Systemen mit mehr als einem Client.'; $wb['dbname_prefix_txt'] = 'Datenbanknamen Prefix'; $wb['dbuser_prefix_txt'] = 'Datenbankbenutzer Prefix'; diff --git a/interface/web/admin/lib/lang/de_tpl_default-v2_admin.lng b/interface/web/admin/lib/lang/de_tpl_default-v2_admin.lng new file mode 100644 index 0000000000000000000000000000000000000000..ef0eda1700ab3500838775a5decc21c2053c7bd3 --- /dev/null +++ b/interface/web/admin/lib/lang/de_tpl_default-v2_admin.lng @@ -0,0 +1,18 @@ +<?php +$wb['tpl_default-v2_admin_head_txt'] = 'Globale Default-v2-Theme Einstellungen'; +$wb['tpl_default-v2_admin_desc_txt'] = ''; +$wb['server_id_txt'] = 'Server'; +$wb['client_id_txt'] = 'Kunde'; +$wb['name_txt'] = 'PHP-Name'; +$wb['Name'] = 'Name'; +$wb['FastCGI Settings'] = 'FastCGI-Einstellungen'; +$wb['PHP-FPM Settings'] = 'PHP-FPM-Einstellungen'; +$wb['Additional PHP Versions'] = 'Zusätzliche PHP-Versionen'; +$wb['Form to edit additional PHP versions'] = 'Formular, um zusätzliche PHP-Versionen hinzuzufügen'; +$wb['server_php_name_error_empty'] = 'Das Name-Feld darf nicht leer sein.'; +$wb['php_fastcgi_binary_txt'] = 'Pfad zum PHP-FastCGI-Binary'; +$wb['php_fastcgi_ini_dir_txt'] = 'Pfad zum php.ini-Verzeichnis'; +$wb['php_fpm_init_script_txt'] = 'Pfad zum PHP-FPM-Init-Skript'; +$wb['php_fpm_ini_dir_txt'] = 'Pfad zum php.ini-Verzeichnis'; +$wb['php_fpm_pool_dir_txt'] = 'Pfad zum PHP-FPM-Pool-Verzeichnis'; +?> diff --git a/interface/web/admin/lib/lang/de_tpl_default_admin.lng b/interface/web/admin/lib/lang/de_tpl_default_admin.lng new file mode 100644 index 0000000000000000000000000000000000000000..74e752ea14a81c5186c286a253b18fc725f18c22 --- /dev/null +++ b/interface/web/admin/lib/lang/de_tpl_default_admin.lng @@ -0,0 +1,18 @@ +<?php +$wb['tpl_default_admin_head_txt'] = 'Globale Default-Theme Einstellungen'; +$wb['tpl_default_admin_desc_txt'] = ''; +$wb['server_id_txt'] = 'Server'; +$wb['client_id_txt'] = 'Kunde'; +$wb['name_txt'] = 'PHP-Name'; +$wb['Name'] = 'Name'; +$wb['FastCGI Settings'] = 'FastCGI-Einstellungen'; +$wb['PHP-FPM Settings'] = 'PHP-FPM-Einstellungen'; +$wb['Additional PHP Versions'] = 'Zusätzliche PHP-Versionen'; +$wb['Form to edit additional PHP versions'] = 'Formular, um zusätzliche PHP-Versionen hinzuzufügen'; +$wb['server_php_name_error_empty'] = 'Das Name-Feld darf nicht leer sein.'; +$wb['php_fastcgi_binary_txt'] = 'Pfad zum PHP-FastCGI-Binary'; +$wb['php_fastcgi_ini_dir_txt'] = 'Pfad zum php.ini-Verzeichnis'; +$wb['php_fpm_init_script_txt'] = 'Pfad zum PHP-FPM-Init-Skript'; +$wb['php_fpm_ini_dir_txt'] = 'Pfad zum php.ini-Verzeichnis'; +$wb['php_fpm_pool_dir_txt'] = 'Pfad zum PHP-FPM-Pool-Verzeichnis'; +?> diff --git a/interface/web/admin/lib/lang/de_users_list.lng b/interface/web/admin/lib/lang/de_users_list.lng index b35551208ed49b9b03c4189b46366e5fa7b23e69..0aae83519c4cf563ce9383f3b1593a3796365114 100644 --- a/interface/web/admin/lib/lang/de_users_list.lng +++ b/interface/web/admin/lib/lang/de_users_list.lng @@ -1,7 +1,7 @@ <?php $wb['list_head_txt'] = 'Benutzer'; $wb['username_txt'] = 'Benutzername'; -$wb["client_id_txt"] = 'Client ID'; +$wb["client_id_txt"] = 'User ID'; $wb["active_txt"] = 'Aktiv'; $wb["groups_txt"] = 'Gruppen'; $wb['add_new_record_txt'] = 'Neuen Benutzer hinzufügen'; diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng index 77eca1350fa9dad8d5368a3ad76d341b9ab453cd..aeaf7f7156f919bd07bce75bba3a322dc9d9ae8b 100644 --- a/interface/web/admin/lib/lang/el_system_config.lng +++ b/interface/web/admin/lib/lang/el_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['dashboard_atom_url_admin_txt'] = 'Dashboard atom feed URL (admin)'; $wb['dashboard_atom_url_reseller_txt'] = 'Dashboard atom feed URL (reseller)'; $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)'; diff --git a/interface/web/admin/lib/lang/en_remote_user_list.lng b/interface/web/admin/lib/lang/en_remote_user_list.lng index 56c6fac4be29b7a8bbc856383c7044edd82214f4..6ff56e6fd6b591330a6d2c6c3e86011422feb15b 100644 --- a/interface/web/admin/lib/lang/en_remote_user_list.lng +++ b/interface/web/admin/lib/lang/en_remote_user_list.lng @@ -2,7 +2,7 @@ $wb['list_head_txt'] = "Remote Users"; $wb['list_desc_txt'] = ""; $wb['add_new_record_txt'] = "Add new user"; -$wb['parent_remote_userid_txt'] = 'ID'; +$wb['parent_remote_userid_txt'] = 'User ID'; $wb['username_txt'] = "Username"; ?> diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index bf457567612fdc60d7ad926d4488c72c6c409a2f..889ab258bf16e0830d798dfbbac86fd5ddaf34b7 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['dashboard_atom_url_admin_txt'] = 'Dashboard atom feed URL (admin)'; $wb['dashboard_atom_url_reseller_txt'] = 'Dashboard atom feed URL (reseller)'; $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)'; diff --git a/interface/web/admin/lib/lang/en_tpl_default-v2_admin.lng b/interface/web/admin/lib/lang/en_tpl_default-v2_admin.lng new file mode 100644 index 0000000000000000000000000000000000000000..3e197606c22a77f68516923d0414057ebb5f6544 --- /dev/null +++ b/interface/web/admin/lib/lang/en_tpl_default-v2_admin.lng @@ -0,0 +1,18 @@ +<?php +$wb['tpl_default-v2_admin_head_txt'] = 'Global Default-v2-Theme Settings'; +$wb['tpl_default-v2_admin_desc_txt'] = ''; +$wb['server_id_txt'] = 'Server'; +$wb['client_id_txt'] = 'Client'; +$wb['name_txt'] = 'PHP Name'; +$wb['Name'] = 'Name'; +$wb['FastCGI Settings'] = 'FastCGI Settings'; +$wb['PHP-FPM Settings'] = 'PHP-FPM Settings'; +$wb['Additional PHP Versions'] = 'Additional PHP Versions'; +$wb['Form to edit additional PHP versions'] = 'Form to edit additional PHP versions'; +$wb['server_php_name_error_empty'] = 'The Name field must not be empty.'; +$wb['php_fastcgi_binary_txt'] = 'Path to the PHP FastCGI binary'; +$wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory'; +$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script'; +$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory'; +$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory'; +?> diff --git a/interface/web/admin/lib/lang/en_tpl_default_admin.lng b/interface/web/admin/lib/lang/en_tpl_default_admin.lng new file mode 100644 index 0000000000000000000000000000000000000000..eee3af5fe4e30c2f22bfa5742d902ce678cfa830 --- /dev/null +++ b/interface/web/admin/lib/lang/en_tpl_default_admin.lng @@ -0,0 +1,18 @@ +<?php +$wb['tpl_default_admin_head_txt'] = 'Global Default-Theme Settings'; +$wb['tpl_default_admin_desc_txt'] = ''; +$wb['server_id_txt'] = 'Server'; +$wb['client_id_txt'] = 'Client'; +$wb['name_txt'] = 'PHP Name'; +$wb['Name'] = 'Name'; +$wb['FastCGI Settings'] = 'FastCGI Settings'; +$wb['PHP-FPM Settings'] = 'PHP-FPM Settings'; +$wb['Additional PHP Versions'] = 'Additional PHP Versions'; +$wb['Form to edit additional PHP versions'] = 'Form to edit additional PHP versions'; +$wb['server_php_name_error_empty'] = 'The Name field must not be empty.'; +$wb['php_fastcgi_binary_txt'] = 'Path to the PHP FastCGI binary'; +$wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory'; +$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script'; +$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory'; +$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory'; +?> diff --git a/interface/web/admin/lib/lang/en_users_list.lng b/interface/web/admin/lib/lang/en_users_list.lng index d80eed172a02a5075110cbc2971d9035f11ebdcd..9860ab403961fc16a951a225eff8c920f136cab1 100644 --- a/interface/web/admin/lib/lang/en_users_list.lng +++ b/interface/web/admin/lib/lang/en_users_list.lng @@ -1,7 +1,7 @@ <?php $wb["list_head_txt"] = 'Users'; $wb["username_txt"] = 'Username'; -$wb["client_id_txt"] = 'Client ID'; +$wb["client_id_txt"] = 'User ID'; $wb["active_txt"] = 'Active'; $wb["groups_txt"] = 'Groups'; $wb["add_new_record_txt"] = 'Add new user'; diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng index b78ca5679d50279fa2dc9a92ee019fbc7c680dd4..504e22d8b4550c39fb68fe6858e7aa28d5602346 100644 --- a/interface/web/admin/lib/lang/es_system_config.lng +++ b/interface/web/admin/lib/lang/es_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = '¡Tenga cuidado al modificar estos valores! No elimine los prefijos en un sistema que tenga más de un cliente.'; $wb['dbname_prefix_txt'] = 'Prefijo del nombre de la base de datos'; $wb['dbuser_prefix_txt'] = 'Prefijo del usuario de la base de datos'; diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng index 5b0ee4dff19799a7a799c52c4d76ac3e0df2ba57..504b5dddbbd7b9256eec10e19824b745ce5beb15 100755 --- a/interface/web/admin/lib/lang/fi_system_config.lng +++ b/interface/web/admin/lib/lang/fi_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Muokkaa näitä arvoja varoen! Älä poista etuliitteitä jos järjestelmässä on enemmän kuin yksi asiakas.'; $wb['dbname_prefix_txt'] = 'Tietokannan nimen etuliite'; $wb['dbuser_prefix_txt'] = 'Tietokannan käyttäjätunnuksen etuliite'; diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng index 14d194f3dec0bece32ac719e40f1a7733fcb74a0..df0dd8f9244f92a5ae835b4bfdbc956672e85a28 100644 --- a/interface/web/admin/lib/lang/fr_system_config.lng +++ b/interface/web/admin/lib/lang/fr_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['dashboard_atom_url_admin_txt'] = 'URL du fil de syndication Atom du tableau de bord (admin)'; $wb['dashboard_atom_url_reseller_txt'] = 'URL du fil de syndication Atom du tableau de bord ( reseller)'; $wb['dashboard_atom_url_client_txt'] = 'URL du fil de syndication Atom du tableau de bord (client)'; diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng index 665d56480fe29762cfed87438f7d519d20cf77eb..b5bcd1b6c4fe007499ca1e7cfbb51624e94211d1 100644 --- a/interface/web/admin/lib/lang/hr_system_config.lng +++ b/interface/web/admin/lib/lang/hr_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Oprezno mijenjajte prefikse i postavke! Nemojte brisati prefikse na sistemima gdje postoji viÅ¡e od jednog klijenata.'; $wb['dbname_prefix_txt'] = 'Prefiks nazivu baze'; $wb['dbuser_prefix_txt'] = 'Prefiks nazivu korisnika baze'; diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng index 9d7e007cd5f033ba7dd022f39ad662053169e923..656e2d8cf832efd6e13e0281bcaea321d6c98930 100644 --- a/interface/web/admin/lib/lang/hu_system_config.lng +++ b/interface/web/admin/lib/lang/hu_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edit these values carefully! Do not remove the prefixes on a systems with more then one Ãœgyfél.'; $wb['dbname_prefix_txt'] = 'Database name prefix'; $wb['dbuser_prefix_txt'] = 'Database user prefix'; diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng index badf4e8a0616aff7db313f52c113223fb16fbbc4..f75c095247f5c90e40c5b8091c878cbd4c13f03a 100644 --- a/interface/web/admin/lib/lang/id_system_config.lng +++ b/interface/web/admin/lib/lang/id_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Sunting nilai-nilai ini dengan hati-hati! Jangan hapus prefiks di sistem yang memiliki lebih dari 1 klien.'; $wb['dbname_prefix_txt'] = 'Prefiks nama database'; $wb['dbuser_prefix_txt'] = 'Prefiks pengguna database'; diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng index b263405cb6a898734e1c7a900c5f64920f993545..f9bff3e04d9c85366c0b110091729e7595901b4e 100644 --- a/interface/web/admin/lib/lang/it_system_config.lng +++ b/interface/web/admin/lib/lang/it_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edit these values carefully! Do not remove the prefixes on a systems with more then one client.'; $wb['dbname_prefix_txt'] = 'Prefisso nome database'; $wb['dbuser_prefix_txt'] = 'Prefisso utente database'; diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng index a0b6ce94a50e522c8742156123a5bc48669ee75f..fc041b5cfde3e8f22548d97b6bda605cfbd2d424 100644 --- a/interface/web/admin/lib/lang/ja_system_config.lng +++ b/interface/web/admin/lib/lang/ja_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = '値ã®å¤‰æ›´ã«ã¯ç´°å¿ƒã®æ³¨æ„を払ã£ã¦ãã ã•ã„。クライアントãŒåˆ©ç”¨ä¸ã®ã‚·ã‚¹ãƒ†ãƒ ã®ãƒ—リフィックスã¯å‰Šé™¤ã—ãªã„ã§ãã ã•ã„。'; $wb['dbname_prefix_txt'] = 'データベースåã®ãƒ—リフィックス'; $wb['dbuser_prefix_txt'] = 'データベースユーザーåã®ãƒ—リフィックス'; diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng index 4ef938ae3676604d7a713a4380e7522682889836..3346d8897354f75bb0a7cfa1f66547b911438c4c 100644 --- a/interface/web/admin/lib/lang/nl_system_config.lng +++ b/interface/web/admin/lib/lang/nl_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['dashboard_atom_url_admin_txt'] = 'Dashboard atom feed URL (admin)'; $wb['dashboard_atom_url_reseller_txt'] = 'Dashboard atom feed URL (reseller)'; $wb['dashboard_atom_url_client_txt'] = 'Dashboard atom feed URL (client)'; diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng index 3135b1995010126400cece969ba8fcb3a47586b7..a4f4e24d6bcc161ab76c89c51878bad32748fb05 100644 --- a/interface/web/admin/lib/lang/pl_system_config.lng +++ b/interface/web/admin/lib/lang/pl_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edytuj te wartoÅ›ci ostrożnie! Nie usuwaj prefiksów w systemie w wiÄ™cej niż jednym kliencie.'; $wb['dbname_prefix_txt'] = 'Prefiks nazwy bazy danych'; $wb['dbuser_prefix_txt'] = 'Prefiks użytkownika bazy danych'; diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng index 2555ef8e3b90b3da1306bd558233a774f5bfe570..8daf21e2489e3e3932c300acbeb3cce6bc1f24c0 100644 --- a/interface/web/admin/lib/lang/pt_system_config.lng +++ b/interface/web/admin/lib/lang/pt_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edite estes valores com cuidado! Não remova os prefixos em um sistema com mais de um cliente!!'; $wb['dbname_prefix_txt'] = 'Prefixo Nome da Base de Dados'; $wb['dbuser_prefix_txt'] = 'Prefixo Utilizador da Base de Dados'; diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng index dd5b9f3dc8035ef43761fd9ef522ba8ac543ead3..f5383fb8314df9c2a78af1a3ac82712fb2539d18 100644 --- a/interface/web/admin/lib/lang/ro_system_config.lng +++ b/interface/web/admin/lib/lang/ro_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edit these values carefully! Do not remove the prefixes on a systems with more then one client.'; $wb['dbname_prefix_txt'] = 'Database name prefix'; $wb['dbuser_prefix_txt'] = 'Database user prefix'; diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng index d6d5b623506820a5040d578d218b575cc53fa89d..f2baba4919cb1d5323998492c433a9bdcfcb2353 100644 --- a/interface/web/admin/lib/lang/ru_system_config.lng +++ b/interface/web/admin/lib/lang/ru_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'ИзменÑйте Ñти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð°ÐºÐºÑƒÑ€Ð°Ñ‚Ð½Ð¾! Ðе удалÑйте префикÑÑ‹ на ÑиÑтемах где более одного пользователÑ.'; $wb['dbname_prefix_txt'] = 'ÐŸÑ€ÐµÑ„Ð¸ÐºÑ Ð‘Ð”'; $wb['dbuser_prefix_txt'] = 'ÐŸÑ€ÐµÑ„Ð¸ÐºÑ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð‘Ð”'; diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng index dd5b9f3dc8035ef43761fd9ef522ba8ac543ead3..f5383fb8314df9c2a78af1a3ac82712fb2539d18 100644 --- a/interface/web/admin/lib/lang/se_system_config.lng +++ b/interface/web/admin/lib/lang/se_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Edit these values carefully! Do not remove the prefixes on a systems with more then one client.'; $wb['dbname_prefix_txt'] = 'Database name prefix'; $wb['dbuser_prefix_txt'] = 'Database user prefix'; diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng index 2b9db99d2aca6e2be009c550d94b6048e5515a83..7c3c381559df9596346a336d4585616f69f17377 100644 --- a/interface/web/admin/lib/lang/sk_system_config.lng +++ b/interface/web/admin/lib/lang/sk_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Upravte tieto hodnoty pozorne! Neodstraňujte predpony na systémoch s viac ako jedného klienta.'; $wb['dbname_prefix_txt'] = 'Predpona názvu databázy '; $wb['dbuser_prefix_txt'] = 'Predpona databáza užÃvateľa'; diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng index f620af1e63e5c549e5b2a2d272ee3a88df92bc31..04be0b6b38b44d49145c1b46be1a77eea98f558e 100644 --- a/interface/web/admin/lib/lang/tr_system_config.lng +++ b/interface/web/admin/lib/lang/tr_system_config.lng @@ -1,4 +1,5 @@ <?php +$wb['system_config_desc_txt'] = ''; $wb['warning'] = 'Bu deÄŸerleri dikkatlice deÄŸiÅŸtirin! Sistemde birden fazla müşteri varsa, ön ekleri kaldırmayın.'; $wb['dbname_prefix_txt'] = 'Veritabanı ismi ön eki'; $wb['dbuser_prefix_txt'] = 'Veritabanı kullanıcısı ön eki'; diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php index 3c564d0abd962f068254354d3d53ffdd4d6c4d72..91a9401f1ac5ed0d61170b53edefa4cad3f1e96e 100644 --- a/interface/web/admin/lib/module.conf.php +++ b/interface/web/admin/lib/module.conf.php @@ -92,8 +92,6 @@ if (is_dir($menu_dir)) { } } -include_once(ISPC_WEB_PATH.'/tools/lib/interface.d/' . $_SESSION['s']['user']['app_theme'] . '.menu.php'); - $module['nav'][] = array( 'title' => 'Interface', 'open' => "1", 'items' => $items); diff --git a/interface/web/admin/tpl_default-v2_admin.php b/interface/web/admin/tpl_default-v2_admin.php new file mode 100644 index 0000000000000000000000000000000000000000..e6d62d6202cd5ca07fd8bcbcb85e949dc245b914 --- /dev/null +++ b/interface/web/admin/tpl_default-v2_admin.php @@ -0,0 +1,73 @@ +<?php +/* +Copyright (c) 2007, 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/tpl_default-v2_admin.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('admin'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onBeforeUpdate() { + global $app, $conf; + + //* Check if the server has been changed + // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway + if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) { + $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id); + if($rec['server_id'] != $this->dataRecord["server_id"]) { + //* Add a error message and switch back to old server + $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); + $this->dataRecord["server_id"] = $rec['server_id']; + } + unset($rec); + } + } +} + +$page = new page_action; +$page->onLoad(); + +?> \ No newline at end of file diff --git a/interface/web/admin/tpl_default_admin.php b/interface/web/admin/tpl_default_admin.php new file mode 100644 index 0000000000000000000000000000000000000000..2a984b358c28d1070712d226cb1940192b5238a6 --- /dev/null +++ b/interface/web/admin/tpl_default_admin.php @@ -0,0 +1,73 @@ +<?php +/* +Copyright (c) 2007, 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/tpl_default_admin.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('admin'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onBeforeUpdate() { + global $app, $conf; + + //* Check if the server has been changed + // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway + if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) { + $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id); + if($rec['server_id'] != $this->dataRecord["server_id"]) { + //* Add a error message and switch back to old server + $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); + $this->dataRecord["server_id"] = $rec['server_id']; + } + unset($rec); + } + } +} + +$page = new page_action; +$page->onLoad(); + +?> \ No newline at end of file diff --git a/interface/web/tools/default-v2_settings.php b/interface/web/tools/default-v2_settings.php deleted file mode 100644 index 30d777f856648f18090683d957db159276c7df57..0000000000000000000000000000000000000000 --- a/interface/web/tools/default-v2_settings.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -/* -Copyright (c) 2008, 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/default-v2_settings.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('tools'); -$app->uses('tpl'); -//// Loading classes -//$app->uses('tpl,tform,tform_actions'); -//$app->load('tform_actions'); -// -//class page_action extends tform_actions { -// -// function onLoad() { -// global $app, $conf, $tform_def_file; -// -// // Loading template classes and initialize template -// if(!is_object($app->tpl)) $app->uses('tpl'); -// if(!is_object($app->tform)) $app->uses('tform'); -// -// $app->tpl->newTemplate("tabbed_form.tpl.htm"); -// -// // Load table definition from file -// $app->tform->loadFormDef($tform_def_file); -// -// // Importing ID -// $this->id = $_SESSION['s']['user']['userid']; -// $_POST['id'] = $_SESSION['s']['user']['userid']; -// -// if(count($_POST) > 1) { -// $this->dataRecord = $_POST; -// $this->onSubmit(); -// } else { -// $this->onShow(); -// } -// } -// -// function onBeforeInsert() { -// global $app, $conf; -// -// if(!in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) { -// $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; -// } -// } -// -// function onInsert() { -// die('No inserts allowed.'); -// } -// -// function onBeforeUpdate() { -// global $app, $conf; -// -// if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.'; -// -// $_SESSION['s']['user']['language'] = $_POST['language']; -// $_SESSION['s']['language'] = $_POST['language']; -// -// if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) { -// $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; -// } -// } -// -// -//} -// -//$page = new page_action; -//$page->onLoad(); - -echo '<h2 class="frmTextHead">Default-v2 Settings</h2><p>No settings for this theme</p>'; -?> diff --git a/interface/web/tools/form/interface_settings.tform.php b/interface/web/tools/form/interface_settings.tform.php index b43e1c67cef8b92239df3442f00210b2a11de779..b3466d9eb519f3f7425867588f9cbc2e0014f2d4 100644 --- a/interface/web/tools/form/interface_settings.tform.php +++ b/interface/web/tools/form/interface_settings.tform.php @@ -60,8 +60,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -$form['title'] = 'Interface Settings'; -$form['description'] = ''; +$form['title'] = 'interface_head_txt'; +$form['description'] = 'interface_desc_txt'; $form['name'] = 'interface'; $form['action'] = 'interface_settings.php'; $form['db_table'] = 'sys_user'; diff --git a/interface/web/tools/form/default-v2_settings.tform.php b/interface/web/tools/form/tpl_default-v2.tform.php similarity index 96% rename from interface/web/tools/form/default-v2_settings.tform.php rename to interface/web/tools/form/tpl_default-v2.tform.php index 1819f8589efa8f6fb97e1ffc4cd65bf5f8904c15..c4a4c28a4c50da38c363c1b00a4b4111df5d18ca 100644 --- a/interface/web/tools/form/default-v2_settings.tform.php +++ b/interface/web/tools/form/tpl_default-v2.tform.php @@ -60,10 +60,10 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -$form['title'] = 'Default-v2 Settings'; -$form['description'] = ''; -$form['name'] = 'default-v2'; -$form['action'] = 'default-v2_settings.php'; +$form['title'] = 'tpl_default-v2_head_txt'; +$form['description'] = 'tpl_default-v2_desc_txt'; +$form['name'] = 'tpl_default-v2'; +$form['action'] = 'tpl_default-v2.php'; $form['db_table'] = 'sys_user'; // needs to be 'sys_user_theme' $form['db_table_idx'] = 'userid'; //?? $form["db_history"] = "no"; diff --git a/interface/web/tools/form/tpl_default.tform.php b/interface/web/tools/form/tpl_default.tform.php new file mode 100644 index 0000000000000000000000000000000000000000..8a16bed3e607da6f710648c6988430d0cfa76ad4 --- /dev/null +++ b/interface/web/tools/form/tpl_default.tform.php @@ -0,0 +1,181 @@ +<?php + +/* +Copyright (c) 2005, 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. +*/ + +/* + Form Definition + + Tabellendefinition + + Datentypen: + - INTEGER (Wandelt Ausdr�cke in Int um) + - DOUBLE + - CURRENCY (Formatiert Zahlen nach W�hrungsnotation) + - VARCHAR (kein weiterer Format Check) + - TEXT (kein weiterer Format Check) + - DATE (Datumsformat, Timestamp Umwandlung) + + Formtype: + - TEXT (normales Textfeld) + - TEXTAREA (normales Textfeld) + - PASSWORD (Feldinhalt wird nicht angezeigt) + - SELECT (Gibt Werte als option Feld aus) + - RADIO + - CHECKBOX + - CHECKBOXARRAY + - FILE + + VALUE: + - Wert oder Array + + Hinweis: + Das ID-Feld ist nicht bei den Table Values einzuf�gen. + + +*/ + +$form['title'] = 'tpl_default_head_txt'; +$form['description'] = 'tpl_default_desc_txt'; +$form['name'] = 'tpl_default'; +$form['action'] = 'tpl_default.php'; +$form['db_table'] = 'sys_user'; // needs to be 'sys_user_theme' +$form['db_table_idx'] = 'userid'; //?? +$form["db_history"] = "no"; +$form['tab_default'] = 'main'; +$form['list_default'] = 'index.php'; +$form['auth'] = 'no'; //? + +//* 0 = id of the user, > 0 id must match with id of current user +$form['auth_preset']['userid'] = 0; +//* 0 = default groupid of the user, > 0 id must match with groupid of current user +$form['auth_preset']['groupid'] = 0; + +//** Permissions are: r = read, i = insert, u = update, d = delete +$form['auth_preset']['perm_user'] = 'riud'; +$form['auth_preset']['perm_group'] = 'riud'; +$form['auth_preset']['perm_other'] = ''; + +//* Pick out modules +//* TODO: limit to activated modules of the user +$modules_list = array(); +$handle = @opendir(ISPC_WEB_PATH); +while ($file = @readdir ($handle)) { + if ($file != '.' && $file != '..') { + if(@is_dir(ISPC_WEB_PATH."/$file")) { + if(is_file(ISPC_WEB_PATH."/$file/lib/module.conf.php") and $file != 'login' && $file != 'designer' && $file != 'mailuser') { + $modules_list[$file] = $file; + } + } + } +} + +//* 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; + } + } +} + +//* 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; + } + } +} + +$form['tabs']['main'] = array ( + 'title' => 'Settings', + 'width' => 80, + 'template' => 'templates/interface_settings.htm', + 'fields' => array ( + ################################## + # Beginn Datenbankfelder + ################################## + 'startmodule' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'regex' => '', + 'errmsg' => '', + 'default' => '', + 'value' => $modules_list, + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' + ), + 'language' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'language_is_empty'), + 1 => array ( 'type' => 'REGEX', + 'regex' => '/^[a-z]{2}$/i', + 'errmsg'=> 'language_regex_mismatch'), + ), + 'regex' => '', + 'errmsg' => '', + 'default' => '', + 'value' => $language_list, + 'separator' => '', + 'width' => '30', + 'maxlength' => '2', + 'rows' => '', + 'cols' => '' + ), + 'app_theme' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'regex' => '', + 'errmsg' => '', + 'default' => 'default', + 'value' => $themes_list, + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' + ) + ################################## + # ENDE Datenbankfelder + ################################## + ) +); + + +?> diff --git a/interface/web/tools/index.php b/interface/web/tools/index.php index ac064f6496e6d03caf1001d46e5e56d77d9e68cb..b13718d957539be5bd48abdf6bc54ac839f43036 100644 --- a/interface/web/tools/index.php +++ b/interface/web/tools/index.php @@ -28,16 +28,7 @@ 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/user_settings.tform.php"; - -/****************************************** -* End Form configuration -******************************************/ +global $app, $conf; require_once('../../lib/config.inc.php'); require_once('../../lib/app.inc.php'); @@ -45,6 +36,16 @@ require_once('../../lib/app.inc.php'); //* Check permissions for module $app->auth->check_module_permissions('tools'); -echo '<h2 class="frmTextHead">'.$app->lng('ISPConfig Tools').'</h2><p>'.$app->lng('ispconfig_tools_note').'</p>'; +$app->uses('tpl'); + +$app->tpl->newTemplate('listpage.tpl.htm'); +$app->tpl->setInclude('content_tpl', 'templates/index.htm'); + +$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_index.lng'; +include($lng_file); + +$app->tpl->setVar($wb); +$app->tpl_defaults(); +$app->tpl->pparse(); ?> \ No newline at end of file diff --git a/interface/web/tools/lib/interface.d/default-v2.menu.php b/interface/web/tools/lib/interface.d/default-v2.menu.php deleted file mode 100644 index 6d6b0c0d24de4ddede0905ef61664603e4ea4963..0000000000000000000000000000000000000000 --- a/interface/web/tools/lib/interface.d/default-v2.menu.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -$items[] = array( 'title' => 'Default-v2 Theme', - 'target' => 'content', - 'link' => 'tools/default-v2_settings.php', - 'html_id' => 'default-v2_settings'); -?> diff --git a/interface/web/tools/lib/interface.d/tpl_default-v2.menu.php b/interface/web/tools/lib/interface.d/tpl_default-v2.menu.php new file mode 100644 index 0000000000000000000000000000000000000000..a21e1d53a8af8cd688bb32c049107c025f488eef --- /dev/null +++ b/interface/web/tools/lib/interface.d/tpl_default-v2.menu.php @@ -0,0 +1,7 @@ +<?php + +$items[] = array( 'title' => 'Default-v2 Theme', + 'target' => 'content', + 'link' => 'tools/tpl_default-v2.php', + 'html_id' => 'tpl_default-v2'); +?> diff --git a/interface/web/tools/lib/interface.d/tpl_default.menu.php b/interface/web/tools/lib/interface.d/tpl_default.menu.php new file mode 100644 index 0000000000000000000000000000000000000000..a18000445abb175dac53f8bfd315e4883808481e --- /dev/null +++ b/interface/web/tools/lib/interface.d/tpl_default.menu.php @@ -0,0 +1,7 @@ +<?php + +$items[] = array( 'title' => 'Default Theme', + 'target' => 'content', + 'link' => 'tools/tpl_default.php', + 'html_id' => 'tpl_default'); +?> diff --git a/interface/web/tools/lib/lang/de_default-v2.lng b/interface/web/tools/lib/lang/de_default-v2.lng deleted file mode 100644 index b60be64cde4f3aae5170f6c75a2502851c150e0f..0000000000000000000000000000000000000000 --- a/interface/web/tools/lib/lang/de_default-v2.lng +++ /dev/null @@ -1,5 +0,0 @@ -<?php -$wb['language_txt'] = 'Sprache'; -$wb['startmodule_txt'] = 'Startmodul'; -$wb['app_theme_txt'] = 'Design'; -?> diff --git a/interface/web/tools/lib/lang/de_index.lng b/interface/web/tools/lib/lang/de_index.lng new file mode 100644 index 0000000000000000000000000000000000000000..d36ff7192a78559e0b4d1785714a4479e7df7c99 --- /dev/null +++ b/interface/web/tools/lib/lang/de_index.lng @@ -0,0 +1,4 @@ +<?php +$wb['page_head_txt'] = 'ISPConfig Tools'; +$wb['page_desc_txt'] = 'Benutzereinstellungen ändern'; +?> diff --git a/interface/web/tools/lib/lang/de_interface.lng b/interface/web/tools/lib/lang/de_interface.lng index b60be64cde4f3aae5170f6c75a2502851c150e0f..bb5255715591aa9b3e731643159470c999e6bcaf 100644 --- a/interface/web/tools/lib/lang/de_interface.lng +++ b/interface/web/tools/lib/lang/de_interface.lng @@ -1,4 +1,6 @@ <?php +$wb["interface_head_txt"] = 'Interface Einstellungen'; +$wb["interface_desc_txt"] = 'Passe das Interface für dich an'; $wb['language_txt'] = 'Sprache'; $wb['startmodule_txt'] = 'Startmodul'; $wb['app_theme_txt'] = 'Design'; diff --git a/interface/web/tools/lib/lang/de_tpl_default-v2.lng b/interface/web/tools/lib/lang/de_tpl_default-v2.lng new file mode 100644 index 0000000000000000000000000000000000000000..079263354eef3372b719709bbf10d460768652d6 --- /dev/null +++ b/interface/web/tools/lib/lang/de_tpl_default-v2.lng @@ -0,0 +1,7 @@ +<?php +$wb["tpl_default-v2_head_txt"] = 'Default-v2 Theme settings'; +$wb["tpl_default-v2_desc_txt"] = 'Passe default-v2-theme-spezifische Optionen'; +$wb['language_txt'] = 'Sprache'; +$wb['startmodule_txt'] = 'Startmodul'; +$wb['app_theme_txt'] = 'Design'; +?> diff --git a/interface/web/tools/lib/lang/de_tpl_default.lng b/interface/web/tools/lib/lang/de_tpl_default.lng new file mode 100644 index 0000000000000000000000000000000000000000..110c148384e7f42168808ecf7ef622e493ab163e --- /dev/null +++ b/interface/web/tools/lib/lang/de_tpl_default.lng @@ -0,0 +1,7 @@ +<?php +$wb["tpl_default_head_txt"] = 'Default Theme Einstellungen'; +$wb["tpl_default_desc_txt"] = 'Passe default-theme-spezifische Optionen'; +$wb['language_txt'] = 'Sprache'; +$wb['startmodule_txt'] = 'Startmodul'; +$wb['app_theme_txt'] = 'Design'; +?> diff --git a/interface/web/tools/lib/lang/en_default-v2.lng b/interface/web/tools/lib/lang/en_default-v2.lng deleted file mode 100644 index b702ba31c1083474b23b24a2dccc968cbd09c757..0000000000000000000000000000000000000000 --- a/interface/web/tools/lib/lang/en_default-v2.lng +++ /dev/null @@ -1,5 +0,0 @@ -<?php -$wb["language_txt"] = 'Language'; -$wb["startmodule_txt"] = 'Startmodule'; -$wb["app_theme_txt"] = 'Design'; -?> \ No newline at end of file diff --git a/interface/web/tools/lib/lang/en_index.lng b/interface/web/tools/lib/lang/en_index.lng new file mode 100644 index 0000000000000000000000000000000000000000..9fa2544eeaec88e37f449a7d5dcb3388f56b2dda --- /dev/null +++ b/interface/web/tools/lib/lang/en_index.lng @@ -0,0 +1,4 @@ +<?php +$wb['page_head_txt'] = 'ISPConfig Tools'; +$wb['page_desc_txt'] = 'Change user settings'; +?> \ No newline at end of file diff --git a/interface/web/tools/lib/lang/en_interface.lng b/interface/web/tools/lib/lang/en_interface.lng index b702ba31c1083474b23b24a2dccc968cbd09c757..b15c7334b28e702ac47115ab5274b98aecc307b9 100644 --- a/interface/web/tools/lib/lang/en_interface.lng +++ b/interface/web/tools/lib/lang/en_interface.lng @@ -1,4 +1,6 @@ <?php +$wb["interface_head_txt"] = 'Interface Settings'; +$wb["interface_desc_txt"] = 'Modify your interface'; $wb["language_txt"] = 'Language'; $wb["startmodule_txt"] = 'Startmodule'; $wb["app_theme_txt"] = 'Design'; diff --git a/interface/web/tools/lib/lang/en_tpl_default-v2.lng b/interface/web/tools/lib/lang/en_tpl_default-v2.lng new file mode 100644 index 0000000000000000000000000000000000000000..950c982409ea5bae91f74103663dbe81de9842d1 --- /dev/null +++ b/interface/web/tools/lib/lang/en_tpl_default-v2.lng @@ -0,0 +1,7 @@ +<?php +$wb["tpl_default-v2_head_txt"] = 'Default-v2 Theme settings'; +$wb["tpl_default-v2_desc_txt"] = 'Modify default-v2-theme specific options'; +$wb["language_txt"] = 'Language'; +$wb["startmodule_txt"] = 'Startmodule'; +$wb["app_theme_txt"] = 'Design'; +?> \ No newline at end of file diff --git a/interface/web/tools/lib/lang/en_tpl_default.lng b/interface/web/tools/lib/lang/en_tpl_default.lng new file mode 100644 index 0000000000000000000000000000000000000000..81c443e6d56d6f757360a9419bd86eec7781c93d --- /dev/null +++ b/interface/web/tools/lib/lang/en_tpl_default.lng @@ -0,0 +1,7 @@ +<?php +$wb["tpl_default_head_txt"] = 'Default Theme settings'; +$wb["tpl_default_desc_txt"] = 'Modify default-theme specific options'; +$wb["language_txt"] = 'Language'; +$wb["startmodule_txt"] = 'Startmodule'; +$wb["app_theme_txt"] = 'Design'; +?> \ No newline at end of file diff --git a/interface/web/tools/lib/module.conf.php b/interface/web/tools/lib/module.conf.php index d053779a2f13c9b719bf189cf503120713c9a65f..10855fe70be368076965ff2cd9ba02a191044aae 100644 --- a/interface/web/tools/lib/module.conf.php +++ b/interface/web/tools/lib/module.conf.php @@ -32,7 +32,7 @@ $items[] = array( 'title' => 'Interface', 'link' => 'tools/interface_settings.php', 'html_id' => 'interface_settings'); -include_once(ISPC_WEB_PATH.'/tools/lib/interface.d/' . $_SESSION['s']['user']['app_theme'] . '.menu.php'); +include_once(ISPC_WEB_PATH.'/tools/lib/interface.d/tpl_' . $_SESSION['s']['user']['app_theme'] . '.menu.php'); $module['nav'][] = array( 'title' => 'Interface', 'open' => 1, diff --git a/interface/web/tools/templates/index.htm b/interface/web/tools/templates/index.htm new file mode 100644 index 0000000000000000000000000000000000000000..e1a0acbba89ed683050d119db53a7b8a8b3236ea --- /dev/null +++ b/interface/web/tools/templates/index.htm @@ -0,0 +1,20 @@ +<h2><tmpl_var name="page_head_txt"></h2> +<p><tmpl_var name="page_desc_txt"></p> + +<div class="panel panel_tools_interface"> + + <div class="pnl_formsarea"> + <fieldset class="inlineLabels"> + <h2 class="frmTextHead"></h2><p>ispconfig_tools_note</p> + + TEST + </fieldset> + + <input type="hidden" name="id" value="{tmpl_var name='id'}"> + + <div class="buttonHolder buttons"> + + </div> + </div> + +</div> \ No newline at end of file diff --git a/interface/web/tools/templates/interface_settings.htm b/interface/web/tools/templates/interface_settings.htm index 045fc0242466da64d93ebae63b7b86bf95f90665..7a22f2708b7fd6b6d5a09b4f814deb4f1dfccfeb 100644 --- a/interface/web/tools/templates/interface_settings.htm +++ b/interface/web/tools/templates/interface_settings.htm @@ -1,16 +1,10 @@ -<h2><tmpl_var name="list_head_txt"></h2> -<p><tmpl_var name="list_desc_txt"></p> +<h2><tmpl_var name="page_head_txt"></h2> +<p><tmpl_var name="page_desc_txt"></p> <div class="panel panel_tools_interface"> <div class="pnl_formsarea"> <fieldset class="inlineLabels"> - <div class="ctrlHolder"> - <label for="startmodule">{tmpl_var name='startmodule_txt'}</label> - <select name="startmodule" id="startmodule" class="selectInput formLengthHalf"> - {tmpl_var name='startmodule'} - </select> - </div> <div class="ctrlHolder"> <label for="language">{tmpl_var name='language_txt'}</label> <select name="language" id="language" class="selectInput flags"> @@ -24,6 +18,12 @@ {tmpl_var name='app_theme'} </select> </div> + <div class="ctrlHolder"> + <label for="startmodule">{tmpl_var name='startmodule_txt'}</label> + <select name="startmodule" id="startmodule" class="selectInput formLengthHalf"> + {tmpl_var name='startmodule'} + </select> + </div> </fieldset> <input type="hidden" name="id" value="{tmpl_var name='id'}"> diff --git a/interface/web/tools/templates/default-v2_settings.htm b/interface/web/tools/templates/tpl_default-v2.htm similarity index 91% rename from interface/web/tools/templates/default-v2_settings.htm rename to interface/web/tools/templates/tpl_default-v2.htm index 045fc0242466da64d93ebae63b7b86bf95f90665..330222ca226039239c5ae299e18b87242c31b1db 100644 --- a/interface/web/tools/templates/default-v2_settings.htm +++ b/interface/web/tools/templates/tpl_default-v2.htm @@ -1,7 +1,7 @@ <h2><tmpl_var name="list_head_txt"></h2> <p><tmpl_var name="list_desc_txt"></p> -<div class="panel panel_tools_interface"> +<div class="panel panel_tools_tpl"> <div class="pnl_formsarea"> <fieldset class="inlineLabels"> @@ -29,7 +29,7 @@ <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','tools/interface_settings.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> + <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','tools/tpl_default-v2.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('tools/index.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> </div> </div> diff --git a/interface/web/tools/templates/tpl_default.htm b/interface/web/tools/templates/tpl_default.htm new file mode 100644 index 0000000000000000000000000000000000000000..233b3e99096f32dc5394e531bc2250583265383b --- /dev/null +++ b/interface/web/tools/templates/tpl_default.htm @@ -0,0 +1,37 @@ +<h2><tmpl_var name="list_head_txt"></h2> +<p><tmpl_var name="list_desc_txt"></p> + +<div class="panel panel_tools_tpl"> + + <div class="pnl_formsarea"> + <fieldset class="inlineLabels"> + <div class="ctrlHolder"> + <label for="startmodule">{tmpl_var name='startmodule_txt'}</label> + <select name="startmodule" id="startmodule" class="selectInput formLengthHalf"> + {tmpl_var name='startmodule'} + </select> + </div> + <div class="ctrlHolder"> + <label for="language">{tmpl_var name='language_txt'}</label> + <select name="language" id="language" class="selectInput flags"> + {tmpl_var name='language'} + </select> + </div> + <!-- TODO: If user theme change is activated --> + <div class="ctrlHolder"> + <label for="app_theme">{tmpl_var name='app_theme_txt'}</label> + <select name="app_theme" id="app_theme" class="selectInput formLengthHalf"> + {tmpl_var name='app_theme'} + </select> + </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','tools/tpl_default.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('tools/index.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> + </div> + </div> + +</div> \ No newline at end of file diff --git a/interface/web/tools/tpl_default-v2.php b/interface/web/tools/tpl_default-v2.php new file mode 100644 index 0000000000000000000000000000000000000000..6e42b7a1ae66509498c9edab77859e9fcea5e25a --- /dev/null +++ b/interface/web/tools/tpl_default-v2.php @@ -0,0 +1,108 @@ +<?php +/* +Copyright (c) 2008, 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/tpl_default-v2.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('tools'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onLoad() { + global $app, $conf, $tform_def_file; + + // Loading template classes and initialize template + if(!is_object($app->tpl)) $app->uses('tpl'); + if(!is_object($app->tform)) $app->uses('tform'); + + $app->tpl->newTemplate("tabbed_form.tpl.htm"); + + // Load table definition from file + $app->tform->loadFormDef($tform_def_file); + + // Importing ID + $this->id = $_SESSION['s']['user']['userid']; + $_POST['id'] = $_SESSION['s']['user']['userid']; + + if(count($_POST) > 1) { + $this->dataRecord = $_POST; + $this->onSubmit(); + } else { + $this->onShow(); + } + } + + function onBeforeInsert() { + global $app, $conf; + + if(!in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) { + $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; + } + } + + function onInsert() { + die('No inserts allowed.'); + } + + function onBeforeUpdate() { + global $app, $conf; + + if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.'; + + $_SESSION['s']['user']['language'] = $_POST['language']; + $_SESSION['s']['language'] = $_POST['language']; + + if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) { + $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; + } + } + + +} + +$page = new page_action; +$page->onLoad(); + +?> diff --git a/interface/web/tools/tpl_default.php b/interface/web/tools/tpl_default.php new file mode 100644 index 0000000000000000000000000000000000000000..fb13b66bdfa81750344de5386935c72da5f1bac6 --- /dev/null +++ b/interface/web/tools/tpl_default.php @@ -0,0 +1,108 @@ +<?php +/* +Copyright (c) 2008, 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/tpl_default.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('tools'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onLoad() { + global $app, $conf, $tform_def_file; + + // Loading template classes and initialize template + if(!is_object($app->tpl)) $app->uses('tpl'); + if(!is_object($app->tform)) $app->uses('tform'); + + $app->tpl->newTemplate("tabbed_form.tpl.htm"); + + // Load table definition from file + $app->tform->loadFormDef($tform_def_file); + + // Importing ID + $this->id = $_SESSION['s']['user']['userid']; + $_POST['id'] = $_SESSION['s']['user']['userid']; + + if(count($_POST) > 1) { + $this->dataRecord = $_POST; + $this->onSubmit(); + } else { + $this->onShow(); + } + } + + function onBeforeInsert() { + global $app, $conf; + + if(!in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) { + $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; + } + } + + function onInsert() { + die('No inserts allowed.'); + } + + function onBeforeUpdate() { + global $app, $conf; + + if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.'; + + $_SESSION['s']['user']['language'] = $_POST['language']; + $_SESSION['s']['language'] = $_POST['language']; + + if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) { + $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; + } + } + + +} + +$page = new page_action; +$page->onLoad(); + +?>