customers.php
来自「全新且完善的强大网上商店系统」· PHP 代码 · 共 653 行 · 第 1/2 页
PHP
653 行
<tr class="header"><td colspan="7"><?=HEADING_TITLE;?></td></tr>
<?php
if (ACCOUNT_GENDER == 'true') {
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_GENDER; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_gender_error == true) {
echo '<input name="customers_gender" type="radio" value="m" '.($customers_gender == 'm' ? 'CHECKED' : '').'> ' . MALE . ' <input name="customers_gender" type="radio" value="f" '.($customers_gender == 'f' ? 'CHECKED' : '').'> ' . FEMALE . ' ' . ENTRY_GENDER_ERROR;
} else {
echo ($customers_gender == 'm') ? MALE : FEMALE;
echo '<input name="customers_gender" type="hidden" value="m" >';
}
} else {
echo '<input name="customers_gender" type="radio" value="m" '.($customers_gender == 'm' ? 'CHECKED' : '').'> ' . MALE . ' <input name="customers_gender" type="radio" value="f" '.($customers_gender == 'f' ? 'CHECKED' : '').'> ' . FEMALE ;
}
?> </td>
</tr>
<?php
}
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_FIRST_NAME; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_firstname_error == true) {
echo '<input type="text" name="customers_firstname" maxlength="32" value="'.$customers_firstname.'"> ' . ENTRY_FIRST_NAME_ERROR;
} else {
echo $customers_firstname.'<input type="hidden" name="customers_firstname" value="'.$customers_firstname.'">';
}
} else {
echo '<input type="text" name="customers_firstname" maxlength="32" value="'.$customers_firstname.'" maxlength="32">';
}
?> </td>
</tr>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_date_of_birth_error == true) {
echo '<input type="text" name="customers_dob" maxlength="10" value="'.$customers_dob.'"> ' . ENTRY_DATE_OF_BIRTH_ERROR;
} else {
echo $customers_dob.'<input type="hidden" name="customers_dob" value="'.$customers_dob.'">';
}
} else {
echo '<input type="text" name="customers_dob" maxlength="10" value="'.$customers_dob.'">';
}
?> </td>
</tr>
<?php
}
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_email_address_error == true) {
echo '<input type="text" name="customers_email_address" value="'.$customers_email_address.'" maxlength="96"> ' . ENTRY_EMAIL_ADDRESS_ERROR;
} elseif ($entry_email_address_check_error == true) {
echo '<input type="text" name="customers_email_address" value="'.$customers_email_address.'" maxlength="96"> ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
} elseif ($entry_email_address_exists == true) {
echo '<input type="text" name="customers_email_address" value="'.$customers_email_address.'" maxlength="96"> ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
} else {
echo $customers_email_address . '<input name="customers_email_address" type="hidden" value="'.$customers_email_address.'">';
}
} else {
echo '<input type="text" name="customers_email_address" value="'.$customers_email_address.'" maxlength="96">';
}
?> </td>
</tr>
<tr>
<td class="header" colspan="2"><?php echo CATEGORY_ADDRESS; ?></td>
</tr>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_COUNTRY; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_country_error == true) {
echo '<select name="entry_country_id">';
$query = $db->query("select countries_id, countries_name from $table_countries order by countries_name");
while ($countries_values = $db->fetch_array($query)) {
echo '<option value="' .$countries_values['countries_id']. '">'.$countries_values['countries_name'].'</option>';
}
echo '</select> ' . ENTRY_COUNTRY_ERROR;
} else {
echo $entry_country_id.'<input type="hidden" name="entry_country_id" value="'.$entry_country_id.'">';
}
} else {
echo '<select name="entry_country_id">';
$query = $db->query("select countries_id, countries_name from $table_countries order by countries_name");
while ($countries_values = $db->fetch_array($query)) {
echo '<option value="' .$countries_values['countries_id']. '" '.($countries_values['countries_id']==$entry_country_id ? 'selected' :'').'>'.$countries_values['countries_name'].'</option>';
}
echo '</select> ' . ENTRY_COUNTRY_ERROR;
}
?></td>
</tr>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_STREET_ADDRESS; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_street_address_error == true) {
echo '<input type="text" name="entry_street_address" value="'.$entry_street_address.'" maxlength="64"> ' . ENTRY_STREET_ADDRESS_ERROR;
} else {
echo $entry_street_address .'<input type="hidden" name="entry_street_address" value="'.$entry_street_address.'">';
}
} else {
echo '<input type="text" name="entry_street_address" value="'.$entry_street_address.'" maxlength="64">';
}
?> </td>
</tr>
<?
if (ACCOUNT_SUBURB == 'true') {
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_SUBURB; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_suburb_error == true) {
echo '<input type="text" name="entry_suburb" value="'.$entry_suburb.'" maxlength="32"> ' . ENTRY_SUBURB_ERROR;
} else {
echo $entry_suburb .'<input type="hidden" name="entry_suburb" value="'.$entry_suburb.'">';
}
} else {
echo '<input type="text" name="entry_suburb" value="'.$entry_suburb.'" maxlength="32">';
}
?> </td>
</tr>
<?php
}
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_POST_CODE; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_post_code_error == true) {
echo '<input type="text" name="entry_postcode" value="'.$entry_postcode.'" maxlength="8">'. ENTRY_POST_CODE_ERROR;
} else {
echo $entry_postcode .'<input type="hidden" name="entry_postcode" value="'.$entry_postcode.'" maxlength="8">';
}
} else {
echo '<input type="text" name="entry_postcode" value="'.$entry_postcode.'" maxlength="8">';
}
?> </td>
</tr>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_CITY; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_city_error == true) {
echo '<input type="text" name="entry_city" value="'.$entry_city.'" maxlength="32">'. ENTRY_CITY_ERROR;
} else {
echo $entry_city .'<input type="hidden" name="entry_city" value="'.$entry_city.'" maxlength="32">';
}
} else {
echo '<input type="text" name="entry_city" value="'.$entry_city.'" maxlength="32">';
}
?> </td>
</tr>
<?
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_STATE; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_city_error == true) {
echo '<input type="text" name="entry_state" value="'.$entry_state.'" maxlength="32"> ' . ENTRY_STATE_ERROR;
} else {
echo $entry_city .'<input type="hidden" name="entry_state" value="'.$entry_state.'" >';
}
} else {
echo '<input type="text" name="entry_state" value="'.$entry_state.'" maxlength="32">';
}
?> </td>
</tr>
<?
}
?>
<tr>
<td class="header" colspan="2"><?php echo CATEGORY_CONTACT; ?></td>
</tr>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($error == true) {
if ($entry_telephone_error == true) {
echo '<input type="text" name="customers_telephone" value="'.$customers_telephone.'" maxlength="32"> ' . ENTRY_TELEPHONE_NUMBER_ERROR;
} else {
echo $customers_telephone .'<input type="hidden" name="customers_telephone" value="'.$customers_telephone.'" >';
}
} else {
echo '<input type="text" name="customers_telephone" value="'.$customers_telephone.'" maxlength="32">';
}
?> </td>
</tr>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_FAX_NUMBER; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($processed == true) {
echo $customers_fax .'<input type="hidden" name="customers_fax" value="'.$customers_fax.'" >';
} else {
echo '<input type="text" name="customers_fax" value="'.$customers_fax.'" maxlength="32">';
}
?> </td>
</tr>
<tr>
<td class="header" colspan="2"><?php echo CATEGORY_OPTIONS; ?></td>
</tr>
<tr>
<td bgcolor="<?=ALTBG1?>"><?php echo ENTRY_NEWSLETTER; ?></td>
<td bgcolor="<?=ALTBG2?>">
<?php
if ($processed == true) {
if ($cInfo->customers_newsletter == '1') {
echo ENTRY_NEWSLETTER_YES;
} else {
echo ENTRY_NEWSLETTER_NO;
}
echo '<input type="hidden" name="customers_newsletter" value="'.$customers_newsletter.'" >';
} else {
echo $newsletter;
}
?> </td>
</tr>
</table></td></tr></table>
<br><center><?=$warning?>
<input type="submit" name="submit" value="提 交">
</center></form><br><br>
<?
}else{
if($page) {
$start_limit = ($page - 1) * MAX_DISPLAY_SEARCH_RESULTS ;
} else {
$start_limit = 0;
$page = 1;
}
$search = '';
if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
$keywords = trim(addslashes($HTTP_GET_VARS['search']));
$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%'";
}
$query = $db->query("SELECT COUNT(*) FROM $table_customers order by customers_lastname DESC");
$multipage = multi($db->result($query, 0), MAX_DISPLAY_SEARCH_RESULTS, $page, "admincp.php?act=customers&order=$order".($desc ? "&desc=$desc" : NULL));
?>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="95%" align="center">
<tr><td bgcolor="<?=BORDERCOLOR?>">
<table border="0" cellspacing="<?=BORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="100%">
<tr class="header"><td>特别提示</td></tr>
<tr bgcolor="<?=ALTBG1?>"><td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr><td><li>更改制造商图片请点击浏览</td>
<td align="right" class="smallText"><?php echo '<a href="'.tep_href_link('admincp.php', 'act=specials&page=' . $HTTP_GET_VARS['page'] . '&type=new_specials').'"><img src="admin/languages/'.$language.'/images/buttons/button_new_product.gif" alt="'.IMAGE_NEW_CATEGORY.'" border="0"></a>'; ?> </td>
</tr></table></td></tr></table></td></tr></table>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="95%" align="center" style="word-break:break-all;">
<tr><td bgcolor="<?=BORDERCOLOR?>">
<table border="0" cellspacing="<?=BORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="100%" style="word-break:break-all;">
</tr><td bgcolor="<?=ALTBG1?>" colspan="2">
<?=$multipage?></td></tr>
</table></td></tr></table>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="95%" align="center" style="word-break:break-all;">
<tr><td bgcolor="<?=BORDERCOLOR?>">
<table border="0" cellspacing="<?=BORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="100%" style="word-break:break-all;">
<tr class="header" align="center">
<td><?=TABLE_HEADING_PRODUCTS; ?></td>
<td><?=TABLE_HEADING_PRODUCTS_PRICE; ?></td>
<td><?=TABLE_HEADING_STATUS; ?></td>
<td><?=TABLE_HEADING_ACTION; ?></td></tr>
<?
$query = $db->query("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");
while ($customerss = $db->fetch_array($query)) {
@extract($customerss);
?>
<tr>
<td bgcolor="<?=ALTBG1?>"><?=$customers_firstname.$customers_lastname; ?></td>
<td bgcolor="<?=ALTBG1?>" align="left"><?php echo $customers_email_address; ?></td>
<td bgcolor="<?=ALTBG1?>" align="center"></td>
<td bgcolor="<?=ALTBG2?>" align="center" width="15%">
<a href="<?echo tep_href_link("admincp.php", 'act=orders&cID=' . $customers_id);?>">账单</a>
<a href="<?echo tep_href_link("admincp.php", 'act=customers&type=edit_customers&page=' . $HTTP_GET_VARS['page'] . '&cID=' . $customers_id);?>">详情</a>
</td>
</tr>
<?php
}
?>
</table></td></tr></table>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="95%" align="center" style="word-break:break-all;">
<tr><td bgcolor="<?=BORDERCOLOR?>">
<table border="0" cellspacing="<?=BORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="100%" style="word-break:break-all;">
</tr>
<td bgcolor="<?=ALTBG1?>" colspan="2">
<?=$multipage?></td></tr>
</table></td></tr></table>
<?
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?