Changeset 1229

Show
Ignore:
Timestamp:
06/17/08 12:37:54 (4 months ago)
Author:
rats
Message:

* Fixed #1231: Session conflict / redirection problem
* Fixed #1277: Adding CHECK_FOR_UPDATES in ispcp.conf
* Fixed #1351: Filemanager not work update RC4 -> RC5
* Fixed #1353: In admin/ispcp_debugger.php not all execute request are counted

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1224 r1229  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-06-17 Benedikt Heintel 
     5        - GUI: 
     6                * Fixed #1231: Session conflict / redirection problem 
     7                * Fixed #1277: Adding CHECK_FOR_UPDATES in ispcp.conf 
     8                * Fixed #1351: Filemanager not work update RC4 -> RC5 
     9                * Fixed #1353: In admin/ispcp_debugger.php not all execute request are counted 
    310 
    4112008-06-15 Benedikt Heintel 
  • trunk/gui/admin/index.php

    r1163 r1229  
    7272        global $cfg; 
    7373 
     74        if (!$cfg['CHECK_FOR_UPDATES']) { 
     75                $tpl->assign(array('UPDATE' => tr('Update checking is disabled!'))); 
     76                $tpl->parse('UPDATE_MESSAGE', 'update_message'); 
     77                return false; 
     78        } 
     79 
    7480        $last_update = "http://www.isp-control.net/latest.txt"; 
    7581        // Fake the browser type 
     
    164170 
    165171        $tpl->assign( 
    166                 array('TRAFFIC_WARNING' => $traff_msg, 
     172                array( 
     173                        'TRAFFIC_WARNING' => $traff_msg, 
    167174                        'BAR_VALUE' => $bar_value, 
    168175                        ) 
  • trunk/gui/admin/ispcp_debugger.php

    r1030 r1229  
    2626    global $cfg; 
    2727 
    28     $query = "select $id_name FROM $table WHERE $id_name = ?"; 
    29         $rs = exec_query($sql, $query, $cfg['ITEM_CHANGE_STATUS']); 
     28    $query = "select `$id_name` FROM `$table` WHERE `$id_name` NOT IN (?, ?, ?)"; 
     29        $rs = exec_query($sql, $query, array($cfg['ITEM_OK_STATUS'], $cfg['ITEM_DISABLED_STATUS'], $cfg['ITEM_ORDERED_STATUS'])); 
    3030    $count = $rs->RecordCount(); 
    3131    return $count; 
  • trunk/gui/admin/ispcp_updates.php

    r1110 r1229  
    2323check_login(__FILE__); 
    2424 
     25$theme_color = $cfg['USER_INITIAL_THEME']; 
     26 
     27$tpl = new pTemplate(); 
     28$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/ispcp_updates.tpl'); 
     29$tpl->define_dynamic('page_message', 'page'); 
     30$tpl->define_dynamic('hosting_plans', 'page'); 
     31$tpl->define_dynamic('update_message', 'page'); 
     32$tpl->define_dynamic('update_infos', 'page'); 
     33 
     34$tpl->assign( 
     35        array( 
     36                'TR_ADMIN_ISPCP_UPDATES_PAGE_TITLE' => tr('ispCP - Virtual Hosting Control System'), 
     37                'THEME_COLOR_PATH' => "../themes/$theme_color", 
     38                'THEME_CHARSET' => tr('encoding'), 
     39                'ISP_LOGO' => get_logo($_SESSION['user_id']) 
     40                ) 
     41        ); 
     42 
     43 
    2544/* BEGIN common functions */ 
    2645function get_update_infos(&$tpl) { 
    2746        global $cfg; 
     47 
     48        if (!$cfg['CHECK_FOR_UPDATES']) { 
     49                $tpl->assign( 
     50                                array( 
     51                                        'UPDATE_MESSAGE' => '', 
     52                                        'UPDATE' => tr('Update checking is disabled!'), 
     53                                        'INFOS' => tr('Enable update at') . " <a href=\"settings.php\">" . tr('Settings') . "</a>" 
     54                                        ) 
     55                                ); 
     56 
     57                $tpl->parse('UPDATE_INFOS', 'update_infos'); 
     58                return false; 
     59        } 
    2860 
    2961        $info_url = "http://www.isp-control.net/download.html"; 
     
    4981        if ($current_version < $last_update_result) { 
    5082                $tpl->assign( 
    51                         array('UPDATE_MESSAGE' => '', 
     83                        array( 
     84                                'UPDATE_MESSAGE' => '', 
    5285                                'UPDATE' => tr('New ispCP update is now available'), 
    5386                                'INFOS' => tr('Get it at') . " <a href=\"" . $info_url . "\" class=\"link\" target=\"ispcp\">" . $info_url . "</a>" 
     
    6295/* END system functions */ 
    6396 
    64 $tpl = new pTemplate(); 
    65 $tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/ispcp_updates.tpl'); 
    66 $tpl->define_dynamic('page_message', 'page'); 
    67 $tpl->define_dynamic('hosting_plans', 'page'); 
    68 $tpl->define_dynamic('update_message', 'page'); 
    69 $tpl->define_dynamic('update_infos', 'page'); 
    70  
    71 global $cfg; 
    72 $theme_color = $cfg['USER_INITIAL_THEME']; 
    73  
    74 $tpl->assign( 
    75         array('TR_ADMIN_ISPCP_UPDATES_PAGE_TITLE' => tr('ispCP - Virtual Hosting Control System'), 
    76                 'THEME_COLOR_PATH' => "../themes/$theme_color", 
    77                 'THEME_CHARSET' => tr('encoding'), 
    78                 'ISP_LOGO' => get_logo($_SESSION['user_id']) 
    79                 ) 
    80         ); 
    81  
    8297/* 
    8398 * 
     
    89104 
    90105$tpl->assign( 
    91         array('TR_UPDATES_TITLE' => tr('ispCP updates'), 
     106        array( 
     107                'TR_UPDATES_TITLE' => tr('ispCP updates'), 
    92108                'TR_AVAILABLE_UPDATES' => tr('Available ispCP updates'), 
    93109                'TR_MESSAGE' => tr('No new ispCP updates available'), 
    94110                'TR_UPDATE' => tr('Update'), 
    95                 'TR_INFOS' => tr('Update details'), 
    96  
     111                'TR_INFOS' => tr('Update details') 
    97112                ) 
    98113        ); 
     
    103118 
    104119$tpl->parse('PAGE', 'page'); 
    105  
    106120$tpl->prnt(); 
    107121 
    108 if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); 
     122if ($cfg['DUMP_GUI_DEBUG']) 
     123        dump_gui_debug(); 
    109124 
    110125unset_messages(); 
  • trunk/gui/admin/settings.php

    r1176 r1229  
    5555        $hosting_plan_level                                     = $_POST['hosting_plan_level']; 
    5656        $domain_rows_per_page                           = clean_input($_POST['domain_rows_per_page']); 
     57        $checkforupdate                                         = $_POST['checkforupdate']; 
    5758        // change Loglevel to constant: 
    5859        switch ($_POST['log_level']) { 
     
    9596                setConfig_Value('DOMAIN_ROWS_PER_PAGE', $domain_rows_per_page); 
    9697                setConfig_Value('LOG_LEVEL', $log_level); 
     98                setConfig_Value('CHECK_FOR_UPDATES', $checkforupdate); 
    9799                set_page_message(tr('Settings saved !')); 
    98100        } 
     
    175177        $tpl->assign('HOSTING_PLANS_LEVEL_ADMIN', ''); 
    176178        $tpl->assign('HOSTING_PLANS_LEVEL_RESELLER', 'selected="selected"'); 
     179} 
     180 
     181if ($cfg['CHECK_FOR_UPDATES']) { 
     182        $tpl->assign('CHECK_FOR_UPDATES_SELECTED_ON', 'selected="selected"'); 
     183        $tpl->assign('CHECK_FOR_UPDATES_SELECTED_OFF', ''); 
     184} else { 
     185        $tpl->assign('CHECK_FOR_UPDATES_SELECTED_ON', ''); 
     186        $tpl->assign('CHECK_FOR_UPDATES_SELECTED_OFF', 'selected="selected"'); 
    177187} 
    178188 
     
    245255                'TR_E_USER_NOTICE' => tr('Notices, Warnings and Errors'), 
    246256                'TR_E_USER_WARNING' => tr('Warnings and Errors'), 
    247                 'TR_E_USER_ERROR' => tr('Errors') 
     257                'TR_E_USER_ERROR' => tr('Errors'), 
     258                'TR_CHECK_FOR_UPDATES' => tr('Check for update') 
    248259                ) 
    249260        ); 
  • trunk/gui/client/add_mail_acc.php

    r1207 r1229  
    371371 
    372372function check_mail_acc_data(&$sql, $dmn_id, $dmn_name) { 
    373           $mail_type_normal = isset($_POST['mail_type_normal']) ? $_POST['mail_type_normal'] : false; 
    374           $mail_type_forward = isset($_POST['mail_type_forward']) ? $_POST['mail_type_forward'] : false; 
     373        global $cfg; 
     374 
     375        $mail_type_normal = isset($_POST['mail_type_normal']) ? $_POST['mail_type_normal'] : false; 
     376        $mail_type_forward = isset($_POST['mail_type_forward']) ? $_POST['mail_type_forward'] : false; 
    375377 
    376378        if (($mail_type_normal == false) && ($mail_type_forward == false)) { 
  • trunk/gui/include/ispcp-lib.php

    r1173 r1229  
    148148$cfg['HARD_MAIL_SUSPENSION'] = true; 
    149149 
     150// false: disable automatic serch for new version 
     151$cfg['CHECK_FOR_UPDATES'] = true; 
     152 
    150153 
    151154require_once(INCLUDEPATH.'/date-functions.php'); 
  • trunk/gui/include/login.php

    r1173 r1229  
    195195                if ($info['host'] != $_SERVER['HTTP_HOST'] || $info['host'] != $_SERVER['SERVER_NAME']) { 
    196196                    set_page_message(tr('Request from foreign host was blocked!')); 
     197                if(!(substr($_SERVER['SCRIPT_FILENAME'], (int)-strlen($_SERVER['REDIRECT_URL']), strlen($_SERVER['REDIRECT_URL'])) === $_SERVER['REDIRECT_URL'])) 
    197198                    redirect_to_level_page(); 
    198199                } 
  • trunk/gui/themes/omega_original/admin/settings.tpl

    r1176 r1229  
    4545                            <tr> 
    4646                              <td width="25">&nbsp;</td> 
     47                              <td colspan="2" class="content3"><strong>{TR_CHECK_FOR_UPDATES}</strong></td> 
     48                            </tr> 
     49                            <tr> 
     50                              <td>&nbsp;</td> 
     51                              <td width="200" class="content2">{TR_CHECK_FOR_UPDATES}</td> 
     52                              <td class="content"><select name="checkforupdate"> 
     53                                  <option value="0" {CHECK_FOR_UPDATES_SELECTED_OFF}>{TR_DISABLED}</option> 
     54                                  <option value="1" {CHECK_FOR_UPDATES_SELECTED_ON}>{TR_ENABLED}</option> 
     55                              </select></td> 
     56                            </tr> 
     57                            <tr> 
     58                              <td width="25">&nbsp;</td> 
    4759                              <td colspan="2" class="content3"><strong>{TR_LOSTPASSWORD}</strong></td> 
    4860                            </tr> 
  • trunk/gui/tools/filemanager/LICENSE.txt

    r910 r1229  
    2626==================== 
    2727 
    28 File: /includes/zip.lib.php  
     28File: /includes/zip.lib.php 
    2929By: Eric Mueller, Denis125 and Peter Listiak 
    3030License: public domain 
     
    4747==================== 
    4848 
    49 File: /modules/updatefile/diff.inc.php  
     49File: /modules/updatefile/diff.inc.php 
    5050Website: http://www.holomind.de/phpnet/diff.php 
    5151By: Daniel Unterberger <diff.phpnet@holomind.de> 
     
    122122By: Mike Haller 
    123123 
    124 JUpload is *NOT* free software. The net2ftp development team has purchased a  
    125 Commercial Enterprise License, which allows the redistribution of JUpload and the  
     124JUpload is *NOT* free software. The net2ftp development team has purchased a 
     125Commercial Enterprise License, which allows the redistribution of JUpload and the 
    126126use of it on an unlimited number of servers. 
    127127 
     
    135135 
    136136Website: http://swfupload.mammon.se/ 
    137 By: Mammon, Lars Huring, Olov Nilz� 
    138 License: MIT License (http://www.opensource.org/licenses/mit-license.php) 
     137By: Mammon, Lars Huring, Olov Nilz�License: MIT License (http://www.opensource.org/licenses/mit-license.php) 
    139138 
    140139 
     
    211210  The precise terms and conditions for copying, distribution and 
    212211modification follow. 
    213   
     212 
    214213                    GNU GENERAL PUBLIC LICENSE 
    215214   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
     
    266265    does not normally print such an announcement, your work based on 
    267266    the Program is not required to print an announcement.) 
    268   
     267 
    269268These requirements apply to the modified work as a whole.  If 
    270269identifiable sections of that work are not derived from the Program, 
     
    324323distribution of the source code, even though third parties are not 
    325324compelled to copy the source along with the object code. 
    326   
     325 
    327326  4. You may not copy, modify, sublicense, or distribute the Program 
    328327except as expressly provided under this License.  Any attempt 
     
    381380This section is intended to make thoroughly clear what is believed to 
    382381be a consequence of the rest of this License. 
    383   
     382 
    384383  8. If the distribution and/or use of the Program is restricted in 
    385384certain countries either by patents or by copyrighted interfaces, the 
  • trunk/gui/tools/filemanager/index.php

    r1198 r1229  
    22 
    33/*  Hi, 
    4      
     4 
    55    Thanks for downloading net2ftp! 
    6      
     6 
    77    This page shows how to integrate net2ftp in a generic PHP page. 
    88    It is quite easy: 
    99    1. Define the constants NET2FTP_APPLICATION_ROOTDIR and NET2FTP_APPLICATION_ROOTDIR_URL 
    1010    2. Include the file main.inc.php 
    11     3. Execute 5 net2ftp() calls to send the HTTP headers, print the Javascript  
     11    3. Execute 5 net2ftp() calls to send the HTTP headers, print the Javascript 
    1212       code, print the HTML body, etc... 
    1313    4. Check if an error occured to print out an error message. 
    14      
     14 
    1515    Look in /integration for more elaborate examples. 
    16      
     16 
    1717    Enjoy, 
    18      
    19     David  
     18 
     19    David 
    2020*/ 
    2121 
     
    3333 
    3434// ------------------------------------------------------------------------ 
    35 // 3. Execute net2ftp($action). Note that net2ftp("sendHttpHeaders") MUST  
     35// 3. Execute net2ftp($action). Note that net2ftp("sendHttpHeaders") MUST 
    3636//    be called once before the other net2ftp() calls! 
    3737// ------------------------------------------------------------------------ 
     
    6161<?php 
    6262// ------------------------------------------------------------------------ 
    63 // 4. Check the result and print out an error message. This can be done using  
     63// 4. Check the result and print out an error message. This can be done using 
    6464//    a template, or by accessing the $net2ftp_result variable directly. 
    6565// ------------------------------------------------------------------------ 
  • trunk/gui/tools/filemanager/settings.inc.php

    r1198 r1229  
    5959 
    6060// ---------------------------------------------------------------------------------- 
    61 // A MySQL database is optional. It can be used for: logging the users,  
    62 // checking the consumption of network and server resources (data transfer  
     61// A MySQL database is optional. It can be used for: logging the users, 
     62// checking the consumption of network and server resources (data transfer 
    6363// volume and script execution time), and checking the user's home directory 
    6464// ---------------------------------------------------------------------------------- 
     
    140140$net2ftp_settings["net2ftpdotcom"] = "no"; 
    141141 
    142 // Google Adsense advertisements  
     142// Google Adsense advertisements 
    143143// Not shown when using HTTPS to avoid warnings on each pageload 
    144144$net2ftp_settings["show_google_ads"] = "no"; 
  • trunk/gui/tools/filemanager/settings_screens.inc.php

    r1198 r1229  
    9999$net2ftp_settings["functionuse_update"] = "no"; 
    100100 
    101 // Open file  
     101// Open file 
    102102$net2ftp_settings["functionuse_open"] = "yes"; 
    103103 
  • trunk/gui/tools/filemanager/skins/omega/loginform.template.php

    r928 r1229  
    5858<?php /* ----- SSL ----- */ ?> 
    5959<?php                                                   if ($sslconnect["inputType"] == "checkbox") { ?> 
    60                                                                 <td><span><input name="sslconnect" value="yes" type="hidden" <?php echo $sslconnect["checked"]; ?> /></span></td> 
     60                                                                <td><span><input name="sslconnect" value="no" type="hidden" <?php echo $sslconnect["checked"]; ?> /></span></td> 
    6161<?php                                                   } else { ?> 
    6262                                                                <td></td>