Changeset 830

Show
Ignore:
Timestamp:
10/06/07 17:34:58 (1 year ago)
Author:
rats
Message:

Fixed #738: ispcp.conf does not exist and other issues on /bin/sh use!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r829 r830  
    77\_________________________________________________________________/ 
    88 
     92007-10-06 Benedikt Heintel 
     10        - SETUP: 
     11                * Fixed #738: ispcp.conf does not exist and other issues on /bin/sh use! 
     12 
    9132007-10-05 Johannes Schobig 
    1014        - GUI: 
     
    1923        - GUI: 
    2024                * Fixed #746: more relative path in the pma stylesheet 
     25        - LANUGAGES: 
     26                * Updated Czech translation (thanks to Josef Pinc) 
     27                * Updated French translation (thanks to Grégory Marigot) 
    2128 
    22292007-10-04 Johannes Schobig 
  • trunk/Makefile.ubuntu

    r658 r830  
    4343        $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) 
    4444 
    45         cd ./configs && $(MAKE) install 
     45        cd ./configs/dists/ubuntu && $(MAKE) install 
    4646        cd ./engine && $(MAKE) install 
    4747        cd ./gui && $(MAKE) install 
  • trunk/configs/Makefile

    r736 r830  
    44install: 
    55 
    6         if [ $(HOST_OS) == debian ] ; then \ 
     6        if test $(HOST_OS) = debian ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    88                (cd ./apache && $(MAKE) install &); \ 
     
    1717                (cd ./proftpd && $(MAKE) install &); \ 
    1818                (cd ./logrotate && $(MAKE) install); \ 
    19         elif [ $(HOST_OS) == fedora ] ; then \ 
     19        elif test $(HOST_OS) = fedora ; then \ 
    2020                cd ./dists/fedora && $(MAKE) install ; \ 
    21         elif [ $(HOST_OS) == gentoo ] ; then \ 
     21        elif test $(HOST_OS) = gentoo ; then \ 
    2222                cd ./dists/gentoo && $(MAKE) install ; \ 
    23         elif [ $(HOST_OS) == redhat ] ; then \ 
     23        elif test $(HOST_OS) = redhat ; then \ 
    2424                cd ./dists/redhat && $(MAKE) install ; \ 
    25         elif [ $(HOST_OS) == sles9 ] ; then \ 
     25        elif test $(HOST_OS) = sles9 ; then \ 
    2626                cd ./dists/sles9 && $(MAKE) install ; \ 
    27         elif [ $(HOST_OS) == suse100 ] ; then \ 
     27        elif test $(HOST_OS) = suse100 ; then \ 
    2828                cd ./dists/suse100 && $(MAKE) install ; \ 
    29         elif [ $(HOST_OS) == suse93 ] ; then \ 
     29        elif test $(HOST_OS) = suse93 ; then \ 
    3030                cd ./dists/suse93 && $(MAKE) install ; \ 
    31         elif [ $(HOST_OS) == ubuntu ] ; then \ 
     31        elif test $(HOST_OS) = ubuntu ; then \ 
    3232                cd ./dists/ubuntu && $(MAKE) install ; \ 
    3333        fi 
     
    3535uninstall: 
    3636 
    37         if [ $(HOST_OS) == debian ] ; then \ 
     37        if test $(HOST_OS) = debian ; then \ 
    3838                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    3939                (cd ./apache && $(MAKE) uninstall &); \ 
     
    4747                (cd ./proftpd && $(MAKE) uninstall &); \ 
    4848                (cd ./logrotate && $(MAKE) uninstall &); \ 
    49         elif [ $(HOST_OS) == fedora ] ; then \ 
     49        elif test $(HOST_OS) = fedora ; then \ 
    5050                cd ./dists/fedora && $(MAKE) uninstall ; \ 
    51         elif [ $(HOST_OS) == gentoo ] ; then \ 
     51        elif test $(HOST_OS) = gentoo ; then \ 
    5252                cd ./dists/gentoo && $(MAKE) uninstall ; \ 
    53         elif [ $(HOST_OS) == redhat ] ; then \ 
     53        elif test $(HOST_OS) = redhat ; then \ 
    5454                cd ./dists/redhat && $(MAKE) uninstall ; \ 
    55         elif [ $(HOST_OS) == sles9 ] ; then \ 
     55        elif test $(HOST_OS) = sles9 ; then \ 
    5656                cd ./dists/sles9 && $(MAKE) uninstall ; \ 
    57         elif [ $(HOST_OS) == suse93 ] ; then \ 
     57        elif test $(HOST_OS) = suse93 ; then \ 
    5858                cd ./dists/suse93 && $(MAKE) uninstall ; \ 
    59         elif [ $(HOST_OS) == suse100 ] ; then \ 
     59        elif test $(HOST_OS) = suse100 ; then \ 
    6060                cd ./dists/suse100 && $(MAKE) uninstall ; \ 
    61         elif [ $(HOST_OS) == ubuntu ] ; then \ 
     61        elif test $(HOST_OS) = ubuntu ; then \ 
    6262                cd ./dists/ubuntu && $(MAKE) uninstall ; \ 
    6363        fi 
  • trunk/configs/apache/Makefile

    r746 r830  
    1616 
    1717        # Debian 4.0 "Etch"? 
    18         if [ $(RELEASE) == '4.0' ] || [ $(RELEASE) == 'lenny/sid' ]; then \ 
     18        if [[ $(RELEASE) = '4.0' ]] || [[ $(RELEASE) = 'lenny/sid' ]]; then \ 
    1919                cp ./fastcgi2.conf ./working/fastcgi_ispcp.conf ; \ 
    2020        else \ 
  • trunk/configs/dists/fedora/Makefile

    r785 r830  
    44install: 
    55 
    6         if [[ $(HOST_OS) == fedora ]] ; then \ 
     6        if test $(HOST_OS) = fedora ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    88                cd ./apache && $(MAKE) install ; cd .. ; \ 
     
    2121uninstall: 
    2222 
    23         if [[ $(HOST_OS) == fedora ]] ; then \ 
     23        if test $(HOST_OS) = fedora ; then \ 
    2424                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    2525                cd ./apache && $(MAKE) uninstall ; cd .. ; \ 
  • trunk/configs/dists/gentoo/Makefile

    r473 r830  
    44install: 
    55 
    6         if [[ $(HOST_OS) == gentoo ]] ; then \ 
     6        if test $(HOST_OS) = gentoo ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    88                cd ./apache && $(MAKE) install ; cd .. ; \ 
     
    2222uninstall: 
    2323 
    24         if [[ $(HOST_OS) == gentoo ]] ; then \ 
     24        if test $(HOST_OS) = gentoo ; then \ 
    2525                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    2626                cd ./apache && $(MAKE) uninstall ; cd .. ; \ 
  • trunk/configs/dists/redhat/Makefile

    r785 r830  
    44install: 
    55 
    6         if [[ $(HOST_OS) == redhat  ]] ; then \ 
     6        if test $(HOST_OS) = redhat ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    88                cd ./apache && $(MAKE) install ; cd .. ; \ 
     
    2121uninstall: 
    2222 
    23         if [[ $(HOST_OS) == redhat ]] ; then \ 
     23        if test $(HOST_OS) = redhat ; then \ 
    2424                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    2525                cd ./apache && $(MAKE) uninstall ; cd .. ; \ 
     
    2828                cd ./cron.d && $(MAKE) uninstall ; cd .. ; \ 
    2929                cd ./database && $(MAKE) uninstall ; cd .. ;  \ 
     30                cd ./fcgi && $(MAKE) uninstall ; cd .. ; \ 
    3031                cd ./init.d && $(MAKE) uninstall ; cd .. ; \ 
    3132                cd ./postfix && $(MAKE) uninstall ; cd .. ; \ 
  • trunk/configs/dists/sles9/Makefile

    r473 r830  
    11 
    2 export  
     2export 
    33 
    44install: 
    55 
    6         if [[ $(HOST_OS) == sles9 ]] ; then \ 
     6        if test $(HOST_OS) = sles9 ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    88                cd ./apache && $(MAKE) install ; cd .. ; \ 
     9                cd ./awstats && $(MAKE) install ; cd .. ; \ 
    910                cd ./bind && $(MAKE) install ; cd .. ; \ 
    10                 cd ./crontab && $(MAKE) install ; cd .. ; \ 
    1111                cd ./cron.d && $(MAKE) install ; cd .. ; \ 
    1212                cd ./database && $(MAKE) install ; cd .. ;  \ 
     13                cd ./fcgi && $(MAKE) install ; cd .. ; \ 
    1314                cd ./init.d && $(MAKE) install ; cd .. ; \ 
    1415                cd ./postfix && $(MAKE) install ; cd .. ; \ 
     
    1718                cd ./logrotate && $(MAKE) install ; cd .. ; \ 
    1819        fi 
    19     
     20 
    2021uninstall: 
    2122 
    22         if [[ $(HOST_OS) == sles9 ]] ; then \ 
     23        if test $(HOST_OS) = sles9 ; then \ 
    2324                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    2425                cd ./apache && $(MAKE) uninstall ; cd .. ; \ 
     26                cd ./awstats && $(MAKE) uninstall ; cd .. ; \ 
    2527                cd ./bind && $(MAKE) uninstall ; cd .. ; \ 
    2628                cd ./crontab && $(MAKE) uninstall ; cd .. ; \ 
    27                 cd ./cron.d && $(MAKE) uninstall ; cd .. ; \ 
    2829                cd ./database && $(MAKE) uninstall ; cd .. ;  \ 
     30                cd ./fcgi && $(MAKE) uninstall ; cd .. ; \ 
    2931                cd ./init.d && $(MAKE) uninstall ; cd .. ; \ 
    3032                cd ./postfix && $(MAKE) uninstall ; cd .. ; \ 
     
    3335                cd ./logrotate && $(MAKE) uninstall ; cd .. ; \ 
    3436        fi 
    35     
    3637 
     38 
  • trunk/configs/dists/suse10/Makefile

    r785 r830  
    44install: 
    55 
    6         if [[ $(HOST_OS) == suse100 ]] ; then \ 
     6        if test $(HOST_OS) = suse100 ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    88                cd ./apache && $(MAKE) install ; cd .. ; \ 
     
    1919uninstall: 
    2020 
    21         if [[ $(HOST_OS) == suse100 ]] ; then \ 
     21        if test $(HOST_OS) = suse100 ; then \ 
    2222                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    2323                cd ./apache && $(MAKE) uninstall ; cd .. ; \ 
  • trunk/configs/dists/ubuntu/Makefile

    r473 r830  
    55install: 
    66 
    7         if [[ $(HOST_OS) == ubuntu ]] ; then \ 
     7        if test $(HOST_OS) = ubuntu ; then \ 
    88                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    99                cd ./apache && $(MAKE) install ; cd .. ; \ 
     
    2323uninstall: 
    2424 
    25         if [[ $(HOST_OS) == ubuntu ]] ; then \ 
     25        if test $(HOST_OS) = ubuntu ; then \ 
    2626                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    2727                cd ./apache && $(MAKE) uninstall ; cd .. ; \ 
  • trunk/configs/dists/ubuntu/apache/Makefile

    r773 r830  
    1616 
    1717        # Ubuntu 7.04? 
    18         if [[ $(RELEASE) == 'testing/unstable' ]] ; then \ 
     18        if [[ $(RELEASE) = 'testing/unstable' ]] ; then \ 
    1919                cp ./fastcgi2.conf ./working/fastcgi_ispcp.conf ; \ 
    2020        else \ 
  • trunk/configs/dists/ubuntu/proftpd/Makefile

    r509 r830  
    99 
    1010        # Ubuntu 7.04? 
    11         if [[ $(RELEASE) == 'testing/unstable' ]] ; then \ 
     11        if [[ $(RELEASE) = 'testing/unstable' ]] ; then \ 
    1212                if [[ -e /etc/proftpd.conf ]] ; then \ 
    1313                        mv /etc/proftpd.conf /etc/proftpd.conf.bak ; \ 
  • trunk/configs/proftpd/Makefile

    r652 r830  
    99 
    1010        # Debian 4.0 "Etch"? 
    11         if [ $(RELEASE) == '4.0' ] || [ $(RELEASE) == 'lenny/sid' ]; then \ 
    12                 if [ -e /etc/proftpd.conf ] ; then \ 
     11        if [[ $(RELEASE) = '4.0' ]] || [[ $(RELEASE) = 'lenny/sid' ]]; then \ 
     12                if [[ -e /etc/proftpd.conf ]] ; then \ 
    1313                        mv /etc/proftpd.conf /etc/proftpd.conf.bak ; \ 
    1414                fi ; \ 
  • trunk/gui/admin/maintenancemode.php

    r776 r830  
    11<?php 
    22/** 
    3  * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version 
     3 * ispCP ω (OMEGA) a Virtual Hosting Control System 
    44 * 
    5  * @copyright        2001-2006 by moleSoftware GmbH 
    6  * @copyright        2006-2007 by ispCP | http://isp-control.net 
    7  * @link             http://isp-control.net 
    8  * @author           ispCP Team (2007) 
     5 * @copyright         2001-2006 by moleSoftware GmbH 
     6 * @copyright         2006-2007 by ispCP | http://isp-control.net 
     7 * @link              http://isp-control.net 
     8 * @author            ispCP Team (2007) 
    99 * 
    10  * @license 
    11  *  This program is free software; you can redistribute it and/or modify it under 
    12  *  the terms of the MPL General Public License as published by the Free Software 
    13  *  Foundation; either version 1.1 of the License, or (at your option) any later 
    14  *  version. 
    15  *  You should have received a copy of the MPL Mozilla Public License along with 
    16  *  this program; if not, write to the Open Source Initiative (OSI) 
    17  *  http://opensource.org | osi@opensource.org 
    18  **
     10 * @license 
     11 *  This program is free software; you can redistribute it and/or modify it under 
     12 *  the terms of the MPL General Public License as published by the Free Software 
     13 *  Foundation; either version 1.1 of the License, or (at your option) any later 
     14 *  version. 
     15 *  You should have received a copy of the MPL Mozilla Public License along with 
     16 *  this program; if not, write to the Open Source Initiative (OSI) 
     17 *  http://opensource.org | osi@opensource.org 
     18 *
    1919 
    2020require '../include/ispcp-lib.php'; 
     
    2323 
    2424$tpl = new pTemplate(); 
    25  
    26 $tpl -> define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'].'/maintenancemode.tpl'); 
     25$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/maintenancemode.tpl'); 
    2726 
    2827$theme_color = $cfg['USER_INITIAL_THEME']; 
    2928 
    30 $tpl -> assign( 
    31                 array( 
    32                         'TR_ADMIN_MAINTENANCEMODE_PAGE_TITLE' => tr('ispCP - Admin/Maintenance mode'), 
    33                         'THEME_COLOR_PATH' => "../themes/$theme_color", 
    34                         'THEME_CHARSET' => tr('encoding'), 
    35                                                'ISP_LOGO' => get_logo($_SESSION['user_id']), 
    36                         'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'] 
    37                      
    38               ); 
     29$tpl->assign( 
     30               array( 
     31                       'TR_ADMIN_MAINTENANCEMODE_PAGE_TITLE' => tr('ispCP - Admin/Maintenance mode'), 
     32                       'THEME_COLOR_PATH' => "../themes/$theme_color", 
     33                       'THEME_CHARSET' => tr('encoding'), 
     34                        'ISP_LOGO' => get_logo($_SESSION['user_id']), 
     35                       'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'] 
     36                       
     37               ); 
    3938 
    4039$selected_on = ''; 
     
    4544 
    4645        $maintenancemode = $_POST['maintenancemode']; 
    47  
    4846        $maintenancemode_message = clean_input($_POST['maintenancemode_message']); 
    4947 
    5048        setConfig_Value('MAINTENANCEMODE', $maintenancemode); 
    51  
    5249        setConfig_Value('MAINTENANCEMODE_MESSAGE', $maintenancemode_message); 
    5350 
    5451        set_page_message(tr('Settings saved !')); 
    55  
    5652} 
    5753 
     
    6763 * 
    6864 */ 
    69 gen_admin_mainmenu($tpl, $cfg['ADMIN_TEMPLATE_PATH'].'/main_menu_system_tools.tpl'); 
    70 gen_admin_menu($tpl, $cfg['ADMIN_TEMPLATE_PATH'].'/menu_system_tools.tpl'); 
     65gen_admin_mainmenu($tpl, $cfg['ADMIN_TEMPLATE_PATH'] . '/main_menu_system_tools.tpl'); 
     66gen_admin_menu($tpl, $cfg['ADMIN_TEMPLATE_PATH'] . '/menu_system_tools.tpl'); 
    7167 
    72 $tpl -> assign( 
    73                 array( 
    74                        'TR_MAINTENANCEMODE' => tr('Maintenance mode'), 
    75                        'TR_MESSAGE_TEMPLATE_INFO' => tr('Under this mode only administrators can login'), 
    76                            'TR_MESSAGE' => tr('Message'), 
    77                                            'MESSAGE_VALUE' => $cfg['MAINTENANCEMODE_MESSAGE'], 
    78                                            'SELECTED_ON' => $selected_on, 
    79                                            'SELECTED_OFF' => $selected_off, 
    80                        'TR_ENABLED' => tr('Enabled'), 
    81                        'TR_DISABLED' => tr('Disabled'), 
    82                        'TR_APPLY_CHANGES' => tr('Apply changes') 
    83                     ) 
    84               ); 
    85  
     68$tpl->assign( 
     69                array( 
     70                        'TR_MAINTENANCEMODE' => tr('Maintenance mode'), 
     71                        'TR_MESSAGE_TEMPLATE_INFO' => tr('Under this mode only administrators can login'), 
     72                        'TR_MESSAGE' => tr('Message'), 
     73                        'MESSAGE_VALUE' => $cfg['MAINTENANCEMODE_MESSAGE'], 
     74                        'SELECTED_ON' => $selected_on, 
     75                        'SELECTED_OFF' => $selected_off, 
     76                        'TR_ENABLED' => tr('Enabled'), 
     77                        'TR_DISABLED' => tr('Disabled'), 
     78                        'TR_APPLY_CHANGES' => tr('Apply changes') 
     79                        ) 
     80                ); 
    8681 
    8782gen_page_message($tpl); 
    8883 
    89 $tpl -> parse('PAGE', 'page'); 
     84$tpl->parse('PAGE', 'page'); 
     85$tpl->prnt(); 
    9086 
    91 $tpl -> prnt(); 
    92  
    93 if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); 
     87if ($cfg['DUMP_GUI_DEBUG']) 
     88        dump_gui_debug(); 
    9489 
    9590unset_messages(); 
     91 
    9692?> 
  • trunk/gui/include/layout-functions.php

    r771 r830  
    11<?php 
    22/** 
    3  * ispCP ω (OMEGA) a Virtual Hosting Control System 
     3 * ispCP ω (OMEGA) a Virtual Hosting Control System 
    44 * 
    5  * @copyright        2001-2006 by moleSoftware GmbH 
    6  * @copyright        2006-2007 by ispCP | http://isp-control.net 
    7  * @link             http://isp-control.net 
    8  * @author           ispCP Team (2007) 
     5 * @copyright         2001-2006 by moleSoftware GmbH 
     6 * @copyright         2006-2007 by ispCP | http://isp-control.net 
     7 * @link              http://isp-control.net 
     8 * @author            ispCP Team (2007) 
    99 * 
    10  *  @license 
    11  *  This program is free software; you can redistribute it and/or modify it under 
    12  *  the terms of the MPL General Public License as published by the Free Software 
    13  *  Foundation; either version 1.1 of the License, or (at your option) any later 
    14  *  version. 
    15  *  You should have received a copy of the MPL Mozilla Public License along with 
    16  *  this program; if not, write to the Open Source Initiative (OSI) 
    17  *  http://opensource.org | osi@opensource.org 
    18  * 
    19  **/ 
     10 * @license 
     11 *   This program is free software; you can redistribute it and/or modify it under 
     12 *   the terms of the MPL General Public License as published by the Free Software 
     13 *   Foundation; either version 1.1 of the License, or (at your option) any later 
     14 *   version. 
     15 *   You should have received a copy of the MPL Mozilla Public License along with 
     16 *   this program; if not, write to the Open Source Initiative (OSI) 
     17 *   http://opensource.org | osi@opensource.org 
     18 */ 
    2019 
    21 // 
     20if (isset($_SESSION['user_id'])) { 
     21        if (!isset($_SESSION['logged_from']) && !isset($_SESSION['logged_from_id'])) { 
     22                list($user_def_lang, $user_def_layout) = get_user_gui_props($sql, $_SESSION['user_id']); 
     23 
     24                $_SESSION['user_theme'] = $user_def_layout; 
     25                $_SESSION['user_def_lang'] = $user_def_lang; 
     26        } 
     27
     28 
    2229// THEME_COLOR managment stuff. 
    23 // 
    2430 
    2531function get_user_gui_props(&$sql, $user_id) { 
     32        global $cfg; 
    2633 
    27   global $cfg; 
    28  
    29   $query = <<<SQL_QUERY 
     34        $query = <<<SQL_QUERY 
    3035        select 
    3136            lang, layout 
     
    3641SQL_QUERY; 
    3742 
    38     $rs = exec_query($sql, $query, array($user_id)); 
     43       $rs = exec_query($sql, $query, array($user_id)); 
    3944 
    40     if ($rs->RecordCount() == 0 || (empty($rs->fields['lang']) && empty($rs->fields['layout']))) { 
    41  
    42         // values for user id, some default stuff 
    43         return array($cfg['USER_INITIAL_LANG'], $cfg['USER_INITIAL_THEME']); 
    44  
    45     } else if (empty($rs->fields['lang'])) { 
    46  
    47         return array($cfg['USER_INITIAL_LANG'],  $rs->fields['layout']); 
    48  
    49     } else if (empty($rs->fields['layout'])) { 
    50  
    51         return array($rs->fields['lang'], $cfg['USER_INITIAL_THEME']); 
    52  
    53     } 
    54  
    55 
    56  
    57 if (isset($_SESSION['user_id'])) { 
    58  
    59         if (!isset($_SESSION['logged_from']) && !isset($_SESSION['logged_from_id'])) { 
    60  
    61                 list($user_def_lang, $user_def_layout) = get_user_gui_props($sql, $_SESSION['user_id']); 
    62  
    63                 $_SESSION['user_theme'] = $user_def_layout; 
    64                 $_SESSION['user_def_lang'] = $user_def_lang; 
     45        if ($rs->RecordCount() == 0 || (empty($rs->fields['lang']) && empty($rs->fields['layout']))) { 
     46                // values for user id, some default stuff 
     47                return array($cfg['USER_INITIAL_LANG'], $cfg['USER_INITIAL_THEME']); 
     48        } 
     49        else if (empty($rs->fields['lang'])) { 
     50                return array($cfg['USER_INITIAL_LANG'], $rs->fields['layout']); 
     51        } 
     52        else if (empty($rs->fields['layout'])) { 
     53                return array($rs->fields['lang'], $cfg['USER_INITIAL_THEME']); 
     54        } 
     55        else { 
     56                return array($rs->fields['lang'], $rs->fields['layout']); 
    6557        } 
    6658} 
    6759 
    6860function gen_page_message(&$tpl) { 
    69  
    70     if (!isset($_SESSION['user_page_message'])) { 
    71         $tpl -> assign('PAGE_MESSAGE', ''); 
    72         $tpl -> assign('MESSAGE',      ''); 
    73     } else { 
    74         $tpl -> assign('MESSAGE', $_SESSION['user_page_message']); 
    75         unset($_SESSION['user_page_message']); 
    76     } 
    77  
     61        if (!isset($_SESSION['user_page_message'])) { 
     62                $tpl->assign('PAGE_MESSAGE', ''); 
     63                $tpl->assign('MESSAGE', ''); 
     64        } else { 
     65                $tpl->assign('MESSAGE', $_SESSION['user_page_message']); 
     66                unset($_SESSION['user_page_message']); 
     67        } 
    7868} 
    7969 
    8070function check_language_exist($lang_table) { 
    81     global $sql; 
     71       global $sql; 
    8272 
    83     $tables = $sql->MetaTables(); 
    84     $nlang = count($tables); 
    85     for ($i=0 ; $i < $nlang; $i++) { 
    86         $data= $tables[$i]; 
    87         if ($data == $lang_table) { 
    88             return true; 
    89        
    90    
    91     return false; 
     73       $tables = $sql->MetaTables(); 
     74       $nlang = count($tables); 
     75       for ($i = 0 ; $i < $nlang; $i++) { 
     76               $data = $tables[$i]; 
     77               if ($data == $lang_table) { 
     78                       return true; 
     79               
     80       
     81       return false; 
    9282} 
    9383 
    9484function set_page_message($message) { 
    95  
    96     if (isset($_SESSION['user_page_message'])) 
    97         $_SESSION['user_page_message'] .= "<br><br>$message<br><br>"; 
    98     else 
    99         $_SESSION['user_page_message'] = $message; 
     85        if (isset($_SESSION['user_page_message'])) 
     86                $_SESSION['user_page_message'] .= "<br><br>$message<br><br>"; 
     87        else 
     88                $_SESSION['user_page_message'] = $message; 
    10089} 
    10190 
     
    116105        $rs = exec_query($sql, $query, array($user_id)); 
    117106 
    118         $search = array(); 
     107        $search = array(); 
    119108        $replace = array(); 
    120109 
     
    124113        $replace[] = $_SESSION['user_logged']; 
    125114        $search [] = '{cid}'; 
    126         $replace[] = $rs -> fields['customer_id']; 
     115        $replace[] = $rs->fields['customer_id']; 
    127116        $search [] = '{fname}'; 
    128         $replace[] = $rs -> fields['fname']; 
     117        $replace[] = $rs->fields['fname']; 
    129118        $search [] = '{lname}'; 
    130         $replace[] = $rs -> fields['lname']; 
     119        $replace[] = $rs->fields['lname']; 
    131120        $search [] = '{company}'; 
    132         $replace[] = $rs -> fields['firm']; 
     121        $replace[] = $rs->fields['firm']; 
    133122        $search [] = '{zip}'; 
    134         $replace[] = $rs -> fields['zip']; 
     123        $replace[] = $rs->fields['zip']; 
    135124        $search [] = '{city}'; 
    136         $replace[] = $rs -> fields['city']; 
     125        $replace[] = $rs->fields['city']; 
    137126        $search [] = '{country}'; 
    138         $replace[] = $rs -> fields['country']; 
     127        $replace[] = $rs->fields['country']; 
    139128        $search [] = '{email}'; 
    140         $replace[] = $rs -> fields['email']; 
     129        $replace[] = $rs->fields['email']; 
    141130        $search [] = '{phone}'; 
    142         $replace[] = $rs -> fields['phone']; 
     131        $replace[] = $rs->fields['phone']; 
    143132        $search [] = '{fax}'; 
    144         $replace[] = $rs -> fields['fax']; 
     133        $replace[] = $rs->fields['fax']; 
    145134        $search [] = '{street1}'; 
    146         $replace[] = $rs -> fields['street1']; 
     135        $replace[] = $rs->fields['street1']; 
    147136        $search [] = '{street2}'; 
    148         $replace[] = $rs -> fields['street2']; 
     137        $replace[] = $rs->fields['street2']; 
    149138 
    150139        $query = <<<SQL_QUERY 
     
    160149 
    161150        $search [] = '{domain_name}'; 
    162         $replace[] = $rs -> fields['domain_name']; 
     151        $replace[] = $rs->fields['domain_name']; 
    163152 
    164153        $menu_link = str_replace($search, $replace, $menu_link); 
     
    168157// curently not being used because there's only one layout/theme 
    169158function gen_def_layout(&$tpl, $user_def_layout) { 
     159        $layouts = array('blue', 'green', 'red', 'yellow'); 
    170160 
    171     $layouts = array('blue', 'green', 'red', 'yellow'); 
     161        foreach ($layouts as $layout) { 
     162                if ($layout === $user_def_layout) { 
     163                        $selected = 'selected'; 
     164                } else { 
     165                        $selected = ''; 
     166                } 
    172167 
    173     foreach ($layouts as $layout) { 
     168                $tpl->assign( 
     169                        array('LAYOUT_VALUE' => $layout, 
     170                                'LAYOUT_SELECTED' => $selected, 
     171                                'LAYOUT_NAME' => $layout 
     172                                ) 
     173                        ); 
    174174 
    175         if ($layout === $user_def_layout) { 
    176  
    177             $selected = 'selected'; 
    178  
    179         } else { 
    180  
    181             $selected = ''; 
    182  
    183         } 
    184  
    185         $tpl -> assign( 
    186         array( 
    187         'LAYOUT_VALUE' => $layout, 
    188         'LAYOUT_SELECTED' => $selected, 
    189         'LAYOUT_NAME' => $layout 
    190         ) 
    191         ); 
    192  
    193         $tpl -> parse('DEF_LAYOUT', '.def_layout'); 
    194     } 
    195  
     175                $tpl->parse('DEF_LAYOUT', '.def_layout'); 
     176        } 
    196177} 
    197178 
  • trunk/gui/index.php

    r804 r830  
    6464        $tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'].'/maintenancemode.tpl'); 
    6565 
    66         $tpl->assign(array( 
    67                                                 'TR_PAGE_TITLE' => tr('ispCP Omega a Virtual Hosting Control System'), 
    68                                                 'THEME_COLOR_PATH' => $cfg['LOGIN_TEMPLATE_PATH'], 
    69                                                 'THEME_CHARSET' => tr('encoding'), 
    70                                                 'TR_MESSAGE' => nl2br($cfg['MAINTENANCEMODE_MESSAGE']), 
    71                                                 'TR_ADMINLOGIN' => tr('Administrator login') 
    72                                                 ) 
    73                                         ); 
     66        $tpl->assign( 
     67                        array( 
     68                                'TR_PAGE_TITLE' => tr('ispCP Omega a Virtual Hosting Control System'), 
     69                                'THEME_COLOR_PATH' => $cfg['LOGIN_TEMPLATE_PATH'], 
     70                                'THEME_CHARSET' => tr('encoding'), 
     71                                'TR_MESSAGE' => nl2br($cfg['MAINTENANCEMODE_MESSAGE']), 
     72                                'TR_ADMINLOGIN' => tr('Administrator login') 
     73                                ) 
     74                        ); 
    7475 
    7576} else { 
     
    7778        $tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'].'/index.tpl'); 
    7879 
    79         $tpl->assign(array( 
    80                                                 'TR_MAIN_INDEX_PAGE_TITLE' => tr('ispCP Omega a Virtual Hosting Control System'), 
    81                                                 'THEME_COLOR_PATH' => $cfg['LOGIN_TEMPLATE_PATH'], 
    82                                                 'THEME_CHARSET' => tr('encoding'), 
    83                                                 'TR_LOGIN' => tr('Login'), 
    84                                                 'TR_USERNAME' => tr('Username'), 
    85                                                 'TR_PASSWORD' => tr('Password'), 
    86                                                 'TR_LOGIN_INFO' => tr('Please enter your login information'), 
    87                                                 // Please make this configurable by ispcp-lib 
    88                                                 'TR_SSL_LINK' => isset($_SERVER['HTTPS']) ? 'http://'.$_SERVER['HTTP_HOST'] : 'https://'.$_SERVER['HTTP_HOST'], 
    89                                                 'TR_SSL_IMAGE' => isset($_SERVER['HTTPS']) ? 'lock.png' : 'unlock.png', 
    90                                                 'TR_SSL_DESCRIPTION' => !isset($_SERVER['HTTPS']) ? tr('Secure Connection') : tr('Normal Connection') 
    91                                                 ) 
    92                                         ); 
     80        $tpl->assign( 
     81                        array( 
     82                                'TR_MAIN_INDEX_PAGE_TITLE' => tr('ispCP Omega a Virtual Hosting Control System'), 
     83                                'THEME_COLOR_PATH' => $cfg['LOGIN_TEMPLATE_PATH'], 
     84                                'THEME_CHARSET' => tr('encoding'), 
     85                                'TR_LOGIN' => tr('Login'), 
     86                                'TR_USERNAME' => tr('Username'), 
     87                                'TR_PASSWORD' => tr('Password'), 
     88                                'TR_LOGIN_INFO' => tr('Please enter your login information'), 
     89                                // Please make this configurable by ispcp-lib 
     90                                'TR_SSL_LINK' => isset($_SERVER['HTTPS']) ? 'http://'.$_SERVER['HTTP_HOST'] : 'https://'.$_SERVER['HTTP_HOST'], 
     91                                'TR_SSL_IMAGE' => isset($_SERVER['HTTPS']) ? 'lock.png' : 'unlock.png', 
     92                                'TR_SSL_DESCRIPTION' => !isset($_SERVER['HTTPS']) ? tr('Secure Connection') : tr('Normal Connection') 
     93                                ) 
     94                        ); 
    9395 
    9496} 
  • trunk/gui/tools/webmail/src/login.php

    r826 r830  
    101101body { 
    102102        text-align: center; 
    103     background-image: url(../skins/omega/header_right_bg.png); 
    104103        background-repeat: no-repeat; 
    105104        margin: 0; 
    106105        padding: 0; 
    107         background-color: #c0c0c0
    108         font-family:Geneva, Arial, Helvetica, sans-serif; 
     106        background-color: #fffff
     107        font-family: Geneva, Arial, Helvetica, sans-serif; 
    109108} 
    110109 
    111110#container { 
    112         background-image:    url(../images/bg.jpg); 
     111        background-image: url(../images/bg.jpg); 
    113112        background-repeat: no-repeat; 
    114113        background-attachment: scroll; 
     
    219218        margin: 3em 2em 0 15em; 
    220219} 
    221 --> 
     220//--> 
    222221</style> 
    223222CSS; 
  • trunk/gui/tools/webmail/src/signout.php

    r826 r830  
    7070<!-- 
    7171body { 
    72  
    73     background-image: url(../skins/omega/header_right_bg.png); 
    74  
     72        text-align: center; 
    7573        background-repeat: no-repeat; 
    76  
    77         text-align: center; 
    78  
    7974        margin: 0; 
    80  
    8175        padding: 0; 
    82  
    83         background-color: #c0c0c0; 
    84  
    85         font-family: Verdana, Lucida, Helvetica; 
    86  
     76        background-color: #ffffff; 
     77        font-family: Geneva, Arial, Helvetica, sans-serif; 
    8778} 
    8879 
    8980#container { 
    90  
    91         background-image:    url(../images/bg.jpg); 
    92  
     81        background-image: url(../images/bg.jpg); 
    9382        background-repeat: no-repeat; 
    94  
    9583        background-attachment: scroll; 
    96  
    9784        background-position: center left; 
    98  
    9985        margin: 8em auto; 
    100  
    10186        width: 474px; 
    102  
    10387        height: 273px; 
    104  
    10588        position: relative; 
    106  
    10789} 
    10890 
    10991#logo { 
    110  
    11192        width: 140px; 
    112