You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
6.2 KiB
164 lines
6.2 KiB
<!-- $Id: user_info.htm 16854 2009-12-07 06:20:09Z sxc_shop $ -->
|
|
{include file="pageheader.htm"}
|
|
{insert_scripts files="../js/region.js"}
|
|
<script type="text/javascript">
|
|
region.isAdmin = false;
|
|
{foreach from=$lang.flow_js item=item key=key}
|
|
var {$key} = "{$item}";
|
|
{/foreach}
|
|
|
|
onload = function() {
|
|
if (!document.all)
|
|
{
|
|
document.forms['theForm'].reset();
|
|
}
|
|
}
|
|
</script>
|
|
<div class="main-div">
|
|
<form method="post" action="user_address_log.php" name="theForm" onsubmit="return validate()">
|
|
<table width="100%" >
|
|
<tr>
|
|
<td class="label">收货人姓名:</td>
|
|
<td><input name="consignee" value="{$consignee.consignee|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">配送区域:</td>
|
|
<td colspan="3" align="left" bgcolor="#ffffff"><select name="country" id="selCountries_{$sn}" onchange="region.changed(this, 1, 'selProvinces_{$sn}')">
|
|
<option value="0">{$lang.please_select}{$lang.country}</option>
|
|
<!-- {foreach from=$country_list item=country} -->
|
|
<option value="{$country.region_id}" {if $consignee.country eq $country.region_id}selected{/if}>{$country.region_name}</option>
|
|
<!-- {/foreach} -->
|
|
</select>
|
|
<select name="province" id="selProvinces_{$sn}" onchange="region.changed(this, 2, 'selCities_{$sn}')">
|
|
<option value="0">{$lang.please_select}{$lang.province}</option>
|
|
<!-- {foreach from=$province_list item=province} -->
|
|
<option value="{$province.region_id}" {if $consignee.province eq $province.region_id}selected{/if}>{$province.region_name}</option>
|
|
<!-- {/foreach} -->
|
|
</select>
|
|
<select name="city" id="selCities_{$sn}" onchange="region.changed(this, 3, 'selDistricts_{$sn}')">
|
|
<option value="0">{$lang.please_select}{$lang.city}</option>
|
|
<!-- {foreach from=$city_list item=city} -->
|
|
<option value="{$city.region_id}" {if $consignee.city eq $city.region_id}selected{/if}>{$city.region_name}</option>
|
|
<!-- {/foreach} -->
|
|
</select>
|
|
<select name="district" id="selDistricts_{$sn}" {if !$district_list.$sn}style="display:none"{/if}>
|
|
<option value="0">{$lang.please_select}{$lang.area}</option>
|
|
<!-- {foreach from=$district_list item=district} -->
|
|
<option value="{$district.region_id}" {if $consignee.district eq $district.region_id}selected{/if}>{$district.region_name}</option>
|
|
<!-- {/foreach} -->
|
|
</select>
|
|
{$lang.require_field} </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">详细地址:</td>
|
|
<td><input name="address" value="{$consignee.address|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">电话:</td>
|
|
<td><input name="tel" value="{$consignee.tel|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">手机:</td>
|
|
<td><input name="mobile" value="{$consignee.mobile|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">电子邮件:</td>
|
|
<td><input name="email" value="{$consignee.email|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">邮政编码:</td>
|
|
<td><input name="zipcode" value="{$consignee.zipcode|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">标志建筑:</td>
|
|
<td><input name="sign_building" value="{$consignee.sign_building|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">最佳送货时间:</td>
|
|
<td><input name="best_time" value="{$consignee.best_time|escape}" type="text" /></td>
|
|
</tr>
|
|
<tr style="display:none">
|
|
<td class="label">审核状态:</td>
|
|
<td><input type="radio" value="0" {if $consignee.audit eq 0}checked="checked"{/if} name="audit"> 未审核 <input type="radio" {if $consignee.audit eq 1}checked="checked"{/if} value="1" name="audit"> 已审核 <input type="radio" {if $consignee.audit eq 2}checked="checked"{/if} value="2" name="audit"> 未通过 </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="center">
|
|
<input type="submit" value="{$lang.button_submit}" class="button" />
|
|
<input type="reset" value="{$lang.button_reset}" class="button" />
|
|
<input type="hidden" name="act" value="{$form_action}" />
|
|
<input type="hidden" name="address_id" value="{$address_id}" />
|
|
<input type="hidden" name="user_id" value="{$user_id}" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
</div>
|
|
{insert_scripts files="../js/utils.js,validator.js"}
|
|
{literal}
|
|
<script language="JavaScript">
|
|
<!--
|
|
|
|
if (document.forms['theForm'].elements['act'].value == "insert")
|
|
{
|
|
document.forms['theForm'].elements['username'].focus();
|
|
}
|
|
else
|
|
{
|
|
document.forms['theForm'].elements['email'].focus();
|
|
}
|
|
|
|
onload = function()
|
|
{
|
|
// 开始检查订单
|
|
startCheckOrder();
|
|
}
|
|
|
|
/**
|
|
* 检查表单输入的数据
|
|
*/
|
|
function validate()
|
|
{
|
|
validator = new Validator("theForm");
|
|
validator.isEmail("email", invalid_email, true);
|
|
|
|
if (document.forms['theForm'].elements['act'].value == "insert")
|
|
{
|
|
validator.required("username", no_username);
|
|
validator.required("password", no_password);
|
|
validator.required("confirm_password", no_confirm_password);
|
|
validator.eqaul("password", "confirm_password", password_not_same);
|
|
|
|
var password_value = document.forms['theForm'].elements['password'].value;
|
|
if (password_value.length < 6)
|
|
{
|
|
validator.addErrorMsg(less_password);
|
|
}
|
|
if (/ /.test(password_value) == true)
|
|
{
|
|
validator.addErrorMsg(passwd_balnk);
|
|
}
|
|
}
|
|
else if (document.forms['theForm'].elements['act'].value == "update")
|
|
{
|
|
var newpass = document.forms['theForm'].elements['password'];
|
|
var confirm_password = document.forms['theForm'].elements['confirm_password'];
|
|
if(newpass.value.length > 0 || confirm_password.value.length)
|
|
{
|
|
if(newpass.value.length >= 6 || confirm_password.value.length >= 6)
|
|
{
|
|
validator.eqaul("password", "confirm_password", password_not_same);
|
|
}
|
|
else
|
|
{
|
|
validator.addErrorMsg(password_len_err);
|
|
}
|
|
}
|
|
}
|
|
|
|
return validator.passed();
|
|
}
|
|
//-->
|
|
</script>
|
|
{/literal}
|
|
{include file="pagefooter.htm"}
|
|
|