<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta content="zh-cn" http-equiv="Content-Language" />
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<meta name="renderer" content="webkit"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,  user-scalable=no"/>
		<title>{%$lngpack.sitename%}</title>
		<meta name="keywords" content="{%$lngpack.keyword%}" />
		<meta name="description" content="{%$lngpack.description%}" />
		<link rel="icon" type="image/png" href="{%$icon_16%}" sizes="16x16"/>
		<link rel="icon" type="image/png" href="{%$icon_32%}" sizes="32x32"/>
		<link rel="icon" type="image/png" href="{%$icon_64%}" sizes="64x64"/>
		<link href="{%$rootpath%}css/bootstrap.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcmsp8_font.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/swiper.min.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcmsp8_all.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcms_p8_public.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/jquery.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/bootstrap.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/swiper.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_base.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_dialog.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/citydb.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/cityselect.js"></script>
	</head>

	<body>
		{%link file="public/head.html"%}
		<section class="bann_container">
			<div class="container page_bann_title">
				<h2>Online inquiry</h2>
			</div>
		</section>

		<section class="container espcms_page_book">
			{%if $out=='enquiry_edit'%}
				<script type="text/javascript">
					$(function () {
						{%if $member_con.MEMBER_CITY_VERIFY==1%}
						$("#city_select").citySelect({
							prov: "{%if $member.province%}{%$member.province%}{%else%}北京{%/if%}",
							city: "{%$member.city%}",
							dist: "{%$member.district%}",
							nodata: "none"
						});
						{%/if%}
						$("#enquiry_list").espcms_formvalidation({display_icon_err: false});
						load_tabclick('.tab_click');
						conpon_check();
					});
				</script>
				<form name="enquiry_list" method="post" id="enquiry_list" class="form-horizontal admin-form" action="{%$enquiry_link.save%}">
					<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
					<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
					<input type="hidden" name="userid" id="userid" value="{%$member.userid%}"/>
					<div class="section-divider mb40"><span>Demand information</span></div>
					<div class="form-group">
						<div class="col-sm-12">
							<table class="table table-striped table-bordered tc">
								<thead class="contrast_th">
									<tr class="info">
										<th class="tc">Required Products</th>
										<th class="tc">number</th>
										<th class="tc">quantity</th>
									</tr>
								</thead>
								<tbody class="contrast_td">
									{%forlist from=$array key=i%}
									<tr>
										<td class="tc">
											<input type="hidden" name="products_id[]" class="products_id" data-tid="{%$array[i].tid%}" value="{%$array[i].did%}"/>
											<input type="hidden" name="products_tid[]" class="products_tid" value="{%$array[i].tid%}"/>
											<input type="hidden" name="products_name[]" value="{%$array[i].title%}"/>
											<input type="hidden" name="products_tsn[]" value="{%$array[i].tsn%}"/>
											{%$array[i].title%}
										</td>
										<td class="tc">{%$array[i].tsn%}</td>
										<td class="tc">{%$array[i].amount%}<input type="hidden" name="product_item_qty[]" id="amount_{%$array[i].did%}" value="{%$array[i].amount%}"></td>
									</tr>
									{%/forlist%}
								</tbody>
							</table>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">Consignee Name</label>
						<div class="col-sm-9"><input type="text" name="linkman" value="{%$member.alias%}" class="form-control" data-validation-minlength="4" data-validation-maxlength="50" placeholder="Please fill in the real name of the contact" title="Please fill in the real name of the contact" data-validation-msg="Sorry: the real name of the consignee is incorrectly entered, please return Re-enter!"/></div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">Gender</label>
						<div class="col-sm-9 pt6">
							<input type="radio" value="1" name="sex" {%if $member.sex==1%}checked{%/if%}> Male&nbsp;
							<input type="radio" value="2" name="sex" {%if $member.sex==2%}checked{%/if%}> Female
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">E-mail</label>
						<div class="col-sm-9"><input type="text" name="email" value="{%$member.email%}" class="form-control" data-validation="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"  placeholder="Please enter E-mail" title="Please enter E-mail" data-validation-msg="Sorry: E-mail input error, please re-enter!"/ ></div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">Moblie</label>
						<div class="col-sm-9"><input type="text" name="mobile" value="{%$member.mobile%}" class="form-control" data-validation="^1[\d]{10}$" placeholder="Please enter 11 mobile phone number" title="Please enter 11 mobile phone number" data-validation-msg="Sorry: The phone number is entered incorrectly, please re-enter!"/> </div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">TEL</label>
						<div class="col-sm-9"><input type="text" name="tel" value="{%$member.tel%}" class="form-control" data-validation="((\d{11})|^[\d]*[-]?((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)" placeholder="Please enter a landline" title ="Please enter the landline number" data-validation-msg="Sorry: the landline is incorrectly entered, please re-enter!"/> </div>
					</div>
					{%if $member_con.MEMBER_CITY_VERIFY==1%}
					<div class="form-group">
						<label class="col-sm-2 control-label">Area</label>
						<div class="col-sm-9">
							<div id="city_select">
								<div class="col-sm-3 p0">
									<select class="form-control prov" name="province"></select>
								</div>
								<div class="col-sm-3 p0 pl5">
									<select class="form-control city" name="city" disabled="disabled"></select>
								</div>
								<div class="col-sm-3 pl5">
									<select class="form-control dist" name="district" disabled="disabled"></select>
								</div>
							</div>
						</div>
					</div>
					{%/if%}
					<div class="form-group">
						<label class="col-sm-2 control-label">Detailed address</label>
						<div class="col-sm-9"><input type="text" name="address" value="{%$member.address%}" class="form-control" data-validation-minlength="4" data-validation-maxlength="200" placeholder="Please fill in the order details" title="Please fill in the order details" data-validation-msg="Sorry: the order details address is entered incorrectly, please go back and re-enter!" /></div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">Remarks</label>
						<div class="col-sm-9">
							<textarea class="form-control" style="width:100%;height:120px" name="content" id="content" maxlength="800" data-isvalidation="true" data-validation-minlength="4" data-validation-maxlength="200" placeholder="Please enter the order note, no more than 500 characters in length" title="Please enter the order note, no more than 500 characters in length" data-validation-msg ="Sorry, the order comment is entered incorrectly. Please enter any character up to 500 characters in length!"></textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-9">
							<button class="btn btn-orange" type="submit" formmethod="POST"/>Submit inquiry</button>
						</div>
					</div>
				</form>
			{%elseif $out=='enquiry_ok'%}
				<div class="section-divider mb40"><span>Inquiry submission success</span></div>
				<div class="tc">
					<h3>Congratulations, your inquiry has been submitted successfully, please remember your inquiry number: <span class="colorgreg b">{%$read.enquirysn%}</span></h3>
				</div>
				{%if $member_app.isetup && $member_app.isopen && $member.userid%}
				<div class="tc mt30 mb30">
					<a class="btn btn-success btn-shadow" href="{%$mlink.center%}">Member Center</a> <a class="btn btn-success btn-shadow" href="{% $enquiry_member_link%}">View Inquiry</a>
				</div>
				{%/if%}
			{%/if%}
		</section>

		{%link file="public/footer.html"%}
	</body>
</html>