Changeset 1132
- Timestamp:
- 04/30/08 00:25:33
(5 months ago)
- Author:
- rats
- Message:
* Fixed #1148: DNS serial is not updated more than once a day when changing sub domains
* Fixed #1200: orderpanel {THEME_CHARSET}
* Fixed #1212: Syntax Error in edit_mail_acc.php
* Fixed #1221: Fatal error on database error
* Updated Polish
* Updated Czech
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1131 |
r1132 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-04-29 Benedikt Heintel |
|---|
| | 5 | - ENGINE: |
|---|
| | 6 | * Fixed #1148: DNS serial is not updated more than once a day when changing sub domains |
|---|
| | 7 | - GUI: |
|---|
| | 8 | * Fixed #1200: orderpanel {THEME_CHARSET} |
|---|
| | 9 | * Fixed #1212: Syntax Error in edit_mail_acc.php |
|---|
| | 10 | * Fixed #1221: Fatal error on database error |
|---|
| | 11 | - LANGUAGES: |
|---|
| | 12 | * Updated Polish |
|---|
| | 13 | * Updated Czech |
|---|
| 3 | 14 | |
|---|
| 4 | 15 | 2008-04-29 Jochen Manz |
|---|
| r1124 |
r1132 |
|
| 508 | 508 | |
|---|
| 509 | 509 | my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); |
|---|
| 510 | | my $time2 = sprintf "%4d%02d%02d01",$year+1900,$mon+1,$mday,$seq; |
|---|
| | 510 | my $time2 = sprintf "%4d%02d%02d%02d",$year+1900,$mon+1,$mday,$seq; |
|---|
| 511 | 511 | |
|---|
| 512 | 512 | my $db_time_val = "$db_time_b\t\t\t $time2\t\n$db_time_e"; |
|---|
| r1128 |
r1132 |
|
| 126 | 126 | ) |
|---|
| 127 | 127 | ); |
|---|
| 128 | | if (count($mtype) > 1) { |
|---|
| | 128 | if (($mail_forward === '_no_') ||(count($mtype) > 1)) { |
|---|
| 129 | 129 | $tpl->assign( |
|---|
| 130 | 130 | array( |
|---|
| r1129 |
r1132 |
|
| 89 | 89 | |
|---|
| 90 | 90 | if(function_exists($functionName)) { |
|---|
| 91 | | $queryArray = $functionName(); |
|---|
| | 91 | $queryArray[] = $functionName(); |
|---|
| 92 | 92 | |
|---|
| 93 | 93 | // Query to set the new Database Revision |
|---|
| … | … | |
| 121 | 121 | function _databaseUpdate_1() { |
|---|
| 122 | 122 | $sqlUpd = array(); |
|---|
| 123 | | |
|---|
| | 123 | |
|---|
| 124 | 124 | $sqlUpd[] = "INSERT INTO config (name, value) VALUES (DATABASE_REVISION , 1)"; |
|---|
| 125 | 125 | |
|---|
| … | … | |
| 182 | 182 | function _databaseUpdate_3() { |
|---|
| 183 | 183 | $sqlUpd = array(); |
|---|
| 184 | | |
|---|
| | 184 | |
|---|
| 185 | 185 | $sqlUpd[] = "ALTER IGNORE TABLE `orders_settings` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment;"; |
|---|
| 186 | 186 | |
|---|
| r771 |
r1132 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 19 | 20 | |
|---|
| 20 | 21 | require '../include/ispcp-lib.php'; |
|---|
| 21 | 22 | |
|---|
| 22 | 23 | $tpl = new pTemplate(); |
|---|
| 23 | | |
|---|
| 24 | | $tpl -> define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'].'/addon.tpl'); |
|---|
| 25 | | |
|---|
| 26 | | $tpl -> define_dynamic('page_message', 'page'); |
|---|
| 27 | | |
|---|
| 28 | | $tpl -> define_dynamic('purchase_header', 'page'); |
|---|
| 29 | | |
|---|
| 30 | | $tpl -> define_dynamic('purchase_footer', 'page'); |
|---|
| 31 | | |
|---|
| | 24 | $tpl->define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'] . '/addon.tpl'); |
|---|
| | 25 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| | 26 | $tpl->define_dynamic('purchase_header', 'page'); |
|---|
| | 27 | $tpl->define_dynamic('purchase_footer', 'page'); |
|---|
| 32 | 28 | |
|---|
| 33 | 29 | /* |
|---|
| … | … | |
| 35 | 31 | */ |
|---|
| 36 | 32 | |
|---|
| 37 | | function addon_domain($dmn_name) |
|---|
| 38 | | { |
|---|
| | 33 | function addon_domain($dmn_name) { |
|---|
| 39 | 34 | $dmn_name = strtolower($dmn_name); |
|---|
| 40 | 35 | $dmn_name = encode_idna($dmn_name); |
|---|
| 41 | 36 | |
|---|
| 42 | 37 | if (!chk_dname($dmn_name)) { |
|---|
| 43 | | |
|---|
| 44 | | set_page_message(tr('Wrong domain name syntax!')); |
|---|
| | 38 | set_page_message(tr('Wrong domain name syntax!')); |
|---|
| 45 | 39 | return; |
|---|
| 46 | | |
|---|
| 47 | | } else if (ispcp_domain_exists($dmn_name, 0)) { |
|---|
| 48 | | |
|---|
| 49 | | set_page_message(tr('Domain with that name already exists on the system!')); |
|---|
| | 40 | } else if (ispcp_domain_exists($dmn_name, 0)) { |
|---|
| | 41 | set_page_message(tr('Domain with that name already exists on the system!')); |
|---|
| 50 | 42 | return; |
|---|
| 51 | | |
|---|
| 52 | | } |
|---|
| | 43 | } |
|---|
| 53 | 44 | |
|---|
| 54 | 45 | $_SESSION['domainname'] = $dmn_name; |
|---|
| 55 | | header( "Location: address.php" ); |
|---|
| | 46 | header("Location: address.php"); |
|---|
| 56 | 47 | die(); |
|---|
| 57 | | |
|---|
| 58 | 48 | } |
|---|
| 59 | 49 | |
|---|
| … | … | |
| 61 | 51 | * Functions end |
|---|
| 62 | 52 | */ |
|---|
| 63 | | |
|---|
| 64 | | |
|---|
| 65 | | |
|---|
| 66 | | |
|---|
| 67 | | |
|---|
| 68 | 53 | |
|---|
| 69 | 54 | /* |
|---|
| … | … | |
| 73 | 58 | */ |
|---|
| 74 | 59 | |
|---|
| 75 | | if (isset($_SESSION['user_id'])){ |
|---|
| | 60 | if (isset($_SESSION['user_id'])) { |
|---|
| 76 | 61 | $user_id = $_SESSION['user_id']; |
|---|
| 77 | 62 | |
|---|
| 78 | | if (isset($_SESSION['plan_id'])){ |
|---|
| | 63 | if (isset($_SESSION['plan_id'])) { |
|---|
| 79 | 64 | $plan_id = $_SESSION['plan_id']; |
|---|
| 80 | | } else if(isset($_GET['id'])){ |
|---|
| | 65 | } else if (isset($_GET['id'])) { |
|---|
| 81 | 66 | $plan_id = $_GET['id']; |
|---|
| 82 | 67 | $_SESSION['plan_id'] = $plan_id; |
|---|
| … | … | |
| 88 | 73 | } |
|---|
| 89 | 74 | |
|---|
| 90 | | if (isset($_SESSION['domainname'])){ |
|---|
| 91 | | header( "Location: address.php" ); |
|---|
| | 75 | if (isset($_SESSION['domainname'])) { |
|---|
| | 76 | header("Location: address.php"); |
|---|
| 92 | 77 | die(); |
|---|
| 93 | 78 | } |
|---|
| 94 | 79 | |
|---|
| 95 | | if (isset($_POST['domainname']) && $_POST['domainname'] != ''){ |
|---|
| | 80 | if (isset($_POST['domainname']) && $_POST['domainname'] != '') { |
|---|
| 96 | 81 | addon_domain($_POST['domainname']); |
|---|
| 97 | 82 | } |
|---|
| … | … | |
| 101 | 86 | gen_page_message($tpl); |
|---|
| 102 | 87 | |
|---|
| 103 | | $tpl -> assign( |
|---|
| 104 | | array( |
|---|
| 105 | | 'DOMAIN_ADDON' => tr('Add On A Domain'), |
|---|
| 106 | | 'TR_DOMAIN_NAME' => tr('Domain name'), |
|---|
| 107 | | 'TR_CONTINUE' => tr('Continue'), |
|---|
| 108 | | 'TR_EXAMPLE' => tr('(e.g. domain-of-your-choice.com)'), |
|---|
| 109 | | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 88 | $tpl->assign( |
|---|
| | 89 | array( |
|---|
| | 90 | 'DOMAIN_ADDON' => tr('Add On A Domain'), |
|---|
| | 91 | 'TR_DOMAIN_NAME' => tr('Domain name'), |
|---|
| | 92 | 'TR_CONTINUE' => tr('Continue'), |
|---|
| | 93 | 'TR_EXAMPLE' => tr('(e.g. domain-of-your-choice.com)'), |
|---|
| | 94 | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 95 | ) |
|---|
| | 96 | ); |
|---|
| 110 | 97 | |
|---|
| | 98 | $tpl->parse('PAGE', 'page'); |
|---|
| | 99 | $tpl->prnt(); |
|---|
| 111 | 100 | |
|---|
| 112 | | ) |
|---|
| 113 | | ); |
|---|
| 114 | | |
|---|
| 115 | | $tpl -> parse('PAGE', 'page'); |
|---|
| 116 | | |
|---|
| 117 | | $tpl -> prnt(); |
|---|
| 118 | | |
|---|
| 119 | | if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); |
|---|
| | 101 | if ($cfg['DUMP_GUI_DEBUG']) |
|---|
| | 102 | dump_gui_debug(); |
|---|
| 120 | 103 | |
|---|
| 121 | 104 | unset_messages(); |
|---|
| | 105 | |
|---|
| 122 | 106 | ?> |
|---|
| r952 |
r1132 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| 7 | 8 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * @license |
|---|
| r747 |
r1132 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| 19 | | |
|---|
| 20 | | |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 21 | 20 | |
|---|
| 22 | 21 | require '../include/ispcp-lib.php'; |
|---|
| 23 | 22 | |
|---|
| 24 | 23 | $tpl = new pTemplate(); |
|---|
| 25 | | |
|---|
| 26 | | $tpl -> define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'].'/chart.tpl'); |
|---|
| 27 | | |
|---|
| 28 | | $tpl -> define_dynamic('page_message', 'page'); |
|---|
| 29 | | |
|---|
| 30 | | $tpl -> define_dynamic('purchase_header', 'page'); |
|---|
| 31 | | |
|---|
| 32 | | $tpl -> define_dynamic('purchase_footer', 'page'); |
|---|
| 33 | | |
|---|
| | 24 | $tpl->define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'] . '/chart.tpl'); |
|---|
| | 25 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| | 26 | $tpl->define_dynamic('purchase_header', 'page'); |
|---|
| | 27 | $tpl->define_dynamic('purchase_footer', 'page'); |
|---|
| 34 | 28 | |
|---|
| 35 | 29 | /* |
|---|
| … | … | |
| 37 | 31 | */ |
|---|
| 38 | 32 | |
|---|
| 39 | | function gen_chart(&$tpl, &$sql, $user_id, $plan_id) |
|---|
| 40 | | { |
|---|
| 41 | | global $cfg; |
|---|
| 42 | | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin'){ |
|---|
| 43 | | $query = <<<SQL_QUERY |
|---|
| | 33 | function gen_chart(&$tpl, &$sql, $user_id, $plan_id) { |
|---|
| | 34 | global $cfg; |
|---|
| | 35 | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin') { |
|---|
| | 36 | $query = <<<SQL_QUERY |
|---|
| 44 | 37 | select |
|---|
| 45 | 38 | * |
|---|
| … | … | |
| 50 | 43 | SQL_QUERY; |
|---|
| 51 | 44 | |
|---|
| 52 | | $rs = exec_query($sql, $query, array($plan_id)); |
|---|
| 53 | | } else { |
|---|
| 54 | | |
|---|
| 55 | | $query = <<<SQL_QUERY |
|---|
| | 45 | $rs = exec_query($sql, $query, array($plan_id)); |
|---|
| | 46 | } else { |
|---|
| | 47 | $query = <<<SQL_QUERY |
|---|
| 56 | 48 | select |
|---|
| 57 | 49 | * |
|---|
| … | … | |
| 64 | 56 | SQL_QUERY; |
|---|
| 65 | 57 | |
|---|
| 66 | | $rs = exec_query($sql, $query, array($user_id, $plan_id)); |
|---|
| 67 | | } |
|---|
| 68 | | if ($rs -> RecordCount() == 0) { |
|---|
| 69 | | |
|---|
| 70 | | header("Location: index.php"); |
|---|
| 71 | | die(); |
|---|
| 72 | | |
|---|
| 73 | | } else { |
|---|
| 74 | | |
|---|
| 75 | | $price = $rs -> fields['price']; |
|---|
| 76 | | $setup_fee = $rs -> fields['setup_fee']; |
|---|
| | 58 | $rs = exec_query($sql, $query, array($user_id, $plan_id)); |
|---|
| | 59 | } |
|---|
| | 60 | if ($rs->RecordCount() == 0) { |
|---|
| | 61 | header("Location: index.php"); |
|---|
| | 62 | die(); |
|---|
| | 63 | } else { |
|---|
| | 64 | $price = $rs->fields['price']; |
|---|
| | 65 | $setup_fee = $rs->fields['setup_fee']; |
|---|
| 77 | 66 | $total = $price + $setup_fee; |
|---|
| 78 | 67 | |
|---|
| 79 | | if ($price == 0 || $price == '') { |
|---|
| 80 | | $price = tr('free of charge'); |
|---|
| 81 | | } else { |
|---|
| 82 | | $price = $price." ".$rs -> fields['value']." ".$rs -> fields['payment']; |
|---|
| 83 | | } |
|---|
| 84 | | |
|---|
| 85 | | if ($setup_fee == 0 || $setup_fee == '') { |
|---|
| 86 | | $setup_fee = tr('free of charge'); |
|---|
| 87 | | } else { |
|---|
| 88 | | $setup_fee = $setup_fee." ".$rs -> fields['value']; |
|---|
| 89 | | } |
|---|
| 90 | | |
|---|
| 91 | | if ($total == 0 ) { |
|---|
| 92 | | $total = tr('free of charge'); |
|---|
| 93 | | } else { |
|---|
| 94 | | $total = $total." ".$rs -> fields['value']; |
|---|
| 95 | | } |
|---|
| 96 | | |
|---|
| 97 | | $tpl -> assign( |
|---|
| 98 | | array( |
|---|
| 99 | | 'PRICE' => $price, |
|---|
| 100 | | 'SETUP' => $setup_fee, |
|---|
| 101 | | 'TOTAL' => $total, |
|---|
| 102 | | 'TR_PACKAGE_NAME' => $rs -> fields['name'], |
|---|
| 103 | | |
|---|
| 104 | | |
|---|
| 105 | | ) |
|---|
| 106 | | ); |
|---|
| 107 | | |
|---|
| 108 | | } |
|---|
| 109 | | |
|---|
| | 68 | if ($price == 0 || $price == '') { |
|---|
| | 69 | $price = tr('free of charge'); |
|---|
| | 70 | } else { |
|---|
| | 71 | $price = $price . " " . $rs->fields['value'] . " " . $rs->fields['payment']; |
|---|
| | 72 | } |
|---|
| | 73 | |
|---|
| | 74 | if ($setup_fee == 0 || $setup_fee == '') { |
|---|
| | 75 | $setup_fee = tr('free of charge'); |
|---|
| | 76 | } else { |
|---|
| | 77 | $setup_fee = $setup_fee . " " . $rs->fields['value']; |
|---|
| | 78 | } |
|---|
| | 79 | |
|---|
| | 80 | if ($total == 0) { |
|---|
| | 81 | $total = tr('free of charge'); |
|---|
| | 82 | } else { |
|---|
| | 83 | $total = $total . " " . $rs->fields['value']; |
|---|
| | 84 | } |
|---|
| | 85 | |
|---|
| | 86 | $tpl->assign( |
|---|
| | 87 | array('PRICE' => $price, |
|---|
| | 88 | 'SETUP' => $setup_fee, |
|---|
| | 89 | 'TOTAL' => $total, |
|---|
| | 90 | 'TR_PACKAGE_NAME' => $rs->fields['name'], |
|---|
| | 91 | |
|---|
| | 92 | ) |
|---|
| | 93 | ); |
|---|
| | 94 | } |
|---|
| 110 | 95 | } |
|---|
| 111 | 96 | |
|---|
| 112 | | function gen_personal_data(&$tpl) |
|---|
| 113 | | { |
|---|
| 114 | | if (isset($_SESSION['fname'])){ |
|---|
| | 97 | function gen_personal_data(&$tpl) { |
|---|
| | 98 | if (isset($_SESSION['fname'])) { |
|---|
| 115 | 99 | $first_name = $_SESSION['fname']; |
|---|
| 116 | 100 | } else { |
|---|
| … | … | |
| 118 | 102 | } |
|---|
| 119 | 103 | |
|---|
| 120 | | |
|---|
| 121 | | |
|---|
| 122 | | if (isset($_SESSION['lname'])){ |
|---|
| | 104 | if (isset($_SESSION['lname'])) { |
|---|
| 123 | 105 | $last_name = $_SESSION['lname']; |
|---|
| 124 | 106 | } else { |
|---|
| … | … | |
| 126 | 108 | } |
|---|
| 127 | 109 | |
|---|
| 128 | | |
|---|
| 129 | | if (isset($_SESSION['firm'])){ |
|---|
| | 110 | if (isset($_SESSION['firm'])) { |
|---|
| 130 | 111 | $company = $_SESSION['firm']; |
|---|
| 131 | 112 | } else { |
|---|
| … | … | |
| 133 | 114 | } |
|---|
| 134 | 115 | |
|---|
| 135 | | |
|---|
| 136 | | if (isset($_SESSION['zip'])){ |
|---|
| | 116 | if (isset($_SESSION['zip'])) { |
|---|
| 137 | 117 | $postal_code = $_SESSION['zip']; |
|---|
| 138 | 118 | } else { |
|---|
| … | … | |
| 140 | 120 | } |
|---|
| 141 | 121 | |
|---|
| 142 | | |
|---|
| 143 | | if (isset($_SESSION['city'])){ |
|---|
| | 122 | if (isset($_SESSION['city'])) { |
|---|
| 144 | 123 | $city = $_SESSION['city']; |
|---|
| 145 | 124 | } else { |
|---|
| … | … | |
| 147 | 126 | } |
|---|
| 148 | 127 | |
|---|
| 149 | | |
|---|
| 150 | | if (isset($_SESSION['country'])){ |
|---|
| | 128 | if (isset($_SESSION['country'])) { |
|---|
| 151 | 129 | $country = $_SESSION['country']; |
|---|
| 152 | 130 | } else { |
|---|
| … | … | |
| 154 | 132 | } |
|---|
| 155 | 133 | |
|---|
| 156 | | |
|---|
| 157 | | if (isset($_SESSION['street1'])){ |
|---|
| | 134 | if (isset($_SESSION['street1'])) { |
|---|
| 158 | 135 | $street1 = $_SESSION['street1']; |
|---|
| 159 | 136 | } else { |
|---|
| … | … | |
| 161 | 138 | } |
|---|
| 162 | 139 | |
|---|
| 163 | | |
|---|
| 164 | | if (isset($_SESSION['street2'])){ |
|---|
| | 140 | if (isset($_SESSION['street2'])) { |
|---|
| 165 | 141 | $street2 = $_SESSION['street2']; |
|---|
| 166 | 142 | } else { |
|---|
| … | … | |
| 168 | 144 | } |
|---|
| 169 | 145 | |
|---|
| 170 | | if (isset($_SESSION['phone'])){ |
|---|
| | 146 | if (isset($_SESSION['phone'])) { |
|---|
| 171 | 147 | $phone = $_SESSION['phone']; |
|---|
| 172 | 148 | } else { |
|---|
| … | … | |
| 174 | 150 | } |
|---|
| 175 | 151 | |
|---|
| 176 | | if (isset($_SESSION['fax'])){ |
|---|
| | 152 | if (isset($_SESSION['fax'])) { |
|---|
| 177 | 153 | $fax = $_SESSION['fax']; |
|---|
| 178 | 154 | } else { |
|---|
| 179 | 155 | $fax = ''; |
|---|
| 180 | 156 | } |
|---|
| 181 | | if (isset($_SESSION['email'])){ |
|---|
| | 157 | if (isset($_SESSION['email'])) { |
|---|
| 182 | 158 | $email = $_SESSION['email']; |
|---|
| 183 | 159 | } else { |
|---|
| 184 | 160 | $email = ''; |
|---|
| 185 | 161 | } |
|---|
| 186 | | if (isset($_SESSION['gender'])){ |
|---|
| | 162 | if (isset($_SESSION['gender'])) { |
|---|
| 187 | 163 | $gender = get_gender_by_code($_SESSION['gender']); |
|---|
| 188 | 164 | } else { |
|---|
| … | … | |
| 190 | 166 | } |
|---|
| 191 | 167 | |
|---|
| 192 | | |
|---|
| 193 | | |
|---|
| 194 | | |
|---|
| 195 | | $tpl -> assign( |
|---|
| 196 | | array( |
|---|
| 197 | | 'VL_USR_NAME' => $first_name, |
|---|
| 198 | | 'VL_LAST_USRNAME' => $last_name, |
|---|
| 199 | | 'VL_USR_FIRM' => $company, |
|---|
| 200 | | 'VL_USR_POSTCODE' => $postal_code, |
|---|
| 201 | | 'VL_USR_GENDER' => $gender, |
|---|
| 202 | | 'VL_USRCITY' => $city, |
|---|
| 203 | | 'VL_COUNTRY' => $country, |
|---|
| 204 | | 'VL_STREET1' => $street1, |
|---|
| 205 | | 'VL_STREET2' => $street2, |
|---|
| 206 | | 'VL_PHONE' => $phone, |
|---|
| 207 | | 'VL_FAX' => $fax, |
|---|
| 208 | | 'VL_EMAIL' => $email, |
|---|
| 209 | | |
|---|
| 210 | | |
|---|
| 211 | | ) |
|---|
| 212 | | ); |
|---|
| 213 | | |
|---|
| 214 | | |
|---|
| | 168 | $tpl->assign( |
|---|
| | 169 | array('VL_USR_NAME' => $first_name, |
|---|
| | 170 | 'VL_LAST_USRNAME' => $last_name, |
|---|
| | 171 | 'VL_USR_FIRM' => $company, |
|---|
| | 172 | 'VL_USR_POSTCODE' => $postal_code, |
|---|
| | 173 | 'VL_USR_GENDER' => $gender, |
|---|
| | 174 | 'VL_USRCITY' => $city, |
|---|
| | 175 | 'VL_COUNTRY' => $country, |
|---|
| | 176 | 'VL_STREET1' => $street1, |
|---|
| | 177 | 'VL_STREET2' => $street2, |
|---|
| | 178 | 'VL_PHONE' => $phone, |
|---|
| | 179 | 'VL_FAX' => $fax, |
|---|
| | 180 | 'VL_EMAIL' => $email, |
|---|
| | 181 | |
|---|
| | 182 | ) |
|---|
| | 183 | ); |
|---|
| 215 | 184 | } |
|---|
| 216 | 185 | |
|---|
| … | … | |
| 218 | 187 | * Functions end |
|---|
| 219 | 188 | */ |
|---|
| 220 | | |
|---|
| 221 | | |
|---|
| 222 | | |
|---|
| 223 | | |
|---|
| 224 | | |
|---|
| 225 | 189 | |
|---|
| 226 | 190 | /* |
|---|
| … | … | |
| 230 | 194 | */ |
|---|
| 231 | 195 | |
|---|
| 232 | | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']){ |
|---|
| | 196 | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { |
|---|
| 233 | 197 | $user_id = $_SESSION['user_id']; |
|---|
| 234 | 198 | $plan_id = $_SESSION['plan_id']; |
|---|
| … | … | |
| 243 | 207 | gen_page_message($tpl); |
|---|
| 244 | 208 | |
|---|
| 245 | | $tpl -> assign( |
|---|
| 246 | | array( |
|---|
| 247 | | 'YOUR_CHART' => tr('Your Chart'), |
|---|
| 248 | | 'TR_COSTS' => tr('Costs'), |
|---|
| 249 | | 'TR_PACKAGE_PRICE' => tr('Price'), |
|---|
| 250 | | 'TR_PACKAGE_SETUPFEE' => tr('Setup fee'), |
|---|
| 251 | | 'TR_TOTAL' => tr('Total'), |
|---|
| 252 | | 'TR_CONTINUE' => tr('Purchase'), |
|---|
| 253 | | 'TR_CHANGE' => tr('Change'), |
|---|
| 254 | | 'TR_FIRSTNAME' => tr('First name'), |
|---|
| 255 | | 'TR_LASTNAME' => tr('Last name'), |
|---|
| 256 | | 'TR_GENDER' => tr('Gender'), |
|---|
| 257 | | 'TR_COMPANY' => tr('Company'), |
|---|
| 258 | | 'TR_POST_CODE' => tr('Zip/Postal code'), |
|---|
| 259 | | 'TR_CITY' => tr('City'), |
|---|
| 260 | | 'TR_COUNTRY' => tr('Country'), |
|---|
| 261 | | 'TR_STREET1' => tr('Street 1'), |
|---|
| 262 | | 'TR_STREET2' => tr('Street 2'), |
|---|
| 263 | | 'TR_EMAIL' => tr('Email'), |
|---|
| 264 | | 'TR_PHONE' => tr('Phone'), |
|---|
| 265 | | 'TR_FAX' => tr('Fax'), |
|---|
| 266 | | 'TR_EMAIL' => tr('Email'), |
|---|
| 267 | | 'TR_PERSONAL_DATA' => tr('Personal Data'), |
|---|
| 268 | | 'THEME_CHARSET' => tr('encoding'), |
|---|
| 269 | | |
|---|
| 270 | | |
|---|
| 271 | | ) |
|---|
| 272 | | ); |
|---|
| 273 | | |
|---|
| 274 | | $tpl -> parse('PAGE', 'page'); |
|---|
| 275 | | |
|---|
| 276 | | $tpl -> prnt(); |
|---|
| 277 | | |
|---|
| 278 | | if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); |
|---|
| | 209 | $tpl->assign( |
|---|
| | 210 | array('YOUR_CHART' => tr('Your Chart'), |
|---|
| | 211 | 'TR_COSTS' => tr('Costs'), |
|---|
| | 212 | 'TR_PACKAGE_PRICE' => tr('Price'), |
|---|
| | 213 | 'TR_PACKAGE_SETUPFEE' => tr('Setup fee'), |
|---|
| | 214 | 'TR_TOTAL' => tr('Total'), |
|---|
| | 215 | 'TR_CONTINUE' => tr('Purchase'), |
|---|
| | 216 | 'TR_CHANGE' => tr('Change'), |
|---|
| | 217 | 'TR_FIRSTNAME' => tr('First name'), |
|---|
| | 218 | 'TR_LASTNAME' => tr('Last name'), |
|---|
| | 219 | 'TR_GENDER' => tr('Gender'), |
|---|
| | 220 | 'TR_COMPANY' => tr('Company'), |
|---|
| | 221 | 'TR_POST_CODE' => tr('Zip/Postal code'), |
|---|
| | 222 | 'TR_CITY' => tr('City'), |
|---|
| | 223 | 'TR_COUNTRY' => tr('Country'), |
|---|
| | 224 | 'TR_STREET1' => tr('Street 1'), |
|---|
| | 225 | 'TR_STREET2' => tr('Street 2'), |
|---|
| | 226 | 'TR_EMAIL' => tr('Email'), |
|---|
| | 227 | 'TR_PHONE' => tr('Phone'), |
|---|
| | 228 | 'TR_FAX' => tr('Fax'), |
|---|
| | 229 | 'TR_EMAIL' => tr('Email'), |
|---|
| | 230 | 'TR_PERSONAL_DATA' => tr('Personal Data'), |
|---|
| | 231 | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 232 | ) |
|---|
| | 233 | ); |
|---|
| | 234 | |
|---|
| | 235 | $tpl->parse('PAGE', 'page'); |
|---|
| | 236 | $tpl->prnt(); |
|---|
| | 237 | |
|---|
| | 238 | if ($cfg['DUMP_GUI_DEBUG']) |
|---|
| | 239 | dump_gui_debug(); |
|---|
| 279 | 240 | |
|---|
| 280 | 241 | unset_messages(); |
|---|
| | 242 | |
|---|
| 281 | 243 | ?> |
|---|
| r745 |
r1132 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| 19 | | |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | $tpl = new pTemplate(); |
|---|
| 24 | | |
|---|
| 25 | | $tpl -> define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'].'/checkout.tpl'); |
|---|
| 26 | | |
|---|
| 27 | | $tpl -> define_dynamic('page_message', 'page'); |
|---|
| 28 | | |
|---|
| 29 | | $tpl -> define_dynamic('purchase_header', 'page'); |
|---|
| 30 | | |
|---|
| 31 | | $tpl -> define_dynamic('purchase_footer', 'page'); |
|---|
| 32 | | |
|---|
| | 24 | $tpl->define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'] . '/checkout.tpl'); |
|---|
| | 25 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| | 26 | $tpl->define_dynamic('purchase_header', 'page'); |
|---|
| | 27 | $tpl->define_dynamic('purchase_footer', 'page'); |
|---|
| 33 | 28 | |
|---|
| 34 | 29 | /* |
|---|
| … | … | |
| 36 | 31 | */ |
|---|
| 37 | 32 | |
|---|
| 38 | | function gen_checkout(&$tpl, &$sql, $user_id, $plan_id) |
|---|
| 39 | | { |
|---|
| 40 | | |
|---|
| | 33 | function gen_checkout(&$tpl, &$sql, $user_id, $plan_id) { |
|---|
| 41 | 34 | $date = time(); |
|---|
| 42 | 35 | $domain_name = $_SESSION['domainname']; |
|---|
| … | … | |
| 44 | 37 | $lname = $_SESSION['lname']; |
|---|
| 45 | 38 | |
|---|
| 46 | | if (isset($_SESSION['firm'])){ |
|---|
| | 39 | if (isset($_SESSION['firm'])) { |
|---|
| 47 | 40 | $firm = $_SESSION['firm']; |
|---|
| 48 | 41 | } else { |
|---|
| … | … | |
| 56 | 49 | $phone = $_SESSION['phone']; |
|---|
| 57 | 50 | |
|---|
| 58 | | if (isset($_SESSION['fax'])){ |
|---|
| | 51 | if (isset($_SESSION['fax'])) { |
|---|
| 59 | 52 | $fax = $_SESSION['fax']; |
|---|
| 60 | 53 | } else { |
|---|
| … | … | |
| 64 | 57 | $street1 = $_SESSION['street1']; |
|---|
| 65 | 58 | |
|---|
| 66 | | if (isset($_SESSION['street2'])){ |
|---|
| | 59 | if (isset($_SESSION['street2'])) { |
|---|
| 67 | 60 | $street2 = $_SESSION['street2']; |
|---|
| 68 | 61 | } else { |
|---|
| … | … | |
| 72 | 65 | $status = "new"; |
|---|
| 73 | 66 | |
|---|
| 74 | | $query = <<<SQL_QUERY |
|---|
| | 67 | $query = <<<SQL_QUERY |
|---|
| 75 | 68 | insert into |
|---|
| 76 | 69 | orders |
|---|
| … | … | |
| 95 | 88 | SQL_QUERY; |
|---|
| 96 | 89 | |
|---|
| 97 | | $rs = exec_query($sql, $query, array($user_id, $plan_id, $date, $domain_name, $fname, $lname, $firm, $zip, $city, $country, $email, $phone, $fax, $street1, $street2, $status)); |
|---|
| 98 | | print $sql -> ErrorMsg(); |
|---|
| 99 | | $order_id = $sql -> Insert_ID(); |
|---|
| | 90 | $rs = exec_query($sql, $query, array($user_id, $plan_id, $date, $domain_name, $fname, $lname, $firm, $zip, $city, $country, $email, $phone, $fax, $street1, $street2, $status)); |
|---|
| | 91 | print $sql->ErrorMsg(); |
|---|
| | 92 | $order_id = $sql->Insert_ID(); |
|---|
| 100 | 93 | send_order_emails($user_id, $domain_name, $fname, $lname, $email, $order_id); |
|---|
| 101 | 94 | |
|---|
| … | … | |
| 141 | 134 | if (isset($_SESSION['plan_id'])) |
|---|
| 142 | 135 | unset($_SESSION['plan_id']); |
|---|
| 143 | | |
|---|
| 144 | | |
|---|
| 145 | 136 | } |
|---|
| 146 | 137 | |
|---|
| … | … | |
| 148 | 139 | * Functions end |
|---|
| 149 | 140 | */ |
|---|
| 150 | | |
|---|
| 151 | | |
|---|
| 152 | | |
|---|
| 153 | | |
|---|
| 154 | | |
|---|
| 155 | 141 | |
|---|
| 156 | 142 | /* |
|---|
| … | … | |
| 160 | 146 | */ |
|---|
| 161 | 147 | |
|---|
| 162 | | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']){ |
|---|
| | 148 | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { |
|---|
| 163 | 149 | $user_id = $_SESSION['user_id']; |
|---|
| 164 | 150 | $plan_id = $_SESSION['plan_id']; |
|---|
| … | … | |
| 169 | 155 | if ( |
|---|
| 170 | 156 | (isset($_SESSION['fname']) && $_SESSION['fname'] != '') and |
|---|
| 171 | | (isset($_SESSION['lname']) && $_SESSION['lname'] != '') and |
|---|
| 172 | | (isset($_SESSION['email']) && $_SESSION['email'] != '') and |
|---|
| 173 | | (isset($_SESSION['zip']) && $_SESSION['zip'] != '') and |
|---|
| 174 | | (isset($_SESSION['city']) && $_SESSION['city'] != '') and |
|---|
| 175 | | (isset($_SESSION['country']) && $_SESSION['country'] != '') and |
|---|
| 176 | | (isset($_SESSION['street1']) && $_SESSION['street1'] != '') and |
|---|
| 177 | | (isset($_SESSION['phone']) && $_SESSION['phone'] != '') |
|---|
| 178 | | ) { |
|---|
| 179 | | |
|---|
| | 157 | (isset($_SESSION['lname']) && $_SESSION['lname'] != '') and |
|---|
| | 158 | (isset($_SESSION['email']) && $_SESSION['email'] != '') and |
|---|
| | 159 | (isset($_SESSION['zip']) && $_SESSION['zip'] != '') and |
|---|
| | 160 | (isset($_SESSION['city']) && $_SESSION['city'] != '') and |
|---|
| | 161 | (isset($_SESSION['country']) && $_SESSION['country'] != '') and |
|---|
| | 162 | (isset($_SESSION['street1']) && $_SESSION['street1'] != '') and |
|---|
| | 163 | (isset($_SESSION['phone']) && $_SESSION['phone'] != '') |
|---|
| | 164 | ) { |
|---|
| 180 | 165 | gen_checkout($tpl, $sql, $user_id, $plan_id); |
|---|
| 181 | | |
|---|
| 182 | 166 | } else { |
|---|
| 183 | | header( "Location: index.php?user_id=$user_id" ); |
|---|
| | 167 | header("Location: index.php?user_id=$user_id"); |
|---|
| 184 | 168 | die(); |
|---|
| 185 | | |
|---|
| 186 | 169 | } |
|---|
| 187 | | |
|---|
| 188 | 170 | |
|---|
| 189 | 171 | gen_purchase_haf($tpl, $sql, $user_id); |
|---|
| … | … | |
| 191 | 173 | gen_page_message($tpl); |
|---|
| 192 | 174 | |
|---|
| 193 | | $tpl -> assign( |
|---|
| 194 | | array( |
|---|
| 195 | | 'CHECK_OUT' => tr('Check Out'), |
|---|
| 196 | | 'THANK_YOU_MESSAGE' => tr('<b>Thank You for purchasing</b><br>You will receive an email with more details and information'), |
|---|
| 197 | | 'THEME_CHARSET' => tr('encoding'), |
|---|
| 198 | | ) |
|---|
| 199 | | ); |
|---|
| | 175 | $tpl->assign( |
|---|
| | 176 | array('CHECK_OUT' => tr('Check Out'), |
|---|
| | 177 | 'THANK_YOU_MESSAGE' => tr('<b>Thank You for purchasing</b><br>You will receive an email with more details and information'), |
|---|
| | 178 | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 179 | ) |
|---|
| | 180 | ); |
|---|
| 200 | 181 | |
|---|
| 201 | | $tpl -> parse('PAGE', 'page'); |
|---|
| | 182 | $tpl->parse('PAGE', 'page'); |
|---|
| | 183 | $tpl->prnt(); |
|---|
| 202 | 184 | |
|---|
| 203 | | $tpl -> prnt(); |
|---|
| | 185 | if ($cfg['DUMP_GUI_DEBUG']) |
|---|
| | 186 | dump_gui_debug(); |
|---|
| 204 | 187 | |
|---|
| 205 | | |
|---|
| 206 | | |
|---|
| 207 | | if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); |
|---|
| 208 | 188 | ?> |
|---|
| r745 |
r1132 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| 19 | | |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | $tpl = new pTemplate(); |
|---|
| 24 | | |
|---|
| 25 | | $tpl -> define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'].'/index.tpl'); |
|---|
| 26 | | |
|---|
| 27 | | $tpl -> define_dynamic('purchase_list', 'page'); |
|---|
| 28 | | |
|---|
| 29 | | $tpl -> define_dynamic('purchase_message', 'page'); |
|---|
| 30 | | |
|---|
| 31 | | $tpl -> define_dynamic('purchase_header', 'page'); |
|---|
| 32 | | |
|---|
| 33 | | $tpl -> define_dynamic('purchase_footer', 'page'); |
|---|
| 34 | | |
|---|
| | 24 | $tpl->define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'] . '/index.tpl'); |
|---|
| | 25 | $tpl->define_dynamic('purchase_list', 'page'); |
|---|
| | 26 | $tpl->define_dynamic('purchase_message', 'page'); |
|---|
| | 27 | $tpl->define_dynamic('purchase_header', 'page'); |
|---|
| | 28 | $tpl->define_dynamic('purchase_footer', 'page'); |
|---|
| 35 | 29 | |
|---|
| 36 | 30 | /* |
|---|
| 37 | 31 | * Functions start |
|---|
| 38 | 32 | */ |
|---|
| 39 | | function gen_packages_list(&$tpl, &$sql, $user_id) |
|---|
| 40 | | { |
|---|
| 41 | | |
|---|
| | 33 | function gen_packages_list(&$tpl, &$sql, $user_id) { |
|---|
| 42 | 34 | global $cfg; |
|---|
| 43 | | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin'){ |
|---|
| 44 | | |
|---|
| | 35 | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin') { |
|---|
| 45 | 36 | $query = <<<SQL_QUERY |
|---|
| 46 | 37 | select |
|---|
| … | … | |
| 60 | 51 | SQL_QUERY; |
|---|
| 61 | 52 | |
|---|
| 62 | | $rs = exec_query($sql, $query, array('admin')); |
|---|
| 63 | | |
|---|
| | 53 | $rs = exec_query($sql, $query, array('admin')); |
|---|
| 64 | 54 | } else { |
|---|
| 65 | | $query = <<<SQL_QUERY |
|---|
| | 55 | $query = <<<SQL_QUERY |
|---|
| 66 | 56 | select |
|---|
| 67 | 57 | * |
|---|
| … | … | |
| 74 | 64 | SQL_QUERY; |
|---|
| 75 | 65 | |
|---|
| 76 | | $rs = exec_query($sql, $query, array($user_id)); |
|---|
| | 66 | $rs = exec_query($sql, $query, array($user_id)); |
|---|
| 77 | 67 | } |
|---|
| 78 | 68 | |
|---|
| 79 | | |
|---|
|