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

📄 admin_other.asp

📁 网站整站
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/adminfunction.asp"-->
<%
call hacker()
call checkadmin("other")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
<script type='text/javascript' language='javascript' src='inc/adminjs.js'></script>
</head>
<body>
<%
Select case request("action")
case ""
call other()
case "newother"
%>
<script language="javascript">
function chk(){
if(document.form.title.value==""){
alert("频道标题不能为空");
document.form.title.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("频道内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=newotherok">
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d>
<tr class="title"  height="22"><td><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;发布频道</b></td></tr>	
<tr class=bg height="25"><td>&nbsp;频道标题:<input name="title" type="text" id="title" size="20" class=yecao style="width:200px"></td></tr>
<tr height="25" class=bg><td>&nbsp;查看权限:<input name="reads" type="radio" value="0" checked>&nbsp;访问游客&nbsp;<input name="reads" type="radio" value="1">&nbsp;普通用户&nbsp;<input name="reads" type="radio" value="2">&nbsp;收费用户&nbsp;积分:<input name="exper" type="text" class="yecao" style="width:30px" value="0"></td></tr>
<tr><td><textarea name="content" id="content" style="display:none"></textarea>
<iframe ID="HtmlEditor1" src='html/index.asp' frameborder=0 scrolling=no width='100%' HEIGHT='350'></iframe>
</td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td  align="center">
<input name="new" type="submit" class="adminbutton" id="new" value="发 布">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr>
</table> 
</form><%
case "editother"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_other where id="&request.QueryString("id")
rs.open sql,conn,1,1%>
<script language="javascript">
function chk(){
if(document.form.title.value==""){
alert("频道标题不能为空");
document.form.title.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("频道内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=editotherok">
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22"  class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;修改频道</b></td></tr>
<tr class=bg height=25><td>&nbsp;标&nbsp;题:<input name="title" type="text" id="title" value="<%=rs("title")%>" size="20" class=yecao style="width:120px"></td></tr>
<tr height="25" class=bg><td>&nbsp;查看权限:<input name="reads" type="radio" value="0" <%if rs("reads")=0 then response.write "checked" end if%>>&nbsp;访问游客&nbsp;<input name="reads" type="radio" value="1"  <%if rs("reads")=1 then response.write "checked" end if%>>&nbsp;普通用户&nbsp;<input name="reads" type="radio" value="2"  <%if rs("reads")=2 then response.write "checked" end if%>>&nbsp;收费用户&nbsp;积分:<input name="exper" type="text" class="yecao" style="width:30px" value="<%=rs("exper")%>"></td></tr>
<tr><td height="30" colspan=2><textarea name="content" id="content" style="display:none"><%=rs("content")%></textarea>
<iframe ID="HtmlEditor1" src='html/index.asp' frameborder=0 scrolling=no width='100%' HEIGHT='350'></iframe></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td align="center">
<input name="id" type="hidden"  value="<%=rs("id")%>">
<input name="edit" type="submit" class="adminbutton" id="edit" value="修 改">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr></table></form>
<%rs.close
set rs=nothing
case "newotherok"
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_other",conn,1,3
rs.addnew
		rs("title")=replace(trim(request.Form("title")),"'","")
		rs("exper")=cint(request.Form("exper"))
		rs("reads")=cint(request.Form("reads"))
		rs("content")=request.Form("content")

rs.update
rs.close
set rs=nothing
response.write"<script>location.href='admin_other.asp';</script>"
case "editotherok"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_other where id="&request("id")
rs.open sql,conn,1,3
		rs("title")=replace(trim(request.Form("title")),"'","")
		rs("exper")=cint(request.Form("exper"))
		rs("reads")=cint(request.Form("reads"))
		rs("content")=request.Form("content")
rs.update
rs.close
set rs=nothing
response.Redirect"admin_other.asp"
End Select
sub other()
dim other
sql="select * from YC_other order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
other=rs.recordcount%>
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22" colspan="6" class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;频道管理 [当前共有<%=other%>个频道]</b></td></tr>
<tr class=bg height="25">
<form  method="post" name="form" id="form" action="del.asp" onsubmit="return downdel();">
<td width="5%"  align=center>选定</td>
<td width="30%" align=center>频道标题</td>
<td width="40%">频道地址</td>
<td width="10%" align=center>操作</td></tr><tr><td class="hr" colspan="6"></td></tr>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr height=25 class=bg>
<td align=center>
<input name='SoftID' type='checkbox' onclick="unselectall()" id="SoftID" value='<%=rs("id")%>'></td>
<td><%=rs("title")%></td>
<td ><input type="text" value="other.asp?id=<%=rs("id")%>" size="20" class=yecao style="width:120px" onMouseOver='this.focus()' onFocus='this.select()'></td>
<td>&nbsp;<a href="?action=editother&id=<%=rs("id")%>">编辑</a>&nbsp;
<a href="other.asp?id=<%=rs("id")%>" target=_blank>查看</a></td></tr>
<%rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>暂时没有频道!</</b></font></td></tr>"
end if
end if%>
<tr><td class="hr" colspan="6"></td></tr>
<tr class=bg><td width="5%" height="23" align=center><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox"></td>
<td height="30" colspan="6">
<input name="submit" type='submit' onClick="document.form.Action.value='Del'" value="删 除" class="adminbutton">
<input name="Action" type="hidden" id="Action" value="Del">
<input name="tab" type="hidden" id="tab" value="YC_other">
<input name="url" type="hidden" id="url" value="admin_other.asp"></td>
</tr></form>
</table></td></tr></table>
<%rs.close
set rs=nothing
end sub
call closedata()%>

⌨️ 快捷键说明

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