Changeset 952

Show
Ignore:
Timestamp:
12/17/07 21:03:27 (12 months ago)
Author:
rats
Message:

* Fixed #935: Admin created date is everytime N/A

  • Fixed #936: The Gender field in Orderpanel is not as it should
Location:
trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r951 r952  
    77\_________________________________________________________________/ 
    88 
     92007-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 
    9142007-12-17 Christian Hernmarck 
    10         - GUI: 
    11                 * Fixed #924: Alias order notification sent to customer 
     15        - GUI: 
     16                *Fixed #924: Alias order notification sent to customer 
    1217 
    13182007-12-16 Benedikt Heintel 
    1419        - GUI: 
    15                 * Added: Gender patch (Thanks to Jochen Manz) 
     20                * Added: Gender patch (thanks to Jochen Manz) 
    1621        - TOOLS: 
    1722                * Fixed: Templates of Squirrelmail (new template version) 
    18                 * Added: Squittelmail Translations 
     23                * Added: Squirrelmail Translations 
    1924 
    20252007-12-15 Benedikt Heintel 
    2126        - 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) 
    2328                * Update Squirrelmail to version 1.4.13 (#932) 
    2429 
     
    2902952007-10-15 Malte Geierhos 
    291296        - SETUP: 
    292                 * fixed #771 according to joximu 
     297                * fixed #771 according to Christian Hernmarck 
    293298        - ENGINE: 
    294299                * fixed #773 perl errors in dmn-mngr 
  • trunk/gui/admin/edit_admin.php

    r949 r952  
    314314                        'EMAIL' => $rs->fields['email'], 
    315315                        'VL_MALE' => (($rs->fields['gender'] === 'M') ? 'selected' : ''), 
    316                         'VL_FEMALE' => (($rs->fields['gender'] == 'F') ? 'selected' : ''), 
     316                        'VL_FEMALE' => (($rs->fields['gender'] === 'F') ? 'selected' : ''), 
    317317                        'VL_UNKNOWN' => ((($rs->fields['gender'] === 'U') || (empty($rs->fields['gender']))) ? 'selected' : ''), 
    318318                        'EDIT_ID' => $edit_id 
  • trunk/gui/admin/edit_reseller.php

    r949 r952  
    770770                'TR_MALE' => tr('Male'), 
    771771                'TR_FEMALE' => tr('Female'), 
     772                'TR_UNKNOWN' => tr('Unknown'), 
    772773                'TR_COMPANY' => tr('Company'), 
    773                 'TR_UNKNOWN' => tr('Unknown'), 
    774774                'TR_ZIP_POSTAL_CODE' => tr('Zip/Postal code'), 
    775775                'TR_CITY' => tr('City'), 
  • trunk/gui/include/admin-functions.php

    r900 r952  
    376376        $i = 0; 
    377377 
    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  
    388378        if ($rs->RecordCount() == 0) { 
    389379                $tpl->assign( 
     
    396386        } else { 
    397387                $tpl->assign( 
    398                         array('TR_ADMIN_USERNAME' => tr('Username'), 
     388                        array( 
     389                                'TR_ADMIN_USERNAME' => tr('Username'), 
    399390                                'TR_ADMIN_CREATED_ON' => tr('Creation date'), 
    400391                                'TR_ADMIN_CREATED_BY' => tr('Created by'), 
     
    413404                                                ) 
    414405                                        ); 
     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); 
    415416                        } 
    416417 
  • trunk/gui/orderpanel/address.php

    r747 r952  
    11<?php 
    22/** 
    3  *  ispCP (OMEGA) - Virtual Hosting Control System | Omega Version 
     3 * ispCP ω (OMEGA) a Virtual Hosting Control System 
    44 * 
    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-2007 by ispCP | http://isp-control.net 
     7 * @link                http://isp-control.net 
     8 * @author              ispCP Team (2007) 
    99 * 
    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 */ 
    2119 
    2220require '../include/ispcp-lib.php'; 
    2321 
    2422$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'); 
    3427 
    3528/* 
     
    3730*/ 
    3831 
    39 function gen_address(&$tpl, &$sql, $user_id, $plan_id) 
    40 { 
    41         if (isset($_POST['fname'])){ 
     32function gen_address(&$tpl, &$sql, $user_id, $plan_id) { 
     33        if (isset($_POST['fname'])) { 
    4234                $first_name = $_POST['fname']; 
    43         } else if(isset($_SESSION['fname'])){ 
     35        } else if (isset($_SESSION['fname'])) { 
    4436                $first_name = $_SESSION['fname']; 
    4537        } else { 
     
    4739        } 
    4840 
    49  
    50  
    51         if (isset($_POST['lname'])){ 
     41        if (isset($_POST['lname'])) { 
    5242                $last_name = $_POST['lname']; 
    53         } else if(isset($_SESSION['lname'])){ 
     43        } else if (isset($_SESSION['lname'])) { 
    5444                $last_name = $_SESSION['lname']; 
    5545        } else { 
     
    5747        } 
    5848 
    59         if (isset($_POST['email'])){ 
     49        if (isset($_POST['email'])) { 
    6050                $email = $_POST['email']; 
    61         } else if(isset($_SESSION['email'])){ 
     51        } else if (isset($_SESSION['email'])) { 
    6252                $email = $_SESSION['email']; 
    6353        } else { 
     
    6555        } 
    6656 
    67         if (isset($_POST['gender'])){ 
     57        if (isset($_POST['gender'])) { 
    6858                $gender = $_POST['gender']; 
    69         } else if(isset($_SESSION['gender'])){ 
     59        } else if (isset($_SESSION['gender'])) { 
    7060                $gender = $_SESSION['gender']; 
    7161        } else { 
    72                 $gender = ''; 
    73         } 
    74  
    75  
    76         if (isset($_POST['firm'])){ 
     62                $gender = 'U'; 
     63        } 
     64 
     65        if (isset($_POST['firm'])) { 
    7766                $company = $_POST['firm']; 
    78         } else if(isset($_SESSION['firm'])){ 
     67        } else if (isset($_SESSION['firm'])) { 
    7968                $company = $_SESSION['firm']; 
    8069        } else { 
     
    8271        } 
    8372 
    84  
    85         if (isset($_POST['zip'])){ 
     73        if (isset($_POST['zip'])) { 
    8674                $postal_code = $_POST['zip']; 
    87         } else if(isset($_SESSION['zip'])){ 
     75        } else if (isset($_SESSION['zip'])) { 
    8876                $postal_code = $_SESSION['zip']; 
    8977        } else { 
     
    9179        } 
    9280 
    93  
    94         if (isset($_POST['city'])){ 
     81        if (isset($_POST['city'])) { 
    9582                $city = $_POST['city']; 
    96         } else if(isset($_SESSION['city'])){ 
     83        } else if (isset($_SESSION['city'])) { 
    9784                $city = $_SESSION['city']; 
    9885        } else { 
     
    10087        } 
    10188 
    102  
    103         if (isset($_POST['country'])){ 
     89        if (isset($_POST['country'])) { 
    10490                $country = $_POST['country']; 
    105         } else if(isset($_SESSION['country'])){ 
     91        } else if (isset($_SESSION['country'])) { 
    10692                $country = $_SESSION['country']; 
    10793        } else { 
     
    10995        } 
    11096 
    111  
    112         if (isset($_POST['street1'])){ 
     97        if (isset($_POST['street1'])) { 
    11398                $street1 = $_POST['street1']; 
    114         } else if(isset($_SESSION['street1'])){ 
     99        } else if (isset($_SESSION['street1'])) { 
    115100                $street1 = $_SESSION['street1']; 
    116101        } else { 
     
    118103        } 
    119104 
    120  
    121         if (isset($_POST['street2'])){ 
     105        if (isset($_POST['street2'])) { 
    122106                $street2 = $_POST['street2']; 
    123         } else if(isset($_SESSION['street2'])){ 
     107        } else if (isset($_SESSION['street2'])) { 
    124108                $street2 = $_SESSION['street2']; 
    125109        } else { 
     
    127111        } 
    128112 
    129         if (isset($_POST['phone'])){ 
     113        if (isset($_POST['phone'])) { 
    130114                $phone = $_POST['phone']; 
    131         } else if(isset($_SESSION['phone'])){ 
     115        } else if (isset($_SESSION['phone'])) { 
    132116                $phone = $_SESSION['phone']; 
    133117        } else { 
     
    135119        } 
    136120 
    137         if (isset($_POST['fax'])){ 
     121        if (isset($_POST['fax'])) { 
    138122                $fax = $_POST['fax']; 
    139         } else if(isset($_SESSION['fax'])){ 
     123        } else if (isset($_SESSION['fax'])) { 
    140124                $fax = $_SESSION['fax']; 
    141125        } else { 
     
    143127        } 
    144128 
    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 
     148function 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                        ) { 
    186162                $_SESSION['fname'] = $_POST['fname']; 
    187163                $_SESSION['lname'] = $_POST['lname']; 
     
    193169                $_SESSION['phone'] = $_POST['phone']; 
    194170 
    195                 if (isset($_POST['firm'])  && $_POST['firm'] != '') { 
     171                if (isset($_POST['firm']) && $_POST['firm'] != '') { 
    196172                        $_SESSION['firm'] = $_POST['firm']; 
    197173                } 
    198174 
    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) { 
    200176                        $_SESSION['gender'] = $_POST['gender']; 
    201177                } else { 
     
    203179                } 
    204180 
    205                 if (isset($_POST['street2'])  && $_POST['street2'] != '') { 
     181                if (isset($_POST['street2']) && $_POST['street2'] != '') { 
    206182                        $_SESSION['street2'] = $_POST['street2']; 
    207183                } 
    208184 
    209                 if (isset($_POST['fax'])  && $_POST['fax'] != '') { 
     185                if (isset($_POST['fax']) && $_POST['fax'] != '') { 
    210186                        $_SESSION['fax'] = $_POST['fax']; 
    211187                } 
     
    213189                header("Location: chart.php"); 
    214190                die(); 
    215  
    216  
    217191        } else { 
    218192                set_page_message(tr('Please fill out all needed fields!')); 
    219193                $_GET['edit'] = "yes"; 
    220  
    221         } 
    222  
    223  
     194        } 
    224195} 
    225196 
     
    227198* Functions end 
    228199*/ 
    229  
    230200 
    231201/* 
     
    235205*/ 
    236206 
    237 if (isset($_SESSION['user_id']) && $_SESSION['plan_id']){ 
     207if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { 
    238208        $user_id = $_SESSION['user_id']; 
    239209        $plan_id = $_SESSION['plan_id']; 
     
    247217if ( 
    248218        (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} 
    262231 
    263232gen_purchase_haf($tpl, $sql, $user_id); 
    264233gen_address($tpl, $sql, $user_id, $plan_id); 
    265234 
    266  
    267  
    268235gen_page_message($tpl); 
    269236 
    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 
     264if ($cfg['DUMP_GUI_DEBUG']) 
     265        dump_gui_debug(); 
    300266 
    301267unset_messages(); 
     268 
    302269?> 
  • trunk/gui/reseller/change_personal.php

    r949 r952  
    8282                                'STREET1' => $rs->fields['street1'], 
    8383                                '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' : '') 
    8787                                ) 
    8888                        ); 
  • trunk/gui/themes/omega_original/orderpanel/address.tpl

    r747 r952  
    4545                <tr> 
    4646                  <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>&nbsp;&nbsp;<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> 
    4854                </tr> 
    4955                <tr>