[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> customers.php (source)

   1  <?php
   2  /*
   3  $Id: customers.php 3 2006-05-27 04:59:07Z user $
   4  
   5    osCMax Power E-Commerce
   6    http://oscdox.com
   7  
   8    Copyright 2006 osCMax
   9  
  10    Released under the GNU General Public License
  11  */
  12  
  13    require ('includes/application_top.php');
  14  
  15    $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
  16  
  17    $error = false;
  18    $processed = false;
  19  
  20    if (tep_not_null($action)) {
  21      switch ($action) {
  22        case 'update':
  23          $customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']);
  24          $customers_firstname = tep_db_prepare_input($HTTP_POST_VARS['customers_firstname']);
  25          $customers_lastname = tep_db_prepare_input($HTTP_POST_VARS['customers_lastname']);
  26          $customers_email_address = tep_db_prepare_input($HTTP_POST_VARS['customers_email_address']);
  27          $customers_telephone = tep_db_prepare_input($HTTP_POST_VARS['customers_telephone']);
  28          $customers_fax = tep_db_prepare_input($HTTP_POST_VARS['customers_fax']);
  29          $customers_newsletter = tep_db_prepare_input($HTTP_POST_VARS['customers_newsletter']);
  30  // BOF: MOD - Separate Pricing per Customer
  31          $customers_group_id = tep_db_prepare_input($HTTP_POST_VARS['customers_group_id']);
  32          $customers_group_ra = tep_db_prepare_input($HTTP_POST_VARS['customers_group_ra']);
  33          $entry_company_tax_id = tep_db_prepare_input($HTTP_POST_VARS['entry_company_tax_id']);
  34          if ($HTTP_POST_VARS['customers_payment_allowed'] && $HTTP_POST_VARS['customers_payment_settings'] == '1') {
  35            $customers_payment_allowed = tep_db_prepare_input($HTTP_POST_VARS['customers_payment_allowed']);
  36          } else { // no error with subsequent re-posting of variables  
  37            $customers_payment_allowed = '';
  38            if ($HTTP_POST_VARS['payment_allowed'] && $HTTP_POST_VARS['customers_payment_settings'] == '1') {
  39              while(list($key, $val) = each($HTTP_POST_VARS['payment_allowed'])) {
  40                if ($val == true) { 
  41                  $customers_payment_allowed .= tep_db_prepare_input($val).';'; 
  42                }
  43              } // end while
  44              $customers_payment_allowed = substr($customers_payment_allowed,0,strlen($customers_payment_allowed)-1);
  45            } // end if ($HTTP_POST_VARS['payment_allowed'])
  46          } // end else ($HTTP_POST_VARS['customers_payment_allowed']
  47          if ($HTTP_POST_VARS['customers_shipment_allowed'] && $HTTP_POST_VARS['customers_shipment_settings'] == '1') {
  48            $customers_shipment_allowed = tep_db_prepare_input($HTTP_POST_VARS['customers_shipment_allowed']);
  49          } else { // no error with subsequent re-posting of variables  
  50  
  51            $customers_shipment_allowed = '';
  52            if ($HTTP_POST_VARS['shipping_allowed'] && $HTTP_POST_VARS['customers_shipment_settings'] == '1') {
  53              while(list($key, $val) = each($HTTP_POST_VARS['shipping_allowed'])) {
  54                if ($val == true) { 
  55                  $customers_shipment_allowed .= tep_db_prepare_input($val).';'; 
  56                }
  57              } // end while
  58              $customers_shipment_allowed = substr($customers_shipment_allowed,0,strlen($customers_shipment_allowed)-1);
  59            } // end if ($HTTP_POST_VARS['shipment_allowed'])
  60          } // end else ($HTTP_POST_VARS['customers_shipment_allowed']
  61  // EOF: MOD - Separate Pricing per Customer
  62          $customers_gender = tep_db_prepare_input($HTTP_POST_VARS['customers_gender']);
  63          $customers_dob = tep_db_prepare_input($HTTP_POST_VARS['customers_dob']);
  64  
  65          $default_address_id = tep_db_prepare_input($HTTP_POST_VARS['default_address_id']);
  66          $entry_street_address = tep_db_prepare_input($HTTP_POST_VARS['entry_street_address']);
  67          $entry_suburb = tep_db_prepare_input($HTTP_POST_VARS['entry_suburb']);
  68          $entry_postcode = tep_db_prepare_input($HTTP_POST_VARS['entry_postcode']);
  69          $entry_city = tep_db_prepare_input($HTTP_POST_VARS['entry_city']);
  70          $entry_country_id = tep_db_prepare_input($HTTP_POST_VARS['entry_country_id']);
  71  
  72          $entry_company = tep_db_prepare_input($HTTP_POST_VARS['entry_company']);
  73          $entry_state = tep_db_prepare_input($HTTP_POST_VARS['entry_state']);
  74          if (isset($HTTP_POST_VARS['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($HTTP_POST_VARS['entry_zone_id']);
  75  
  76          if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
  77            $error = true;
  78            $entry_firstname_error = true;
  79          } else {
  80            $entry_firstname_error = false;
  81          }
  82  
  83          if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  84            $error = true;
  85            $entry_lastname_error = true;
  86          } else {
  87            $entry_lastname_error = false;
  88          }
  89  
  90          if (ACCOUNT_DOB == 'true') {
  91            if (checkdate(substr(tep_date_raw($customers_dob), 4, 2), substr(tep_date_raw($customers_dob), 6, 2), substr(tep_date_raw($customers_dob), 0, 4))) {
  92              $entry_date_of_birth_error = false;
  93            } else {
  94              $error = true;
  95              $entry_date_of_birth_error = true;
  96            }
  97          }
  98  
  99          if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
 100            $error = true;
 101            $entry_email_address_error = true;
 102          } else {
 103            $entry_email_address_error = false;
 104          }
 105  
 106          if (!tep_validate_email($customers_email_address)) {
 107            $error = true;
 108            $entry_email_address_check_error = true;
 109          } else {
 110            $entry_email_address_check_error = false;
 111          }
 112  
 113          if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
 114            $error = true;
 115            $entry_street_address_error = true;
 116          } else {
 117            $entry_street_address_error = false;
 118          }
 119  
 120          if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
 121            $error = true;
 122            $entry_post_code_error = true;
 123          } else {
 124            $entry_post_code_error = false;
 125          }
 126  
 127          if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH) {
 128            $error = true;
 129            $entry_city_error = true;
 130          } else {
 131            $entry_city_error = false;
 132          }
 133  
 134          if ($entry_country_id == false) {
 135            $error = true;
 136            $entry_country_error = true;
 137          } else {
 138            $entry_country_error = false;
 139          }
 140  
 141          if (ACCOUNT_STATE == 'true') {
 142            if ($entry_country_error == true) {
 143              $entry_state_error = true;
 144            } else {
 145              $zone_id = 0;
 146              $entry_state_error = false;
 147              $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'");
 148              $check_value = tep_db_fetch_array($check_query);
 149              $entry_state_has_zones = ($check_value['total'] > 0);
 150              if ($entry_state_has_zones == true) {
 151                $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'");
 152                if (tep_db_num_rows($zone_query) == 1) {
 153                  $zone_values = tep_db_fetch_array($zone_query);
 154                  $entry_zone_id = $zone_values['zone_id'];
 155                } else {
 156                  $error = true;
 157                  $entry_state_error = true;
 158                }
 159              } else {
 160                if (strlen($entry_state) < ENTRY_STATE_MIN_LENGTH) {
 161                  $error = true;
 162                  $entry_state_error = true;
 163                }
 164              }
 165           }
 166        }
 167  
 168        if (strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
 169          $error = true;
 170          $entry_telephone_error = true;
 171        } else {
 172          $entry_telephone_error = false;
 173        }
 174  
 175        $check_email = tep_db_query("select customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($customers_email_address) . "' and customers_id != '" . (int)$customers_id . "'");
 176        if (tep_db_num_rows($check_email)) {
 177          $error = true;
 178          $entry_email_address_exists = true;
 179        } else {
 180          $entry_email_address_exists = false;
 181        }
 182  
 183        if ($error == false) {
 184  
 185          $sql_data_array = array('customers_firstname' => $customers_firstname,
 186                                  'customers_lastname' => $customers_lastname,
 187                                  'customers_email_address' => $customers_email_address,
 188                                  'customers_telephone' => $customers_telephone,
 189                                  'customers_fax' => $customers_fax,
 190                                  'customers_newsletter' => $customers_newsletter,
 191  // BOF: MOD - Separate Pricing per Customer
 192                                  'customers_group_id' => $customers_group_id,
 193                                  'customers_group_ra' => $customers_group_ra,
 194                                  'customers_payment_allowed' => $customers_payment_allowed,
 195                                  'customers_shipment_allowed' => $customers_shipment_allowed);
 196  // EOF: MOD - Separate Pricing per Customer
 197  
 198          if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $customers_gender;
 199          if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($customers_dob);
 200  
 201          tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "'");
 202  
 203          tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int)$customers_id . "'");
 204  
 205          if ($entry_zone_id > 0) $entry_state = '';
 206  
 207          $sql_data_array = array('entry_firstname' => $customers_firstname,
 208                                  'entry_lastname' => $customers_lastname,
 209                                  'entry_street_address' => $entry_street_address,
 210                                  'entry_postcode' => $entry_postcode,
 211                                  'entry_city' => $entry_city,
 212                                  'entry_country_id' => $entry_country_id);
 213  // BOF: MOD - Separate Pricing per Customer
 214  //      if  (ACCOUNT_COMPANY  ==  'true')  $sql_data_array['entry_company']  =  $entry_company;
 215          if (ACCOUNT_COMPANY == 'true') {
 216          $sql_data_array['entry_company'] = $entry_company;
 217           $sql_data_array['entry_company_tax_id'] = $entry_company_tax_id;
 218          } 
 219  // EOF: MOD - Separate Pricing per Customer
 220          if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $entry_suburb;
 221  
 222          if (ACCOUNT_STATE == 'true') {
 223            if ($entry_zone_id > 0) {
 224              $sql_data_array['entry_zone_id'] = $entry_zone_id;
 225              $sql_data_array['entry_state'] = '';
 226            } else {
 227              $sql_data_array['entry_zone_id'] = '0';
 228              $sql_data_array['entry_state'] = $entry_state;
 229            }
 230          }
 231  
 232          tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$default_address_id . "'");
 233  
 234          tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $customers_id));
 235  
 236          } else if ($error == true) {
 237            $cInfo = new objectInfo($HTTP_POST_VARS);
 238            $processed = true;
 239          }
 240  
 241          break;
 242        case 'deleteconfirm':
 243          $customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']);
 244  
 245          if (isset($HTTP_POST_VARS['delete_reviews']) && ($HTTP_POST_VARS['delete_reviews'] == 'on')) {
 246            $reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'");
 247            while ($reviews = tep_db_fetch_array($reviews_query)) {
 248              tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$reviews['reviews_id'] . "'");
 249            }
 250  
 251            tep_db_query("delete from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'");
 252          } else {
 253            tep_db_query("update " . TABLE_REVIEWS . " set customers_id = null where customers_id = '" . (int)$customers_id . "'");
 254          }
 255  // BOF: MOD - Separate Pricing per Customer
 256  // Once all customers with a specific customers_group_id have been deleted from
 257  // the table customers, the next time a customer is deleted, all entries in the table products_groups
 258  // that have the (now apparently obsolete) customers_group_id will be deleted!
 259  // If you don't want that, leave this section out, or comment it out
 260  // Note that when customers groups are deleted from the table customers_groups, all the
 261  // customers with that specific customer_group_id will be changed to customer_group_id = '0' (default/Retail)
 262          $multiple_groups_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS_GROUPS . " ");
 263          while ($group_ids = tep_db_fetch_array($multiple_groups_query)) {
 264            $multiple_customers_query = tep_db_query("select distinct customers_group_id from " . TABLE_CUSTOMERS . " where customers_group_id = " . $group_ids['customers_group_id'] . " ");
 265            if (!($multiple_groups = tep_db_fetch_array($multiple_customers_query))) {
 266              tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '" . $group_ids['customers_group_id'] . "'");
 267            }
 268          }
 269  // EOF: MOD - Separate Pricing per Customer
 270  
 271          tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "'");
 272          tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'");
 273          tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customers_id . "'");
 274          tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customers_id . "'");
 275          tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customers_id . "'");
 276          tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$customers_id . "'");
 277  
 278          tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action'))));
 279          break;
 280        default:
 281  // BOF: MOD - Separate Pricing per Customer
 282  //  old    $customers_query  =  tep_db_query("select  c.customers_id,  c.customers_gender,  c.customers_firstname,  c.customers_lastname,  c.customers_dob,  c.customers_email_address,  a.entry_company,  a.entry_street_address,  a.entry_suburb,  a.entry_postcode,  a.entry_city,  a.entry_state,  a.entry_zone_id,  a.entry_country_id,  c.customers_telephone,  c.customers_fax,  c.customers_newsletter,  c.customers_default_address_id  from  "  .  TABLE_CUSTOMERS  .  "  c  left  join  "  .  TABLE_ADDRESS_BOOK  .  "  a  on  c.customers_default_address_id  =  a.address_book_id  where  a.customers_id  =  c.customers_id  and  c.customers_id  =  '"  .  (int)$HTTP_GET_VARS['cID']  .  "'");
 283          $customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_company_tax_id, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_group_id,  c.customers_group_ra, c.customers_payment_allowed, c.customers_shipment_allowed, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
 284    
 285          $module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
 286          $ship_module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
 287  
 288          $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
 289          $directory_array = array();
 290          if ($dir = @dir($module_directory)) {
 291          while ($file = $dir->read()) {
 292          if (!is_dir($module_directory . $file)) {
 293             if (substr($file, strrpos($file, '.')) == $file_extension) {
 294                $directory_array[] = $file; // array of all the payment modules present in includes/modules/payment
 295                    }
 296                 }
 297              }
 298          sort($directory_array);
 299          $dir->close();
 300          }
 301  
 302          $ship_directory_array = array();
 303          if ($dir = @dir($ship_module_directory)) {
 304          while ($file = $dir->read()) {
 305          if (!is_dir($ship_module_directory . $file)) {
 306             if (substr($file, strrpos($file, '.')) == $file_extension) {
 307                $ship_directory_array[] = $file; // array of all shipping modules present in includes/modules/shipping
 308                  }
 309                }
 310              }
 311              sort($ship_directory_array);
 312              $dir->close();
 313          }
 314          $existing_customers_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id ");
 315  // EOF: MOD - Separate Pricing per Customer
 316          $customers = tep_db_fetch_array($customers_query);
 317          $cInfo = new objectInfo($customers);
 318  // BOF: MOD - Separate Pricing per Customer
 319  //      $shipment_allowed = explode (";",$cInfo->customers_shipment_allowed);
 320  // EOF: MOD - Separate Pricing per Customer
 321      }
 322    }
 323  ?>
 324  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
 325  <html <?php echo HTML_PARAMS; ?>>
 326  <head>
 327  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
 328  <title><?php echo TITLE; ?></title>
 329  <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
 330  <script language="javascript" src="includes/general.js"></script>
 331  <?php
 332    if ($action == 'edit' || $action == 'update') {
 333  ?>
 334  <script language="javascript"><!--
 335  
 336  function check_form() {
 337    var error = 0;
 338    var error_message = "<?php echo JS_ERROR; ?>";
 339  
 340    var customers_firstname = document.customers.customers_firstname.value;
 341    var customers_lastname = document.customers.customers_lastname.value;
 342  <?php if (ACCOUNT_COMPANY == 'true') echo 'var entry_company = document.customers.entry_company.value;' . "\n"; ?>
 343  <?php if (ACCOUNT_DOB == 'true') echo 'var customers_dob = document.customers.customers_dob.value;' . "\n"; ?>
 344    var customers_email_address = document.customers.customers_email_address.value;
 345    var entry_street_address = document.customers.entry_street_address.value;
 346    var entry_postcode = document.customers.entry_postcode.value;
 347    var entry_city = document.customers.entry_city.value;
 348    var customers_telephone = document.customers.customers_telephone.value;
 349  
 350  <?php if (ACCOUNT_GENDER == 'true') { ?>
 351    if (document.customers.customers_gender[0].checked || document.customers.customers_gender[1].checked) {
 352    } else {
 353      error_message = error_message + "<?php echo JS_GENDER; ?>";
 354      error = 1;
 355    }
 356  <?php } ?>
 357  
 358    if (customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) {
 359      error_message = error_message + "<?php echo JS_FIRST_NAME; ?>";
 360      error = 1;
 361    }
 362  
 363    if (customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) {
 364      error_message = error_message + "<?php echo JS_LAST_NAME; ?>";
 365      error = 1;
 366    }
 367  
 368  <?php if (ACCOUNT_DOB == 'true') { ?>
 369    if (customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) {
 370      error_message = error_message + "<?php echo JS_DOB; ?>";
 371      error = 1;
 372    }
 373  <?php } ?>
 374  
 375    if (customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) {
 376      error_message = error_message + "<?php echo JS_EMAIL_ADDRESS; ?>";
 377      error = 1;
 378    }
 379  
 380    if (entry_street_address.length < <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>) {
 381      error_message = error_message + "<?php echo JS_ADDRESS; ?>";
 382      error = 1;
 383    }
 384  
 385    if (entry_postcode.length < <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>) {
 386      error_message = error_message + "<?php echo JS_POST_CODE; ?>";
 387      error = 1;
 388    }
 389  
 390    if (entry_city.length < <?php echo ENTRY_CITY_MIN_LENGTH; ?>) {
 391      error_message = error_message + "<?php echo JS_CITY; ?>";
 392      error = 1;
 393    }
 394  
 395  <?php
 396    if (ACCOUNT_STATE == 'true') {
 397  ?>
 398    if (document.customers.elements['entry_state'].type != "hidden") {
 399      if (document.customers.entry_state.value.length < <?php echo ENTRY_STATE_MIN_LENGTH; ?>) {
 400         error_message = error_message + "<?php echo JS_STATE; ?>";
 401         error = 1;
 402      }
 403    }
 404  <?php
 405    }
 406  ?>
 407  
 408    if (document.customers.elements['entry_country_id'].type != "hidden") {
 409      if (document.customers.entry_country_id.value == 0) {
 410        error_message = error_message + "<?php echo JS_COUNTRY; ?>";
 411        error = 1;
 412      }
 413    }
 414  
 415    if (customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) {
 416      error_message = error_message + "<?php echo JS_TELEPHONE; ?>";
 417      error = 1;
 418    }
 419  
 420    if (error == 1) {
 421      alert(error_message);
 422      return false;
 423    } else {
 424      return true;
 425    }
 426  }
 427  //--></script>
 428  <?php
 429    }
 430  ?>
 431  </head>
 432  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
 433  <!-- header //-->
 434  <?php require (DIR_WS_INCLUDES . 'header.php'); ?>
 435  <!-- header_eof //-->
 436  
 437  <!-- body //-->
 438  <table border="0" width="100%" cellspacing="2" cellpadding="2">
 439    <tr>
 440      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
 441  <!-- left_navigation //-->
 442  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
 443  <!-- left_navigation_eof //-->
 444      </table></td>
 445  <!-- body_text //-->
 446      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 447  <?php
 448    if ($action == 'edit' || $action == 'update') {
 449      $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES),
 450                                array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO));
 451  ?>
 452        <tr>
 453          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 454            <tr>
 455              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
 456              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
 457            </tr>
 458          </table></td>
 459        </tr>
 460        <tr>
 461          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 462        </tr>
 463        <tr><?php echo tep_draw_form('customers', FILENAME_CUSTOMERS, tep_get_all_get_params(array('action')) . 'action=update', 'post', 'onSubmit="return check_form();"') . tep_draw_hidden_field('default_address_id', $cInfo->customers_default_address_id); ?>
 464          <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td>
 465        </tr>
 466        <tr>
 467          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 468  <?php
 469      if (ACCOUNT_GENDER == 'true') {
 470  ?>
 471            <tr>
 472              <td class="main"><?php echo ENTRY_GENDER; ?></td>
 473              <td class="main">
 474  <?php
 475      if ($error == true) {
 476        if ($entry_gender_error == true) {
 477          echo tep_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . ENTRY_GENDER_ERROR;
 478        } else {
 479          echo ($cInfo->customers_gender == 'm') ? MALE : FEMALE;
 480          echo tep_draw_hidden_field('customers_gender');
 481        }
 482      } else {
 483        echo tep_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . FEMALE;
 484      }
 485  ?></td>
 486            </tr>
 487  <?php
 488      }
 489  ?>
 490            <tr>
 491              <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
 492              <td class="main">
 493  <?php
 494    if ($error == true) {
 495      if ($entry_firstname_error == true) {
 496        echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"') . '&nbsp;' . ENTRY_FIRST_NAME_ERROR;
 497      } else {
 498        echo $cInfo->customers_firstname . tep_draw_hidden_field('customers_firstname');
 499      }
 500    } else {
 501      echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true);
 502    }
 503  ?></td>
 504            </tr>
 505            <tr>
 506              <td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
 507              <td class="main">
 508  <?php
 509    if ($error == true) {
 510      if ($entry_lastname_error == true) {
 511        echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"') . '&nbsp;' . ENTRY_LAST_NAME_ERROR;
 512      } else {
 513        echo $cInfo->customers_lastname . tep_draw_hidden_field('customers_lastname');
 514      }
 515    } else {
 516      echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true);
 517    }
 518  ?></td>
 519            </tr>
 520  <?php
 521      if (ACCOUNT_DOB == 'true') {
 522  ?>
 523            <tr>
 524              <td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
 525              <td class="main">
 526  
 527  <?php
 528      if ($error == true) {
 529        if ($entry_date_of_birth_error == true) {
 530          echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"') . '&nbsp;' . ENTRY_DATE_OF_BIRTH_ERROR;
 531        } else {
 532          echo $cInfo->customers_dob . tep_draw_hidden_field('customers_dob');
 533        }
 534      } else {
 535        echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"', true);
 536      }
 537  ?></td>
 538            </tr>
 539  <?php
 540      }
 541  ?>
 542            <tr>
 543              <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
 544              <td class="main">
 545  <?php
 546    if ($error == true) {
 547      if ($entry_email_address_error == true) {
 548        echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR;
 549      } elseif ($entry_email_address_check_error == true) {
 550        echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
 551      } elseif ($entry_email_address_exists == true) {
 552        echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
 553      } else {
 554        echo $customers_email_address . tep_draw_hidden_field('customers_email_address');
 555      }
 556    } else {
 557      echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"', true);
 558    }
 559  ?></td>
 560            </tr>
 561          </table></td>
 562        </tr>
 563  <?php
 564      if (ACCOUNT_COMPANY == 'true') {
 565  ?>
 566        <tr>
 567          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 568        </tr>
 569        <tr>
 570          <td class="formAreaTitle"><?php echo CATEGORY_COMPANY; ?></td>
 571        </tr>
 572        <tr>
 573          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 574            <tr>
 575              <td class="main"><?php echo ENTRY_COMPANY; ?></td>
 576              <td class="main">
 577  <?php
 578      if ($error == true) {
 579        if ($entry_company_error == true) {
 580          echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"') . '&nbsp;' . ENTRY_COMPANY_ERROR;
 581        } else {
 582          echo $cInfo->entry_company . tep_draw_hidden_field('entry_company');
 583        }
 584      } else {
 585        echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"');
 586      }
 587  ?></td>
 588  <?php // BOF: MOD - Separate Pricing per Customer ?>
 589            </tr>
 590            <tr>
 591              <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td>
 592              <td class="main">
 593  <?php 
 594      if ($error == true) {
 595        if ($entry_company_tax_id_error == true) {
 596          echo tep_draw_input_field('entry_company_tax_id', $cInfo->entry_company_tax_id, 'maxlength="32"') . '&nbsp;' . ENTRY_COMPANY_TAX_ID_ERROR;
 597        } else {
 598          echo $cInfo->entry_company . tep_draw_hidden_field('entry_company_tax_id');
 599        }
 600      } else {
 601        echo tep_draw_input_field('entry_company_tax_id', $cInfo->entry_company_tax_id, 'maxlength="32"');
 602        }
 603  ?></td>
 604            </tr>
 605            <tr>
 606              <td class="main"><?php echo ENTRY_CUSTOMERS_GROUP_REQUEST_AUTHENTICATION; ?></td>
 607              <td class="main">
 608  <?php
 609      if ($error == true) {
 610        if ($customers_group_ra_error == true) {
 611          echo tep_draw_radio_field('customers_group_ra', '0', false, $cInfo->customers_group_ra) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_NO . '&nbsp;&nbsp;' . tep_draw_radio_field('customers_group_ra', '1', false, $cInfo->customers_group_ra) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_YES . '&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_ERROR;
 612        } else {
 613          echo ($cInfo->customers_group_ra == '0') ? ENTRY_CUSTOMERS_GROUP_RA_NO : ENTRY_CUSTOMERS_GROUP_RA_YES;
 614          echo tep_draw_hidden_field('customers_group_ra');
 615        }
 616      } else {
 617        echo tep_draw_radio_field('customers_group_ra', '0', false, $cInfo->customers_group_ra) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_NO . '&nbsp;&nbsp;' . tep_draw_radio_field('customers_group_ra', '1', false, $cInfo->customers_group_ra) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_YES;
 618      }
 619  ?></td>
 620            </tr>
 621  <?php // EOF: MOD - Separate Pricing per Customer ?>
 622            </tr>
 623          </table></td>
 624        </tr>
 625  <?php
 626      }
 627  ?>
 628        <tr>
 629          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 630        </tr>
 631        <tr>
 632          <td class="formAreaTitle"><?php echo CATEGORY_ADDRESS; ?></td>
 633        </tr>
 634        <tr>
 635          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 636            <tr>
 637              <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
 638              <td class="main">
 639  <?php
 640    if ($error == true) {
 641      if ($entry_street_address_error == true) {
 642        echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"') . '&nbsp;' . ENTRY_STREET_ADDRESS_ERROR;
 643      } else {
 644        echo $cInfo->entry_street_address . tep_draw_hidden_field('entry_street_address');
 645      }
 646    } else {
 647      echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true);
 648    }
 649  ?></td>
 650            </tr>
 651  <?php
 652      if (ACCOUNT_SUBURB == 'true') {
 653  ?>
 654            <tr>
 655              <td class="main"><?php echo ENTRY_SUBURB; ?></td>
 656              <td class="main">
 657  <?php
 658      if ($error == true) {
 659        if ($entry_suburb_error == true) {
 660          echo tep_draw_input_field('suburb', $cInfo->entry_suburb, 'maxlength="32"') . '&nbsp;' . ENTRY_SUBURB_ERROR;
 661        } else {
 662          echo $cInfo->entry_suburb . tep_draw_hidden_field('entry_suburb');
 663        }
 664      } else {
 665        echo tep_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"');
 666      }
 667  ?></td>
 668            </tr>
 669  <?php
 670      }
 671  ?>
 672            <tr>
 673              <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
 674              <td class="main">
 675  <?php
 676    if ($error == true) {
 677      if ($entry_post_code_error == true) {
 678        echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"') . '&nbsp;' . ENTRY_POST_CODE_ERROR;
 679      } else {
 680        echo $cInfo->entry_postcode . tep_draw_hidden_field('entry_postcode');
 681      }
 682    } else {
 683      echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true);
 684    }
 685  ?></td>
 686            </tr>
 687            <tr>
 688              <td class="main"><?php echo ENTRY_CITY; ?></td>
 689              <td class="main">
 690  <?php
 691    if ($error == true) {
 692      if ($entry_city_error == true) {
 693        echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"') . '&nbsp;' . ENTRY_CITY_ERROR;
 694      } else {
 695        echo $cInfo->entry_city . tep_draw_hidden_field('entry_city');
 696      }
 697    } else {
 698      echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true);
 699    }
 700  ?></td>
 701            </tr>
 702  <?php
 703      if (ACCOUNT_STATE == 'true') {
 704  ?>
 705            <tr>
 706              <td class="main"><?php echo ENTRY_STATE; ?></td>
 707              <td class="main">
 708  <?php
 709      $entry_state = tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state);
 710      if ($error == true) {
 711        if ($entry_state_error == true) {
 712          if ($entry_state_has_zones == true) {
 713            $zones_array = array();
 714            $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($cInfo->entry_country_id) . "' order by zone_name");
 715            while ($zones_values = tep_db_fetch_array($zones_query)) {
 716              $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
 717            }
 718            echo tep_draw_pull_down_menu('entry_state', $zones_array) . '&nbsp;' . ENTRY_STATE_ERROR;
 719          } else {
 720            echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)) . '&nbsp;' . ENTRY_STATE_ERROR;
 721          }
 722        } else {
 723          echo $entry_state . tep_draw_hidden_field('entry_zone_id') . tep_draw_hidden_field('entry_state');
 724        }
 725      } else {
 726        echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state));
 727      }
 728  
 729  ?></td>
 730           </tr>
 731  <?php
 732      }
 733  ?>
 734            <tr>
 735              <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
 736              <td class="main">
 737  <?php
 738    if ($error == true) {
 739      if ($entry_country_error == true) {
 740        echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id) . '&nbsp;' . ENTRY_COUNTRY_ERROR;
 741      } else {
 742        echo tep_get_country_name($cInfo->entry_country_id) . tep_draw_hidden_field('entry_country_id');
 743      }
 744    } else {
 745      echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id);
 746    }
 747  ?></td>
 748            </tr>
 749          </table></td>
 750        </tr>
 751        <tr>
 752          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 753        </tr>
 754        <tr>
 755          <td class="formAreaTitle"><?php echo CATEGORY_CONTACT; ?></td>
 756        </tr>
 757        <tr>
 758          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 759            <tr>
 760              <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
 761              <td class="main">
 762  <?php
 763    if ($error == true) {
 764      if ($entry_telephone_error == true) {
 765        echo tep_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"') . '&nbsp;' . ENTRY_TELEPHONE_NUMBER_ERROR;
 766      } else {
 767        echo $cInfo->customers_telephone . tep_draw_hidden_field('customers_telephone');
 768      }
 769    } else {
 770      echo tep_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', true);
 771    }
 772  ?></td>
 773            </tr>
 774            <tr>
 775              <td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
 776              <td class="main">
 777  <?php
 778    if ($processed == true) {
 779      echo $cInfo->customers_fax . tep_draw_hidden_field('customers_fax');
 780    } else {
 781      echo tep_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"');
 782    }
 783  ?></td>
 784            </tr>
 785          </table></td>
 786        </tr>
 787        <tr>
 788          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 789        </tr>
 790        <tr>
 791          <td class="formAreaTitle"><?php echo CATEGORY_OPTIONS; ?></td>
 792        </tr>
 793        <tr>
 794          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 795            <tr>
 796              <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
 797              <td class="main">
 798  <?php
 799    if ($processed == true) {
 800      if ($cInfo->customers_newsletter == '1') {
 801        echo ENTRY_NEWSLETTER_YES;
 802      } else {
 803        echo ENTRY_NEWSLETTER_NO;
 804      }
 805      echo tep_draw_hidden_field('customers_newsletter');
 806    } else {
 807      echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0'));
 808    }
 809  ?></td>
 810            </tr>
 811  <?php // BOF: MOD - Separate Pricing per Customer ?>
 812  <tr>
 813    <td class="main"><?php echo ENTRY_CUSTOMERS_GROUP_NAME; ?></td>
 814  <?php
 815    if ($processed != true) {
 816    $index = 0;
 817    while ($existing_customers =  tep_db_fetch_array($existing_customers_query)) {
 818   $existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => "&#160;".$existing_customers['customers_group_name']."&#160;");
 819      ++$index;
 820    }
 821    } // end if ($processed != true )
 822  ?>
 823    <td class="main"><?php if ($processed == true) {
 824      echo $cInfo->customers_group_id . tep_draw_hidden_field('customers_group_id');
 825    } else {
 826    echo tep_draw_pull_down_menu('customers_group_id', $existing_customers_array, $cInfo->customers_group_id);
 827    } ?></td>
 828  </tr>
 829  <?php // EOF: MOD - Separate Pricing per Customer ?>
 830          </table></td>
 831        </tr>
 832  <?php // BOF: MOD - Separate Pricing per Customer ?>
 833        <tr>
 834          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 835        </tr>
 836        <tr>
 837          <td class="formAreaTitle"><?php include_once(DIR_WS_LANGUAGES . $language . '/modules.php');
 838          echo HEADING_TITLE_MODULES_PAYMENT; ?></td>
 839        </tr>
 840        <tr>
 841          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 842            <tr bgcolor="#DEE4E8">
 843              <td class="main" colspan="2"><?php if ($processed == true) {
 844                if ($cInfo->customers_payment_settings == '1') {
 845                  echo ENTRY_CUSTOMERS_PAYMENT_SET ;
 846                  echo ' : ';
 847                } else {
 848                  echo ENTRY_CUSTOMERS_PAYMENT_DEFAULT;
 849                }  
 850                echo tep_draw_hidden_field('customers_payment_settings');
 851                } else { // $processed != true
 852                echo tep_draw_radio_field('customers_payment_settings', '1', false, (tep_not_null($cInfo->customers_payment_allowed)? '1' : '0' )) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_PAYMENT_SET . '&nbsp;&nbsp;' . tep_draw_radio_field('customers_payment_settings', '0', false, (tep_not_null($cInfo->customers_payment_allowed)? '1' : '0' )) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_PAYMENT_DEFAULT ; } ?></td>
 853              </tr>
 854  <?php if ($processed != true) {
 855      $payments_allowed = explode (";",$cInfo->customers_payment_allowed);
 856      $module_active = explode (";",MODULE_PAYMENT_INSTALLED);
 857      $installed_modules = array();
 858      for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
 859      $file = $directory_array[$i];
 860      if (in_array ($directory_array[$i], $module_active)) {
 861        include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/payment/' . $file);
 862        include($module_directory . $file);
 863  
 864       $class = substr($file, 0, strrpos($file, '.'));
 865       if (tep_class_exists($class)) {
 866         $module = new $class;
 867         if ($module->check() > 0) {
 868           $installed_modules[] = $file;
 869         }
 870       } // end if (tep_class_exists($class))
 871  ?>
 872            <tr>
 873              <td class="main" colspan="2"><?php echo tep_draw_checkbox_field('payment_allowed[' . $i . ']', $module->code.".php" , (in_array ($module->code.".php", $payments_allowed)) ?  1 : 0); ?>&#160;&#160;<?php echo $module->title; ?></td>
 874            </tr>
 875  <?php
 876    } // end if (in_array ($directory_array[$i], $module_active)) 
 877   } // end for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++)
 878  ?>
 879            <tr>
 880              <td class="main" colspan="2" style="padding-left: 30px; padding-right: 10px; padding-top: 10px;"><?php echo ENTRY_CUSTOMERS_PAYMENT_SET_EXPLAIN ?></td>
 881            </tr>
 882  <?php 
 883     } else { // end if ($processed != true)
 884  ?>
 885            <tr>
 886              <td class="main" colspan="2"><?php if ($cInfo->customers_payment_settings == '1') {
 887                echo $customers_payment_allowed;
 888              } else {
 889                echo ENTRY_CUSTOMERS_PAYMENT_DEFAULT;
 890              } 
 891             echo tep_draw_hidden_field('customers_payment_allowed'); ?></td>
 892            </tr>
 893  <?php 
 894   } // end else: $processed == true
 895  ?>
 896             </td>
 897            </tr>
 898           </table>
 899          </td>
 900        </tr>
 901        <tr>
 902          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 903        </tr>
 904        <tr>
 905          <td class="formAreaTitle"><?php echo HEADING_TITLE_MODULES_SHIPPING; ?></td>
 906        </tr>
 907        <tr>
 908          <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
 909            <tr bgcolor="#DEE4E8">
 910              <td class="main" colspan="2"><?php if ($processed == true) {
 911              if ($cInfo->customers_shipment_settings == '1') {
 912                echo ENTRY_CUSTOMERS_SHIPPING_SET ;
 913                echo ' : ';
 914              } else {
 915                echo ENTRY_CUSTOMERS_SHIPPING_DEFAULT;
 916              }  
 917              echo tep_draw_hidden_field('customers_shipment_settings');
 918              } else { // $processed != true
 919                echo tep_draw_radio_field('customers_shipment_settings', '1', false, (tep_not_null($cInfo->customers_shipment_allowed)? '1' : '0' )) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_SHIPPING_SET . '&nbsp;&nbsp;' . tep_draw_radio_field('customers_shipment_settings', '0', false, (tep_not_null($cInfo->customers_shipment_allowed)? '1' : '0' )) . '&nbsp;&nbsp;' . ENTRY_CUSTOMERS_SHIPPING_DEFAULT ; } ?></td>
 920            </tr>
 921  <?php if ($processed != true) {
 922      $shipment_allowed = explode (";",$cInfo->customers_shipment_allowed);
 923      $ship_module_active = explode (";",MODULE_SHIPPING_INSTALLED);
 924      $installed_shipping_modules = array();
 925      for ($i = 0, $n = sizeof($ship_directory_array); $i < $n; $i++) {
 926      $file = $ship_directory_array[$i];
 927      if (in_array ($ship_directory_array[$i], $ship_module_active)) {
 928        include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/' . $file);
 929        include($ship_module_directory . $file);
 930  
 931       $ship_class = substr($file, 0, strrpos($file, '.'));
 932       if (tep_class_exists($ship_class)) {
 933         $ship_module = new $ship_class;
 934         if ($ship_module->check() > 0) {
 935           $installed_shipping_modules[] = $file;
 936         }
 937       } // end if (tep_class_exists($ship_class))
 938  ?>
 939            <tr>
 940              <td class="main" colspan="2"><?php echo tep_draw_checkbox_field('shipping_allowed[' . $i . ']', $ship_module->code.".php" , (in_array ($ship_module->code.".php", $shipment_allowed)) ?  1 : 0); ?>&#160;&#160;<?php echo $ship_module->title; ?></td>
 941            </tr>
 942  <?php
 943    } // end if (in_array ($ship_directory_array[$i], $ship_module_active)) 
 944   } // end for ($i = 0, $n = sizeof($ship_directory_array); $i < $n; $i++)
 945          ?>
 946             <tr>
 947              <td class="main" colspan="2" style="padding-left: 30px; padding-right: 10px; padding-top: 10px;"><?php echo ENTRY_CUSTOMERS_SHIPPING_SET_EXPLAIN ?></td>
 948             </tr>
 949  <?php 
 950     } else { // end if ($processed != true)
 951  ?>
 952              <tr>
 953              <td class="main" colspan="2"><?php if ($cInfo->customers_shipment_settings == '1') {
 954                  echo $customers_shipment_allowed;
 955              } else {
 956                  echo ENTRY_CUSTOMERS_SHIPPING_DEFAULT;
 957              } 
 958              echo tep_draw_hidden_field('customers_shipment_allowed'); ?></td>
 959            </tr>
 960  <?php 
 961   } // end else: $processed == true
 962  ?>
 963             </td>
 964            </tr>
 965           </table>
 966          </td>
 967        </tr>
 968  <?php // EOF: MOD - Separate Pricing per Customer ?>
 969        <tr>
 970          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 971        </tr>
 972        <tr>
 973          <td align="right" class="main"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
 974        </tr></form>
 975  <?php
 976    } else {
 977  ?>
 978        <tr>
 979          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 980            <tr><?php echo tep_draw_form('search', FILENAME_CUSTOMERS, '', 'get'); ?>
 981              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
 982              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
 983              <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); ?></td>
 984            <?php echo tep_hide_session_id(); ?></form></tr>
 985          </table></td>
 986        </tr>
 987        <tr>
 988          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 989            <tr>
 990  <?php // BOF: MOD - customer_sort_admin_v1 adapted for Separate Pricing Per Customer
 991            switch ($listing) {
 992                case "id-asc":
 993                $order = "c.customers_id";
 994                  break;
 995                  case "cg_name":
 996                $order = "cg.customers_group_name, c.customers_lastname";
 997                  break;
 998                case "cg_name-desc":
 999                $order = "cg.customers_group_name DESC, c.customers_lastname";
1000                break;
1001                case "firstname":
1002                $order = "c.customers_firstname";
1003                break;
1004                case "firstname-desc":
1005                $order = "c.customers_firstname DESC";
1006                break;
1007                case "company":
1008                $order = "a.entry_company, c.customers_lastname";
1009                break;
1010                case "company-desc":
1011                $order = "a.entry_company DESC,c .customers_lastname DESC";
1012                break;
1013                case "ra":
1014                $order = "c.customers_group_ra DESC, c.customers_id DESC";
1015                break;
1016                case "ra-desc":
1017                $order = "c.customers_group_ra, c.customers_id DESC";
1018                break;
1019                case "lastname":
1020                $order = "c.customers_lastname, c.customers_firstname";
1021                break;
1022                case "lastname-desc":
1023                $order = "c.customers_lastname DESC, c.customers_firstname";
1024                break;
1025                default:
1026                $order = "c.customers_id DESC";
1027            }
1028  // EOF: MOD - customer_sort_admin_v1 adapted for Separate Pricing Per Customer ?>
1029              <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
1030                <tr class="dataTableHeadingRow">
1031                  <td class="dataTableHeadingContent" valign="top"><a href="<?php echo "$PHP_SELF?listing=company"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . ENTRY_COMPANY . ' --> A-B-C From Top '); ?></a>&nbsp;<a href="<?php echo "$PHP_SELF?listing=company-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . ENTRY_COMPANY . ' --> Z-X-Y From Top '); ?></a><br><?php echo ENTRY_COMPANY; ?></td>
1032                  <td class="dataTableHeadingContent" valign="top"><a href="<?php echo "$PHP_SELF?listing=lastname"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_LASTNAME . ' --> A-B-C From Top '); ?></a>&nbsp;<a href="<?php echo "$PHP_SELF?listing=lastname-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_LASTNAME . ' --> Z-X-Y From Top '); ?></a><br><?php echo TABLE_HEADING_LASTNAME; ?></td>
1033                  <td class="dataTableHeadingContent" valign="top"><a href="<?php echo "$PHP_SELF?listing=firstname"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_FIRSTNAME . ' --> A-B-C From Top '); ?></a>&nbsp;<a href="<?php echo "$PHP_SELF?listing=firstname-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_FIRSTNAME . ' --> Z-X-Y From Top '); ?></a><br><?php echo TABLE_HEADING_FIRSTNAME; ?></td>
1034                  <td class="dataTableHeadingContent" valign="top"><a href="<?php echo "$PHP_SELF?listing=cg_name"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' --> A-B-C From Top '); ?></a>&nbsp;<a href="<?php echo "$PHP_SELF?listing=cg_name-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' --> Z-X-Y From Top '); ?></a><br><?php echo TABLE_HEADING_CUSTOMERS_GROUPS; ?></td>
1035                  <td class="dataTableHeadingContent" align="right" valign="top"><a href="<?php echo "$PHP_SELF?listing=id-asc"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_ACCOUNT_CREATED . ' --> 1-2-3 From Top '); ?></a>&nbsp;<a href="<?php echo "$PHP_SELF?listing=id-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_ACCOUNT_CREATED . ' --> 3-2-1 From Top '); ?></a><br><?php echo TABLE_HEADING_ACCOUNT_CREATED; ?></td>
1036                  <td class="dataTableHeadingContent" align="middle" valign="top"><a href="<?php echo "$PHP_SELF?listing=ra"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' --> RA first (to Top) '); ?></a>&nbsp;<a href="<?php echo "$PHP_SELF?listing=ra-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' --> RA last (to Bottom)'); ?></a><br><?php echo TABLE_HEADING_REQUEST_AUTHENTICATION; ?>&nbsp;</td>
1037                  <td class="dataTableHeadingContent" align="right" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '11', '12'); ?>&nbsp;<br><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
1038  <?php // EOF: MOD - customer_sort_admin_v1 adapted for Separate Pricing Per Customer ?>
1039                </tr>     
1040  <?php
1041      $search = '';
1042      if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
1043        $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search']));
1044        $search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%'";
1045      }
1046  // LINE CHANGED: MOD - customer_sort_admin_v1 adapted for Separate Pricing Per Customer
1047  //  $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname";
1048      $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_id, c.customers_group_ra, a.entry_country_id, a.entry_company, cg.customers_group_name from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join customers_groups cg on c.customers_group_id = cg.customers_group_id " . $search . " order by $order";
1049      $customers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows);
1050      $customers_query = tep_db_query($customers_query_raw);
1051      while ($customers = tep_db_fetch_array($customers_query)) {
1052        $info_query = tep_db_query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customers['customers_id'] . "'");
1053        $info = tep_db_fetch_array($info_query);
1054  
1055        if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $customers['customers_id']))) && !isset($cInfo)) {
1056          $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$customers['entry_country_id'] . "'");
1057          $country = tep_db_fetch_array($country_query);
1058  
1059          $reviews_query = tep_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers['customers_id'] . "'");
1060          $reviews = tep_db_fetch_array($reviews_query);
1061  
1062          $customer_info = array_merge($country, $info, $reviews);
1063  
1064          $cInfo_array = array_merge($customers, $customer_info);
1065          $cInfo = new objectInfo($cInfo_array);
1066        }
1067  
1068        if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id)) {
1069          echo '          <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '\'">' . "\n";
1070        } else {
1071          echo '          <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '\'">' . "\n";
1072        }
1073  // BOF: MOD - customer_sort_admin_v1 adapted for Separate Pricing Per Customer ?>
1074                  <td class="dataTableContent"><?php
1075        if (strlen($customers['entry_company']) > 16 ) {
1076          print ("<acronym title=\"".$customers['entry_company']."\">".substr($customers['entry_company'], 0, 16)."&#160;</acronym>");
1077        } else {
1078          echo $customers['entry_company']; } ?></td>
1079                  <td class="dataTableContent"><?php 
1080        if (strlen($customers['customers_lastname']) > 15 ) {
1081          print ("<acronym title=\"".$customers['customers_lastname']."\">".substr($customers['customers_lastname'], 0, 15)."&#160;</acronym>");
1082        } else {
1083          echo $customers['customers_lastname']; } ?></td>
1084                  <td class="dataTableContent"><?php
1085        if (strlen($customers['customers_firstname']) > 15 ) {
1086          print ("<acronym title=\"".$customers['customers_firstname']."\">".substr($customers['customers_firstname'], 0, 15)."&#160;</acronym>");
1087        } else {
1088        echo $customers['customers_firstname']; } ?></td>
1089                  <td class="dataTableContent"><?php
1090        if (strlen($customers['customers_group_name']) > 17 ) {
1091          print ("<acronym title=\"".$customers['customers_group_name']."\"> ".substr($customers['customers_group_name'], 0, 17)."&#160;</acronym>");
1092        } else {
1093          echo $customers['customers_group_name'] ;
1094        }  
1095  // EOF: MOD - customer_sort_admin_v1 adapted for Separate Pricing Per Customer ?></td> 
1096                  <td class="dataTableContent" align="right"><?php echo tep_date_short($info['date_account_created']); ?></td>
1097  <?php // BOF: MOD - Customer Group ?>
1098                  <td class="dataTableContent" align="middle">
1099  <?php
1100        if ($customers['customers_group_ra'] == '1') {
1101          echo tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_GREEN, 10, 10);
1102        } else {
1103          echo tep_draw_separator('pixel_trans.gif', '10', '10'); 
1104        } ?></td>
1105  <?php // EOF: MOD - Customer Group ?>
1106                  <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
1107                </tr>
1108  <?php
1109      }
1110  ?>
1111                <tr>
1112  <?php // LINE CHANGED: MOD customer_sort_admin_v1 adapted for Separate Pricing Per Customer colspan 4 to 7 ?>
1113                  <td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
1114                    <tr>
1115                      <td class="smallText" valign="top"><?php echo $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS); ?></td>
1116                      <td class="smallText" align="right"><?php echo $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))); ?></td>
1117                    </tr>
1118  <?php
1119      if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
1120  ?>
1121                    <tr>
1122                      <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS) . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
1123                    </tr>
1124  <?php
1125      }
1126  ?>
1127                  </table></td>
1128                </tr>
1129  <?php // BOF: MOD - Separate Pricing Per Customer: show numbers of customers in each customers group
1130    if (!isset($HTTP_GET_VARS['search'])) {
1131    $customers_groups_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id ");
1132    while ($existing_customers_groups =  tep_db_fetch_array($customers_groups_query)) {
1133      $existing_customers_groups_array[] = array("id" => $existing_customers_groups['customers_group_id'], "text" => $existing_customers_groups['customers_group_name']);
1134      }
1135      $count_groups_query = tep_db_query("select customers_group_id, count(*) as count from " . TABLE_CUSTOMERS . " group by customers_group_id order by count desc");
1136      while ($count_groups = tep_db_fetch_array($count_groups_query)) {
1137    for ($n = 0; $n < sizeof($existing_customers_groups_array); $n++) {
1138      if ($count_groups['customers_group_id'] == $existing_customers_groups_array[$n]['id']) {
1139        $count_groups['customers_group_name'] = $existing_customers_groups_array[$n]['text'];
1140      }
1141    } // end for ($n = 0; $n < sizeof($existing_customers_groups_array); $n++)
1142    $count_groups_array[] = array("id" => $count_groups['customers_group_id'], "number_in_group" => $count_groups['count'], "name" => $count_groups['customers_group_name']); 
1143    }
1144  ?>
1145       <tr>
1146         <td style="padding-top: 10px;" align="center" colspan="7"><table border="0" cellspacing="0" cellpadding="2" style="border: 1px solid #c9c9c9">
1147           <tr class="dataTableHeadingRow">
1148             <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS_GROUPS ?></td>
1149             <td class="dataTableHeadingContent">&#160;</td>
1150             <td class="dataTableHeadingContent" align="right">No.</td>
1151           </tr>
1152  <?php $c = '0'; // variable used for background coloring of rows
1153    for ($z = 0; $z < sizeof($count_groups_array); $z++) { 
1154      $bgcolor = ($c++ & 1) ? ' class="dataTableRow"' : ''; 
1155  ?>
1156           <tr<?php echo $bgcolor; ?>>
1157             <td class="dataTableContent"><?php echo $count_groups_array[$z]['name']; ?></td>
1158             <td class="dataTableContent">&#160;</td>
1159             <td class="dataTableContent" align="right"><?php echo $count_groups_array[$z]['number_in_group'] ?></td>
1160           </tr>
1161  <?php 
1162     } // end for ($z = 0; $z < sizeof($count_groups_array); $z++) 
1163  ?>
1164                   </table></td>
1165                <tr>
1166  <?php
1167    } // end if (!isset($HTTP_GET_VARS['search']))
1168  // EOF: MOD - Separate Pricing Per Customer: show numbers of customers in each customers group ?>
1169              </table></td>
1170  <?php
1171    $heading = array();
1172    $contents = array();
1173  
1174    switch ($action) {
1175      case 'confirm':
1176  // LINE CHANGED: MOD - Separate Pricing Per Customer: dark grey field with customer name higher
1177  //    $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>');
1178        $heading[] = array('text' => ''. tep_draw_separator('pixel_trans.gif', '11', '12') .'&nbsp;<br><b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>');
1179        $contents = array('form' => tep_draw_form('customers', FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm'));
1180        $contents[] = array('text' => TEXT_DELETE_INTRO . '<br><br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
1181        if (isset($cInfo->number_of_reviews) && ($cInfo->number_of_reviews) > 0) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews));
1182        $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
1183        break;
1184      default:
1185        if (isset($cInfo) && is_object($cInfo)) {
1186  // LINE CHANGED: MOD - Separate Pricing Per Customer: dark grey field with customer name higher
1187  //      $heading[] = array('text' => '<b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
1188          $heading[] = array('text' => ''. tep_draw_separator('pixel_trans.gif', '11', '12') .'&nbsp;<br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
1189          $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
1190          $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
1191          $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
1192          $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_LAST_LOGON . ' '  . tep_date_short($cInfo->date_last_logon));
1193          $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
1194          $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
1195          $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
1196        }
1197        break;
1198    }
1199  
1200    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
1201      echo '            <td width="25%" valign="top">' . "\n";
1202  
1203      $box = new box;
1204      echo $box->infoBox($heading, $contents);
1205  
1206      echo '            </td>' . "\n";
1207    }
1208  ?>
1209            </tr>
1210          </table></td>
1211        </tr>
1212  <?php
1213    }
1214  ?>
1215      </table></td>
1216  <!-- body_text_eof //-->
1217    </tr>
1218  </table>
1219  <!-- body_eof //-->
1220  
1221  <!-- footer //-->
1222  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
1223  <!-- footer_eof //-->
1224  <br>
1225  </body>
1226  </html>
1227  <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7