Changeset 1016

Show
Ignore:
Timestamp:
02/24/08 20:00:04 (9 months ago)
Author:
rats
Message:

* Fixed #294: Some small tasks/features, low priority
-> 2. When logged in as user and there is an active support ticket, then write it with red, so the user "knows"
* Fixed #365: (ubuntu) make all shell scripts and makefiles posix compliant
* Fixed #818: (ubuntu) proftpd doesn't work after fresh install on ubuntu feisty
* Fixed #987: error pages not created
* Fixed #956: Standard mail addresses created for subdomains
* Fixed #992: (gentoo) logrotate throws errors when using syslog-ng

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1015 r1016  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-02-24 Benedikt Heintel 
     5        - ENGINE: 
     6                * Fixed #987: error pages not created 
     7        - GUI: 
     8                * Fixed #294: Some small tasks/features, low priority 
     9                        -> 2. When logged in as user and there is an active support ticket, then write it with red, so the user "knows" 
     10                * Fixed #956: Standard mail addresses created for subdomains 
     11        - DISTS: 
     12                * Fixed #365: (ubuntu) make all shell scripts and makefiles posix compliant 
     13                * Fixed #818: (ubuntu) proftpd doesn't work after fresh install on ubuntu feisty 
     14                * Fixed #992: (gentoo) logrotate throws errors when using syslog-ng 
     15 
     162008-02-24 Jochen Manz 
     17        - TOOLS: 
     18                * Fixed #871: Small CSS error in Webmail 
    319 
    4202008-02-23 Benedikt Heintel 
  • trunk/configs/dists/gentoo/ispcp.conf

    r1007 r1016  
    99# 
    1010 
    11 BuildDate = 20080207 
     11BuildDate = 20080218 
    1212 
    1313Version = 1.0.0 RC4 OMEGA 
    1414 
    15 VersionH = 1.0 Priamos 
     15CodeName = Priamos 
    1616 
    1717DEFAULT_ADMIN_ADDRESS = 
     
    346346USER_INITIAL_THEME = omega_original 
    347347 
    348 ISPCP_LICENSE = ispCP 1.0rc4 OMEGA<br />build: 2008-02-07<br />Priamos 
    349  
    350348FTP_USERNAME_SEPARATOR = @ 
    351349 
    352350FTP_HOMEDIR = /var/www/virtual 
    353  
    354 FTP_SHELL = /bin/bash 
    355351 
    356352IPS_LOGO_PATH = ../themes/user_logos 
  • trunk/configs/dists/gentoo/logrotate/ispcp

    r906 r1016  
    99        sharedscripts 
    1010        prerotate 
    11                 /var/www/ispcp/engine/traffic/ispcp-vrl-traff >/var/log/ispcp/ispcp-vrl-traff.log 
     11                /var/www/ispcp/engine/traffic/ispcp-vrl-traff > /var/log/ispcp/ispcp-vrl-traff.log 
    1212        endscript 
    1313        postrotate 
     
    2828  compress 
    2929  delaycompress 
    30   postrotate 
    31     /usr/bin/killall -HUP syslogd 
    32   endscript 
    3330} 
    3431 
  • trunk/configs/dists/gentoo/postfix/main.cf

    r1007 r1016  
    2525myorigin   = $myhostname 
    2626 
    27 smtpd_banner = $myhostname ESMTP ispCP {MTA_VERSION} Managed {MTA_HOST_TYPE} 
     27smtpd_banner = $myhostname ESMTP ispCP {MTA_VERSION} Managed 
    2828setgid_group = postdrop 
    2929 
     
    3838virtual_transport   = virtual 
    3939transport_maps      = hash:{MTA_TRANSPORT_HASH} 
    40 alias_maps                      = hash:/etc/aliases 
     40alias_maps                      = hash:{MTA_LOCAL_ALIAS_HASH} 
    4141 
    4242# 
  • trunk/configs/dists/ubuntu/apache/parts/als_entry.tpl

    r1007 r1016  
    4747        # httpd als entry PHP support END. 
    4848        Options -Indexes Includes FollowSymLinks MultiViews 
    49         AllowOverride AuthConfig FileInfo 
     49        AllowOverride All 
    5050        Order allow,deny 
    5151        Allow from all 
  • trunk/configs/dists/ubuntu/bind/parts/db_e.tpl

    r1007 r1016  
    2929; CNAME for web transfer 
    3030ftp             IN              CNAME           www 
    31 pma             IN              CNAME           www 
    32 webmail         IN              CNAME           www 
    3331; sub [{SUB_NAME}] entry BEGIN. 
    3432; sub [{SUB_NAME}] entry END. 
  • trunk/configs/dists/ubuntu/bind/parts/db_master_e.tpl

    r1007 r1016  
    2929; CNAME for web transfer 
    3030ftp             IN              CNAME           www 
    31 pma             IN              CNAME           www 
    32 webmail         IN              CNAME           www 
    3331; sub [{SUB_NAME}] entry BEGIN. 
    3432; sub [{SUB_NAME}] entry END. 
  • trunk/configs/dists/ubuntu/ispcp.conf

    r1007 r1016  
    99# 
    1010 
    11 BuildDate = 20080207 
     11BuildDate = 20080218 
    1212 
    1313Version = 1.0.0 RC4 OMEGA 
    1414 
    15 VersionH = 1.0 Priamos 
     15CodeName = Priamos 
    1616 
    1717DEFAULT_ADMIN_ADDRESS = 
     
    7575CMD_RM = /bin/rm 
    7676 
    77 CMD_SHELL = /bin/bash 
     77CMD_SHELL = /bin/sh 
    7878 
    7979CMD_TAR = /bin/tar 
     
    346346USER_INITIAL_THEME = omega_original 
    347347 
    348 ISPCP_LICENSE = ispCP 1.0rc4 OMEGA<br />build: 2008-02-07<br />Priamos 
    349  
    350348FTP_USERNAME_SEPARATOR = @ 
    351349 
    352350FTP_HOMEDIR = /var/www/virtual 
    353  
    354 FTP_SHELL = /bin/bash 
    355351 
    356352IPS_LOGO_PATH = ../themes/user_logos 
  • trunk/configs/dists/ubuntu/logrotate/ispcp

    r1007 r1016  
    99        sharedscripts 
    1010        prerotate 
    11                 /var/www/ispcp/engine/traffic/ispcp-vrl-traff >/var/log/ispcp/ispcp-vrl-traff.log 
     11                /var/www/ispcp/engine/traffic/ispcp-vrl-traff > /var/log/ispcp/ispcp-vrl-traff.log 
    1212        endscript 
    1313        postrotate 
  • trunk/configs/dists/ubuntu/postfix/main.cf

    r1007 r1016  
    2525myorigin   = $myhostname 
    2626 
    27 smtpd_banner = $myhostname ESMTP ispCP {MTA_VERSION} Managed {MTA_HOST_TYPE} 
     27smtpd_banner = $myhostname ESMTP ispCP {MTA_VERSION} Managed 
    2828setgid_group = postdrop 
    2929 
     
    3838virtual_transport   = virtual 
    3939transport_maps      = hash:{MTA_TRANSPORT_HASH} 
    40 alias_maps                      = hash:/etc/aliases 
     40alias_maps                      = hash:{MTA_LOCAL_ALIAS_HASH} 
    4141 
    4242# 
  • trunk/configs/dists/ubuntu/postfix/mta-cfg-setup.sh

    r473 r1016  
    1 #!/bin/bash 
     1#!/bin/sh 
    22 
    33MTA_CONF_DIR=/etc/postfix 
     
    2828 
    2929${CMD_NEWALIASES} 
    30  
  • trunk/configs/dists/ubuntu/proftpd/Makefile

    r882 r1016  
    1 RELEASE=`cat /etc/debian_version | awk '{print $1}'` 
     1RELEASE=`cat /etc/lsb-release | awk '{print $1}'` 
    22 
    33export 
     
    88        cp -R ./backup $(SYSTEM_CONF)/proftpd 
    99 
    10         # if: Ubuntu 6.06 or 6.10 (testing/unstable
    11         # else: Ubuntu 7.04 or 7.10 (4.0, lenny/sid) 
    12         if test $(RELEASE) = 'testing/unstable' ; then \ 
     10        # if: Ubuntu 6.06 (dapper
     11        # else: Ubuntu >= 6.10 
     12        if test $(RELEASE) = 'dapper' ; then \ 
    1313                cp ./proftpd.conf $(ROOT_CONF) ; \ 
    1414                cp ./proftpd.conf $(SYSTEM_CONF)/proftpd ; \ 
  • trunk/configs/ispcp.conf

    r1008 r1016  
    350350FTP_HOMEDIR = /var/www/virtual 
    351351 
    352 FTP_SHELL = /bin/bash 
    353  
    354352IPS_LOGO_PATH = ../themes/user_logos 
    355353 
  • trunk/docs/CentOS/INSTALL

    r994 r1016  
    175175        # service postfix start 
    176176 
    177 4. You have to set up some configuration variables for your linux distribution. 
    178         ispCP ω is preconfigurated for Debian 4.0 Etch. 
    179         If you're using another distribution please check, if config files exist in 
    180         ./configs/dists and use/change them. 
    181  
    182         Check the ispcp.conf and adapt it to your requirements. 
    183         An overview over the variables you can find in the FAQ on 
    184         http://isp-control.net 
     1774. (optional) Check the ispcp.conf and adapt it to your requirements. 
     178   An overview over the variables you can find in the FAQ on 
     179   http://isp-control.net 
    185180 
    1861815. Build the System by using make: 
  • trunk/docs/Debian/INSTALL

    r1012 r1016  
    169169        (when you get to the rootkithunter screen, select two time 'yes') 
    170170 
    171 4.  You have to set up some configuration variables for your linux distribution. 
    172         ispCP ω is preconfigurated for Debian 4.0 Etch. 
    173         If you're using another distribution please check, if config files exist in 
    174         ./configs/dists and use/change them. 
    175  
    176         Check the ispcp.conf and adapt it to your requirements. 
    177         An overview over the variables you can find in the FAQ on 
    178         http://isp-control.net 
     1714. (optional) Check the ispcp.conf and adapt it to your requirements. 
     172   An overview over the variables you can find in the FAQ on 
     173   http://isp-control.net 
    179174 
    1801755. Build the System by using make: 
  • trunk/docs/Gentoo/INSTALL

    r906 r1016  
    6363        # emerge -ua `cat ./docs/Gentoo/gentoo-packages` 
    6464 
    65 4. Now there are two ways of install ISPCP ω 
    66  
    67 a) via install script 
    68 --------------------- 
    69 4a. Start the script and follow the install instructions: 
    70         # ./install-ispcp.sh 
    71  
    72 After that return to step 12. 
    73  
    74 b) manualy 
    75 ---------- 
    76 4b. Change into the configuration directory: 
    77         # cd ./configs 
    78  
    79 5. Open the ispcp.conf and make some changes. 
    80    You have to set up some configuration variables for your linux distribution. 
    81    ISPCP ω is preconfigurated for Debian 4.0 Etch. 
    82    If you're using another distribution please check, if config files exist in 
    83    ./configs/dists and use/change them. 
    84  
    85    These are the Variables you have to look at: 
    86  
    87         SECONDARY_DNS = 
    88         MYSQL_PREFIX_TYPE =                     # '' for MYSQL_PREFIX = yes, 
    89                                                                 # infront or behind for MYSQL_PREFIX = no 
    90  
    91    Check the ispcp.conf and adapt it to your requirements. 
     654.      (optional) Check the ispcp.conf and adapt it to your requirements. 
    9266   An overview over the variables you can find in the FAQ on 
    9367   http://isp-control.net 
    9468 
    95 6. Return to the parent direction and build the System by using make: 
    96         # cd ../ 
     695. Return to the parent direction and build the System by using make: 
    9770        # make -f Makefile.gentoo install 
    9871 
    99 7. Copy all the directories into the system (you may make backups) 
     726. Copy all the directories into the system (you may make backups) 
    10073        # cp -RvL /tmp/ispcp-1.0.0/* / 
    10174 
    102 8. Now it's time to set up the frontend. Change into the engine directory: 
     757. Now it's time to set up the frontend. Change into the engine directory: 
    10376        # cd /var/www/ispcp/engine/setup 
    10477 
    105 8a. Set the MySQL password, if not set: 
     787a. Set the MySQL password, if not set: 
    10679        # mysqladmin -u root password YOUR_PASSWORD 
    10780 
    108 9. Start the engine setup: 
     818. Start the engine setup: 
    10982        # ./ispcp-setup 
    11083 
    111 10. Install ISPCP ω step-by-step 
     849. Install ISPCP ω step-by-step 
    11285 
    11386        If you get no error, all went good; if you get one, look at 
    11487        http://isp-control.net to solve the problem. 
    11588 
    116 11. There is an error in some courier-versions. Courier won't stop, if you use 
     8910. There is an error in some courier-versions. Courier won't stop, if you use 
    11790        /etc/init.d/courier-authdaemon stop, so change it: 
    11891        # nano /etc/ini.d/courier-authdaemon 
     
    12194        into:   killall authdaemond.plain 
    12295 
    123 12. Clean the temporary folders: 
     9611. Clean the temporary folders: 
    12497        # rm -R /tmp/ispcp-1.0.0 
    12598 
    126 13. Open /etc/conf.d/postgrey and update POSTGREY_PORT="60000" 
     9912. Open /etc/conf.d/postgrey and update POSTGREY_PORT="60000" 
    127100 
    128101================================================================================ 
    1291025) Update 
    130103--------- 
     104Make sure you are logged in as root. 
    131105 
    132 There are two ways of update ISPCP ω 
     1061. Untar or unzip the distribution files to a secure directory: 
     107        # cd /root 
     108        # tar xjvf ispcp-omega-1.0.0-rc4.tar.bz2 
    133109 
    134 a) via install script 
    135 --------------------- 
    136 1. Start the script and follow the update instructions: 
    137         # ./install-ispcp.sh 
     1102. Change to the newly created directory: 
     111        # cd ./ispcp-omega-1.0.0 
    138112 
    139 b) manualy 
    140 ---------- 
    141 1.      Please check the update From-To-Files in the ./docs directory 
     1133. Install the required modules: 
     114        # emerge -ua `cat ./docs/Gentoo/gentoo-packages` 
     115 
     1164. (optional) Check the ispcp.conf and adapt it to your requirements. 
     117   An overview over the variables you can find in the FAQ on 
     118   http://isp-control.net 
     119 
     1205. Build the System by using make: 
     121        # make -f Makefile.gentoo install 
     122 
     1236. Save key files 
     124        # cp -v /var/www/ispcp/engine/ispcp-db-keys.pl /tmp/ispcp-1.0.0/var/www/ispcp/engine/ 
     125        # cp -v /var/www/ispcp/engine/messager/ispcp-db-keys.pl /tmp/ispcp-1.0.0/var/www/ispcp/engine/messager/ 
     126        # cp -v /var/www/ispcp/gui/include/ispcp-db-keys.php /tmp/ispcp-1.0.0/var/www/ispcp/gui/include/ 
     127 
     1287. Copy /usr and /var directories into your system (you may make backups) 
     129        # cp -Rv /tmp/ispcp-1.0.0/usr/* /usr/ 
     130        # cp -Rv /tmp/ispcp-1.0.0/var/* /var/ 
     131 
     1328. Backup ispcp.conf and copy the /etc dircetory into your system (you may make backups): 
     133        # mv -v /etc/ispcp/ispcp.conf /etc/ispcp/ispcp.old.conf 
     134        # cp -Rv /tmp/ispcp-1.0.0/etc/* /etc/ 
     135 
     1369. Now it's time to update your installation. Change into the engine directory: 
     137        # cd /var/www/ispcp/engine/setup 
     138 
     13910. Start the engine update: 
     140        # perl ispcp-update 
     141 
     14211. Update ispCP ω step-by-step 
     143 
     144        If you get no error, all went good; if you get one, look at 
     145        http://isp-control.net to solve the problem. 
     146 
     14712. Clean the temporary folders: 
     148        # rm -fR /tmp/ispcp-1.0.0 
    142149 
    143150================================================================================ 
  • trunk/docs/Gentoo/gentoo-packages

    r906 r1016  
    11app-admin/apache-tools 
    22app-admin/apachetop 
     3app-admin/syslog-ng 
    34app-crypt/mcrypt 
    45app-crypt/mhash 
  • trunk/engine/ispcp-dmn-mngr

    r1012 r1016  
    44# Copyright (c) 2001-2006 by moleSoftware GmbH 
    55# http://www.molesoftware.com 
    6 # Copyright (c) 2006-2007 by isp Control Panel 
     6# Copyright (c) 2006-2008 by isp Control Panel 
    77# http://isp-control.net 
    88# 
     
    23762376 
    23772377        # 
     2378        # Default error pages; 
     2379        # 
     2380 
     2381    my @errordocs = (401, 403, 404, 500, 503); 
     2382 
     2383    my ($i, $key) = ('', ''); 
     2384 
     2385    for($i = 0; $i < scalar(@errordocs); $i++) { 
     2386        $key = $errordocs[$i]; 
     2387 
     2388        if (-e "$root_dir/gui/errordocs/$key.html") { 
     2389 
     2390            $rs = sys_command("$main::cfg{'CMD_CP'} -p $root_dir/gui/errordocs/$key.html $www_dir/$dmn_name/errors/"); 
     2391            return $rs if ($rs != 0); 
     2392            $rs = setfmode("$www_dir/$dmn_name/errors/$key.html", $sys_user, $sys_group, 0644); 
     2393            return $rs if ($rs != 0); 
     2394        } 
     2395    } 
     2396    $rs = sys_command("$main::cfg{'CMD_CP'} -p $root_dir/gui/errordocs/inc/error_top.jpg $www_dir/$dmn_name/errors/inc/"); 
     2397    return $rs if ($rs != 0); 
     2398    $rs = sys_command("$main::cfg{'CMD_CP'} -p $root_dir/gui/errordocs/inc/valid_css.jpg $www_dir/$dmn_name/errors/inc/"); 
     2399    return $rs if ($rs != 0); 
     2400    $rs = sys_command("$main::cfg{'CMD_CP'} -p $root_dir/gui/errordocs/inc/valid_xhtml.jpg $www_dir/$dmn_name/errors/inc/"); 
     2401    return $rs if ($rs != 0); 
     2402    $rs = sys_command("$main::cfg{'CMD_CP'} -p $root_dir/gui/errordocs/inc/errordocs.js $www_dir/$dmn_name/errors/inc/"); 
     2403    return $rs if ($rs != 0); 
     2404    $rs = sys_command("$main::cfg{'CMD_CP'} -p $root_dir/gui/errordocs/inc/errordocs.css $www_dir/$dmn_name/errors/inc/"); 
     2405    return $rs if ($rs != 0); 
     2406    $rs = setfmode("$www_dir/$dmn_name/errors/inc/error_top.jpg", $sys_user, $sys_group, 0644); 
     2407    return $rs if ($rs != 0); 
     2408    $rs = setfmode("$www_dir/$dmn_name/errors/inc/valid_css.jpg", $sys_user, $sys_group, 0644); 
     2409    return $rs if ($rs != 0); 
     2410    $rs = setfmode("$www_dir/$dmn_name/errors/inc/valid_xhtml.jpg", $sys_user, $sys_group, 0644); 
     2411    return $rs if ($rs != 0); 
     2412    $rs = setfmode("$www_dir/$dmn_name/errors/inc/errordocs.js", $sys_user, $sys_group, 0644); 
     2413    return $rs if ($rs != 0); 
     2414    $rs = setfmode("$www_dir/$dmn_name/errors/inc/errordocs.css", $sys_user, $sys_group, 0644); 
     2415    return $rs if ($rs != 0); 
     2416 
     2417        # 
    23782418        # php.ini for the domain 
    23792419        # 
  • trunk/engine/setup/set-engine-permissions.sh

    r745 r1016  
    6161for i in `find $ROOT_DIR/engine/`; do 
    6262 
    63         if [[ -f $i ]]; then 
     63        if [ -f $i ]; then 
    6464 
    6565                if [ $DEBUG -eq 1 ]; then 
     
    7070                chown root:root $i; 
    7171 
    72         elif [[ -d $i ]]; then 
     72        elif [ -d $i ]; then 
    7373 
    7474                if [ $DEBUG -eq 1 ]; then 
  • trunk/gui/admin/index.php

    r1014 r1016  
    3232$tpl->define_dynamic('msg_entry', 'page'); 
    3333$tpl->define_dynamic('update_message', 'page'); 
     34$tpl->define_dynamic('database_update_message', 'page'); 
    3435$tpl->define_dynamic('traff_warn', 'page'); 
    3536 
     
    4748            (ticket_status = '2' or ticket_status = '5') 
    4849          and 
    49             ticket_reply = '0' 
     50            ticket_reply = 0 
    5051SQL_QUERY; 
    5152 
     
    9596        } else { 
    9697                $tpl->assign(array('UPDATE_MESSAGE' => '')); 
     98        } 
     99 
     100        if(checkDatabaseUpdateExists()) { 
     101                $tpl->assign(array('DATABASE_UPDATE' => '<a href="database_update.php" class=\"link\">' . tr('A database update is available') . '</a>')); 
     102                $tpl->parse('DATABASE_UPDATE_MESSAGE', 'database_update_message'); 
     103        } else { 
     104                $tpl->assign(array('DATABASE_UPDATE_MESSAGE' => '')); 
    97105        } 
    98106} 
  • trunk/gui/client/add_subdomain.php

    r1014 r1016  
    2424 
    2525$tpl = new pTemplate(); 
    26  
    2726$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/add_subdomain.tpl'); 
    2827$tpl->define_dynamic('page_message', 'page'); 
     
    180179        $sub_id = $sql->Insert_ID(); 
    181180 
    182         if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) { 
    183  
    184             $reseller_id = who_owns_this(who_owns_this($domain_id, 'dmn_id'), 'user'); 
    185  
    186             $query = 'SELECT email FROM admin WHERE admin_id = ? LIMIT 1'; 
    187                 $rs = exec_query($sql, $query, $reseller_id); 
    188                 $reseller_email = $rs->fields['email']; 
    189  
    190         $query = <<<SQL_QUERY 
    191             INSERT INTO mail_users 
    192                 (mail_acc, 
    193                  mail_pass, 
    194                  mail_forward, 
    195                  domain_id, 
    196                  mail_type, 
    197                  sub_id, 
    198                  status, 
    199                  mail_auto_respond) 
    200             VALUES 
    201             (?, ?, ?, ?, ?, ?, ?, ?) 
    202 SQL_QUERY; 
    203  
    204         // create default forwarder for webmaster@sub.domain.tld to the account's owner 
    205         $rs = exec_query($sql, $query, array('webmaster', 
    206                 '_no_', 
    207                 $_SESSION['user_email'], 
    208                 $domain_id, 
    209                 'subdom_forward', 
    210                 $sub_id, 
    211                 $cfg['ITEM_ADD_STATUS'], 
    212                 '_no_')); 
    213  
    214         // create default forwarder for postmaster@sub.domain.tld to the account's reseller 
    215         $rs = exec_query($sql, $query, array('postmaster', 
    216                 '_no_', 
    217                 $reseller_email, 
    218                 $domain_id, 
    219                 'subdom_forward', 
    220                 $sub_id, 
    221                 $cfg['ITEM_ADD_STATUS'], 
    222                 '_no_')); 
    223  
    224         // create default forwarder for abuse@sub.domain.tld to the account's reseller 
    225         $rs = exec_query($sql, $query, array('abuse', 
    226                 '_no_', 
    227                 $reseller_email, 
    228                 $domain_id, 
    229                 'subdom_forward', 
    230                 $sub_id, 
    231                 $cfg['ITEM_ADD_STATUS'], 
    232                 '_no_')); 
    233         } 
     181        // We do not need to create the default mail adresses, subdomains are 
     182        // related to their domains. 
    234183 
    235184        write_log($_SESSION['user_logged'] . ": add new subdomain: " . $sub_name); 
  • trunk/gui/client/index.php

    r1014 r1016  
    5252    } 
    5353    return "$num&nbsp;/&nbsp;$limit"; 
     54} 
     55 
     56function gen_system_message(&$tpl, &$sql) { 
     57        $user_id = $_SESSION['user_id']; 
     58 
     59        $query = <<<SQL_QUERY 
     60        select 
     61            count(ticket_id) as cnum 
     62        from 
     63            tickets 
     64        where 
     65            (ticket_to = ? or ticket_from = ?) 
     66          and 
     67            (ticket_status = '2') 
     68          and 
     69            ticket_reply = 0 
     70SQL_QUERY; 
     71 
     72        $rs = exec_query($sql, $query, array($user_id, $user_id)); 
     73 
     74        $num_question = $rs->fields('cnum'); 
     75 
     76        if ($num_question == 0) { 
     77                $tpl->assign(array('MSG_ENTRY' => '')); 
     78        } else { 
     79                $tpl->assign( 
     80                                array( 
     81                                        'TR_NEW_MSGS' => tr('You have <b>%d</b> new answer to your support questions', $num_question), 
     82                                        'TR_VIEW' => tr('View') 
     83                                        ) 
     84                        ); 
     85 
     86                $tpl->parse('MSG_ENTRY', 'msg_entry'); 
     87        } 
    5488} 
    5589 
     
    283317 
    284318$tpl->assign( 
    285     array('ACCOUNT_NAME' => $account_name, 
    286         'MAIN_DOMAIN' => $dmn_name, 
    287         'MYSQL_SUPPORT' => ($dmn_sqld_limit != -1 && $dmn_sqlu_limit != -1) ? tr('yes') : tr('no'), 
    288         'SUBDOMAINS' => gen_num_limit_msg($sub_cnt, $dmn_subd_limit), 
    289         'DOMAIN_ALIASES' => gen_num_limit_msg($als_cnt, $dmn_als_limit), 
    290         'MAIL_ACCOUNTS' => gen_num_limit_msg($mail_acc_cnt, $dmn_mailacc_limit), 
    291         'FTP_ACCOUNTS' => gen_num_limit_msg($ftp_acc_cnt, $dmn_ftpacc_limit), 
    292         'SQL_DATABASES' => gen_num_limit_msg($sqld_acc_cnt, $dmn_sqld_limit), 
    293         'SQL_USERS' => gen_num_limit_msg($sqlu_acc_cnt, $dmn_sqlu_limit) 
     319            array( 
     320                        'ACCOUNT_NAME' => $account_name, 
     321                'MAIN_DOMAIN' => $dmn_name, 
     322                'MYSQL_SUPPORT' => ($dmn_sqld_limit != -1 && $dmn_sqlu_limit != -1) ? tr('yes') : tr('no'), 
     323                'SUBDOMAINS' => gen_num_limit_msg($sub_cnt, $dmn_subd_limit), 
     324                'DOMAIN_ALIASES' => gen_num_limit_msg($als_cnt, $dmn_als_limit), 
     325                'MAIL_ACCOUNTS' => gen_num_limit_msg($mail_acc_cnt, $dmn_mailacc_limit), 
     326                'FTP_ACCOUNTS' => gen_num_limit_msg($ftp_acc_cnt, $dmn_ftpacc_limit), 
     327                'SQL_DATABASES' => gen_num_limit_msg($sqld_acc_cnt, $dmn_sqld_limit), 
     328                'SQL_USERS' => gen_num_limit_msg($sqlu_acc_cnt, $dmn_sqlu_limit) 
    294329        ) 
    295330    ); 
    296331 
    297332$tpl->assign( 
    298     array('TR_CLIENT_MAIN_INDEX_PAGE_TITLE' => tr('ispCP - Client/Main Index'), 
    299         'THEME_COLOR_PATH' => "../themes/$theme_color", 
    300         'THEME_CHARSET' => tr('encoding'), 
    301         'ISP_LOGO' => get_logo($_SESSION['user_id']) 
     333            array( 
     334                        'TR_CLIENT_MAIN_INDEX_PAGE_TITLE' => tr('ispCP - Client/Main Index'), 
     335                'THEME_COLOR_PATH' => "../themes/$theme_color", 
     336                'THEME_CHARSET' => tr('encoding'), 
     337                'ISP_LOGO' => get_logo($_SESSION['user_id']) 
    302338        ) 
    303339    ); 
     
    313349 
    314350gen_logged_from($tpl); 
     351 
     352gen_system_message($tpl, $sql); 
    315353 
    316354check_permissions($tpl); 
  • trunk/gui/include/ispcp-config.php

    r1008 r1016  
    183183                'FTP_USERNAME_SEPARATOR' => null, 
    184184                'FTP_HOMEDIR' => null, 
    185                 'FTP_SHELL' => null, 
    186185                'IPS_LOGO_PATH' => null, 
    187186                'ISPCP_SUPPORT_SYSTEM_PATH' => null, 
  • trunk/gui/include/ispcp-lib.php

    r900 r1016  
    157157require_once(INCLUDEPATH.'/emailtpl-functions.php'); 
    158158require_once(INCLUDEPATH.'/layout-functions.php'); 
     159require_once(INCLUDEPATH.'/database-update-functions.php'); 
    159160 
    160161if ($_SERVER['SCRIPT_NAME'] != '/client/sql_execute_query.php') { 
  • trunk/gui/include/vfs.php

    r999 r1016  
    44 * 
    55 * @copyright   2006-2008 by ispCP | http://isp-control.net 
     6 * @version     SVN: $ID$ 
    67 * @link                http://isp-control.net 
    78 * @author              ispCP Team 
     
    161162SQL_QUERY; 
    162163                $rs = exec_query($this->_db, $query, array($user, $passwd, $rs->fields['domain_uid'], $rs->fields['domain_gid'], 
    163                                 $cfg['FTP_SHELL'], $cfg['FTP_HOMEDIR'] . '/' . $this->_domain 
     164                                $cfg['CMD_SHELL'], $cfg['FTP_HOMEDIR'] . '/' . $this->_domain 
    164165                                )); 
    165166                if (!$rs) { 
  • trunk/gui/reseller/index.php

    r1014 r1016  
    2323check_login(__FILE__); 
    2424 
     25$theme_color = $cfg['USER_INITIAL_THEME']; 
     26 
     27$tpl = new pTemplate(); 
     28$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/index.tpl'); 
     29$tpl->define_dynamic('def_language', 'page'); 
     30$tpl->define_dynamic('def_layout', 'page'); 
     31$tpl->define_dynamic('no_messages', 'page'); 
     32$tpl->define_dynamic('msg_entry', 'page'); 
     33$tpl->define_dynamic('traff_warn', 'page'); 
     34$tpl->define_dynamic('layout', 'page'); 
     35$tpl->define_dynamic('logged_from', 'page'); 
     36$tpl->define_dynamic('traff_warn', 'page'); 
     37 
    2538// page functions. 
     39function gen_system_message(&$tpl, &$sql) { 
     40        $user_id = $_SESSION['user_id']; 
     41 
     42        $query = <<<SQL_QUERY 
     43        select 
     44            count(ticket_id) as cnum 
     45        from 
     46            tickets 
     47        where 
     48            (ticket_to = ? or ticket_from = ?) 
     49          and 
     50            (ticket_status = '1' or ticket_status = '4') 
     51          and 
     52            ticket_reply = 0 
     53SQL_QUERY; 
     54 
     55        $rs = exec_query($sql, $query, array($user_id, $user_id)); 
     56 
     57        $num_question = $rs->fields('cnum'); 
     58 
     59        if ($num_question == 0) { 
     60                $tpl->assign(array('MSG_ENTRY' => '')); 
     61        } else { 
     62                $tpl->assign( 
     63                                array( 
     64                                        'TR_NEW_MSGS' => tr('You have <b>%d</b> new support questions', $num_question), 
     65                                        'TR_VIEW' => tr('View') 
     66                                        ) 
     67                        ); 
     68 
     69                $tpl->parse('MSG_ENTRY', 'msg_entry'); 
     70        } 
     71} 
     72 
    2673 
    2774function gen_traff_usage(&$tpl, $usage, $max_usage, $bars_max) { 
     
    245292        } 
    246293} 
    247  
    248 $tpl = new pTemplate(); 
    249 $tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/index.tpl'); 
    250 $tpl->define_dynamic('def_language', 'page'); 
    251 $tpl->define_dynamic('def_layout', 'page'); 
    252 $tpl->define_dynamic('no_messages', 'page'); 
    253 $tpl->define_dynamic('msg_entry', 'page'); 
    254 $tpl->define_dynamic('traff_warn', 'page'); 
    255 $tpl->define_dynamic('layout', 'page'); 
    256 $tpl->define_dynamic('logged_from', 'page'); 
    257 $tpl->define_dynamic('traff_warn', 'page'); 
    258  
    259294// common page data. 
    260  
    261 $theme_color = $cfg['USER_INITIAL_THEME']; 
    262295 
    263296$tpl->assign( 
     
    301334gen_reseller_menu($tpl, $cfg['RESELLER_TEMPLATE_PATH'] . '/menu_general_information.tpl'); 
    302335 
     336gen_system_message($tpl, $sql); 
     337 
    303338// static page messages. 
    304339 
  • trunk/gui/themes/omega_original/admin/index.tpl

    r1014 r1016  
    112112          </tr> 
    113113          <!-- EDP: update_message --> 
     114          <!-- BDP: database_update_message --> 
     115          <tr> 
     116            <td width="25">&nbsp;</td> 
     117&nbs