Changeset 952
- Timestamp:
- 12/17/07 21:03:27 (12 months ago)
- Location:
- trunk
- Files:
-
- 7 modified
-
CHANGELOG (modified) (2 diffs)
-
gui/admin/edit_admin.php (modified) (1 diff)
-
gui/admin/edit_reseller.php (modified) (1 diff)
-
gui/include/admin-functions.php (modified) (3 diffs)
-
gui/orderpanel/address.php (modified) (19 diffs)
-
gui/reseller/change_personal.php (modified) (1 diff)
-
gui/themes/omega_original/orderpanel/address.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r951 r952 7 7 \_________________________________________________________________/ 8 8 9 2007-12-17 Jochen Manz 10 - GUI: 11 * Fixed #935: Admin created date is everytime N/A 12 * Fixed #936: The Gender field in Orderpanel is not as it should 13 9 14 2007-12-17 Christian Hernmarck 10 - GUI:11 *Fixed #924: Alias order notification sent to customer15 - GUI: 16 *Fixed #924: Alias order notification sent to customer 12 17 13 18 2007-12-16 Benedikt Heintel 14 19 - GUI: 15 * Added: Gender patch ( Thanks to Jochen Manz)20 * Added: Gender patch (thanks to Jochen Manz) 16 21 - TOOLS: 17 22 * Fixed: Templates of Squirrelmail (new template version) 18 * Added: Squi ttelmail Translations23 * Added: Squirrelmail Translations 19 24 20 25 2007-12-15 Benedikt Heintel 21 26 - TOOLS: 22 * Fixed #714: undefined index in pma-style sheet (thanks to joximu)27 * Fixed #714: undefined index in pma-style sheet (thanks to Christian Hernmarck) 23 28 * Update Squirrelmail to version 1.4.13 (#932) 24 29 … … 290 295 2007-10-15 Malte Geierhos 291 296 - SETUP: 292 * fixed #771 according to joximu297 * fixed #771 according to Christian Hernmarck 293 298 - ENGINE: 294 299 * fixed #773 perl errors in dmn-mngr -
trunk/gui/admin/edit_admin.php
r949 r952 314 314 'EMAIL' => $rs->fields['email'], 315 315 'VL_MALE' => (($rs->fields['gender'] === 'M') ? 'selected' : ''), 316 'VL_FEMALE' => (($rs->fields['gender'] == 'F') ? 'selected' : ''),316 'VL_FEMALE' => (($rs->fields['gender'] === 'F') ? 'selected' : ''), 317 317 'VL_UNKNOWN' => ((($rs->fields['gender'] === 'U') || (empty($rs->fields['gender']))) ? 'selected' : ''), 318 318 'EDIT_ID' => $edit_id -
trunk/gui/admin/edit_reseller.php
r949 r952 770 770 'TR_MALE' => tr('Male'), 771 771 'TR_FEMALE' => tr('Female'), 772 'TR_UNKNOWN' => tr('Unknown'), 772 773 'TR_COMPANY' => tr('Company'), 773 'TR_UNKNOWN' => tr('Unknown'),774 774 'TR_ZIP_POSTAL_CODE' => tr('Zip/Postal code'), 775 775 'TR_CITY' => tr('City'), -
trunk/gui/include/admin-functions.php
r900 r952 376 376 $i = 0; 377 377 378 $admin_created = $rs->fields['domain_created'];379 380 if ($admin_created == 0) {381 $admin_created = tr('N/A');382 } else {383 global $cfg;384 $date_formt = $cfg['DATE_FORMAT'];385 $admin_created = date($date_formt, $admin_created);386 }387 388 378 if ($rs->RecordCount() == 0) { 389 379 $tpl->assign( … … 396 386 } else { 397 387 $tpl->assign( 398 array('TR_ADMIN_USERNAME' => tr('Username'), 388 array( 389 'TR_ADMIN_USERNAME' => tr('Username'), 399 390 'TR_ADMIN_CREATED_ON' => tr('Creation date'), 400 391 'TR_ADMIN_CREATED_BY' => tr('Created by'), … … 413 404 ) 414 405 ); 406 } 407 408 $admin_created = $rs->fields['domain_created']; 409 410 if ($admin_created == 0) { 411 $admin_created = tr('N/A'); 412 } else { 413 global $cfg; 414 $date_formt = $cfg['DATE_FORMAT']; 415 $admin_created = date($date_formt, $admin_created); 415 416 } 416 417 -
trunk/gui/orderpanel/address.php
r747 r952 1 1 <?php 2 2 /** 3 * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version3 * ispCP ω (OMEGA) a Virtual Hosting Control System 4 4 * 5 * @copyright 2001-2006 by moleSoftware GmbH6 * @copyright 2006-2007 by ispCP | http://isp-control.net7 * @link http://isp-control.net8 * @authorispCP Team (2007)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) 9 9 * 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 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 */ 21 19 22 20 require '../include/ispcp-lib.php'; 23 21 24 22 $tpl = new pTemplate(); 25 26 $tpl -> define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'].'/address.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 23 $tpl->define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'] . '/address.tpl'); 24 $tpl->define_dynamic('page_message', 'page'); 25 $tpl->define_dynamic('purchase_header', 'page'); 26 $tpl->define_dynamic('purchase_footer', 'page'); 34 27 35 28 /* … … 37 30 */ 38 31 39 function gen_address(&$tpl, &$sql, $user_id, $plan_id) 40 { 41 if (isset($_POST['fname'])){ 32 function gen_address(&$tpl, &$sql, $user_id, $plan_id) { 33 if (isset($_POST['fname'])) { 42 34 $first_name = $_POST['fname']; 43 } else if (isset($_SESSION['fname'])){35 } else if (isset($_SESSION['fname'])) { 44 36 $first_name = $_SESSION['fname']; 45 37 } else { … … 47 39 } 48 40 49 50 51 if (isset($_POST['lname'])){ 41 if (isset($_POST['lname'])) { 52 42 $last_name = $_POST['lname']; 53 } else if (isset($_SESSION['lname'])){43 } else if (isset($_SESSION['lname'])) { 54 44 $last_name = $_SESSION['lname']; 55 45 } else { … … 57 47 } 58 48 59 if (isset($_POST['email'])) {49 if (isset($_POST['email'])) { 60 50 $email = $_POST['email']; 61 } else if (isset($_SESSION['email'])){51 } else if (isset($_SESSION['email'])) { 62 52 $email = $_SESSION['email']; 63 53 } else { … … 65 55 } 66 56 67 if (isset($_POST['gender'])) {57 if (isset($_POST['gender'])) { 68 58 $gender = $_POST['gender']; 69 } else if (isset($_SESSION['gender'])){59 } else if (isset($_SESSION['gender'])) { 70 60 $gender = $_SESSION['gender']; 71 61 } else { 72 $gender = ''; 73 } 74 75 76 if (isset($_POST['firm'])){ 62 $gender = 'U'; 63 } 64 65 if (isset($_POST['firm'])) { 77 66 $company = $_POST['firm']; 78 } else if (isset($_SESSION['firm'])){67 } else if (isset($_SESSION['firm'])) { 79 68 $company = $_SESSION['firm']; 80 69 } else { … … 82 71 } 83 72 84 85 if (isset($_POST['zip'])){ 73 if (isset($_POST['zip'])) { 86 74 $postal_code = $_POST['zip']; 87 } else if (isset($_SESSION['zip'])){75 } else if (isset($_SESSION['zip'])) { 88 76 $postal_code = $_SESSION['zip']; 89 77 } else { … … 91 79 } 92 80 93 94 if (isset($_POST['city'])){ 81 if (isset($_POST['city'])) { 95 82 $city = $_POST['city']; 96 } else if (isset($_SESSION['city'])){83 } else if (isset($_SESSION['city'])) { 97 84 $city = $_SESSION['city']; 98 85 } else { … … 100 87 } 101 88 102 103 if (isset($_POST['country'])){ 89 if (isset($_POST['country'])) { 104 90 $country = $_POST['country']; 105 } else if (isset($_SESSION['country'])){91 } else if (isset($_SESSION['country'])) { 106 92 $country = $_SESSION['country']; 107 93 } else { … … 109 95 } 110 96 111 112 if (isset($_POST['street1'])){ 97 if (isset($_POST['street1'])) { 113 98 $street1 = $_POST['street1']; 114 } else if (isset($_SESSION['street1'])){99 } else if (isset($_SESSION['street1'])) { 115 100 $street1 = $_SESSION['street1']; 116 101 } else { … … 118 103 } 119 104 120 121 if (isset($_POST['street2'])){ 105 if (isset($_POST['street2'])) { 122 106 $street2 = $_POST['street2']; 123 } else if (isset($_SESSION['street2'])){107 } else if (isset($_SESSION['street2'])) { 124 108 $street2 = $_SESSION['street2']; 125 109 } else { … … 127 111 } 128 112 129 if (isset($_POST['phone'])) {113 if (isset($_POST['phone'])) { 130 114 $phone = $_POST['phone']; 131 } else if (isset($_SESSION['phone'])){115 } else if (isset($_SESSION['phone'])) { 132 116 $phone = $_SESSION['phone']; 133 117 } else { … … 135 119 } 136 120 137 if (isset($_POST['fax'])) {121 if (isset($_POST['fax'])) { 138 122 $fax = $_POST['fax']; 139 } else if (isset($_SESSION['fax'])){123 } else if (isset($_SESSION['fax'])) { 140 124 $fax = $_SESSION['fax']; 141 125 } else { … … 143 127 } 144 128 145 146 147 148 $tpl -> assign( 149 array( 150 'VL_USR_NAME' => $first_name, 151 'VL_LAST_USRNAME' => $last_name, 152 'VL_EMAIL' => $email, 153 'VL_USR_FIRM' => $company, 154 'VL_USR_POSTCODE' => $postal_code, 155 'VL_USRCITY' => $city, 156 'VL_COUNTRY' => $country, 157 'VL_STREET1' => $street1, 158 'VL_STREET2' => $street2, 159 'VL_PHONE' => $phone, 160 'VL_FAX' => $fax, 161 'VL_MALE' => ($gender == 'M')? 'checked' : '', 162 'VL_FEMALE' => ($gender == 'F')? 'checked' : '', 163 ) 164 ); 165 166 167 } 168 169 function check_address_data(&$tpl) 170 { 171 172 if (isset($_GET['edit'])) 173 unset($_GET['edit']); 174 if ( 175 (isset($_POST['fname']) && $_POST['fname'] != '') and 176 (isset($_POST['email']) && $_POST['email'] != '') and 177 chk_email($_POST['email']) and 178 (isset($_POST['lname']) && $_POST['lname'] != '') and 179 (isset($_POST['zip']) && $_POST['zip'] != '') and 180 (isset($_POST['city']) && $_POST['city'] != '') and 181 (isset($_POST['country']) && $_POST['country'] != '') and 182 (isset($_POST['street1']) && $_POST['street1'] != '') and 183 (isset($_POST['phone']) && $_POST['phone'] != '') 184 ) { 185 129 $tpl->assign( 130 array('VL_USR_NAME' => $first_name, 131 'VL_LAST_USRNAME' => $last_name, 132 'VL_EMAIL' => $email, 133 'VL_USR_FIRM' => $company, 134 'VL_USR_POSTCODE' => $postal_code, 135 'VL_USRCITY' => $city, 136 'VL_COUNTRY' => $country, 137 'VL_STREET1' => $street1, 138 'VL_STREET2' => $street2, 139 'VL_PHONE' => $phone, 140 'VL_FAX' => $fax, 141 'VL_MALE' => (($gender === 'M') ? 'checked' : ''), 142 'VL_FEMALE' => (($gender === 'F') ? 'checked' : ''), 143 'VL_UNKNOWN' => (($gender == 'U') ? 'checked' : '') 144 ) 145 ); 146 } 147 148 function check_address_data(&$tpl) { 149 if (isset($_GET['edit'])) 150 unset($_GET['edit']); 151 if ( 152 (isset($_POST['fname']) && $_POST['fname'] != '') and 153 (isset($_POST['email']) && $_POST['email'] != '') and 154 chk_email($_POST['email']) and 155 (isset($_POST['lname']) && $_POST['lname'] != '') and 156 (isset($_POST['zip']) && $_POST['zip'] != '') and 157 (isset($_POST['city']) && $_POST['city'] != '') and 158 (isset($_POST['country']) && $_POST['country'] != '') and 159 (isset($_POST['street1']) && $_POST['street1'] != '') and 160 (isset($_POST['phone']) && $_POST['phone'] != '') 161 ) { 186 162 $_SESSION['fname'] = $_POST['fname']; 187 163 $_SESSION['lname'] = $_POST['lname']; … … 193 169 $_SESSION['phone'] = $_POST['phone']; 194 170 195 if (isset($_POST['firm']) && $_POST['firm'] != '') {171 if (isset($_POST['firm']) && $_POST['firm'] != '') { 196 172 $_SESSION['firm'] = $_POST['firm']; 197 173 } 198 174 199 if (isset($_POST['gender']) && get_gender_by_code($_POST['gender'], true) !== null) {175 if (isset($_POST['gender']) && get_gender_by_code($_POST['gender'], true) !== null) { 200 176 $_SESSION['gender'] = $_POST['gender']; 201 177 } else { … … 203 179 } 204 180 205 if (isset($_POST['street2']) && $_POST['street2'] != '') {181 if (isset($_POST['street2']) && $_POST['street2'] != '') { 206 182 $_SESSION['street2'] = $_POST['street2']; 207 183 } 208 184 209 if (isset($_POST['fax']) && $_POST['fax'] != '') {185 if (isset($_POST['fax']) && $_POST['fax'] != '') { 210 186 $_SESSION['fax'] = $_POST['fax']; 211 187 } … … 213 189 header("Location: chart.php"); 214 190 die(); 215 216 217 191 } else { 218 192 set_page_message(tr('Please fill out all needed fields!')); 219 193 $_GET['edit'] = "yes"; 220 221 } 222 223 194 } 224 195 } 225 196 … … 227 198 * Functions end 228 199 */ 229 230 200 231 201 /* … … 235 205 */ 236 206 237 if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) {207 if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { 238 208 $user_id = $_SESSION['user_id']; 239 209 $plan_id = $_SESSION['plan_id']; … … 247 217 if ( 248 218 (isset($_SESSION['fname']) && $_SESSION['fname'] != '') and 249 (isset($_SESSION['email']) && $_SESSION['email'] != '') and 250 (isset($_SESSION['lname']) && $_SESSION['lname'] != '') and 251 (isset($_SESSION['zip']) && $_SESSION['zip'] != '') and 252 (isset($_SESSION['city']) && $_SESSION['city'] != '') and 253 (isset($_SESSION['country']) && $_SESSION['country'] != '') and 254 (isset($_SESSION['street1']) && $_SESSION['street1'] != '') and 255 (isset($_SESSION['phone']) && $_SESSION['phone'] != '') and 256 !isset($_GET['edit']) 257 ) { 258 header( "Location: chart.php" ); 259 die(); 260 } 261 219 (isset($_SESSION['email']) && $_SESSION['email'] != '') and 220 (isset($_SESSION['lname']) && $_SESSION['lname'] != '') and 221 (isset($_SESSION['zip']) && $_SESSION['zip'] != '') and 222 (isset($_SESSION['city']) && $_SESSION['city'] != '') and 223 (isset($_SESSION['country']) && $_SESSION['country'] != '') and 224 (isset($_SESSION['street1']) && $_SESSION['street1'] != '') and 225 (isset($_SESSION['phone']) && $_SESSION['phone'] != '') and 226 !isset($_GET['edit']) 227 ) { 228 header("Location: chart.php"); 229 die(); 230 } 262 231 263 232 gen_purchase_haf($tpl, $sql, $user_id); 264 233 gen_address($tpl, $sql, $user_id, $plan_id); 265 234 266 267 268 235 gen_page_message($tpl); 269 236 270 $tpl -> assign( 271 array( 272 'TR_ADRESS' => tr('Enter Address'), 273 'TR_FIRSTNAME' => tr('First name'), 274 'TR_LASTNAME' => tr('Last name'), 275 'TR_COMPANY' => tr('Company'), 276 'TR_POST_CODE' => tr('Zip/Postal code'), 277 'TR_CITY' => tr('City'), 278 'TR_COUNTRY' => tr('Country'), 279 'TR_STREET1' => tr('Street 1'), 280 'TR_STREET2' => tr('Street 2'), 281 'TR_EMAIL' => tr('Email'), 282 'TR_PHONE' => tr('Phone'), 283 'TR_GENDER' => tr('Gender'), 284 'TR_MALE' => tr('Male'), 285 'TR_FEMALE' => tr('Female'), 286 'TR_FAX' => tr('Fax'), 287 'TR_CONTINUE' => tr('Continue'), 288 'NEED_FILLED' => tr('* denotes mandatory field.'), 289 'THEME_CHARSET' => tr('encoding'), 290 291 292 ) 293 ); 294 295 $tpl -> parse('PAGE', 'page'); 296 297 $tpl -> prnt(); 298 299 if ($cfg['DUMP_GUI_DEBUG']) dump_gui_debug(); 237 $tpl->assign( 238 array( 239 'TR_ADRESS' => tr('Enter Address'), 240 'TR_FIRSTNAME' => tr('First name'), 241 'TR_LASTNAME' => tr('Last name'), 242 'TR_COMPANY' => tr('Company'), 243 'TR_POST_CODE' => tr('Zip/Postal code'), 244 'TR_CITY' => tr('City'), 245 'TR_COUNTRY' => tr('Country'), 246 'TR_STREET1' => tr('Street 1'), 247 'TR_STREET2' => tr('Street 2'), 248 'TR_EMAIL' => tr('Email'), 249 'TR_PHONE' => tr('Phone'), 250 'TR_GENDER' => tr('Gender'), 251 'TR_MALE' => tr('Male'), 252 'TR_FEMALE' => tr('Female'), 253 'TR_UNKNOWN' => tr('Unknown'), 254 'TR_FAX' => tr('Fax'), 255 'TR_CONTINUE' => tr('Continue'), 256 'NEED_FILLED' => tr('* denotes mandatory field.'), 257 'THEME_CHARSET' => tr('encoding') 258 ) 259 ); 260 261 $tpl->parse('PAGE', 'page'); 262 $tpl->prnt(); 263 264 if ($cfg['DUMP_GUI_DEBUG']) 265 dump_gui_debug(); 300 266 301 267 unset_messages(); 268 302 269 ?> -
trunk/gui/reseller/change_personal.php
r949 r952 82 82 'STREET1' => $rs->fields['street1'], 83 83 'STREET2' => $rs->fields['street2'], 84 'VL_MALE' => (($rs->fields['gender'] == 'M') ? 'selected' : ''),85 'VL_FEMALE' => (($rs->fields['gender'] == 'F') ? 'selected' : ''),86 'VL_UNKNOWN' => ((($rs->fields['gender'] == 'U') || (empty($rs->fields['gender']))) ? 'selected' : '')84 'VL_MALE' => (($rs->fields['gender'] === 'M') ? 'selected' : ''), 85 'VL_FEMALE' => (($rs->fields['gender'] === 'F') ? 'selected' : ''), 86 'VL_UNKNOWN' => ((($rs->fields['gender'] === 'U') || (empty($rs->fields['gender']))) ? 'selected' : '') 87 87 ) 88 88 ); -
trunk/gui/themes/omega_original/orderpanel/address.tpl
r747 r952 45 45 <tr> 46 46 <td class="content2">{TR_GENDER}</td> 47 <td class="content"><input type="radio" name="gender" value="M" {VL_MALE} id="mgender"/><label for="mgender">{TR_MALE}</label> <input type="radio" name="gender" value="F" {VL_FEMALE} id="fgender"/><label for="fgender">{TR_FEMALE}</label></td> 47 <td class="content"> 48 <select name="gender" size="1"> 49 <option value="M" {VL_MALE}>{TR_MALE}</option> 50 <option value="F" {VL_FEMALE}>{TR_FEMALE}</option> 51 <option value="U" {VL_UNKNOWN}>{TR_UNKNOWN}</option> 52 </select> 53 </td> 48 54 </tr> 49 55 <tr>
