Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

184
 
185
 
185
 
customer.php
_> 11 <?php
  22 /*
<> 3 -  $Id: customer.php 184 2005-09-07 14:48:20Z hpdl $
   3+  $Id: customer.php 185 2005-09-13 20:30:24Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2004 osCommerce
   8+  Copyright (c) 2005 osCommerce
99 
  1010   Released under the GNU General Public License
  1111 */
  1212 
  1313   class osC_Customer {
<> 14 -    var $is_logged_on,
  15 -        $id,
  16 -        $gender,
  17 -        $first_name,
  18 -        $last_name,
  19 -        $full_name,
  20 -        $email_address,
  21 -        $default_address_id,
  22 -        $country_id,
  23 -        $zone_id;
2414 
  2515 /* Private variables */
  2616 
     
 !
156146           $this->setGender($Qcustomer->value('customers_gender'));
  157147           $this->setFirstName($Qcustomer->value('customers_firstname'));
  158148           $this->setLastName($Qcustomer->value('customers_lastname'));
<> 159 -          $this->setFullName();
160149           $this->setEmailAddress($Qcustomer->value('customers_email_address'));
  161150 
  162151           if (is_numeric($Qcustomer->value('customers_default_address_id')) && ($Qcustomer->value('customers_default_address_id') > 0)) {
     
 !
196185       return false;
  197186     }
  198187 
<> 199 -    function isGuest() {
  200 -      return !$this->isLoggedOn();
  201 -    }
  202 -
203188     function setID($id) {
<> 204 -      $this->id = $id;
  205 -
206189       if (is_numeric($id) && ($id > 0)) {
  207190         $this->_data['id'] = $id;
  208191       } else {
     
 !
211194     }
  212195 
  213196     function setDefaultAddressID($id) {
<> 214 -      $this->default_address_id = $id;
  215 -
216197       if (is_numeric($id) && ($id > 0)) {
  217198         $this->_data['default_address_id'] = $id;
  218199       } else {
     
 !
229210     }
  230211 
  231212     function setGender($gender) {
<> 232 -      $this->gender = $gender;
  233 -
234213       if ( (strtolower($gender) == 'm') || (strtolower($gender) == 'f') ) {
  235214         $this->_data['gender'] = strtolower($gender);
  236215       } else {
     
 !
239218     }
  240219 
  241220     function setFirstName($first_name) {
<> 242 -      $this->first_name = $first_name;
  243 -
244221       $this->_data['first_name'] = $first_name;
  245222     }
  246223 
  247224     function setLastName($last_name) {
<> 248 -      $this->last_name = $last_name;
  249 -
250225       $this->_data['last_name'] = $last_name;
  251226     }
  252227 
<> 253 -    function setFullName($fullname = '') {
  254 -      if (empty($fullname)) {
  255 -        $this->full_name = $this->first_name . ' ' . $this->last_name;
  256 -      } else {
  257 -        $this->full_name = $fullname;
  258 -      }
  259 -    }
  260 -
261228     function setEmailAddress($email_address) {
<> 262 -      $this->email_address = $email_address;
  263 -
264229       $this->_data['email_address'] = $email_address;
  265230     }
  266231 
  267232     function setCountryID($id) {
<> 268 -      $this->country_id = $id;
  269 -
270233       $this->_data['country_id'] = $id;
  271234     }
  272235 
  273236     function setZoneID($id) {
<> 274 -      $this->zone_id = $id;
  275 -
<_ 276237       $this->_data['zone_id'] = $id;
  277238     }
  278239   }