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

📄 user_cz.asp

📁 在线点播系统
💻 ASP
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from setup where id=1",conn,1,1
website_name=rs("website_name")
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=website_name%> - 影卡充值</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #000000;
}
a:visited {
	color: #000000;
}
a:hover {
	color: #FF6600;
}
-->
</style>
<link href="../images/style.css" rel="stylesheet" type="text/css">
</head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<!--#include file="header.asp"-->
<table width="776" height="450" border="0" align="center" cellpadding="0" cellspacing="0" class="t1">
  <tr>
    <td width="260" height="36" rowspan="2" background="../images/img22.gif"><img src="../images/img29.gif" width="220" height="36"></td>
    <td width="9" height="36" rowspan="2" valign="top"><img src="../images/1_04.jpg" width="9" height="36"></td>
    <td height="11" background="../images/1_05.jpg"></td>
  </tr>
  <tr>
    <td height="25"><a href="index.asp">用户管理中心</a> - 影卡充值 </td>
  </tr>
  <tr>
    <td width="260" align="center" valign="top"><table width="240" height="30" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
        <table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="30" align="center"><img src="../images/img18.gif" width="23" height="21"></td>
            <td align="left"><a href="index.asp"><strong>管理首页</strong></a></td>
          </tr>
        </table>
        <table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="30" align="center"><img src="../images/img25.gif" width="23" height="21"></td>
            <td align="left"><strong><a href="user_data.asp">修改资料</a></strong></td>
          </tr>
        </table>
        <table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="30" align="center"><img src="../images/img26.gif" width="23" height="21"></td>
            <td align="left"><strong>影卡充值←</strong></td>
          </tr>
        </table>
        <table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="30" align="center"><img src="../images/img27.gif" width="23" height="21"></td>
            <td align="left"><a href="user_msg.asp"><strong>站内短信</strong></a></td>
          </tr>
        </table>
        <table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="30" align="center"><img src="../images/img28.gif" width="23" height="21"></td>
            <td align="left"><a href="user_filmfav.asp"><strong>影片收藏</strong></a></td>
          </tr>
        </table>
        <table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="30" align="center"><img src="../images/img16.gif" width="23" height="21"></td>
            <td align="left"><a href="login.asp?action=logout"><strong>退出登陆</strong></a></td></tr>
        </table>
    </td>
    <td valign="top" background="../images/1_24.jpg">&nbsp;</td>
    <td align="center" valign="top">
<%
action_e=request.Querystring("action")
Select Case action_e
	Case ""
	  Call main()
	Case "cz_true"
	  Call cz_true()
end select
%>
<%sub main()%>
<table width="450" height="240" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><table width="250" border="0" cellpadding="0" cellspacing="0">
        <form name="form1" method="post" action="user_cz.asp?action=cz_true">
          <tr>
            <td width="100" height="25" align="right">影卡卡号:</td>
            <td><input name="card_num" type="text" class="input2" id="card_num" size="20"></td>
          </tr>
          <tr>
            <td height="25" align="right">影卡密码:</td>
            <td><input name="card_pwd" type="password" class="input2" id="card_pwd" size="20"></td>
          </tr>
          <tr>
            <td height="25" align="right">充值账号:</td>
            <td><input name="userid" type="text" class="input2" id="userid" size="15" maxlength="12"></td>
          </tr>
          <tr>
            <td height="25" align="right">确认充值账号:</td>
            <td><input name="re_userid" type="text" class="input2" id="re_userid" size="15" maxlength="12"></td>
          </tr>
          <tr>
            <td height="25" align="right">验证代码:</td>
            <td><input name="vcode" type="text" class="input2" id="vcode" size="4" maxlength="4">
                <img src="../inc/vcode.asp"></td>
          </tr>
          <tr align="center">
            <td height="50" colspan="2"><input name="image" type="image" src="../images/img19.gif" width="48" height="20"></td>
          </tr>
        </form>
    </table></td>
  </tr>
</table>
<%end sub%>
<%
sub cz_true()


call myobj.chkrq()

set rs=server.createobject("adodb.recordset")
rs.open "select * from setup where id=1",conn,1,1
count_pc=rs("count_pc")
rs.close
if UCase(request.form("vcode"))<>session("vcode") then
	response.write"<script language=javascript>alert('验证代码错误');history.back();</Script>"
	response.end
end if
if request.Form("card_num")="" or request.Form("card_pwd")="" then
	response.write"<script language=javascript>alert('请输入影卡卡号和密码');history.back();</Script>"
	response.end
end if
if myobj.ChkNum(request.Form("card_num"))=false then
	response.write"<script language=javascript>alert('影卡卡号只能是数字');history.back();</Script>"
	response.end
