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

📄 change_ip.asp

📁 在线点播系统
💻 ASP
字号:
<!--#include file="../chklogin.asp"-->
<%
starttime=timer()
%>
<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="400" 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> - 网吧用户修改绑定IP地址</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"><strong><a href="index.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/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><a href="user_cz.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/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="#"><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 "chklogin"
	  Call chklogin()
	Case "logend"
	  Call logend()
end select
%>
<%
sub main
if request.cookies("userid")<>"" then
	response.write"<script language=javascript>alert('在进行此操作前,请先将当前的用户账号退出');history.back();</Script>"
	response.end
end if
%>
<!--头号-->
	<table width="490" height="200" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center">
<form name="form1" method="post" action="change_ip.asp?action=chklogin">
		<table width="300" height="25" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>
		<table width="400" height="40" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center">在修改网吧用户的绑定IP地址之前,请先以该账号登陆</td>
          </tr>
        </table>
		<table width="280" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25" colspan="2" align="center"><strong>网吧用户登陆</strong></td>
          </tr>
          <tr>
            <td width="80" height="25" align="center">用户账号:</td>
            <td align="left"><input name="userid" type="text" class="input2" id="userid" size="20"></td>
          </tr>
          <tr>
            <td height="25" align="center">用户密码:</td>
            <td align="left"><input name="u_pwd" type="password" class="input2" id="u_pwd" size="20"></td>
          </tr>
<%
aryReturn = Split(myobj.getIP(),".")
%>
          <tr>
            <td height="25" align="center">修改绑定IP:</td>
            <td align="left"><input name="bdip0" type="text" class="input2" id="bdip0" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(0),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
.
  <input name="bdip1" type="text" class="input2" id="bdip1" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(1),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
.
<input name="bdip2" type="text" class="input2" id="bdip2" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(2),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
.
<input name="bdip3" type="text" class="input2" id="bdip3" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(3),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></td>
          </tr>
          <tr>
            <td height="25" align="center">验证代码:</td>
            <td align="left"><input name="vcode" type="text" class="input2" id="vcode" size="4" maxlength="4">
              <img src="../inc/vcode.asp"></td>
          </tr>
          <tr>
            <td height="40" colspan="2" align="center"><input name="image" type="image" src="../images/login.gif" width="48" height="20">              </td>
            </tr>
        </table>
</form>
<!--尾-->
		</td>
      </tr>
    </table>
<%end sub%>
<%
sub chklogin()


call myobj.chkrq()

if request.form("userid")="" then
response.write"<script language=javascript>alert('请填写用户账号');history.back();</Script>"
response.end
end if
if myobj.ChkID(request.form("userid"))=false then
response.write"<script language=javascript>alert('用户账号只能是字母、数字、下划线,并且第一个字符或最后一个字符不能是下划线');history.back();</Script>"
response.end
end if
if len(request.form("userid"))<3 or len(request.form("userid"))>12 then
response.write"<script language=javascript>alert('用户账号不能小于3个字符,大于12个字符');history.back();</Script>"
response.end
end if
if request.form("u_pwd")="" then
response.write"<script language=javascript>alert('请填写用户密码');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("u_pwd"))<6 or myobj.ChkLen(request.form("u_pwd"))>24 then
response.write"<script language=javascript>alert('用户密码不能小于6个字符,大于24个字符');history.back();</Script>"
response.end
end if
if UCase(request.Form("vcode"))<>session("vcode") 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
end if
if rs("u_type")<>3 then
	response.write"<script language=javascript>alert('您要修改的用户账号并不是网吧包月用户');history.back();</Script>"
	response.end
end if
if md5(request.form("u_pwd"))<>rs("u_pwd") then
	call nr()
	response.write"<script language=javascript>alert('用户密码错误');history.back();</Script>"
	response.end
end if
old_bdip=rs("bd_ip")
call cr() '关闭对象

if request.form("bdip0")="" or request.form("bdip1")="" or request.form("bdip2")="" or request.form("bdip3")="" then
	response.write"<script language=javascript>alert('请将与该网吧包月用户账号绑定的IP地址填写完整');history.back();</Script>"
	response.end
end if
if myobj.ChkNum(request.form("bdip0"))=false or myobj.ChkNum(request.form("bdip1"))=false or myobj.ChkNum(request.form("bdip2"))=false or myobj.ChkNum(request.form("bdip3"))=false then
	response.write"<script language=javascript>alert('IP地址只能填写0-255的数字');history.back();</Script>"
	response.end
end if
if request.form("bdip0")=0 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=0 then
	response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
	response.end
end if
if request.form("bdip0")=255 and request.form("bdip1")=255 and request.form("bdip2")=255 and request.form("bdip3")=255 then
	response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
	response.end
end if
if request.form("bdip0")=127 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=1 then
	response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
	response.end
end if
if request.form("bdip0")=224 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=1 then
	response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
	response.end
end if
if request.form("bdip0")=224 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=2 then
	response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
	response.end
end if
if request.form("bdip0")=169 and request.form("bdip1")=254 then
	response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
	response.end
end if
edit_bdip=request.form("bdip0")&"."&request.form("bdip1")&"."&request.form("bdip2")&"."&request.form("bdip3")
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=3 and bd_ip='"&edit_bdip&"'",conn,1,1
if not rs.eof then
	call nr()
	response.write"<script language=javascript>alert('您要绑定的IP地址已经被本站其它用户绑定!');history.back();</Script>"
	response.end
end if
rs.close

set rs=server.createobject("adodb.recordset")
rs.open "select * from member where userid='"&request.form("userid")&"'",conn,1,3
rs("bd_ip")=edit_bdip
rs.update
rs.close
%>
<!--头号-->
<table width="490" height="200" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><table width="300" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="25">用户账号:<%=request.form("userid")%></td>
      </tr>
      <tr>
        <td height="25">原绑定的IP地址:<%=old_bdip%></td>
      </tr>
      <tr>
        <td height="25">绑定到新IP地址:<%=edit_bdip%></td>
      </tr>
      <tr>
        <td height="30" align="center">绑定IP地址修改成功!<a href="index.asp">点击此处进入用户管理中心</a></td>
      </tr>
    </table></td>
  </tr>
</table>
<%end sub%>
	</td>
  </tr>
</table>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

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