Changeset 1162

Show
Ignore:
Timestamp:
05/20/08 13:00:28 (4 months ago)
Author:
rats
Message:

* Fixed #1266: client webtools site overview misses awstats menu entry
* Fixed #1270: some HTML fixes in the HTML templates for the ispcp login

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1161 r1162  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-05-20 Benedikt Heintel 
     5        - GUI: 
     6                * Fixed #1266: client webtools site overview misses awstats menu entry 
     7                * Fixed #1270: some HTML fixes in the HTML templates for the ispcp login 
    38 
    492008-05-19 Benedikt Heintel 
  • trunk/configs/centos/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/debian/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/fedora/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/gentoo/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/openbsd/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/opensuse/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/redhat/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/configs/ubuntu/ispcp.conf

    r1158 r1162  
    99# 
    1010 
    11 BuildDate = 20080518 
     11BuildDate = 20080520 
    1212 
    1313Version = 1.0.0 RC5 OMEGA 
  • trunk/gui/client/webtools.php

    r1161 r1162  
    3737                        'THEME_CHARSET' => tr('encoding'), 
    3838                        'ISP_LOGO' => get_logo($_SESSION['user_id']) 
    39                
    40         ); 
     39                       
     40               ); 
    4141 
    4242function gen_page_awstats(&$tpl) { 
  • trunk/gui/include/client-functions.php

    r1157 r1162  
    55 * @copyright   2001-2006 by moleSoftware GmbH 
    66 * @copyright   2006-2008 by ispCP | http://isp-control.net 
    7  * @version             $ID$ 
     7 * @version             SVN: $ID$ 
    88 * @link                http://isp-control.net 
    99 * @author              ispCP Team 
     
    7979function get_domain_running_sub_cnt(&$sql, $domain_id) { 
    8080        $query = <<<SQL_QUERY 
    81         select 
    82             count(subdomain_id) as cnt 
    83         from 
     81        SELECT 
     82            COUNT(subdomain_id) AS cnt 
     83        FROM 
    8484            subdomain 
    85         where 
     85        WHERE 
    8686            domain_id = ? 
    8787SQL_QUERY; 
     
    9696function get_domain_running_als_cnt(&$sql, $domain_id) { 
    9797        $query = <<<SQL_QUERY 
    98         select 
    99             count(alias_id) as cnt 
    100         from 
     98        SELECT 
     99            COUNT(alias_id) AS cnt 
     100        FROM 
    101101            domain_aliasses 
    102         where 
     102        WHERE 
    103103            domain_id = ? 
    104104 
     
    172172function get_domain_running_dmn_ftp_acc_cnt(&$sql, $domain_id) { 
    173173        $query = <<<SQL_QUERY 
    174         select 
     174        SELECT 
    175175            domain_name 
    176         from 
     176        FROM 
    177177            domain 
    178         where 
     178        WHERE 
    179179            domain_id = ? 
    180180SQL_QUERY; 
     
    185185 
    186186        $query = <<<SQL_QUERY 
    187         select 
    188             count(userid) as cnt 
    189         from 
     187        SELECT 
     188            COUNT(userid) AS cnt 
     189        FROM 
    190190            ftp_users 
    191         where 
    192             userid rlike
     191        WHERE 
     192            userid RLIKE
    193193SQL_QUERY; 
    194194 
     
    202202function get_domain_running_sub_ftp_acc_cnt(&$sql, $domain_id) { 
    203203        $query = <<<SQL_QUERY 
    204         select 
     204        SELECT 
    205205            subdomain_name 
    206         from 
     206        FROM 
    207207            subdomain 
    208         where 
    209             domain_id = ? 
    210         order by 
     208        WHERE 
     209            domain_id = ? 
     210        ORDER BY 
    211211            subdomain_id 
    212212SQL_QUERY; 
    213213 
    214214        $query2 = <<<SQL_QUERY 
    215         select 
     215        SELECT 
    216216            domain_name 
    217         from 
     217        FROM 
    218218            domain 
    219         where 
     219        WHERE 
    220220            domain_id = ? 
    221221SQL_QUERY; 
     
    230230 
    231231                $query = <<<SQL_QUERY 
    232             select 
    233                 count(userid) as cnt 
    234             from 
     232            SELECT 
     233                COUNT(userid) AS cnt 
     234            FROM 
    235235                ftp_users 
    236             where 
    237                 userid rlike
     236            WHERE 
     237                userid RLIKE
    238238SQL_QUERY; 
    239239 
     
    250250function get_domain_running_als_ftp_acc_cnt(&$sql, $domain_id) { 
    251251        $query = <<<SQL_QUERY 
    252         select 
     252        SELECT 
    253253            alias_name 
    254         from 
     254        FROM 
    255255            domain_aliasses 
    256         where 
    257             domain_id = ? 
    258         order by 
     256        WHERE 
     257            domain_id = ? 
     258        ORDER BY 
    259259            alias_id 
    260260SQL_QUERY; 
     
    268268 
    269269                $query = <<<SQL_QUERY 
    270             select 
    271                 count(userid) as cnt 
    272             from 
     270            SELECT 
     271                COUNT(userid) AS cnt 
     272            FROM 
    273273                ftp_users 
    274             where 
    275                 userid rlike
     274            WHERE 
     275                userid RLIKE
    276276SQL_QUERY; 
    277277 
     
    301301function get_domain_running_sqld_acc_cnt(&$sql, $domain_id) { 
    302302        $query = <<<SQL_QUERY 
    303         select 
    304             count(sqld_id) as cnt 
    305         from 
     303        SELECT 
     304            COUNT(sqld_id) AS cnt 
     305        FROM 
    306306            sql_database 
    307         where 
     307        WHERE 
    308308            domain_id = ? 
    309309SQL_QUERY; 
     
    318318function get_domain_running_sqlu_acc_cnt(&$sql, $domain_id) { 
    319319        $query = <<<SQL_QUERY 
    320         select distinct 
     320        SELECT DISTINCT 
    321321            t1.sqlu_name 
    322         from 
    323             sql_user as t1, sql_database as t2 
    324         where 
     322        FROM 
     323            sql_user AS t1, sql_database AS t2 
     324        WHERE 
    325325            t2.domain_id = ? 
    326           and 
     326          AND 
    327327            t2.sqld_id = t1.sqld_id 
    328328SQL_QUERY; 
     
    411411 
    412412        $query = <<<SQL_QUERY 
    413         select 
     413        SELECT 
    414414            * 
    415         from 
     415        FROM 
    416416            custom_menus 
    417         where 
     417        WHERE 
    418418            menu_level = 'user' 
    419           or 
     419          OR 
    420420            menu_level = 'all' 
    421421SQL_QUERY; 
     
    469469        } 
    470470 
    471         if ($cfg['AWSTATS_ACTIVE'] == "no") { 
    472                 $tpl->assign('ISACTIVE_AWSTATS', ''); 
     471        if ($cfg['AWSTATS_ACTIVE'] != 'yes') { 
     472                $tpl->assign('ACTIVE_AWSTATS', ''); 
    473473        } else { 
    474                 $tpl->assign('AWSTSTS', 'http://' . $_SERVER['HTTP_HOST'] . '/stats'); 
     474                $tpl->assign( 
     475                        array( 
     476                                'AWSTATS_PATH' => 'http://' . $_SESSION['user_logged'] . '/stats/', 
     477                                'AWSTATS_TARGET' => '_blank' 
     478                                ) 
     479                        ); 
    475480        } 
    476481 
     
    531536 
    532537        $query = <<<SQL_QUERY 
    533         select 
     538        SELECT 
    534539            * 
    535         from 
     540        FROM 
    536541            custom_menus 
    537         where 
     542        WHERE 
    538543            menu_level = 'user' 
    539           or 
     544          OR 
    540545            menu_level = 'all' 
    541546SQL_QUERY; 
     
    560565 
    561566                        $tpl->assign( 
    562                                 array('BUTTON_LINK' => $menu_link, 
     567                                array( 
     568                                        'BUTTON_LINK' => $menu_link, 
    563569                                        'BUTTON_NAME' => $menu_name, 
    564570                                        'BUTTON_TARGET' => $menu_target, 
     
    576582        } 
    577583 
    578         if ($cfg['AWSTATS_ACTIVE'] == "no") { 
    579                 $tpl->assign('AWSTSTS', ''); 
     584        if ($cfg['AWSTATS_ACTIVE'] != 'yes') { 
     585                $tpl->assign('ACTIVE_AWSTATS', ''); 
    580586        } else { 
    581                 $tpl->assign('AWSTSTS', 'http://' . $_SERVER['HTTP_HOST'] . '/stats'); 
     587                $tpl->assign( 
     588                        array( 
     589                                'AWSTATS_PATH' => 'http://' . $_SESSION['user_logged'] . '/stats/', 
     590                                'AWSTATS_TARGET' => '_blank' 
     591                                ) 
     592                        ); 
    582593        } 
    583594 
     
    587598function get_user_domain_id(&$sql, $user_id) { 
    588599        $query = <<<SQL_QUERY 
    589         select 
     600        SELECT 
    590601            domain_id 
    591         from 
     602        FROM 
    592603            domain 
    593         where 
     604        WHERE 
    594605            domain_admin_id = ? 
    595606SQL_QUERY; 
     
    630641        $query = <<<SQL_QUERY 
    631642                SELECT 
    632                         COUNT(sqlu_id) as cnt 
     643                        COUNT(sqlu_id) AS cnt 
    633644                FROM 
    634645                        sql_user 
     
    645656        // let's get sql user common data; 
    646657        $query = <<<SQL_QUERY 
    647          select 
     658         SELECT 
    648659            t1.sqld_id, t1.sqlu_name, t2.sqld_name, t1.sqlu_name 
    649          from 
    650             sql_user as t1, 
    651             sql_database as t2 
    652          where 
     660         FROM 
     661            sql_user AS t1, 
     662            sql_database AS t2 
     663         WHERE 
    653664            t1.sqld_id = t2.sqld_id 
    654            and 
     665           AND 
    655666            t2.domain_id = ? 
    656            and 
     667           AND 
    657668            t1.sqlu_id = ? 
    658669SQL_QUERY; 
     
    674685                // revoke grants on global level, if any; 
    675686                $query = <<<SQL_QUERY 
    676                 revoke all on *.* from ?@'%' 
     687                REVOKE ALL ON *.* FROM ?@'%' 
    677688SQL_QUERY; 
    678689                $rs = exec_query($sql, $query, array($db_user_name)); 
    679690                $query = <<<SQL_QUERY 
    680                 revoke all on *.* from ?@localhost 
     691                       REVOKE ALL ON *.* FROM ?@localhost 
    681692SQL_QUERY; 
    682693                $rs = exec_query($sql, $query, array($db_user_name)); 
    683694                // delete user record from mysql.user table; 
    684695                $query = <<<SQL_QUERY 
    685          delete from 
     696         DELETE FROM 
    686697                    mysql.user 
    687          where 
    688                    Host = '%' 
    689          and 
    690                  User = ? 
     698         WHERE 
     699                       Host = '%' 
     700           AND 
     701                               User = ? 
    691702SQL_QUERY; 
    692703                $rs = exec_query($sql, $query, array($db_user_name)); 
    693704 
    694705                $query = <<<SQL_QUERY 
    695         delete from 
    696                 mysql.user 
    697         where 
    698                 Host = 'localhost' 
    699         and 
    700                 User = ? 
     706                       DELETE FROM 
     707                               mysql.user 
     708                       WHERE 
     709                               Host = 'localhost' 
     710                         AND 
     711                               User = ? 
    701712SQL_QUERY; 
    702713                $rs = exec_query($sql, $query, array($db_user_name)); 
    703714                // flush privileges. 
    704715                $query = <<<SQL_QUERY 
    705                 flush privileges 
     716                FLUSH PRIVILEGES; 
    706717SQL_QUERY; 
    707718                $rs = exec_query($sql, $query, array()); 
     
    709720                $new_db_name = str_replace("_", "\\_", $db_name); 
    710721                $query = <<<SQL_QUERY 
    711                 revoke all on $new_db_name.* from ?@'%' 
     722                REVOKE ALL ON $new_db_name.* FROM ?@'%' 
    712723SQL_QUERY; 
    713724                $rs = exec_query($sql, $query, array($db_user_name)); 
    714725                $query = <<<SQL_QUERY 
    715                 revoke all on $new_db_name.* from ?@localhost 
     726                       REVOKE ALL ON $new_db_name.* FROM ?@localhost 
    716727SQL_QUERY; 
    717728                $rs = exec_query($sql, $query, array($db_user_name)); 
     
    723734                $tpl->assign('SQL_SUPPORT', ''); 
    724735        } 
    725  
    726736        if (isset($_SESSION['email_support']) && $_SESSION['email_support'] == "no") { 
    727737                $tpl->assign('ADD_EMAIL', ''); 
    728738        } 
    729  
    730739        if (isset($_SESSION['subdomain_support']) && $_SESSION['subdomain_support'] == "no") { 
    731740                $tpl->assign('SUBDOMAIN_SUPPORT', ''); 
     
    734743                $tpl->assign('DOMAINALIAS_SUPPORT', ''); 
    735744        } 
    736  
    737745        if (isset($_SESSION['subdomain_support']) && $_SESSION['subdomain_support'] == "no") { 
    738746                $tpl->assign('SUBDOMAIN_SUPPORT_CONTENT', ''); 
     
    741749                $tpl->assign('DOMAINALIAS_SUPPORT_CONTENT', ''); 
    742750        } 
    743  
    744751        if (isset($_SESSION['alias_support']) && $_SESSION['alias_support'] == "no" && isset($_SESSION['subdomain_support']) && $_SESSION['subdomain_support'] == "no") { 
    745752                $tpl->assign('DMN_MNGMNT', ''); 
     
    776783function delete_sql_database(&$sql, $dmn_id, $db_id) { 
    777784        $query = <<<SQL_QUERY 
    778         select 
    779             sqld_name as db_name 
    780         from 
     785        SELECT 
     786            sqld_name AS db_name 
     787        FROM 
    781788            sql_database 
    782         where 
    783             domain_id = ? 
    784           and 
     789        WHERE 
     790            domain_id = ? 
     791          AND 
    785792            sqld_id = ? 
    786793SQL_QUERY; 
     
    795802        // have we any users assigned to this database; 
    796803        $query = <<<SQL_QUERY 
    797         select 
    798             t2.sqlu_id as db_user_id, 
    799             t2.sqlu_name as db_user_name 
    800         from 
    801             sql_database as t1, 
    802             sql_user as t2 
    803         where 
     804        SELECT 
     805            t2.sqlu_id AS db_user_id, 
     806            t2.sqlu_name AS db_user_name 
     807        FROM 
     808            sql_database AS t1, 
     809            sql_user AS t2 
     810        WHERE 
    804811            t1.sqld_id = t2.sqld_id 
    805           and 
     812          AND 
    806813            t1.domain_id = ? 
    807           and 
     814          AND 
    808815            t1.sqld_id = ? 
    809816SQL_QUERY; 
     
    824831        // drop desired database; 
    825832        $query = <<<SQL_QUERY 
    826         drop database 
     833        DROP DATABASE; 
    827834SQL_QUERY; 
    828835 
     
    831838        $rs = exec_query($sql, $query, array()); 
    832839 
    833         write_log($_SESSION['user_logged'] . ": deletes SQL database: " . $db_name); 
     840        write_log($_SESSION['user_logged'] . ": delete SQL database: " . $db_name); 
    834841        // delete desired database from the ispcp sql_database table; 
    835842        $query = <<<SQL_QUERY 
    836         delete from 
     843        DELETE FROM 
    837844            sql_database 
    838         where 
    839             domain_id = ? 
    840           and 
     845        WHERE 
     846            domain_id = ? 
     847          AND 
    841848            sqld_id = ? 
    842849SQL_QUERY; 
  • trunk/gui/themes/omega_original/index.tpl

    r1075 r1162  
    99 </head> 
    1010 <body onLoad="javascript:document.frm.uname.focus()"> 
    11   <table width="100%" height="100% "align="center" cellpadding="0" cellspacing="0"> 
     11  <table width="100%" height="100%" "align="center" cellpadding="0" cellspacing="0"> 
    1212   <tr> 
    1313    <td> 
    14      <table width="453" style="border:solid 1px #CCCCCC;"align="center" cellpadding="0" cellspacing="0"> 
     14     <table width="453" style="border:solid 1px #CCCCCC;" align="center" cellpadding="0" cellspacing="0"> 
    1515      <tr> 
    1616       <td> 
  • trunk/gui/themes/omega_original/lostpassword.tpl

    r474 r1162  
    99 </head> 
    1010<body onLoad="javascript:document.frm.uname.focus()"> 
    11 <table width="100%" height="100% "align="center" cellpadding="0" cellspacing="0"> 
     11<table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0"> 
    1212  <tr> 
    1313    <td> 
    14 <table width="453" style="border:solid 1px #CCCCCC;"align="center" cellpadding="0" cellspacing="0"> 
     14<table width="453" style="border:solid 1px #CCCCCC;" align="center" cellpadding="0" cellspacing="0"> 
    1515  <tr> 
    1616    <td> 
     
    2525         <tr> 
    2626          <td width="45" rowspan="6"></td> 
    27           <td colspan="2"><strong><div class="login_text">{TR_IMGCAPCODE}<br />{TR_CAPCODE}</div></strong></td> 
     27          <td colspan="2"> 
     28                        <div class="login_text"><strong>{TR_IMGCAPCODE}<br />{TR_CAPCODE}</strong></div></td> 
    2829         </tr> 
    2930         <tr> 
     
    3738         </tr> 
    3839         <tr> 
    39           <td colspan="2"><strong> 
    40            <div class="login_text">{TR_USERNAME}</div> 
     40          <td colspan="2"> 
     41           <div class="login_text"><strong>{TR_USERNAME}</strong></div> 
    4142          </td> 
    4243         </tr> 
  • trunk/gui/themes/omega_original/lostpassword_message.tpl

    r474 r1162  
    88 </head> 
    99<body onLoad="javascript:document.frm.uname.focus()"> 
    10 <table width="100%" height="100% "align="center" cellpadding="0" cellspacing="0"> 
     10<table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0"> 
    1111  <tr> 
    1212    <td> 
    13 <table width="453" style="border:solid 1px #CCCCCC;"align="center" cellpadding="0" cellspacing="0"> 
     13<table width="453" style="border:solid 1px #CCCCCC;" align="center" cellpadding="0" cellspacing="0"> 
    1414  <tr> 
    1515    <td> 
  • trunk/gui/themes/omega_original/maintenancemode.tpl

    r776 r1162  
    99 </head> 
    1010 <body text="#000000"> 
    11   <table width="100%" height="100% "align="center" cellpadding="0" cellspacing="0"> 
     11  <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0"> 
    1212   <tr> 
    1313    <td> 
    14      <table width="453" style="border:solid 1px #CCCCCC;"align="center" cellpadding="0" cellspacing="0"> 
     14     <table width="453" style="border:solid 1px #CCCCCC;" align="center" cellpadding="0" cellspacing="0"> 
    1515      <tr> 
    1616       <td> 
  • trunk/gui/themes/omega_original/system-message.tpl

    r1092 r1162  
    88 </head> 
    99 <body text="#000000"> 
    10   <table width="100%" height="100% "align="center" cellpadding="0" cellspacing="0"> 
     10  <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0"> 
    1111   <tr> 
    1212    <td> 
    13      <table width="453" style="border:solid 1px #CCCCCC;"align="center" cellpadding="0" cellspacing="0"> 
     13     <table width="453" style="border:solid 1px #CCCCCC;" align="center" cellpadding="0" cellspacing="0"> 
    1414      <tr> 
    1515       <td>