Changeset 764

Show
Ignore:
Timestamp:
08/22/07 04:00:38 (1 year ago)
Author:
raphael
Message:

Fixed #582: FIXME: /var/www/ispcp/gui/include/calc-functions.php:61
Fixed an error where system information was not displayed correctly in admin/server_statistic.php
Improved passwords generator
Fixed #584: $main::db{'CONF_DIR'} is not read by vhcs2ispcp.pl Line 200
Fixed #583: missing semicolon in vhcs2ispcp.sql

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r762 r764  
    1 ispCP ω 1.0.0 Changelog 
     1ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    33 _________________________________________________________________ 
     
    66|               * gui: disable stats-alias in client menu         | 
    77\_________________________________________________________________/ 
     8 
     92007-08-21 Raphael Geissert 
     10    - GUI: 
     11        * Fixed #582: FIXME: /var/www/ispcp/gui/include/calc-functions.php:61 
     12        * Fixed an error where system information was not displayed correctly in admin/server_statistic.php 
     13        * Improved passwords generator 
     14    - SETUP: 
     15        * Fixed #584: $main::db{'CONF_DIR'} is not read by vhcs2ispcp.pl Line 200 
     16        * Fixed #583: missing semicolon in vhcs2ispcp.sql 
    817 
    9182007-08-20 Raphael Geissert 
     
    965974        - RELEASE: VHCS ω Omega 1.0.0 RC1 
    966975 
    967 VHCS ω 2.4.8 Changelog 
     976VHCS ω 2.4.8 Changelog 
    968977~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    969978 
  • trunk/engine/setup/vhcs2ispcp.pl

    r717 r764  
    4747 
    4848    } 
    49      
     49 
    5050    print STDOUT "\t"; 
    51      
     51 
    5252    if ( -e "/etc/init.d/vhcs2_daemon" ) { 
    53      
     53 
    5454        sys_command("/etc/init.d/vhcs2_daemon stop"); 
    55          
     55 
    5656        print STDOUT "\t"; 
    57          
    58     } 
    59      
     57 
     58    } 
     59 
    6060    if ( -e "/etc/init.d/ispcp_daemon" ) { 
    61      
     61 
    6262        sys_command("/etc/init.d/ispcp_daemon stop"); 
    63          
     63 
    6464        print STDOUT "\t"; 
    65      
    66     }     
    67      
     65 
     66    } 
     67 
    6868    if ( -e "/etc/init.d/ispcp_network" ) { 
    69      
     69 
    7070        sys_command("/etc/init.d/ispcp_network stop"); 
    71          
     71 
    7272        print STDOUT "\t"; 
    73      
    74     } 
    75      
     73 
     74    } 
     75 
    7676    print STDOUT "\n\tBlocking access to /etc/vhcs2/vhcs2.conf..."; 
    77      
     77 
    7878    if (sys_command("chmod a-r /etc/vhcs2/vhcs2.conf") != 0) { 
    7979        print STDOUT "failed!\n"; 
     
    8282 
    8383    print STDOUT "done\n"; 
    84      
     84 
    8585    return 0; 
    8686} 
    8787 
    8888sub start_services { 
    89      
     89 
    9090    print STDOUT "\tAllowing access to /etc/vhcs2/vhcs2.conf ..."; 
    9191 
     
    9595    } 
    9696    print STDOUT "done\n"; 
    97      
     97 
    9898    sys_command("$main::cfg{'CMD_ISPCPD'} start"); 
    9999    sys_command("$main::cfg{'CMD_ISPCPN'} start"); 
    100100    sleep(2); 
    101      
     101 
    102102    print STDOUT "\tDisabling vhcs2's apache2 sites ..."; 
    103      
     103 
    104104    if (-e "/etc/apache2/sites-enabled/vhcs2.conf" && 
    105105        sys_command("unlink /etc/apache2/sites-enabled/vhcs2.conf") != 0) { 
     
    108108    } 
    109109    print STDOUT "done\n"; 
    110      
     110 
    111111    #Restart servers to make them use the newly generated config 
    112112    sys_command("$main::cfg{'CMD_HTTPD'} restart"); 
     
    131131    sleep(2); 
    132132    sys_command("$main::cfg{'CMD_AUTHD'} restart"); 
    133      
     133 
    134134    return 0; 
    135135} 
     
    138138 
    139139    my ($msg, $code) = @_; 
    140      
     140 
    141141    if (!defined($code) || $code <= 0 ) { 
    142142        $code = 1; 
     
    152152 
    153153sub upgrade_database { 
    154      
     154 
    155155    my ($rdata, $rs, $sql) = (undef, undef, undef); 
    156      
     156 
    157157    print STDOUT "\tDropping ispcp table..."; 
    158      
     158 
    159159    ($rs, $rdata) = doSQL("DROP DATABASE IF EXISTS `ispcp`;"); 
    160      
     160 
    161161    if ($rs != 0) { 
    162162        print STDOUT "failed!\n"; 
     
    167167 
    168168    print STDOUT "\tCreating new database..."; 
    169      
     169 
    170170    if (sys_command("mysqladmin -u\'$main::cfg{'DATABASE_USER'}\' -p\'$main::db_pwd\' create ispcp ") != 0) { 
    171171        print STDOUT "failed!\n"; 
     
    176176 
    177177    print STDOUT "\tCopying database..."; 
    178      
     178 
    179179    if (sys_command("mysqldump --opt -u\'$main::cfg{'DATABASE_USER'}\' -p\'$main::db_pwd\' $main::cfg{'DATABASE_NAME'} | mysql -u\'$main::cfg{'DATABASE_USER'}\' -p\'$main::db_pwd\' ispcp") != 0) { 
    180180        print STDOUT "failed!\n"; 
     
    185185 
    186186    print STDOUT "\tUpgrading database structure..."; 
    187      
     187 
    188188    if (sys_command("mysql -u\'$main::cfg{'DATABASE_USER'}\' -p\'$main::db_pwd\' < vhcs2ispcp.sql") != 0) { 
    189189        print STDOUT "failed!\n"; 
     
    197197 
    198198sub install_language { 
    199      
    200     if (sys_command("mysql -u\'$main::cfg{'DATABASE_USER'}\' -p\'$main::db_pwd\' ispcp < $main::db{'CONF_DIR'}/database/languages.sql") != 0) { 
     199 
     200    if (sys_command("mysql -u\'$main::cfg{'DATABASE_USER'}\' -p\'$main::db_pwd\' ispcp < $main::cfg{'CONF_DIR'}/database/languages.sql") != 0) { 
    201201        print STDOUT "failed!\n"; 
    202202        exit_werror(); 
     
    215215 
    216216 
    217 \tNOTE: During the migration process some or all the services might require to be  
     217\tNOTE: During the migration process some or all the services might require to be 
    218218\t shutdown or restarted. 
    219219MSG 
     
    319319\tHave a nice day 
    320320-- 
    321 \tVHCS 2.4.7.1 to ispCP Omega migration script  
     321\tVHCS 2.4.7.1 to ispCP Omega migration script 
    322322\t\t- Copyright (C) 2007 Raphael Geissert 
    323323This program makes use of software copyrighted by moleSoftware GmbH, and isp Control Panel. 
  • trunk/engine/setup/vhcs2ispcp.sql

    r729 r764  
    6666ALTER TABLE `login` ADD `captcha_count` TINYINT( 1 ) default '0'; 
    6767ALTER TABLE `login` ADD `login_count` TINYINT( 1 ) default '0'; 
    68 ALTER TABLE `login` ADD PRIMARY KEY ( `session_id` ) 
     68ALTER TABLE `login` ADD PRIMARY KEY ( `session_id` ); 
    6969 
    70 ALTER TABLE `quotalimits` ADD PRIMARY KEY ( `name` ) 
    71 ALTER TABLE `quotatallies` ADD PRIMARY KEY ( `name` ) 
     70ALTER TABLE `quotalimits` ADD PRIMARY KEY ( `name` ); 
     71ALTER TABLE `quotatallies` ADD PRIMARY KEY ( `name` ); 
    7272 
    7373-- Drop existing languages (they are outdated anyways) 
     
    104104UPDATE `subdomain` SET `subdomain_status` = 'change' WHERE `subdomain_status` = 'ok'; 
    105105UPDATE `domain_aliasses` SET `alias_status` = 'change' WHERE `alias_status` = 'ok'; 
     106UPDATE `mail_users` SET `status` = 'change' WHERE `status` = 'ok'; 
    106107-- END: Regenerate config files 
    107108 
    108109-- Change charset: 
    109110 
    110 ALTER DATABASE `ispcp` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci 
     111ALTER DATABASE `ispcp` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
    111112 
    112113COMMIT; 
  • trunk/gui/admin/admin_log.php

    r679 r764  
    205205 
    206206        $query = null; 
     207        $msg = ''; 
    207208 
    208209        switch ($_POST['uaction_clear']) { 
     
    214215            log 
    215216SQL_QUERY; 
     217                    $msg = tr('%s deleted the full admin log!', $_SESSION['user_logged']); 
    216218                        break; 
    217219 
     
    228230 
    229231SQL_QUERY; 
     232                    $msg = tr('%s deleted the admin log older than two weeks!', $_SESSION['user_logged']); 
    230233 
    231234                        break; 
     
    240243                        >= log_time 
    241244SQL_QUERY; 
     245                    $msg = tr('%s deleted the admin log older than one month!', $_SESSION['user_logged']); 
    242246 
    243247                        break; 
     
    252256                        >= log_time 
    253257SQL_QUERY; 
     258                    $msg = tr('%s deleted the admin log older than three months!', $_SESSION['user_logged']); 
    254259                        break; 
    255260 
     
    263268                        >= log_time 
    264269SQL_QUERY; 
     270                    $msg = tr('%s deleted the admin log older than six months!', $_SESSION['user_logged']); 
    265271                        break; 
    266272 
     
    274280                        >= log_time 
    275281SQL_QUERY; 
     282                    $msg = tr('%s deleted the admin log older than one year!', $_SESSION['user_logged']); 
    276283 
    277284                        break; 
     
    282289        } 
    283290 
    284         $rs = exec_query($sql, $query, array()); 
     291        $rs = execute_query($sql, $query); 
     292        write_log($msg); 
    285293 
    286294    } 
  • trunk/gui/admin/migration.php

    r730 r764  
    2121 
    2222check_login(__FILE__); 
    23 goto_user_location(); 
     23redirect_to_level_page(); 
    2424 
    2525$query = <<<SQL_QUERY 
  • trunk/gui/admin/multilanguage.php

    r762 r764  
    109109                // add lang pack now ! 
    110110                $file_type = $_FILES['lang_file']['type']; 
    111  
    112                 if (empty($_FILES['lang_file']['name'])) { 
     111                $file = $_FILES['lang_file']['tmp_name']; 
     112 
     113                if (empty($_FILES['lang_file']['name']) || !file_exists($file) || is_readable($file)) { 
    113114                        set_page_message(tr('Upload file error!')); 
    114115                        return; 
    115116                } 
    116117 
    117                 if (!($file_type === "text/plain") && !($file_type === "application/octet-stream"))
     118                if ($file_type !== "text/plain" && $file_type !== "application/octet-stream")
    118119                        set_page_message(tr('You can upload only text files!')); 
    119120                        return; 
    120121                } else { 
    121                         $file = $_FILES['lang_file']['tmp_name']; 
    122122 
    123123                        $fp = fopen($file, 'r'); 
     
    155155 
    156156                        if (empty($ab['ispcp_languageSetlocaleValue']) || empty($ab['ispcp_table']) || empty($ab['ispcp_language']) 
    157                              || !preg_match('/^[a-z]{2}(_[A-Z]{2}){0,1}$/Di',$ab['ispcp_languageSetlocaleValue']) 
    158                              || !preg_match('/^[a-z0-9]+$/Di',$ab['ispcp_table'])) { 
     157                             || !preg_match('/^[a-z]{2}(_[A-Z]{2}){0,1}$/Di', $ab['ispcp_languageSetlocaleValue']) 
     158                             || !preg_match('/^[a-z0-9]+$/Di', $ab['ispcp_table'])) { 
    159159 
    160160                            set_page_message(tr('Uploaded file does not contain the language information!')); 
  • trunk/gui/client/catchall.php

    r743 r764  
    110110            array('CATCHALL_DOMAIN' => $show_dmn_name, 
    111111                'CATCHALL_ACC' => $show_mail_acc, 
    112                 'CATCHALL_STATUS' => user_trans_item_status($mail_status), 
     112                'CATCHALL_STATUS' => translate_dmn_status($mail_status), 
    113113                'CATCHALL_ACTION' => $catchall_action, 
    114114                'CATCHALL_ACTION_SCRIPT' => $catchall_action_script 
  • trunk/gui/client/email_accounts.php

    r730 r764  
    237237                                    'MAIL_ACC' => $mail_acc."@".$show_sub_name.".".$show_dmn_name, 
    238238                                    'MAIL_TYPE' => user_trans_mail_type($rs -> fields['mail_type']), 
    239                                     'MAIL_STATUS' => user_trans_item_status($rs -> fields['status']), 
     239                                    'MAIL_STATUS' => translate_dmn_status($rs -> fields['status']), 
    240240                                    'MAIL_ACTION' => $mail_action, 
    241241                                    'MAIL_ACTION_SCRIPT' => $mail_action_script, 
     
    318318                                    'MAIL_ACC' => $mail_acc."@".$show_als_name, 
    319319                                    'MAIL_TYPE' => user_trans_mail_type($rs -> fields['mail_type']), 
    320                                     'MAIL_STATUS' => user_trans_item_status($rs -> fields['status']), 
     320                                    'MAIL_STATUS' => translate_dmn_status($rs -> fields['status']), 
    321321                                    'MAIL_ACTION' => $mail_action, 
    322322                                    'MAIL_ACTION_SCRIPT' => $mail_action_script, 
  • trunk/gui/client/manage_domains.php

    r741 r764  
    193193$tpl -> assign(array('TR_CLIENT_MANAGE_DOMAINS_PAGE_TITLE' => tr('ISPCP - Client/Manage Domains'), 
    194194                     'THEME_COLOR_PATH' => "../themes/$theme_color", 
    195                      'THEME_CHARSET' => tr('encoding'),  
     195                     'THEME_CHARSET' => tr('encoding'), 
    196196                     'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'], 
    197197                     'ISP_LOGO' => get_logo($_SESSION['user_id']))); 
  • trunk/gui/client/sql_execute_query.php

    r731 r764  
    129129 
    130130    if ($_POST['sql_query'] === '') { 
    131         set_page_message(tr('Please enter SQL query!')); 
     131        set_page_message(tr('Please enter an SQL query!')); 
    132132        $tpl->assign('SQL_RESULT', ''); 
    133133        return; 
     
    158158    $db_user_pass = $rs->fields['sqlu_pass']; 
    159159    $db_name = $rs->fields['sqld_name']; 
    160     $sql_user = &ADONewConnection('mysql'); 
     160    $sql_user = &ADONewConnection($cfg['DB_TYPE']); 
    161161 
    162162    if (!@$sql_user->Connect($cfg['DB_HOST'], $db_user_name, $db_user_pass, $db_name)) { 
    163         set_page_message(tr('Cannot connect as MySQL administrator!')); 
     163        set_page_message(tr('Could not connect to the SQL server as %s!', $db_user_name)); 
    164164        $tpl->assign('SQL_RESULT', ''); 
    165165        return; 
     
    171171 
    172172    if (!$rs) { 
    173         $tpl->assign(array('QUERY_STATUS' => tr('SQL query has error'), 
     173        $tpl->assign(array('QUERY_STATUS' => tr('Execution of SQL query failed!'), 
    174174                'QUERY_RESULT' => $sql_user->ErrorMsg())); 
    175175    } else { 
    176176        write_log($_SESSION['user_logged'] . ": execute SQL query!"); 
    177         $tpl->assign(array('QUERY_STATUS' => tr('SQL query is ok'), 
     177        $tpl->assign(array('QUERY_STATUS' => tr('Execution of SQL query succeeded!'), 
    178178                'QUERY_RESULT' => sql_rs2html($rs))); 
    179179    } 
     
    228228                                'TR_CLIENT_SQL_EXECUTE_QUERY_PAGE_TITLE' => tr('ISPCP - Client/Execute SQL Query'), 
    229229                        'THEME_COLOR_PATH' => "../themes/$theme_color", 
    230                         'THEME_CHARSET' => tr('encoding'),  
     230                        'THEME_CHARSET' => tr('encoding'), 
    231231                        'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'], 
    232232                        'ISP_LOGO' => get_logo($_SESSION['user_id']) 
  • trunk/gui/include/admin-functions.php

    r747 r764  
    16981698                $client_ip = "unknown"; 
    16991699        } 
    1700         $msg2 = $msg."<br><small>User IP: ".$client_ip."</small>"; 
    1701  
    1702         $sql->Execute( "INSERT INTO log (log_time,log_message) VALUES(NOW(),'$msg2')" ); 
     1700        $msg2 = htmlentities($msg) . "<br><small>User IP: ".$client_ip."</small>"; 
     1701 
     1702        $query = "INSERT INTO log (log_time,log_message) VALUES(NOW(), ?)"; 
     1703 
     1704        exec_query($sql, $query, $msg2, false); 
    17031705 
    17041706 
     
    17081710        if ($send_log_to != '') { 
    17091711 
    1710                 global $cfg, $default_hostname, $default_base_server_ip, $Version, $VersionH, $BuildDate, $admin_login; 
     1712                global $default_hostname, $default_base_server_ip, $Version, $VersionH, $BuildDate, $admin_login; 
    17111713 
    17121714                $admin_email = $cfg['DEFAULT_ADMIN_ADDRESS']; 
     
    17171719                $BuildDate = $cfg['BuildDate']; 
    17181720 
    1719                 $subject = "ISPCP $Version on $default_hostname ($default_base_server_ip)"; 
     1721                $subject = "ispCP $Version on $default_hostname ($default_base_server_ip)"; 
    17201722 
    17211723                $to       = $send_log_to; 
     
    17411743                $headers .= "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n"; 
    17421744 
    1743                 $headers .=     "X-Mailer: ISPCP $Version Logging Mailer"; 
     1745                $headers .=     "X-Mailer: ispCP $Version Logging Mailer"; 
    17441746 
    17451747                $mail_result = mail($to, $subject, $message, $headers); 
     
    17491751                $log_message = "$admin_login: Logging Daemon Mail To: |$to|, From: |$admin_email|, Status: |$mail_status|!"; 
    17501752 
    1751                 $sql->Execute( "INSERT INTO log (log_time,log_message) VALUES(NOW(),'$log_message')" ); 
     1753                exec_query($sql, "INSERT INTO log (log_time,log_message) VALUES(NOW(), ?)", $log_message, false); 
    17521754 
    17531755        } 
  • trunk/gui/include/calc-functions.php

    r762 r764  
    4141 
    4242    switch ($from) { 
    43         case 'PiB': 
     43        case 'PB': 
    4444            $bytes = $bytes * pow(1024, 5); 
    4545            break; 
    46         case 'TiB': 
     46        case 'TB': 
    4747            $bytes = $bytes * pow(1024, 4); 
    4848            break; 
    49         case 'GiB': 
     49        case 'GB': 
    5050            $bytes = $bytes * pow(1024, 3); 
    5151            break; 
     
    5353            $bytes = $bytes * pow(1024, 2); 
    5454            break; 
    55         case 'KiB': 
     55        case 'KB': 
    5656            $bytes = $bytes * pow(1024, 1); 
    5757            break; 
     
    6969    if ($bytes > pow(1024, 5)) { 
    7070        $bytes = $bytes/pow(1024, 5); 
    71         $ret   = tr('%.2f PB'); 
     71        $ret   = tr('%.2f PB', $bytes); 
    7272    } else if ($bytes > pow(1024, 4)) { 
    7373        $bytes = $bytes/pow(1024, 4); 
    74         $ret   = tr('%.2f TB'); 
     74        $ret   = tr('%.2f TB', $bytes); 
    7575    } else if ($bytes > pow(1024, 3)) { 
    7676        $bytes = $bytes/pow(1024, 3); 
    77         $ret   = tr('%.2f GB'); 
     77        $ret   = tr('%.2f GB', $bytes); 
    7878    } else if ($bytes > pow(1024, 2) ) { 
    7979        $bytes = $bytes/pow(1024, 2); 
    80         $ret   = tr('%.2f MB'); 
     80        $ret   = tr('%.2f MB', $bytes); 
    8181    } else if ($bytes > pow(1024, 1)) { 
    8282        $bytes = $bytes/pow(1024, 1); 
    83         $ret   = tr('%.2f KB'); 
     83        $ret   = tr('%.2f KB', $bytes); 
    8484    } else { 
    8585        $ret   = tr('%d B', $bytes); 
     
    137137} 
    138138 
    139 function count_array($array) { 
    140  
    141         $count = 0; 
    142         reset($array); 
    143  
    144         while(list($key, $val) = each($array)) $count += count($val); 
    145  
    146         return $count - 1; 
    147  
    148 } 
    149  
    150139function _passgen() { 
    151140 
    152        global $cfg; 
     141    global $cfg; 
    153142 
    154        $pw = ''; 
     143    $pw = ''; 
    155144 
    156         $chars = "2,3,4,7,8,9,A,B,C,D,E,F,G,H,K,M,N,P,R,T,W,U,Y,a,b,c,d,e,f,g,h,k,m,n,p,q,r,t,w,u,y"; 
     145    for($i = 0; $i <= $cfg['PASSWD_CHARS']; $i++) { 
    157146 
    158        $chars_array = explode(",", $chars)
     147        $z = 0
    159148 
    160         $chars_count = count_array($chars_array); 
     149        do { 
     150            $z = mt_rand(42, 123); 
     151        } while($z >= 91 && $z <= 96); 
    161152 
    162        for($i=0; $i < $cfg['PASSWD_CHARS']; $i++) { 
     153        $pw .= chr($z); 
    163154 
    164                mt_srand((double)microtime() * 1000000); 
     155    } 
    165156 
    166         $z = mt_rand(0, $chars_count); 
    167  
    168         $pw .= "" . $chars_array[$z] . ""; 
    169  
    170         } 
    171         return $pw; 
     157    return $pw; 
    172158 
    173159} 
  • trunk/gui/include/client-functions.php

    r747 r764  
    575575} 
    576576 
    577 function user_trans_item_status($item_status) { 
    578  
    579     //DEPRECATED 
    580     return translate_dmn_status($item_status); 
    581 } 
    582  
    583577function user_trans_mail_type($mail_type) { 
    584578    if ($mail_type === 'normal_mail') { 
  • trunk/gui/include/login.php

    r743 r764  
    158158 
    159159    exec_query($sql, $query, array(time(), $sess_id)); 
    160     goto_user_location(); 
    161160    return true; 
    162 } 
    163  
    164 function goto_user_location() { 
    165  
    166         $path = explode("/", $_SERVER['SCRIPT_NAME']); 
    167         $found = false; 
    168  
    169         for($i = count($path) - 2 ; $i < count($path); $i++) { 
    170                 if($path[$i] == $_SESSION['user_type']){ 
    171                 $found= true; 
    172         } 
    173                 else if ($_SESSION['user_type'] == 'user' && $path[$i] == 'client') { 
    174                 $found= true; 
    175                 } 
    176         } 
    177  
    178         if(!$found) { 
    179                 if ($_SESSION['user_type'] == 'admin') { 
    180                 header("Location: ../admin/manage_users.php"); 
    181                 die(); 
    182         } 
    183                 else if ($_SESSION['user_type'] == 'reseller') { 
    184                 header("Location: ../reseller/index.php"); 
    185                     die(); 
    186             } 
    187                 else if ($_SESSION['user_type'] == 'user') { 
    188                 header("Location: ../client/index.php"); 
    189                     die(); 
    190             } 
    191         } 
    192161} 
    193162 
     
    211180                if ($level != $_SESSION['user_type']) { 
    212181                    write_log('Warning! user |'.$_SESSION['user_logged'].'| requested |'.$_SERVER["REQUEST_URI"].'| with REQUEST_METHOD |'.$_SERVER["REQUEST_METHOD"].'|'); 
    213                     header("Location: ../index.php"); 
     182                    header("Location: /index.php"); 
    214183                    die(); 
    215184                } 
     
    369338 
    370339function redirect_to_level_page() { 
     340 
    371341    if (!isset($_SESSION['user_type'])) 
    372342    return false; 
  • trunk/gui/include/sql.php

    r743 r764  
    3333$cfg['DB_NAME'] = $cfg['DATABASE_NAME']; 
    3434 
    35 $sql = &ADONewConnection('mysql'); 
     35$sql = &ADONewConnection($cfg['DB_TYPE']); 
    3636 
    3737@$sql -> Connect($cfg['DB_HOST'], $cfg['DB_USER'], $cfg['DB_PASS'], $cfg['DB_NAME']) OR 
     
    5050} 
    5151 
    52 function exec_query(&$sql, $query, $data = array()) { 
     52function exec_query(&$sql, $query, $data = array(), $failDie = true) { 
    5353        $query = $sql->Prepare($query); 
    5454        $rs = $sql->Execute($query, $data); 
    55         if (!$rs) system_message($sql->ErrorMsg()); 
     55 
     56        if (!$rs && $failDie) { 
     57            system_message($sql->ErrorMsg()); 
     58        } 
     59 
    5660        return $rs; 
    5761} 
  • trunk/language-files/cs_CZ.po

    r762 r764  
    55"Project-Id-Version: PACKAGE VERSION\n" 
    66"Report-Msgid-Bugs-To: \n" 
    7 "POT-Creation-Date: 2007-08-18 23:33-0500\n" 
     7"POT-Creation-Date: 2007-08-21 20:56-0500\n" 
    88"PO-Revision-Date: 2007-07-06 16:02-0500\n" 
    99"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    8686msgstr "" 
    8787 
    88 msgid "ispCP - Admin/Manage users/Add reseller" 
    89 msgstr "" 
    90  
    91 msgid "Reseller IP list is empty!" 
    92 msgstr "" 
    93  
    94 msgid "No." 
    95 msgstr "" 
    96  
    97 msgid "Assign" 
    98 msgstr "Přiřadit" 
    99  
    100 msgid "Label" 
    101 msgstr "Popis" 
    102  
    103 msgid "Number" 
    104 msgstr "číslo" 
    105  
    106 msgid "Reseller" 
     88msgid "ISPCP - Admin/Manage users/Add User" 
     89msgstr "ISPCP - Admin/Údržba uživatelů/Přidat uživatele" 
     90 
     91msgid "Administrator" 
     92msgstr "Administrátor" 
     93 
     94msgid "Incorrect username length or syntax!" 
     95msgstr "" 
     96 
     97msgid "Incorrect password length or syntax!" 
     98msgstr "" 
     99 
     100msgid "Entered passwords do not match!" 
     101msgstr "" 
     102 
     103msgid "Incorrect email length or syntax!" 
    107104msgstr "" 
    108105 
     
    110107msgstr "" 
    111108 
    112 msgid "Incorrect username length or syntax!" 
    113 msgstr "" 
    114  
    115 msgid "Incorrect password length or syntax!" 
    116 msgstr "" 
    117  
    118 msgid "Entered passwords do not match!" 
    119 msgstr "" 
    120  
    121 msgid "Incorrect email length or syntax!" 
    122 msgstr "" 
    123  
    124 msgid "Incorrect max domain count or syntax!" 
    125 msgstr "Incorrect <i>max domain</i> count or syntax!" 
    126  
    127 msgid "Incorrect max subdomain count or syntax!" 
    128 msgstr "Incorrect <i>max subdomain</i> count or syntax!" 
    129  
    130 msgid "Incorrect max alias count or syntax!" 
    131 msgstr "Incorrect <i>max alias</i> count or syntax!" 
    132  
    133 msgid "Incorrect max FTP count or syntax!" 
    134 msgstr "Incorrect <i>max FTP</i> count or syntax!" 
    135  
    136 msgid "Incorrect max mail count or syntax!" 
    137 msgstr "Incorrect <i>max e-mail</i> count or syntax!" 
    138  
    139 msgid "Incorrect max SQL databases count or syntax!" 
    140 msgstr "Incorrect <i>max mySQL databases</i> count or syntax!" 
    141  
    142 msgid "Incorrect max SQL users count or syntax!" 
    143 msgstr "Incorrect <i>max mySQL users</i> count or syntax!" 
    144  
    145 msgid "Incorrect max traffic amount or syntax!" 
    146 msgstr "Incorrect <i>max traffic</i> amount or syntax!" 
    147  
    148 msgid "Incorrect max disk amount or syntax!" 
    149 msgstr "Incorrect <i>max disk</i> amount or syntax!" 
    150  
    151 msgid "You must assign at least one IP number for a reseller!" 
    152 msgstr "Musíte přiřadit alespoň jednu IP adresu pro prodejce." 
    153  
    154 msgid "Add reseller" 
    155 msgstr "Přidat prodejce" 
     109msgid "Empty data or wrong field!" 
     110msgstr "Nevyplněny údaje nebo chybné políčko!" 
     111 
     112msgid "Passwords don't match!" 
     113msgstr "" 
     114 
     115msgid "Add admin" 
     116msgstr "Přidat administrátora" 
    156117 
    157118msgid "Core data" 
     
    164125msgstr "" 
    165126 
    166 msgid "unlimited" 
    167 msgstr "Bez omezení" 
    168  
    169 msgid "Domains limit" 
    170 msgstr "" 
    171  
    172 msgid "Subdomains limit" 
    173 msgstr "" 
    174  
    175 msgid "Aliases limit" 
    176 msgstr "" 
    177  
    178 msgid "Mail accounts limit" 
    179 msgstr "" 
    180  
    181 msgid "FTP accounts limit" 
    182 msgstr "" 
    183  
    184 msgid "SQL databases limit" 
    185 msgstr "" 
    186  
    187 msgid "SQL users limit" 
    188 msgstr "" 
    189  
    190 msgid "Traffic limit [MB]" 
    191 msgstr "" 
    192  
    193 msgid "Disk limit [MB]" 
    194 msgstr "" 
    195  
    196 msgid "PHP" 
    197 msgstr "péhápé" 
    198  
    199 msgid "CGI / Perl" 
    200 msgstr "CGI/PERL" 
    201  
    202 msgid "JSP" 
    203 msgstr "Java Server Pages" 
    204  
    205 msgid "SSI" 
    206 msgstr "" 
    207  
    208 msgid "Frontpage extensions" 
    209 msgstr "" 
    210  
    211 msgid "Backup and restore" 
    212 msgstr "Záloha a obnovení" 
    213  
    214 msgid "Custom error pages" 
    215 msgstr "Uživatelské chybové stránky" 
    216  
    217 msgid "Protected areas" 
    218 msgstr "" 
    219  
    220 msgid "Webmail" 
    221 msgstr "Webový přístup k mailu" 
    222  
    223 msgid "Directory listing" 
    224 msgstr "Výpis adresáře" 
    225  
    226 msgid "Apache logfiles" 
    227 msgstr "Soubory protokolů Apache" 
    228  
    229 msgid "AwStats" 
    230 msgstr "" 
    231  
    232 msgid "Logo upload" 
    233 msgstr "Uložení loga" 
    234  
    235 msgid "yes" 
    236 msgstr "ano" 
    237  
    238 msgid "no" 
    239 msgstr "ne" 
    240  
    241 msgid "Reseller IPs" 
    242 msgstr "" 
    243  
    244127msgid "Additional data" 
    245128msgstr "Doplňující údaje" 
    246  
    247 msgid "Customer ID" 
    248 msgstr "ID zákazníka" 
    249129 
    250130msgid "First name" 
     
    293173msgstr "Přidat" 
    294174 
    295 msgid "ISPCP - Admin/Manage users/Add User" 
    296 msgstr "ISPCP - Admin/Údržba uživatelů/Přidat uživatele" 
    297  
    298 msgid "Administrator" 
    299 msgstr "Administrátor" 
    300  
    301 msgid "Empty data or wrong field!" 
    302 msgstr "Nevyplněny údaje nebo chybné políčko!" 
    303  
    304 msgid "Passwords don't match!" 
    305 msgstr "" 
    306  
    307 msgid "Add admin" 
    308 msgstr "Přidat administrátora" 
     175msgid "ispCP - Admin/Manage users/Add reseller" 
     176msgstr "" 
     177 
     178msgid "Reseller IP list is empty!" 
     179msgstr "" 
     180 
     181msgid "No." 
     182msgstr "" 
     183 
     184msgid "Assign" 
     185msgstr "Přiřadit" 
     186 
     187msgid "Label" 
     188msgstr "Popis" 
     189 
     190msgid "Number" 
     191msgstr "číslo" 
     192 
     193msgid "Reseller" 
     194msgstr "" 
     195 
     196msgid "Incorrect max domain count or syntax!" 
     197msgstr "Incorrect <i>max domain</i> count or syntax!" 
     198 
     199msgid "Incorrect max subdomain count or syntax!" 
     200msgstr "Incorrect <i>max subdomain</i> count or syntax!" 
     201 
     202msgid "Incorrect max alias count or syntax!" 
     203msgstr "Incorrect <i>max alias</i> count or syntax!" 
     204 
     205msgid "Incorrect max FTP count or syntax!" 
     206msgstr "Incorrect <i>max FTP</i> count or syntax!" 
     207 
     208msgid "Incorrect max mail count or syntax!" 
     209msgstr "Incorrect <i>max e-mail</i> count or syntax!" 
     210 
     211msgid "Incorrect max SQL databases count or syntax!" 
     212msgstr "Incorrect <i>max mySQL databases</i> count or syntax!" 
     213 
     214msgid "Incorrect max SQL users count or syntax!" 
     215msgstr "Incorrect <i>max mySQL users</i> count or syntax!" 
     216 
     217msgid "Incorrect max traffic amount or syntax!" 
     218msgstr "Incorrect <i>max traffic</i> amount or syntax!" 
     219 
     220msgid "Incorrect max disk amount or syntax!" 
     221msgstr "Incorrect <i>max disk</i> amount or syntax!" 
     222 
     223msgid "You must assign at least one IP number for a reseller!" 
     224msgstr "Musíte přiřadit alespoň jednu IP adresu pro prodejce." 
     225 
     226msgid "Add reseller" 
     227msgstr "Přidat prodejce" 
     228 
     229msgid "unlimited" 
     230msgstr "Bez omezení" 
     231 
     232msgid "Domains limit" 
     233msgstr "" 
     234 
     235msgid "Subdomains limit" 
     236msgstr "" 
     237 
     238msgid "Aliases limit" 
     239msgstr "" 
     240 
     241msgid "Mail accounts limit" 
     242msgstr "" 
     243 
     244msgid "FTP accounts limit" 
     245msgstr "" 
     246 
     247msgid "SQL databases limit" 
     248msgstr "" 
     249 
     250msgid "SQL users limit" 
     251msgstr "" 
     252 
     253msgid "Traffic limit [MB]" 
     254msgstr "" 
     255 
     256msgid "Disk limit [MB]" 
     257msgstr "" 
     258 
     259msgid "PHP" 
     260msgstr "péhápé" 
     261 
     262msgid "CGI / Perl" 
     263msgstr "CGI/PERL"