⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 account_details.php

📁 美国cre loaded 6.2 b2b网站系统升级补丁
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php/*  $Id: account_details.php,v 1.1.1.1 2004/03/04 23:40:22 ccwjr Exp $  osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  Copyright (c) 2002 osCommerce  Released under the GNU General Public License  THIS IS BETA - Use at your own risk!  Step-By-Step Manual Order Entry Verion 0.5  Customer Entry through Admin*/  $newsletter_array = array(array('id' => '1',                                  'text' => ENTRY_NEWSLETTER_YES),                            array('id' => '0',                                  'text' => ENTRY_NEWSLETTER_NO));function sbs_get_zone_name($country_id, $zone_id) {    $zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . "'");    if (tep_db_num_rows($zone_query)) {      $zone = tep_db_fetch_array($zone_query);      return $zone['zone_name'];    } else {      return $default_zone;    }  } // Returns an array with countries// TABLES: countries  function sbs_get_countries($countries_id = '', $with_iso_codes = false) {    $countries_array = array();    if ($countries_id) {      if ($with_iso_codes) {        $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "' order by countries_name");        $countries_values = tep_db_fetch_array($countries);        $countries_array = array('countries_name' => $countries_values['countries_name'],                                 'countries_iso_code_2' => $countries_values['countries_iso_code_2'],                                 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);      } else {        $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "'");        $countries_values = tep_db_fetch_array($countries);        $countries_array = array('countries_name' => $countries_values['countries_name']);      }    } else {      $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name");      while ($countries_values = tep_db_fetch_array($countries)) {        $countries_array[] = array('countries_id' => $countries_values['countries_id'],                                   'countries_name' => $countries_values['countries_name']);      }    }    return $countries_array;  }  ////function sbs_get_country_list($name, $selected = '', $parameters = '') {   $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));   $countries = sbs_get_countries();   $size = sizeof($countries);   for ($i=0; $i<$size; $i++) {     $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);   }   return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);}////// Alias function to tep_get_countries, which also returns the countries iso codes//  function tep_get_countries_with_iso_codes($countries_id) {//    return tep_get_countries($countries_id, true);//  }?><table border="0" width="100%" cellspacing="0" cellpadding="2">  <tr>    <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td>  </tr>  <tr>    <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">      <tr>        <td class="main"><table border="0" cellspacing="0" cellpadding="2"><?php  if (ACCOUNT_GENDER == 'true') {    $male = ($account['customers_gender'] == 'm') ? true : false;    $female = ($account['customers_gender'] == 'f') ? true : false;?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_GENDER; ?></td>            <td class="main">&nbsp;<?php    if ($is_read_only) {      echo ($account['customers_gender'] == 'm') ? MALE : FEMALE;    } elseif ($error) {      if ($entry_gender_error) {        echo tep_draw_radio_field('gender', 'm', $male) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender', 'f', $female) . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . ENTRY_GENDER_ERROR;      } else {        echo ($gender == 'm') ? MALE : FEMALE;        echo tep_draw_hidden_field('gender');      }    } else {      echo tep_draw_radio_field('gender', 'm', $male) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender', 'f', $female) . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . ENTRY_GENDER_TEXT;    }?></td>          </tr><?php  }?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_FIRST_NAME; ?></td>            <td class="main">&nbsp;<?php  if ($is_read_only) {    echo $account['customers_firstname'];  } elseif ($error) {    if ($entry_firstname_error) {      echo tep_draw_input_field('firstname') . '&nbsp;' . ENTRY_FIRST_NAME_ERROR;    } else {      echo $firstname . tep_draw_hidden_field('firstname');    }  } else {    echo tep_draw_input_field('firstname', $account['customers_firstname']) . '&nbsp;' . ENTRY_FIRST_NAME_TEXT;  }?></td>          </tr>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_LAST_NAME; ?></td>            <td class="main">&nbsp;<?php  if ($is_read_only) {    echo $account['customers_lastname'];  } elseif ($error) {    if ($entry_lastname_error) {      echo tep_draw_input_field('lastname') . '&nbsp;' . ENTRY_LAST_NAME_ERROR;    } else {      echo $lastname . tep_draw_hidden_field('lastname');    }  } else {    echo tep_draw_input_field('lastname', $account['customers_lastname']) . '&nbsp;' . ENTRY_LAST_NAME_TEXT;  }?></td>          </tr><?php  if (ACCOUNT_DOB == 'true') {?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_DATE_OF_BIRTH; ?></td>            <td class="main">&nbsp;<?php    if ($is_read_only) {      echo tep_date_short($account['customers_dob']);    } elseif ($error) {      if ($entry_date_of_birth_error) {        echo tep_draw_input_field('dob') . '&nbsp;' . ENTRY_DATE_OF_BIRTH_ERROR;      } else {        echo $dob . tep_draw_hidden_field('dob');      }    } else {      echo tep_draw_input_field('dob', tep_date_short($account['customers_dob'])) . '&nbsp;' . ENTRY_DATE_OF_BIRTH_TEXT;    }?></td>          </tr><?php  }?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_EMAIL_ADDRESS; ?></td>            <td class="main">&nbsp;<?php  if ($is_read_only) {    echo $account['customers_email_address'];  } elseif ($error) {    if ($entry_email_address_error) {      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR;    } elseif ($entry_email_address_check_error) {      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;    } elseif ($entry_email_address_exists) {      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;    } else {      echo $email_address . tep_draw_hidden_field('email_address');    }  } else {    echo tep_draw_input_field('email_address', $account['customers_email_address']) . '&nbsp;' . ENTRY_EMAIL_ADDRESS_TEXT;  }?></td>          </tr>        </table></td>      </tr>    </table></td>  </tr><?php  if (ACCOUNT_COMPANY == 'true') {?>  <tr>    <td class="formAreaTitle"><br><?php echo CATEGORY_COMPANY; ?></td>  </tr>  <tr>    <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">      <tr>        <td class="main">        <table border="0" cellspacing="0" cellpadding="2">          <tr>            <td class="main">&nbsp;<?php echo ENTRY_COMPANY; ?></td>            <td class="main">&nbsp;<?php    if ($is_read_only) {      echo $account['entry_company'];    } elseif ($error) {      if ($entry_company_error) {        echo tep_draw_input_field('company') . '&nbsp;' . ENTRY_COMPANY_ERROR;      } else {        echo $company . tep_draw_hidden_field('company');      }    } else {      echo tep_draw_input_field('company', $account['entry_company']);    }?></td></tr>           <tr>            <td class="main">&nbsp;<?php echo ENTRY_COMPANY_TAX_ID; ?></td>            <td class="main">&nbsp; <?php    if ($is_read_only) {      echo $account['entry_company_tax_id'];    } elseif ($error) {      if ($entry_company_tax_id_error) {        echo tep_draw_input_field('entry_company_tax_id') . '&nbsp;' . ENTRY_COMPANY_TAX_ID_ERROR;      } else {        echo $entry_company_tax_id . tep_draw_hidden_field('entry_company_tax_id');      }    } else {      echo tep_draw_input_field('entry_company_tax_id', $account['entry_company_tax_id']);    }?>           </td>  </tr>        </table>    </td>      </tr>    </table></td>  </tr>        <?php  }?>  <tr>    <td class="formAreaTitle"><br><?php echo CATEGORY_ADDRESS; ?></td>  </tr>  <tr>    <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">      <tr>        <td class="main"><table border="0" cellspacing="0" cellpadding="2">          <tr>            <td class="main">&nbsp;<?php echo ENTRY_STREET_ADDRESS; ?></td>            <td class="main">&nbsp;<?php  if ($is_read_only) {    echo $account['entry_street_address'];  } elseif ($error) {    if ($entry_street_address_error) {      echo tep_draw_input_field('street_address') . '&nbsp;' . ENTRY_STREET_ADDRESS_ERROR;    } else {      echo $street_address . tep_draw_hidden_field('street_address');    }  } else {    echo tep_draw_input_field('street_address', $account['entry_street_address']) . '&nbsp;' . ENTRY_STREET_ADDRESS_TEXT;  }?></td>          </tr><?php  if (ACCOUNT_SUBURB == 'true') {?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_SUBURB; ?></td>            <td class="main">&nbsp;<?php    if ($is_read_only) {      echo $account['entry_suburb'];    } elseif ($error) {      if ($entry_suburb_error) {        echo tep_draw_input_field('suburb') . '&nbsp;' . ENTRY_SUBURB_ERROR;      } else {        echo $suburb . tep_draw_hidden_field('suburb');      }    } else {      echo tep_draw_input_field('suburb', $account['entry_suburb']) . '&nbsp;' . ENTRY_SUBURB_TEXT;    }?></td>          </tr><?php  }?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_POST_CODE; ?></td>            <td class="main">&nbsp;<?php  if ($is_read_only) {    echo $account['entry_postcode'];  } elseif ($error) {    if ($entry_post_code_error) {      echo tep_draw_input_field('postcode') . '&nbsp;' . ENTRY_POST_CODE_ERROR;    } else {      echo $postcode . tep_draw_hidden_field('postcode');    }  } else {    echo tep_draw_input_field('postcode', $account['entry_postcode']) . '&nbsp;' . ENTRY_POST_CODE_TEXT;  }?></td>          </tr>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_CITY; ?></td>            <td class="main">&nbsp;<?php  if ($is_read_only) {    echo $account['entry_city'];  } elseif ($error) {    if ($entry_city_error) {      echo tep_draw_input_field('city') . '&nbsp;' . ENTRY_CITY_ERROR;    } else {      echo $city . tep_draw_hidden_field('city');    }  } else {    echo tep_draw_input_field('city', $account['entry_city']) . '&nbsp;' . ENTRY_CITY_TEXT;  }?></td>          </tr><?php  if (ACCOUNT_STATE == 'true') {?>          <tr>            <td class="main">&nbsp;<?php echo ENTRY_STATE; ?></td>            <td class="main">&nbsp;<?php    $state = sbs_get_zone_name($country, $zone_id);    if ($is_read_only) {      echo sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id']);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -