[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/ -> Order_Info_Check.php (source)

   1  <?php
   2  /*

   3  $Id: Order_Info_Check.php 3 2006-05-27 04:59:07Z user $

   4      by Cheng

   5    

   6          OSCommerce v2.2 CVS (09/17/02)

   7    

   8     Modified versions of create_account.php and related

   9    files.  Allowing 'purchase without account'.        

  10  

  11  

  12    osCMax Power E-Commerce

  13    http://oscdox.com

  14  

  15    Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

  16  

  17    Released under the GNU General Public License

  18  */
  19  
  20    $newsletter_array = array(array('id' => '1',
  21                                    'text' => ENTRY_NEWSLETTER_YES),
  22                              array('id' => '0',
  23                                    'text' => ENTRY_NEWSLETTER_NO));
  24  ?>
  25  <table border="0" width="100%" cellspacing="0" cellpadding="2">
  26    <tr>
  27      <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td>
  28    </tr>
  29    <tr>
  30      <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
  31        <tr>
  32          <td class="main"><table border="0" cellspacing="0" cellpadding="2">
  33  <?php
  34    if (ACCOUNT_GENDER == 'true') {
  35      $male = ($account['customers_gender'] == 'm') ? true : false;
  36      $female = ($account['customers_gender'] == 'f') ? true : false;
  37  ?>
  38            <tr>
  39              <td class="main"> <?php echo ENTRY_GENDER; ?></td>
  40              <td class="main"> 
  41  <?php
  42      if ($is_read_only) {
  43        echo ($account['customers_gender'] == 'm') ? MALE : FEMALE;
  44      } elseif ($error) {
  45        if ($entry_gender_error) {
  46          echo tep_draw_radio_field('gender', 'm', $male) . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f', $female) . '  ' . FEMALE . ' ' . ENTRY_GENDER_ERROR;
  47        } else {
  48          echo ($gender == 'm') ? MALE : FEMALE;
  49          echo tep_draw_hidden_field('gender');
  50        }
  51      } else {
  52        echo tep_draw_radio_field('gender', 'm', $male) . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f', $female) . '  ' . FEMALE . ' ' . ENTRY_GENDER_TEXT;
  53      }
  54  ?></td>
  55            </tr>
  56  <?php
  57    }
  58  ?>
  59            <tr>
  60              <td class="main"> <?php echo ENTRY_FIRST_NAME; ?></td>
  61              <td class="main"> 
  62  <?php
  63    if ($is_read_only) {
  64      echo $account['customers_firstname'];
  65    } elseif ($error) {
  66      if ($entry_firstname_error) {
  67        echo tep_draw_input_field('firstname') . ' ' . ENTRY_FIRST_NAME_ERROR;
  68      } else {
  69        echo $firstname . tep_draw_hidden_field('firstname');
  70      }
  71    } else {
  72      echo tep_draw_input_field('firstname', $account['customers_firstname']) . ' ' . ENTRY_FIRST_NAME_TEXT;
  73    }
  74  ?></td>
  75            </tr>
  76            <tr>
  77              <td class="main"> <?php echo ENTRY_LAST_NAME; ?></td>
  78              <td class="main"> 
  79  <?php
  80    if ($is_read_only) {
  81      echo $account['customers_lastname'];
  82    } elseif ($error) {
  83      if ($entry_lastname_error) {
  84        echo tep_draw_input_field('lastname') . ' ' . ENTRY_LAST_NAME_ERROR;
  85      } else {
  86        echo $lastname . tep_draw_hidden_field('lastname');
  87      }
  88    } else {
  89      echo tep_draw_input_field('lastname', $account['customers_lastname']) . ' ' . ENTRY_LAST_NAME_TEXT;
  90    }
  91  ?></td>
  92            </tr>
  93  <?php
  94    if (ACCOUNT_DOB == 'true') {
  95  ?>
  96            <tr>
  97              <td class="main"> <?php echo ENTRY_DATE_OF_BIRTH; ?></td>
  98              <td class="main"> 
  99  <?php
 100      if ($is_read_only) {
 101        echo tep_date_short($account['customers_dob']);
 102      } elseif ($error) {
 103        if ($entry_date_of_birth_error) {
 104          echo tep_draw_input_field('dob') . ' ' . ENTRY_DATE_OF_BIRTH_ERROR;
 105        } else {
 106          echo $dob . tep_draw_hidden_field('dob');
 107        }
 108      } else {
 109        echo tep_draw_input_field('dob', tep_date_short($account['customers_dob'])) . ' ' . ENTRY_DATE_OF_BIRTH_TEXT;
 110      }
 111  ?></td>
 112            </tr>
 113  <?php
 114    }
 115  ?>
 116            <tr>
 117              <td class="main"> <?php echo ENTRY_EMAIL_ADDRESS; ?></td>
 118              <td class="main"> 
 119  <?php
 120    if ($is_read_only) {
 121      echo $account['customers_email_address'];
 122    } elseif ($error) {
 123      if ($entry_email_address_error) {
 124        echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR;
 125      } elseif ($entry_email_address_check_error) {
 126        echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
 127      } elseif ($entry_email_address_exists) {
 128        echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
 129      } else {
 130        echo $email_address . tep_draw_hidden_field('email_address');
 131      }
 132    } else {
 133      echo tep_draw_input_field('email_address', $account['customers_email_address']) . ' ' . ENTRY_EMAIL_ADDRESS_TEXT;
 134    }
 135  ?></td>
 136            </tr>
 137          </table></td>
 138        </tr>
 139      </table></td>
 140    </tr>
 141  <?php
 142    if (ACCOUNT_COMPANY == 'true') {
 143  ?>  
 144    <tr>
 145      <td class="formAreaTitle"><br><?php echo CATEGORY_COMPANY; ?></td>
 146    </tr>
 147    <tr>
 148      <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
 149        <tr>
 150          <td class="main"><table border="0" cellspacing="0" cellpadding="2">
 151            <tr>
 152              <td class="main"> <?php echo ENTRY_COMPANY; ?></td>
 153              <td class="main"> 
 154  <?php
 155      if ($is_read_only) {
 156        echo $account['entry_company'];
 157      } elseif ($error) {
 158        if ($entry_company_error) {
 159          echo tep_draw_input_field('company') . ' ' . ENTRY_COMPANY_ERROR;
 160        } else {
 161          echo $company . tep_draw_hidden_field('company');
 162        }
 163      } else {
 164        echo tep_draw_input_field('company', $account['entry_company']) . ' ' . ENTRY_COMPANY_TEXT;
 165      }
 166  ?></td>
 167            </tr>
 168          </table></td>
 169        </tr>
 170      </table></td>
 171    </tr>
 172  <?php
 173    }
 174  ?>
 175    <tr>
 176      <td class="formAreaTitle"><br><?php echo CATEGORY_ADDRESS; ?></td>
 177    </tr>
 178    <tr>
 179      <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
 180        <tr>
 181          <td class="main"><table border="0" cellspacing="0" cellpadding="2">
 182            <tr>
 183              <td class="main"> <?php echo ENTRY_STREET_ADDRESS; ?></td>
 184              <td class="main"> 
 185  <?php
 186    if ($is_read_only) {
 187      echo $account['entry_street_address'];
 188    } elseif ($error) {
 189      if ($entry_street_address_error) {
 190        echo tep_draw_input_field('street_address') . ' ' . ENTRY_STREET_ADDRESS_ERROR;
 191      } else {
 192        echo $street_address . tep_draw_hidden_field('street_address');
 193      }
 194    } else {
 195      echo tep_draw_input_field('street_address', $account['entry_street_address']) . ' ' . ENTRY_STREET_ADDRESS_TEXT;
 196    }
 197  ?></td>
 198            </tr>
 199  <?php
 200    if (ACCOUNT_SUBURB == 'true') {
 201  ?>
 202            <tr>
 203              <td class="main"> <?php echo ENTRY_SUBURB; ?></td>
 204              <td class="main"> 
 205  <?php
 206      if ($is_read_only) {
 207        echo $account['entry_suburb'];
 208      } elseif ($error) {
 209        if ($entry_suburb_error) {
 210          echo tep_draw_input_field('suburb') . ' ' . ENTRY_SUBURB_ERROR;
 211        } else {
 212          echo $suburb . tep_draw_hidden_field('suburb');
 213        }
 214      } else {
 215        echo tep_draw_input_field('suburb', $account['entry_suburb']) . ' ' . ENTRY_SUBURB_TEXT;
 216      }
 217  ?></td>
 218            </tr>
 219  <?php
 220    }
 221  ?>
 222  
 223            <tr>
 224              <td class="main"> <?php echo ENTRY_CITY; ?></td>
 225              <td class="main"> 
 226  <?php
 227    if ($is_read_only) {
 228      echo $account['entry_city'];
 229    } elseif ($error) {
 230      if ($entry_city_error) {
 231        echo tep_draw_input_field('city') . ' ' . ENTRY_CITY_ERROR;
 232      } else {
 233        echo $city . tep_draw_hidden_field('city');
 234      }
 235    } else {
 236      echo tep_draw_input_field('city', $account['entry_city']) . ' ' . ENTRY_CITY_TEXT;
 237    }
 238  ?></td>
 239  
 240  <?php
 241    if (ACCOUNT_STATE == 'true') {
 242  ?>
 243            <tr>
 244              <td class="main"> <?php echo ENTRY_STATE; ?></td>
 245              <td class="main"> 
 246  <?php
 247      $state = tep_get_zone_name($country, $zone_id, $state);
 248      if ($is_read_only) {
 249        echo tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state']);
 250      } elseif ($error) {
 251        if ($entry_state_error) {
 252          if ($entry_state_has_zones) {
 253            $zones_array = array();
 254            $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country) . "' order by zone_name");
 255            while ($zones_values = tep_db_fetch_array($zones_query)) {
 256              $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
 257            }
 258            echo tep_draw_pull_down_menu('state', $zones_array) . ' ' . ENTRY_STATE_ERROR;
 259          } else {
 260            echo tep_draw_input_field('state') . ' ' . ENTRY_STATE_ERROR;
 261          }
 262        } else {
 263          echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state');
 264        }
 265      } else {
 266        echo tep_draw_input_field('state', tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . ' ' . ENTRY_STATE_TEXT;
 267      }
 268  ?></td>
 269            </tr>
 270  <?php
 271    }
 272  ?>          
 273            <tr>
 274              <td class="main"> <?php echo ENTRY_POST_CODE; ?></td>
 275              <td class="main"> 
 276  <?php
 277    if ($is_read_only) {
 278      echo $account['entry_postcode'];
 279    } elseif ($error) {
 280      if ($entry_post_code_error) {
 281        echo tep_draw_input_field('postcode') . ' ' . ENTRY_POST_CODE_ERROR;
 282      } else {
 283        echo $postcode . tep_draw_hidden_field('postcode');
 284      }
 285    } else {
 286      echo tep_draw_input_field('postcode', $account['entry_postcode']) . ' ' . ENTRY_POST_CODE_TEXT;
 287    }
 288  ?></td>
 289            </tr>
 290            </tr>
 291            <tr>
 292              <td class="main"> <?php echo ENTRY_COUNTRY; ?></td>
 293              <td class="main"> 
 294  <?php
 295    if ($is_read_only) {
 296      echo tep_get_country_name($account['entry_country_id']);
 297    } elseif ($error) {
 298      if ($entry_country_error) {
 299        echo tep_get_country_list('country') . ' ' . ENTRY_COUNTRY_ERROR;
 300      } else {
 301        echo tep_get_country_name($country) . tep_draw_hidden_field('country');
 302      }
 303    } else {
 304      echo tep_get_country_list('country', $account['entry_country_id']) . ' ' . ENTRY_COUNTRY_TEXT;
 305    }
 306  ?></td>
 307            </tr>
 308  
 309  
 310          </table></td>
 311        </tr>
 312      </table></td>
 313    </tr>
 314    <tr>
 315      <td class="formAreaTitle"><br><?php echo CATEGORY_CONTACT; ?></td>
 316    </tr>
 317    <tr>
 318      <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
 319        <tr>
 320          <td class="main"><table border="0" cellspacing="0" cellpadding="2">
 321            <tr>
 322              <td class="main"> <?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
 323              <td class="main"> 
 324  <?php
 325    if ($is_read_only) {
 326      echo $account['customers_telephone'];
 327    } elseif ($error) {
 328      if ($entry_telephone_error) {
 329        echo tep_draw_input_field('telephone') . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR;
 330      } else {
 331        echo $telephone . tep_draw_hidden_field('telephone');
 332      }
 333    } else {
 334      echo tep_draw_input_field('telephone', $account['customers_telephone']) . ' ' . ENTRY_TELEPHONE_NUMBER_TEXT;
 335    }
 336  ?></td>
 337            </tr>
 338            <tr>
 339              <td class="main"> <?php echo ENTRY_FAX_NUMBER; ?></td>
 340              <td class="main"> 
 341  <?php
 342    if ($is_read_only) {
 343      echo $account['customers_fax'];
 344    } elseif ($processed) {
 345      echo $fax . tep_draw_hidden_field('fax');
 346    } else {
 347      echo tep_draw_input_field('fax', $account['customers_fax']) . ' ' . ENTRY_FAX_NUMBER_TEXT;
 348    }
 349  ?></td>
 350            </tr>
 351          </table></td>
 352        </tr>
 353      </table></td>
 354    </tr>
 355    <tr>
 356      <td class="formAreaTitle"><br><?php echo CATEGORY_OPTIONS; ?></td>
 357    </tr>
 358    <tr>
 359      <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
 360        <tr>
 361          <td class="main"><table border="0" cellspacing="0" cellpadding="2">
 362            <tr>
 363              <td class="main"> <?php echo ENTRY_NEWSLETTER; ?></td>
 364              <td class="main"> 
 365  <?php
 366    if ($is_read_only) {
 367      if ($account['customers_newsletter'] == '1') {
 368        echo ENTRY_NEWSLETTER_YES;
 369      } else {
 370        echo ENTRY_NEWSLETTER_NO;
 371      }
 372    } elseif ($processed) {
 373      if ($newsletter == '1') {
 374        echo ENTRY_NEWSLETTER_YES;
 375      } else {
 376        echo ENTRY_NEWSLETTER_NO;
 377      }
 378      echo tep_draw_hidden_field('newsletter');  
 379    } else {
 380      echo tep_draw_pull_down_menu('newsletter', $newsletter_array, $account['customers_newsletter']) . ' ' . ENTRY_NEWSLETTER_TEXT;
 381    }
 382  ?></td>
 383            </tr>
 384          </table></td>
 385        </tr>
 386      </table></td>
 387    </tr>
 388  <?php
 389    if (!$is_read_only) {
 390  ?>
 391    <!--tr>
 392      <td class="formAreaTitle"><br><?php echo CATEGORY_PASSWORD; ?></td>
 393    </tr>
 394    <tr>
 395      <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
 396        <tr>
 397          <td class="main"><table border="0" cellspacing="0" cellpadding="2">
 398            <tr>
 399              <td class="main">&nbsp;<?php echo ENTRY_PASSWORD; ?></td>
 400              <td class="main">&nbsp;
 401  <?php
 402      if ($error) {
 403        if ($entry_password_error) {
 404          echo tep_draw_password_field('password') . '&nbsp;' . ENTRY_PASSWORD_ERROR;
 405        } else {
 406          echo PASSWORD_HIDDEN . tep_draw_hidden_field('password') . tep_draw_hidden_field('confirmation');
 407        }
 408      } else {
 409        echo tep_draw_password_field('password') . '&nbsp;' . ENTRY_PASSWORD_TEXT;
 410      }
 411  ?></td>
 412           </tr>
 413  <?php
 414      if ( (!$error) || ($entry_password_error) ) {
 415  ?>
 416            <tr>
 417              <td class="main">&nbsp;<?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
 418              <td class="main">&nbsp;
 419  <?php
 420        echo tep_draw_password_field('confirmation') . '&nbsp;' . ENTRY_PASSWORD_CONFIRMATION_TEXT;
 421  ?></td>
 422            </tr>
 423  <?php
 424      }
 425  ?>
 426          </table></td>
 427        </tr>
 428      </table></td>
 429    </tr//-->
 430  <?php
 431    }
 432  ?>
 433  </table>


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