📄 cong.asp
字号:
<!--#include file="conn.asp"-->
<%
if trim(request("action"))="add" then
cname=request("cname")
nname=request("nname")
pass=request("pass")
ooname=request("name")
if cname="" or pass="" or nname="" then
response.write "<script language=JavaScript>{window.alert('冲值卡资料填写错误,请重新输入!');window.history.go(-1);}</script>"
response.end
else
set rs=server.createobject("adodb.recordset")
sql="SELECT cname,pass,dianzhi,zhuangtai from chong where cname='"&request("cname")&"'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then %>
错误:冲值帐号不存在
<%else
set rs=server.createobject("adodb.recordset")
sql="SELECT cname,pass,dianzhi,zhuangtai from chong where cname='"&request("cname")&"'"
rs.open sql,conn,1,3
if rs("zhuangtai")<>"尚未使用" then %>对不起!本冲值卡已经被<%=rs("zhuangtai")%>使用<% elseif rs("pass")=request("pass") then
ooname=request("name")
dianzhi=rs("dianzhi")
zhuangtai=rs("zhuangtai")
sql="update use set cun=cun+'"&dianzhi&"' where id="&nname&""
conn.Execute(sql)
' response.write "success"
%>您已经成功冲值拉<%=dianzhi%>元到您的帐号ID[<%=nname%>]您的冲值卡<%=cname%>已使用完毕<% sql="update chong set zhuangtai='"&ooname&"' where cname='"&request("cname")&"'"
conn.Execute(sql)
' response.write "success" %><%
else %>
错误:帐号密码不正确
<%end if
end if
end if
end if %><script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
//-->
</script>
<title>【帐号冲值】</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="style.css" rel=Stylesheet type=text/css>
<% set rs=server.createobject("adodb.recordset")
sql="SELECT * from use where name='"&session("use")&"'"
rs.open sql,conn,1,3
%>
<table width="382" border="0" cellspacing="0" cellpadding="0" height="107" bgcolor="#F3F3F3">
<tr>
<td height="30">欢迎您!<font color="#990000"><%=rs("name")%></font></td>
</tr>
<tr>
<td height="1" bgcolor="#CCCCCC"></td>
</tr>
<tr>
<td>
<form name="form1" method="post" action="cong.asp?action=add">
<table width="378" border="0" cellspacing="0" cellpadding="0" height="63">
<tr>
<td width="99">冲值卡号:</td>
<td colspan="2">
<input style="BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 9pt; HEIGHT: 19px;"type="text" name="cname" size="30">
</td>
</tr>
<tr>
<td width="99">卡密码:</td>
<td colspan="2">
<input style="BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 9pt; HEIGHT: 19px;"type="text" name="pass" size="30">
</td>
</tr>
<tr>
<td width="99" height="11">预冲帐号ID:</td>
<td width="191" height="11">
<input style="BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 9pt; HEIGHT: 19px;"type="text" name="nname" value="<%=rs("id")%>" size="8">
名称:
<input style="BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 9pt; HEIGHT: 19px;"type="text" name="name" value="<%=rs("name")%>" size="10">
</td>
<td width="88" height="11">
<div align="center">
<input type="image" name="Submit" value="Submit" src="img/xyb.gif" width="54" height="18">
</div>
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td><font color="#990000">要冲另外帐号,请修改为相应的帐号ID和名称</font></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -