<!--#include file="inc/const.asp"-->
<!--#include file="inc/check.asp"-->
<!--#include file="../inc/chkinput.asp"-->
<!--#include file="inc/head.inc"-->
<%
Call InnerLocation("交费确认")

Dim Action,SQL,Rs
Action = LCase(Request("action"))
Select Case Trim(Action)
Case "save"
	Call SaveConfirm
Case Else
	Call showmain
End Select
If Founderr = True Then
	Call ToErrors(ErrMsg)
End If
Sub showmain()
%>
<form action="?action=save" method="post" name="form2">
    <table class="Usertableborder" cellspacing="1" cellpadding="3" align="center" border="0">
		<tr height="25">
			<th colspan="2">交费确认</th>
		</tr>
		<tr align="center" height="25">
			<td class="Usertablerow2" colspan="2"><font color="#ff0000">注意：</font><font color="#0000ff">请一定要正确填写以下含*的选项，以方便我们核对！</font></td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right" width="20%">汇款日期：</td>
			<td class="Usertablerow1" width="80%"><input size="15" name="PayDate" value="<%=date()%>" type="text" /> <font color="#ff0000">*</font></td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right">汇款金额：</td>
			<td class="Usertablerow1"><input onkeyup="if(isNaN(this.value))this.value=''" size="15" name="PayMoney" type="text" /> 元 <font color="#ff0000">*</font></td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right">定 单 号：</td>
			<td class="Usertablerow1"><input size="30" name="indent" type="text" /> <font color="#ff0000">*</font></td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right">汇款方式：</td>
			<td class="Usertablerow1"><input type="radio" checked="checked" name="paymode" value="银行汇款" /> 电汇&nbsp;&nbsp; <input type="radio" name="paymode" value="邮局汇款" /> 邮汇&nbsp;&nbsp; <input type="radio" name="paymode" value="网上支付" /> 网上支付</td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right">用户名：</td>
			<td class="Usertablerow1"><input size="15" name="username" value="<%=NewAsp.MemberName%>" type="text" /> <font color="#ff0000">*</font></td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right">汇款人名称：</td>
			<td class="Usertablerow1"><input size="30" name="customer" type="text" /> <font color="#ff0000">*</font></td>
		</tr>
		<tr height="25">
			<td class="Usertablerow1" align="right">汇款人邮箱：</td>
			<td class="Usertablerow1"><input size="30" name="Email" type="text" /> <font color="#ff0000">*</font></td>
		</tr>
		<tr>
			<td class="Usertablerow1" align="right">其它说明：</td>
			<td class="Usertablerow1"><textarea rows="5" cols="50" name="readme"></textarea> <font color="#ff0000">*</font></td>
		</tr>
		<tr height="28">
			<td class="Usertablerow1" align="right">验 证 码：</td>
			<td class="Usertablerow1"><input name="checkcode" type="text" class="logininput" id="checkcode" size="5" maxlength="4" onfocus="get_checkcode();this.onfocus=null;" onkeyup="ajaxcheckcode('check_code','checkcode');" />
				<span id="img_checkcode"><label style="cursor:pointer;" onclick="get_checkcode();">点击获取验证码</label></span><span id="isok_checkcode"></span> <font color="#ff0000">*</font></td>
		</tr>
		<tr align="center" height="28">
			<td class="Usertablerow2" colspan="2"><input class="button" type="submit" name="submit_button" value=" 确认提交 " /></td>
		</tr>
    </table>
</form>
<%
End Sub

Sub SaveConfirm()
	If NewAsp.CheckPost=False Then
		ErrMsg = ErrMsg + Postmsg
		FoundErr = True
		Exit Sub
	End If
	If Not NewAsp.CodeIsTrue() Then
		ErrMsg = ErrMsg + "<meta http-equiv=""refresh"" content=""2;URL=confirm.asp""><li>验证码校验失败，请返回刷新页面再试。两秒后自动返回</li>"
		Founderr = True
		Exit Sub
	End If

	If Not IsDate(Request.Form("PayDate")) Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>日期输入错误。</li>"
	End If
	If Not IsNumeric(Request.Form("PayMoney")) Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>汇款金额输入错误。</li>"
	End If
	If Trim(Request.Form("indent")) = "" Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>你的定单号没有填咧？</li>"
	End If
	If IsValidEmail(Request.Form("Email")) = False Then
		ErrMsg = ErrMsg + "<li>您的Email有错误！</li>"
		Founderr = True
	End If
	If Trim(Request.Form("customer")) = "" Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>汇款人名称不能为空。</li>"
	End If
	If Trim(Request.Form("username")) = "" Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>用户名不能为空？</li>"
	End If
	If Founderr = True Then Exit Sub
	Set Rs = NewAsp.CreateAXObject("ADODB.Recordset")
	SQL = "SELECT * FROM NC_Confirm WHERE (id is null)"
	Rs.Open SQL,Conn,1,3
	Rs.Addnew
		Rs("paymode").Value = NewAsp.RequestForm(Request.Form("paymode"),20)
		Rs("PayDate").Value = NewAsp.RequestForm(Request.Form("PayDate"),30)
		Rs("PayMoney").Value = NewAsp.CheckNumeric(Request.Form("PayMoney"))
		Rs("indent").Value = NewAsp.RequestForm(Request.Form("indent"),35)
		Rs("Email").Value = NewAsp.RequestForm(Request.Form("Email"),50)
		Rs("customer").Value = NewAsp.RequestForm(Request.Form("customer"),30)
		Rs("username").Value = NewAsp.RequestForm(Request.Form("username"),30)
		Rs("readme").Value = NewAsp.RequestForm(Request.Form("readme"),200)
		Rs("isPass").Value = 0
	Rs.Update
	Rs.close:set Rs = Nothing
	Call ToSucceed("<li>恭喜您！确认信息提交成功，我们会在一个工作日内处理你的定单。")
End Sub

%>
<!--#include file="inc/foot.inc"-->