end if
if request.form("userid")="" then
	response.write"<script language=javascript>alert('请输入要充值的用户账号');history.back();</Script>"
	response.end
end if
if request.form("re_userid")<>request.form("userid") 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("userid")&"'",conn,1,1
if rs.eof then
	call nr()
	response.write"<script language=javascript>alert('要充值的用户账号并不存在');history.back();</Script>"
	response.end
else
	if rs("is_free")=true then
	response.write"<script language=javascript>alert('要充值的用户账号是免费用户,免费用户无需充值即可点播影片');history.back();</Script>"
	response.end
	end if
	if rs("u_type")=3 then
		user_pc_count=rs("max_online")
	end if
	user_type=rs("u_type")
	user_vip=rs("is_vip")
end if
rs.close

set rs=server.createobject("adodb.recordset")
rs.open "select * from cards where card_num='"&request.form("card_num")&"'",conn,1,1
if rs.eof then
	call nr()
	response.write"<script language=javascript>alert('要充值的影卡并不存在');history.back();</Script>"
	response.end
else
	card_value=rs("card_value")
	if request.form("card_pwd")<>rs("card_pwd") then
		call nr()
		response.write"<script language=javascript>alert('影卡密码错误');history.back();</Script>"
		response.end
	end if
	if isnull(rs("used_userid"))=false or rs("used_userid")<>"" then
		call nr()
		response.write"<script language=javascript>alert('该影卡已经被使用过,不能再次使用');history.back();</Script>"
		response.end
	end if
	if count_pc=true then
		if rs("card_type")=3 then
			card_pc_count=rs("pc_count")
			if 	user_pc_count<>card_pc_count then
				call nr()
				response.write"<script language=javascript>alert('系统设置开启了网吧用户按网吧注册时的客户机数量的计费模式,因为您要使用的影卡的只允许允许充值到客户端数量为 "&card_pc_count&" 台的网吧,但是将要充值的网吧包月用户账号设置的客户端数量是"&user_pc_count&"台,所以您不能使用该影卡对该账号进行充值,请使用相应的影卡充值,详细情况请咨询代理商或网站管理员');history.back();</Script>"
				response.end
			end if
		end if
	end if
	if user_type<>rs("card_type") then
		if rs("card_type")=1 then
			call nr()
			response.write"<script language=javascript>alert('该影卡是个人计点用户使用的影卡,与将要被充值账号的用户类型不符,无法进行充值');history.back();</Script>"
			response.end
		end if
		if rs("card_type")=2 then
			call nr()
			response.write"<script language=javascript>alert('该影卡是个人包月用户使用的影卡,与将要被充值账号的用户类型不符,无法进行充值');history.back();</Script>"
			response.end
		end if
		if rs("card_type")=3 then
			call nr()
			response.write"<script language=javascript>alert('该影卡是网吧包月用户使用的影卡,与将要被充值账号的用户类型不符,无法进行充值');history.back();</Script>"
			response.end
		end if
	end if
	if user_vip<>rs("card_vip") then
		if user_vip=true then
			call nr()
			response.write"<script language=javascript>alert('VIP用户只能使用VIP影卡进行充值');history.back();</Script>"
			response.end
		else
			call nr()
			response.write"<script language=javascript>alert('普通用户不能使用VIP影卡进行充值');history.back();</Script>"
			response.end
		end if
	end if
end if
card_money=rs("card_money")
link_id=rs("id")
rs.close

set rs=server.createobject("adodb.recordset")
rs.open "select * from cards where card_num='"&request.form("card_num")&"'",conn,1,3
rs("used_userid")=request.form("userid")
rs("used_time")=now()
rs.update
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where userid='"&request.form("userid")&"'",conn,1,3
if user_type=1 then
rs("point")=rs("point")+cint(card_value)
else
	if user_type<>1 then
		if Datediff("s",rs("end_time"),now())<0 then
			rs("end_time")=DateAdd("m",cint(card_value),rs("end_time"))
		else
			rs("end_time")=DateAdd("m",cint(card_value),now())
		end if
	end if
end if
rs.update
rs.close

set rs=server.createobject("adodb.recordset")
rs.open "select * from money_stat where (id is null)",conn,1,3
rs.addnew
rs("money_type")=1
rs("link_id")=link_id
rs("money_count")=card_money
rs.update
rs.close
%>
<table width="450" height="100" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">影卡充值成功,请即时登陆被充值的账号,查询充值是否成功!</td>
  </tr>
</table>
<%
end sub
%>
<!--尾-->	
	</td>
  </tr>
</table>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

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