Changeset 1229
- 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
| r1224 |
r1229 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-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 |
|---|
| 3 | 10 | |
|---|
| 4 | 11 | 2008-06-15 Benedikt Heintel |
|---|
| r1163 |
r1229 |
|
| 72 | 72 | global $cfg; |
|---|
| 73 | 73 | |
|---|
| | 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 | |
|---|
| 74 | 80 | $last_update = "http://www.isp-control.net/latest.txt"; |
|---|
| 75 | 81 | // Fake the browser type |
|---|
| … | … | |
| 164 | 170 | |
|---|
| 165 | 171 | $tpl->assign( |
|---|
| 166 | | array('TRAFFIC_WARNING' => $traff_msg, |
|---|
| | 172 | array( |
|---|
| | 173 | 'TRAFFIC_WARNING' => $traff_msg, |
|---|
| 167 | 174 | 'BAR_VALUE' => $bar_value, |
|---|
| 168 | 175 | ) |
|---|
| r1030 |
r1229 |
|
| 26 | 26 | global $cfg; |
|---|
| 27 | 27 | |
|---|
| 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'])); |
|---|
| 30 | 30 | $count = $rs->RecordCount(); |
|---|
| 31 | 31 | return $count; |
|---|
| r1110 |
r1229 |
|
| 23 | 23 | check_login(__FILE__); |
|---|
| 24 | 24 | |
|---|
| | 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 | |
|---|
| 25 | 44 | /* BEGIN common functions */ |
|---|
| 26 | 45 | function get_update_infos(&$tpl) { |
|---|
| 27 | 46 | 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 | } |
|---|
| 28 | 60 | |
|---|
| 29 | 61 | $info_url = "http://www.isp-control.net/download.html"; |
|---|
| … | … | |
| 49 | 81 | if ($current_version < $last_update_result) { |
|---|
| 50 | 82 | $tpl->assign( |
|---|
| 51 | | array('UPDATE_MESSAGE' => '', |
|---|
| | 83 | array( |
|---|
| | 84 | 'UPDATE_MESSAGE' => '', |
|---|
| 52 | 85 | 'UPDATE' => tr('New ispCP update is now available'), |
|---|
| 53 | 86 | 'INFOS' => tr('Get it at') . " <a href=\"" . $info_url . "\" class=\"link\" target=\"ispcp\">" . $info_url . "</a>" |
|---|
| … | … | |
| 62 | 95 | /* END system functions */ |
|---|
| 63 | 96 | |
|---|
| 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 | | |
|---|
| 82 | 97 | /* |
|---|
| 83 | 98 | * |
|---|
| … | … | |
| 89 | 104 | |
|---|
| 90 | 105 | $tpl->assign( |
|---|
| 91 | | array('TR_UPDATES_TITLE' => tr('ispCP updates'), |
|---|
| | 106 | array( |
|---|
| | 107 | 'TR_UPDATES_TITLE' => tr('ispCP updates'), |
|---|
| 92 | 108 | 'TR_AVAILABLE_UPDATES' => tr('Available ispCP updates'), |
|---|
| 93 | 109 | 'TR_MESSAGE' => tr('No new ispCP updates available'), |
|---|
| 94 | 110 | 'TR_UPDATE' => tr('Update'), |
|---|
| 95 | | 'TR_INFOS' => tr('Update details'), |
|---|
| 96 | | |
|---|
| | 111 | 'TR_INFOS' => tr('Update details') |
|---|
| 97 | 112 | ) |
|---|
| 98 | 113 | ); |
|---|
| … | … | |
| 103 | 118 | |
|---|
| 104 | 119 | $tpl->parse('PAGE', 'page'); |
|---|
| 105 | | |
|---|
| 106 | 120 | $tpl->prnt(); |
|---|
| 107 | 121 | |
|---|
| 108 | | if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); |
|---|
| | 122 | if ($cfg['DUMP_GUI_DEBUG']) |
|---|
| | 123 | dump_gui_debug(); |
|---|
| 109 | 124 | |
|---|
| 110 | 125 | unset_messages(); |
|---|
| r1176 |
r1229 |
|
| 55 | 55 | $hosting_plan_level = $_POST['hosting_plan_level']; |
|---|
| 56 | 56 | $domain_rows_per_page = clean_input($_POST['domain_rows_per_page']); |
|---|
| | 57 | $checkforupdate = $_POST['checkforupdate']; |
|---|
| 57 | 58 | // change Loglevel to constant: |
|---|
| 58 | 59 | switch ($_POST['log_level']) { |
|---|
| … | … | |
| 95 | 96 | setConfig_Value('DOMAIN_ROWS_PER_PAGE', $domain_rows_per_page); |
|---|
| 96 | 97 | setConfig_Value('LOG_LEVEL', $log_level); |
|---|
| | 98 | setConfig_Value('CHECK_FOR_UPDATES', $checkforupdate); |
|---|
| 97 | 99 | set_page_message(tr('Settings saved !')); |
|---|
| 98 | 100 | } |
|---|
| … | … | |
| 175 | 177 | $tpl->assign('HOSTING_PLANS_LEVEL_ADMIN', ''); |
|---|
| 176 | 178 | $tpl->assign('HOSTING_PLANS_LEVEL_RESELLER', 'selected="selected"'); |
|---|
| | 179 | } |
|---|
| | 180 | |
|---|
| | 181 | if ($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"'); |
|---|
| 177 | 187 | } |
|---|
| 178 | 188 | |
|---|
| … | … | |
| 245 | 255 | 'TR_E_USER_NOTICE' => tr('Notices, Warnings and Errors'), |
|---|
| 246 | 256 | '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') |
|---|
| 248 | 259 | ) |
|---|
| 249 | 260 | ); |
|---|
| r1207 |
r1229 |
|
| 371 | 371 | |
|---|
| 372 | 372 | function 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; |
|---|
| 375 | 377 | |
|---|
| 376 | 378 | if (($mail_type_normal == false) && ($mail_type_forward == false)) { |
|---|
| r1173 |
r1229 |
|
| 148 | 148 | $cfg['HARD_MAIL_SUSPENSION'] = true; |
|---|
| 149 | 149 | |
|---|
| | 150 | // false: disable automatic serch for new version |
|---|
| | 151 | $cfg['CHECK_FOR_UPDATES'] = true; |
|---|
| | 152 | |
|---|
| 150 | 153 | |
|---|
| 151 | 154 | require_once(INCLUDEPATH.'/date-functions.php'); |
|---|
| r1173 |
r1229 |
|
| 195 | 195 | if ($info['host'] != $_SERVER['HTTP_HOST'] || $info['host'] != $_SERVER['SERVER_NAME']) { |
|---|
| 196 | 196 | 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'])) |
|---|
| 197 | 198 | redirect_to_level_page(); |
|---|
| 198 | 199 | } |
|---|
| r1176 |
r1229 |
|
| 45 | 45 | <tr> |
|---|
| 46 | 46 | <td width="25"> </td> |
|---|
| | 47 | <td colspan="2" class="content3"><strong>{TR_CHECK_FOR_UPDATES}</strong></td> |
|---|
| | 48 | </tr> |
|---|
| | 49 | <tr> |
|---|
| | 50 | <td> </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"> </td> |
|---|
| 47 | 59 | <td colspan="2" class="content3"><strong>{TR_LOSTPASSWORD}</strong></td> |
|---|
| 48 | 60 | </tr> |
|---|
| r910 |
r1229 |
|
| 26 | 26 | ==================== |
|---|
| 27 | 27 | |
|---|
| 28 | | File: /includes/zip.lib.php |
|---|
| | 28 | File: /includes/zip.lib.php |
|---|
| 29 | 29 | By: Eric Mueller, Denis125 and Peter Listiak |
|---|
| 30 | 30 | License: public domain |
|---|
| … | … | |
| 47 | 47 | ==================== |
|---|
| 48 | 48 | |
|---|
| 49 | | File: /modules/updatefile/diff.inc.php |
|---|
| | 49 | File: /modules/updatefile/diff.inc.php |
|---|
| 50 | 50 | Website: http://www.holomind.de/phpnet/diff.php |
|---|
| 51 | 51 | By: Daniel Unterberger <diff.phpnet@holomind.de> |
|---|
| … | … | |
| 122 | 122 | By: Mike Haller |
|---|
| 123 | 123 | |
|---|
| 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 |
|---|
| | 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 |
|---|
| 126 | 126 | use of it on an unlimited number of servers. |
|---|
| 127 | 127 | |
|---|
| … | … | |
| 135 | 135 | |
|---|
| 136 | 136 | Website: http://swfupload.mammon.se/ |
|---|
| 137 | | By: Mammon, Lars Huring, Olov Nilz� |
|---|
| 138 | | License: MIT License (http://www.opensource.org/licenses/mit-license.php) |
|---|
| | 137 | By: Mammon, Lars Huring, Olov Nilz�License: MIT License (http://www.opensource.org/licenses/mit-license.php) |
|---|
| 139 | 138 | |
|---|
| 140 | 139 | |
|---|
| … | … | |
| 211 | 210 | The precise terms and conditions for copying, distribution and |
|---|
| 212 | 211 | modification follow. |
|---|
| 213 | | |
|---|
| | 212 | |
|---|
| 214 | 213 | GNU GENERAL PUBLIC LICENSE |
|---|
| 215 | 214 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
|---|
| … | … | |
| 266 | 265 | does not normally print such an announcement, your work based on |
|---|
| 267 | 266 | the Program is not required to print an announcement.) |
|---|
| 268 | | |
|---|
| | 267 | |
|---|
| 269 | 268 | These requirements apply to the modified work as a whole. If |
|---|
| 270 | 269 | identifiable sections of that work are not derived from the Program, |
|---|
| … | … | |
| 324 | 323 | distribution of the source code, even though third parties are not |
|---|
| 325 | 324 | compelled to copy the source along with the object code. |
|---|
| 326 | | |
|---|
| | 325 | |
|---|
| 327 | 326 | 4. You may not copy, modify, sublicense, or distribute the Program |
|---|
| 328 | 327 | except as expressly provided under this License. Any attempt |
|---|
| … | … | |
| 381 | 380 | This section is intended to make thoroughly clear what is believed to |
|---|
| 382 | 381 | be a consequence of the rest of this License. |
|---|
| 383 | | |
|---|
| | 382 | |
|---|
| 384 | 383 | 8. If the distribution and/or use of the Program is restricted in |
|---|
| 385 | 384 | certain countries either by patents or by copyrighted interfaces, the |
|---|
| r1198 |
r1229 |
|
| 2 | 2 | |
|---|
| 3 | 3 | /* Hi, |
|---|
| 4 | | |
|---|
| | 4 | |
|---|
| 5 | 5 | Thanks for downloading net2ftp! |
|---|
| 6 | | |
|---|
| | 6 | |
|---|
| 7 | 7 | This page shows how to integrate net2ftp in a generic PHP page. |
|---|
| 8 | 8 | It is quite easy: |
|---|
| 9 | 9 | 1. Define the constants NET2FTP_APPLICATION_ROOTDIR and NET2FTP_APPLICATION_ROOTDIR_URL |
|---|
| 10 | 10 | 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 |
|---|
| 12 | 12 | code, print the HTML body, etc... |
|---|
| 13 | 13 | 4. Check if an error occured to print out an error message. |
|---|
| 14 | | |
|---|
| | 14 | |
|---|
| 15 | 15 | Look in /integration for more elaborate examples. |
|---|
| 16 | | |
|---|
| | 16 | |
|---|
| 17 | 17 | Enjoy, |
|---|
| 18 | | |
|---|
| 19 | | David |
|---|
| | 18 | |
|---|
| | 19 | David |
|---|
| 20 | 20 | */ |
|---|
| 21 | 21 | |
|---|
| … | … | |
| 33 | 33 | |
|---|
| 34 | 34 | // ------------------------------------------------------------------------ |
|---|
| 35 | | // 3. Execute net2ftp($action). Note that net2ftp("sendHttpHeaders") MUST |
|---|
| | 35 | // 3. Execute net2ftp($action). Note that net2ftp("sendHttpHeaders") MUST |
|---|
| 36 | 36 | // be called once before the other net2ftp() calls! |
|---|
| 37 | 37 | // ------------------------------------------------------------------------ |
|---|
| … | … | |
| 61 | 61 | <?php |
|---|
| 62 | 62 | // ------------------------------------------------------------------------ |
|---|
| 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 |
|---|
| 64 | 64 | // a template, or by accessing the $net2ftp_result variable directly. |
|---|
| 65 | 65 | // ------------------------------------------------------------------------ |
|---|
| r1198 |
r1229 |
|
| 59 | 59 | |
|---|
| 60 | 60 | // ---------------------------------------------------------------------------------- |
|---|
| 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 |
|---|
| 63 | 63 | // volume and script execution time), and checking the user's home directory |
|---|
| 64 | 64 | // ---------------------------------------------------------------------------------- |
|---|
| … | … | |
| 140 | 140 | $net2ftp_settings["net2ftpdotcom"] = "no"; |
|---|
| 141 | 141 | |
|---|
| 142 | | // Google Adsense advertisements |
|---|
| | 142 | // Google Adsense advertisements |
|---|
| 143 | 143 | // Not shown when using HTTPS to avoid warnings on each pageload |
|---|
| 144 | 144 | $net2ftp_settings["show_google_ads"] = "no"; |
|---|
| r1198 |
r1229 |
|
| 99 | 99 | $net2ftp_settings["functionuse_update"] = "no"; |
|---|
| 100 | 100 | |
|---|
| 101 | | // Open file |
|---|
| | 101 | // Open file |
|---|
| 102 | 102 | $net2ftp_settings["functionuse_open"] = "yes"; |
|---|
| 103 | 103 | |
|---|
| r928 |
r1229 |
|
| 58 | 58 | <?php /* ----- SSL ----- */ ?> |
|---|
| 59 | 59 | <?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> |
|---|
| 61 | 61 | <?php } else { ?> |
|---|
| 62 | 62 | <td></td> |
|---|
|