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

📄 dns_admin.asp

📁 使用Asp+Access+FSO+Jmail+Servu开发
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = 0
%>
<!--#include file="admin.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet href="../css/admin.css" type="text/css">
<body bgcolor="#FFFFFF">
<%
sel=Request.QueryString ("sel")
if sel="" then sel=3
if sel>3 then 
end if
select case sel
case 3
%>
<table width="400" border="1" align="center" cellpadding="4" cellspacing="0" class="table-line">
  <tr class="td-title-color"> 
    <td align="center" colspan="2"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="shadow">二级域名管理</td>
      </tr>
    </table></td>
  </tr>
  <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td align="center"><a href="dns_admin.asp?sel=4">域名管理</a>:</td>
    <td width="307">可以绑定多域名,可以设置域名优先级!</td>
  </tr>
  <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td align="center"><a href="dns_admin.asp?sel=14">用户管理</a>:</td>
    <td>可以管理用户账号,信息及密码!</td>
  </tr>
  <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td align="center"><a href="dns_admin.asp?sel=11">广告管理</a>:</td>
    <td>可以设置是否访问域名有广告弹出及部分用户有广告</td>
  </tr>
</table>
<br>
<%
case 4
'域名管理
domain_count=true
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.Open connstr
rs.Open ("select * from [domain]"),conn,1,1
if rs.BOF or rs.EOF then 
'rs.Close
'set rs=nothing
'conn.Close
'set conn=nothing
domain_count=False
'Response.Write "未曾有任何可用域名!"
'Response.End 
end if

%>

  
<table width="400" border="1" cellpadding="4" cellspacing="0" align="center" class="table-line">
  <tr align="center" class="td-title-color"> 
    <td colspan="6"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="shadow">域名管理</td>
      </tr>
    </table></td>
  </tr>
  <tr align="center"> 
    <td width="41">id号</td>
    <td width="84">域 名</td>
    <td width="48">广 告</td>
    <td width="48">排 序</td>
    <td width="59">删除</td>
    <td width="59">修改</td>
  </tr>
  <%
if domain_count= true then 
do while not rs.EOF
%>
  <form name="form2" method="post" action="dns_admin.asp?sel=5">
    <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
      <td align="center" height="40" width="41"><%=rs("id")%> 
        <input type="hidden" name="id" value="<%=rs("id")%>">
      </td>
      <td height="40" width="84"> 
        <input type="text" name="domain" size="10" value="<%=rs("domain")%>">
      </td>
      <td align="center" height="40" width="48"> 
        <input type="text" style="text-align:center;" name="ad" size="5" maxlength="5" value="<%=rs("ad")%>">
      </td>
      <td align="center" height="40" width="48"> 
        <input type="text" style="text-align:center;" name="top" size="5" maxlength="5" value="<%=rs("top")%>">
      </td>
      <td align="center" height="40" width="59">
        <input type="checkbox" name="checkbox" value="DEL">
      </td>
      <td align="center" height="40" width="59"> 
        <input type="submit" name="Submit3" value="提交">
      </td>
    </tr>
  </form>
  <%
rs.MoveNext
loop
end if
%>
  <form name="form2" method="post" action="dns_admin.asp?sel=6">
  <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td align="center" width="41">&nbsp;</td>
    <td width="84"> 
      <input type="text" name="domain" size="10">
    </td>
    <td align="center" width="48"> 
      <input type="text" style="text-align:center;" name="ad" size="5" maxlength="5" value="0">
    </td>
    <td align="center" width="48"> 
      <input type="text" style="text-align:center;" name="top" size="5" maxlength="5" value="0">
    </td>
    <td align="center" width="59">&nbsp;</td>
    <td align="center" width="59"> 
      <input type="submit" name="Submit32" value="添加">
    </td>
  </tr>
</form>  
</table>
<center>[<a href="javascript:history.go(-1)">返回</a>]</center>
<br>
<%
rs.Close
set rs=nothing
conn.Close
set conn=nothing
case 5
chk_admin_login(3)
id=Request.Form ("id")
domain=trim(Request.Form ("domain"))
ad=trim(Request.Form ("ad"))
top=trim(Request.Form ("top"))
noreg=trim(Request.Form ("noreg"))
checkbox=Request.Form ("checkbox")

if id="" or domain="" or ad="" or top="" then 
msg="所有项目均不能为空值!"
call initerr()
Response.End 
end if
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.Open connstr
rs.Open ("select * from [domain] where id="&id),conn,1,3
if rs.BOF or rs.EOF then 
rs.Close
set rs=nothing
conn.Close
set conn=nothing
msg="找不到此项记录!"
call initerr()
Response.End 
end if
if checkbox="DEL" then
chk_admin_login(3)
rs.delete
else
rs("domain")=domain
rs("ad")=ad
rs("top")=top
end if
rs.Update 
rs.Close
domain_info=""
rs.Open ("select * from [domain] order by [top] desc"),conn,1,1
do while not (rs.bof or rs.eof) 
domain_info=domain_info&rs(0)&"|"&rs(1)&"|"&rs(2)&"|"&rs(3)&"|"&rs(4)&"|"
rs.movenext
loop
Application("domain_info")=domain_info
rs.close
set rs=nothing
conn.Close
set conn=nothing
msg="更新成功请返回刷新页面!"
call initerr()
Response.End 
case 6
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.Open connstr
domain=trim(Request.Form ("domain"))
ad=trim(Request.Form ("ad"))
top=trim(Request.Form ("top"))
if domain="" or ad="" or top="" then
msg="所有项目均不能为空值!"
call initerr()
Response.End 
end if
rs.Open ("select * from domain where domain='"&domain&"'"),conn,1,3
if not(rs.BOF or rs.EOF ) then 
rs.Close
set rs=nothing
conn.Close
set conn=nothing
msg="系统中己存有"&domain&"的域名!"
call initerr()
Response.End 
end if
rs.AddNew
rs("domain")=domain
rs("ad")=ad
rs("top")=top
rs.Update 
rs.Close
domain_info=""
rs.Open ("select * from [domain] order by [top] desc"),conn,1,1
do while not (rs.bof or rs.eof) 
domain_info=domain_info&rs(0)&"|"&rs(1)&"|"&rs(2)&"|"&rs(3)&"|"&rs(4)&"|"
rs.movenext
loop
Application("domain_info")=domain_info
rs.close
set rs=nothing
conn.Close
set conn=nothing
msg="添加成功!请返回刷新页面!"
call initerr()
Response.End 
%>
<br>
<%
case 11
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.Open connstr
%>
<table width="400" border="1" align="center" cellpadding="4" cellspacing="0" class="table-line">
  <tr align="center" class="td-title-color"> 
    <td colspan="3"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="shadow">域名广告管理</td>
      </tr>
    </table></td>
  </tr>
  <tr align="center"> 
    <td>id号</td>
    <td> 域 名 </td>
    <td>修 改</td>
  </tr>
<%
rs.open("select [id],[domain] from [domain]"),conn,1,1
do while not(rs.eof)
%>  
  <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td><%=rs("id")%></td>
    <td> 
      <%=rs("domain")%>
    </td>
    <td><a href=dns_admin.asp?sel=12&id=<%=rs("id")%>>修 改</a></td>
  </tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
<center>[<a href="javascript:history.go(-1)">返回</a>]</center>
<%
case 12
chk_admin_login(2)
id=Request.QueryString ("id")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.Open connstr

⌨️ 快捷键说明

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