⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cz.asp

📁 视频点播系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="chklogin.asp"-->
<%

call myobj.chkrq()

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户账号充值</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	color: #0000FF;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style>
<script language="vbscript">
function show_cz_value()
if form1.cz_type.value="" or isnull(form1.cz_type.value) or IsEmpty(form1.cz_type.value) then
	document.GetElementById("cz_value").style.display="none"
	document.GetElementById("cz_value2").style.display="none"
	document.GetElementById("cz_value3").style.display="inline"
end if
if form1.cz_type.value<>"" and isnull(form1.cz_type.value)=false and IsEmpty(form1.cz_type.value)=false then
	if form1.cz_type.value=1 then
		document.GetElementById("cz_value").style.display="inline"
		document.GetElementById("cz_value2").style.display="none"
		document.GetElementById("cz_value3").style.display="none"
	end if
	if form1.cz_type.value=2 or form1.cz_type.value=3 then
		document.GetElementById("cz_value").style.display="none"
		document.GetElementById("cz_value2").style.display="inline"
		document.GetElementById("cz_value3").style.display="none"
	end if
end if
end function
</script>
</head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<%
action_e=request.QueryString("action")
Select Case action_e
	Case ""
	  Call main()
	Case "cz_true"
	  Call cz_true()
end select
%>
<%
sub main()
session("cz")=true
%>
<form name="form1" method="post" action="<%=filename%>?action=cz_true">
  <table width="500" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center">[<a href="agent_index.asp">管理中心首页</a>] [<a href="edit.asp">修改资料</a>] [<span class="font3">账号充值</span>] [<a href="cz_log.asp">充值记录</a>] [<a href="login.asp?action=logout">注销登陆</a>]</td>
    </tr>
  </table>
  <table width="500" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong class="font1">用户账号充值</strong></td>
  </tr>
</table>
  <table width="500" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from agents where agent_id='"&request.cookies("username")&"'",conn,1,1
agent_money=rs("agent_money")
agent_money2=rs("agent_money2")
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
    <tr>
      <td align="center" bgcolor="#F7F7F7">您的代理预付金额剩余:<span class="font3"><%=agent_money%></span> 元,您还可以透支:<span class="font3"><%=agent_money2%></span> 元</td>
    </tr>
  </table>
  <table width="500" height="210" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <td align="center" bgcolor="#F7F7F7"><table width="350" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="150" height="25" align="right">用户类型:</td>
        <td><select name="cz_type" class="select1" id="cz_type" onChange="vbscript:show_cz_value()">
            <option selected>请选择</option>
            <option value="1">个人计点</option>
            <option value="2">个人包月</option>
            <option value="3">网吧包月</option>
          </select></td>
      </tr>
      <tr>
        <td height="25" align="right">充值数量:</td>
        <td><select name="cz_value" class="select1" id="cz_value" style="display:none">
          <option selected>请选择点数</option>
          <option value="100">100点</option>
          <option value="300">300点</option>
          <option value="600">600点</option>
        </select>
          <select name="cz_value2" class="select1" id="cz_value2" style="display:none">
            <option selected>请选择月数</option>
            <option value="1">1个月</option>
            <option value="3">3个月</option>
            <option value="6">6个月</option>
              </select>
          <select name="cz_value3" class="select1" id="cz_value3">
            <option selected>请选择种类</option>
              </select></td>
      </tr>
      <tr id="tb_pc_count">
        <td height="25" align="right">VIP用户:</td>
        <td><input type="radio" name="cz_vip" value="true">
    是 
      <input type="radio" name="cz_vip" value="false">
    否</td>
      </tr>
      <tr id="tb_pc_count">
        <td height="25" align="right">用户账号:</td>
        <td><input name="member_id" type="text" class="input1" id="member_id" size="15"></td>
      </tr>
      <tr id="tb_pc_count">
        <td height="25" align="right">确认用户账号:</td>
        <td><input name="re_member_id" type="text" class="input1" id="re_member_id" size="15"></td>
      </tr>
      <tr align="center" id="tb_pc_count">
        <td height="40" colspan="2"><input name="submit" type="submit" class="button1" id="submit" value="确  定">
          <input name="agent_money" type="hidden" id="agent_money" value="<%=agent_money%>">
          <input name="agent_money2" type="hidden" id="agent_money2" value="<%=agent_money2%>"></td>
        </tr>
    </table></td>
  </tr>
</table>
</form>
<%end sub%>
<%
sub cz_true()
if session("cz")<>true then
Response.Redirect ("cz.asp")
end if
if request.form("agent_money")="" or request.form("agent_money2")="" then
	response.write"<script language=javascript>alert('关键参数值无法获取');history.back();</Script>"
	response.end 
end if
if myobj.chkmoney(request.form("agent_money"))=false or myobj.chkmoney(request.form("agent_money2"))=false then
	response.write"<script language=javascript>alert('关键参数值的格式错误');history.back();</Script>"
	response.end 
end if
if request.form("cz_type")="" or isnull(request.form("cz_type")) then
	response.write"<script language=javascript>alert('请选择用户类型');history.back();</Script>"
	response.end 
end if
if myobj.ChkNum(request.form("cz_type"))=false then
	response.write"<script language=javascript>alert('用户类型值错误');history.back();</Script>"
	response.end 
end if
if cint(request.form("cz_type"))<1 or cint(request.form("cz_type"))>3 then
	response.write"<script language=javascript>alert('用户类型值错误');history.back();</Script>"
	response.end 
end if
if request.form("cz_type")=1 then
	if request.form("cz_value")="" then
		response.write"<script language=javascript>alert('请选择充值点数');history.back();</Script>"
		response.end 
	end if
	if myobj.ChkNum(request.form("cz_value"))=false then
		response.write"<script language=javascript>alert('充值点数值错误');history.back();</Script>"
		response.end 
	end if
	if cint(request.form("cz_value"))<>100 and cint(request.form("cz_value"))<>300 and cint(request.form("cz_value"))<>600 then
		response.write"<script language=javascript>alert('充值点数值错误');history.back();</Script>"
		response.end 
	end if
end if
if request.form("cz_type")<>1 then
	if request.form("cz_value2")="" then
		response.write"<script language=javascript>alert('请选择充值月数');history.back();</Script>"
		response.end 
	end if
	if myobj.ChkNum(request.form("cz_value2"))=false then
		response.write"<script language=javascript>alert('充值月数值错误');history.back();</Script>"
		response.end 
	end if
	if cint(request.form("cz_value2"))<>1 and cint(request.form("cz_value2"))<>3 and cint(request.form("cz_value2"))<>6 then
		response.write"<script language=javascript>alert('充值月数值错误');history.back();</Script>"
		response.end 
	end if
end if
if request.form("cz_vip")="" then
	response.write"<script language=javascript>alert('请选择该要充值的账号是否是VIP用户');history.back();</Script>"
	response.end 
end if
if myobj.chkbool(request.form("cz_vip"))=false then
	response.write"<script language=javascript>alert('VIP值类型错误');history.back();</Script>"
	response.end 
end if
if request.form("member_id")="" then
	response.write"<script language=javascript>alert('请填写要充值的用户账号');history.back();</Script>"
	response.end 
end if
if myobj.ChkID(request.form("member_id"))=false then
	response.write"<script language=javascript>alert('用户账号只能是字母、数字或下划线,并且第一个字符和最后一个字符不能是下划线');history.back();</Script>"
	response.end 
end if
if len(request.form("member_id"))<3 or len(request.form("member_id"))>12 then
	response.write"<script language=javascript>alert('用户账号不能少于3或多于12个字符');history.back();</Script>"
	response.end 
end if
if request.form("re_member_id")<>request.form("member_id") then
	response.write"<script language=javascript>alert('确认用户账号失败,两次输入的账号必须相同');history.back();</Script>"
	response.end 
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where userid='"&request.form("member_id")&"'",conn,1,1
if rs.eof then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.write"<script language=javascript>alert('该用户并不存在');history.back();</Script>"
	response.end 
else
	if cint(request.form("cz_type"))<>rs("u_type") then
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
		response.write"<script language=javascript>alert('该用户账号类型与要充值的类型不匹配');history.back();</Script>"
		response.end 
	end if
	if rs("is_vip")=true then
		if cbool(request.form("cz_vip"))<>true then
			response.write"<script language=javascript>alert('该用户是VIP用户,你必须选择VIP用户充值');history.back();</Script>"
			response.end 
		end if
	end if
	if rs("is_vip")<>true then
		if cbool(request.form("cz_vip"))<>false then
			response.write"<script language=javascript>alert('该用户不是VIP用户,你不能选择VIP用户充值');history.back();</Script>"
			response.end 
		end if
	end if
end if
rs.close

set rs=server.createobject("adodb.recordset")
rs.open "select * from money_setup where money_type='agent'",conn,1,1
'个人计点
pop_100p=rs("pop_100p")
vip_100p=rs("vip_100p")
pop_300p=rs("pop_300p")
vip_300p=rs("vip_300p")
pop_600p=rs("pop_600p")
vip_600p=rs("vip_600p")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -