cfoe
2012-07-20 6665c6cbb9e2025fc6b7f36cf9ff86ca9673cb1e
added admin and enduser interface for theme settings
2 files copied
5 files deleted
33 files modified
2 files renamed
21 files added
1190 ■■■■ changed files
interface/web/admin/form/tpl_default-v2_admin.tform.php 194 ●●●●● patch | view | raw | blame | history
interface/web/admin/form/tpl_default_admin.tform.php 194 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/interface.d/default-v2.menu.php 7 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/interface.d/tpl_default-v2.menu.php 7 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/interface.d/tpl_default.menu.php 7 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/ar_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/br_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/cz_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_remote_user_list.lng 2 ●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_tpl_default-v2_admin.lng 18 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_tpl_default_admin.lng 18 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_users_list.lng 2 ●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/el_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_remote_user_list.lng 2 ●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_tpl_default-v2_admin.lng 18 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_tpl_default_admin.lng 18 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_users_list.lng 2 ●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/es_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/fi_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/fr_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/hr_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/hu_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/id_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/it_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/ja_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/nl_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/pl_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/pt_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/ro_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/ru_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/se_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/sk_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/tr_system_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/module.conf.php 2 ●●●●● patch | view | raw | blame | history
interface/web/admin/tpl_default-v2_admin.php 73 ●●●●● patch | view | raw | blame | history
interface/web/admin/tpl_default_admin.php 73 ●●●●● patch | view | raw | blame | history
interface/web/tools/default-v2_settings.php 109 ●●●●● patch | view | raw | blame | history
interface/web/tools/form/interface_settings.tform.php 4 ●●●● patch | view | raw | blame | history
interface/web/tools/form/tpl_default-v2.tform.php 8 ●●●● patch | view | raw | blame | history
interface/web/tools/form/tpl_default.tform.php 54 ●●●●● patch | view | raw | blame | history
interface/web/tools/index.php 23 ●●●● patch | view | raw | blame | history
interface/web/tools/lib/interface.d/default-v2.menu.php 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/interface.d/tpl_default-v2.menu.php 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/interface.d/tpl_default.menu.php 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/de_default-v2.lng 5 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/de_index.lng 4 ●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/de_interface.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/de_tpl_default-v2.lng 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/de_tpl_default.lng 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/en_default-v2.lng 5 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/en_index.lng 4 ●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/en_interface.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/en_tpl_default-v2.lng 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/en_tpl_default.lng 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/module.conf.php 2 ●●● patch | view | raw | blame | history
interface/web/tools/templates/index.htm 20 ●●●●● patch | view | raw | blame | history
interface/web/tools/templates/interface_settings.htm 16 ●●●● patch | view | raw | blame | history
interface/web/tools/templates/tpl_default-v2.htm 4 ●●●● patch | view | raw | blame | history
interface/web/tools/templates/tpl_default.htm 4 ●●●● patch | view | raw | blame | history
interface/web/tools/tpl_default-v2.php 108 ●●●●● patch | view | raw | blame | history
interface/web/tools/tpl_default.php 108 ●●●●● patch | view | raw | blame | history
interface/web/admin/form/tpl_default-v2_admin.tform.php
New file
@@ -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
    ##################################
    )
);
?>
interface/web/admin/form/tpl_default_admin.tform.php
New file
@@ -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
    ##################################
    )
);
?>
interface/web/admin/lib/interface.d/default-v2.menu.php
File was deleted
interface/web/admin/lib/interface.d/tpl_default-v2.menu.php
New file
@@ -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');
?>
interface/web/admin/lib/interface.d/tpl_default.menu.php
New file
@@ -0,0 +1,7 @@
<?php
$items[] = array(   'title'     => 'Default Theme',
                    'target'     => 'content',
                    'link'    => 'admin/tpl_default_admin.php',
                    'html_id'   => 'tpl_default_admin');
?>
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';
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';
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';
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';
?>
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';
interface/web/admin/lib/lang/de_tpl_default-v2_admin.lng
New file
@@ -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';
?>
interface/web/admin/lib/lang/de_tpl_default_admin.lng
New file
@@ -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';
?>
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';
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)';
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";
?>
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)';
interface/web/admin/lib/lang/en_tpl_default-v2_admin.lng
New file
@@ -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';
?>
interface/web/admin/lib/lang/en_tpl_default_admin.lng
New file
@@ -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';
?>
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';
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';
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';
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)';
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';
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';
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';
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';
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'] = 'データベースユーザー名のプリフィックス';
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)';
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';
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';
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';
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'] = 'Префикс пользователя БД';
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';
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';
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';
interface/web/admin/lib/module.conf.php
@@ -92,8 +92,6 @@
    }
}
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);
interface/web/admin/tpl_default-v2_admin.php
New file
@@ -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();
?>
interface/web/admin/tpl_default_admin.php
New file
@@ -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();
?>
interface/web/tools/default-v2_settings.php
File was deleted
interface/web/tools/form/interface_settings.tform.php
@@ -60,8 +60,8 @@
*/
$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';
interface/web/tools/form/tpl_default-v2.tform.php
File was renamed from interface/web/tools/form/default-v2_settings.tform.php
@@ -60,10 +60,10 @@
*/
$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";
interface/web/tools/form/tpl_default.tform.php
copy from interface/web/tools/form/default-v2_settings.tform.php copy to interface/web/tools/form/tpl_default.tform.php
File was copied from interface/web/tools/form/default-v2_settings.tform.php
@@ -60,10 +60,10 @@
*/
$form['title']         = 'Default-v2 Settings';
$form['description']     = '';
$form['name']         = 'default-v2';
$form['action']        = 'default-v2_settings.php';
$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";
@@ -126,7 +126,51 @@
    ##################################
    # 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
    ##################################
interface/web/tools/index.php
@@ -28,16 +28,7 @@
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 @@
//* 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();
?>
interface/web/tools/lib/interface.d/default-v2.menu.php
File was deleted
interface/web/tools/lib/interface.d/tpl_default-v2.menu.php
New file
@@ -0,0 +1,7 @@
<?php
$items[] = array(   'title'     => 'Default-v2 Theme',
                    'target'     => 'content',
                    'link'    => 'tools/tpl_default-v2.php',
                    'html_id'   => 'tpl_default-v2');
?>
interface/web/tools/lib/interface.d/tpl_default.menu.php
New file
@@ -0,0 +1,7 @@
<?php
$items[] = array(   'title'     => 'Default Theme',
                    'target'     => 'content',
                    'link'    => 'tools/tpl_default.php',
                    'html_id'   => 'tpl_default');
?>
interface/web/tools/lib/lang/de_default-v2.lng
File was deleted
interface/web/tools/lib/lang/de_index.lng
New file
@@ -0,0 +1,4 @@
<?php
$wb['page_head_txt'] = 'ISPConfig Tools';
$wb['page_desc_txt'] = 'Benutzereinstellungen ändern';
?>
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';
interface/web/tools/lib/lang/de_tpl_default-v2.lng
New file
@@ -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';
?>
interface/web/tools/lib/lang/de_tpl_default.lng
New file
@@ -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';
?>
interface/web/tools/lib/lang/en_default-v2.lng
File was deleted
interface/web/tools/lib/lang/en_index.lng
New file
@@ -0,0 +1,4 @@
<?php
$wb['page_head_txt'] = 'ISPConfig Tools';
$wb['page_desc_txt'] = 'Change user settings';
?>
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';
interface/web/tools/lib/lang/en_tpl_default-v2.lng
New file
@@ -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';
?>
interface/web/tools/lib/lang/en_tpl_default.lng
New file
@@ -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';
?>
interface/web/tools/lib/module.conf.php
@@ -32,7 +32,7 @@
                    '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,
interface/web/tools/templates/index.htm
New file
@@ -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">
            &nbsp;
        </div>
    </div>
</div>
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'}">
interface/web/tools/templates/tpl_default-v2.htm
File was renamed from interface/web/tools/templates/default-v2_settings.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>
interface/web/tools/templates/tpl_default.htm
copy from interface/web/tools/templates/default-v2_settings.htm copy to interface/web/tools/templates/tpl_default.htm
File was copied from interface/web/tools/templates/default-v2_settings.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.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>
interface/web/tools/tpl_default-v2.php
New file
@@ -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();
?>
interface/web/tools/tpl_default.php
New file
@@ -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();
?>