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

📄 admin_flash.asp

📁 安全性好,适用于制作论坛和进行资源下载的个人和大型网站使用!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="mdb.asp"-->
<%Admin="dj"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<HTML><HEAD><TITLE>Hxcms管理中心—动漫管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey))>
<%
'****************************************************
' Hxcms 7.5      Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
if session("adminlogin")<>sessionvar then
  Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
  response.end
else
if request.form("MM_insert") then
if request.form("action")="newcat" then
dim catname
catname=trim(replace(request.form("cat_name"),"'",""))
if catname="" then
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
  response.end
end if
  conn.Execute ("Insert Into f_cat(cat_name) Values('"&catname&"')")
  response.redirect "admin_flash.asp?action=cat"

elseif request.form("action")="newswf" then
dim catid,fname,furl,fpic,fdesc,isbest,Commend,author
catid=request.form("catid")
fname=trim(replace(request.form("name"),"'",""))
furl=trim(replace(request.form("url"),"'",""))
fpic=trim(replace(request.form("pic"),"'",""))
fdesc=trim(replace(request.form("desc"),"'",""))
Commend=trim(replace(request.form("Commend"),"'",""))
author=trim(replace(request.form("author"),"'",""))
isbest=request.form("isbest")
if fname="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫名称!');history.back(1);</script>")
  response.end
end if
if not isInteger(catid) then
  Response.Write("<script language=javascript>alert('你必须选择动漫所属分类!');history.back(1);</script>")
  response.end
end if
if furl="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫地址!');history.back(1);</script>")
  response.end
end if
if fpic="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫的图片地址!');history.back(1);</script>")
  response.end
end if
if fdesc="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫的简要说明!');history.back(1);</script>")
  response.end
end if
sql="select * from flash"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
  rs("title")=fname
  rs("cat_id")=catid
  rs("url")=furl
  rs("img")=fpic
  rs("Content")=fdesc
  if cint(isbest)=1 then
     rs("isbest")=cint(isbest)
  end if
  rs("Commend")=Commend
  rs("author")=author
  rs("time")=date()
  rs.update
  rs.close
  set rs=nothing
  conn.execute("update allcount set flashcount = flashcount + 1")
  response.redirect "admin_flash.asp?action=sites"

elseif request.form("action")="editswf" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的动漫id参数。');history.back(1);</script>")
    response.End
  end if
end if
catid=request.form("catid")
fname=trim(replace(request.form("name"),"'",""))
furl=trim(replace(request.form("url"),"'",""))
fpic=trim(replace(request.form("pic"),"'",""))
fdesc=trim(replace(request.form("desc"),"'",""))
Commend=trim(replace(request.form("Commend"),"'",""))
author=trim(replace(request.form("author"),"'",""))
isbest=request.form("isbest")
if fname="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫名称!');history.back(1);</script>")
  response.end
end if
if not isInteger(catid) then
  Response.Write("<script language=javascript>alert('你必须选择动漫所属分类!');history.back(1);</script>")
  response.end
end if
if furl="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫地址!');history.back(1);</script>")
  response.end
end if
if fpic="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫的图片地址!');history.back(1);</script>")
  response.end
end if
if fdesc="" then
  Response.Write("<script language=javascript>alert('你必须填写动漫的简要说明!');history.back(1);</script>")
  response.end
end if
sql="select * from flash where id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
  rs("title")=fname
  rs("cat_id")=catid
  rs("url")=furl
  rs("img")=fpic
  rs("Content")=fdesc
  rs("isbest")=cint(isbest)
  rs("Commend")=Commend
  rs("author")=author
  rs.update
  rs.close
  set rs=nothing
  response.redirect "admin_flash.asp?action=sites"

elseif request.form("action")="delswf" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的动漫id参数。');history.back(1);</script>")
    response.End
  end if
end if
  Conn.Execute "DELETE * FROM flash WHERE id="&clng(request.form("id"))
  conn.execute("update allcount set flashcount = flashcount - 1")
  response.redirect "admin_flash.asp?action=sites"

elseif request.form("action")="editcat" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的动漫分类id参数。');history.back(1);</script>")
    response.End
  end if
end if
catname=trim(replace(request.form("cat_name"),"'",""))
if catname="" then
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
  response.End
end if
  conn.Execute ("Update f_cat Set cat_name='"&catname&"' where cat_id="&cint(request.form("id"))&"")
  response.redirect "admin_flash.asp?action=cat"

elseif request.form("action")="delcat" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的动漫分类id参数。');history.back(1);</script>")
    response.End
  end if
end if
  Conn.Execute "DELETE * FROM f_cat WHERE cat_id="&clng(request.form("id"))
  Conn.Execute "DELETE * FROM flash WHERE cat_id="&clng(request.form("id"))
  response.redirect "admin_flash.asp?action=cat"
end if
end if

if request.querystring("action")="cat" then
sql="select * from f_cat order by cat_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%> 
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
        <tr class=Hxcmsss> 
          <td colspan="3">动漫分类管理</font></td>
        </tr>
        <tr class=Hxcmsqs align="center"> 
          <td width="10%">编号</td>
          <td width="70%">分类名称</td>
          <td width="20%">操作</td>
        </tr>
        <%do while not rs.eof%>
        <tr class=Hxcmsds> 
          <td align="center"><%=rs("cat_id")%> </td>
          <td><a href="#"><%=rs("cat_name")%></a> </td>
          <td align="center"><a href="admin_flash.asp?id=<%=rs("cat_id")%>&action=editcat">编辑</a> 
            <a href="admin_flash.asp?id=<%=rs("cat_id")%>&action=delcat">删除</a> <a href="flash.asp?cat_id=<%=rs("cat_id")%>" target="_blank">查看</a></td>
        </tr>
        <%rs.movenext
loop
if rs.bof and rs.eof then%>
        <tr class=Hxcms align="center"> 
          <td colspan="3">当前没有动漫分类!</td>
        </tr>
        <%rs.close
set rs=nothing
end if%>
      </table>
<%end if
if request.querystring("action")="newcat" then%> 
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
        <form name="form1" method="post" action="">
		<tr class=Hxcmsss> 
            <td>新增动漫分类</font></td>
        </tr>
        <tr class=Hxcmsds> 
            <td>分类名称- 
              <input type="text" name="cat_name" size="40">
          </td>
        </tr>
        <tr class=Hxcmsqs> 
            <td align="center">
              <input type="submit" name="Submit" value="确定新增" class="button">
              <input type="reset" name="Reset" value="清空重填" class="button">
            </td>
        </tr>
		<input type="hidden" name="action" value="newcat">
		<input type="hidden" name="MM_insert" value="true">
		</form>
      </table>
<%end if
if request.QueryString("action")="editcat" then
if request.querystring("id")="" then
  Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
    Response.Write("<script language=javascript>alert('非法的动漫分类ID参数!');history.back(1);</script>")
    response.end
  end if
end if
sql="select * from f_cat where cat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
 <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse"><form name="form1" method="post" action="">
          <tr class=Hxcmsss> 
            <td>修改动漫分类</font></td>
          </tr>
          <tr class=Hxcmsds> 
            <td>分类名称- 
              <input name="cat_name" type="text" id="cat_name" size="40" value="<%=rs("cat_name")%>"> 
            </td>
          </tr>
          <tr class=Hxcmsqs> 
            <td align="center"> <input name="Submit" type="submit" class="button" id="Submit" value="确定修改"> 
              <input name="Reset" type="reset" class="button" id="Reset" value="清空重填"> </td>
          </tr>
		  <input type="hidden" name="id" value="<%=rs("cat_id")%>">
          <input type="hidden" name="action" value="editcat">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
<%
rs.close
set rs=nothing
end if
if request.QueryString("action")="delcat" then
if request.querystring("id")="" then
  Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
    Response.Write("<script language=javascript>alert('非法的动漫分类ID参数!');history.back(1);</script>")
    response.end
  end if
end if
sql="select * from f_cat where cat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
        <form name="form1" method="post" action="">
          <tr class=Hxcmsss> 
            <td>删除动漫分类</font></td>
          </tr>
          <tr class=Hxcmsds> 
            <td>分类名称- <%=rs("cat_name")%>
            </td>
          </tr>
          <tr class=Hxcmsqs> 
            <td align="center"> 
              <input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
            </td>
          </tr>
          <input type="hidden" name="id" value="<%=rs("cat_id")%>">
          <input type="hidden" name="action" value="delcat">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
<%
rs.close
set rs=nothing
end if
if request.form("operation")="DEL" then
num=request.form("id").Count
for i=1 to num
  conn.execute("delete from flash where id="&request.form("id")(i))
  next
end if
if request.querystring("action")="sites" then
Response.Write("<table align=""center"" width=""98%"" border=""1"" cellspacing=""0"" cellpadding=""4"" class=Hxcmsbk style=""border-collapse: collapse"">")
%>
<form name="form3" method="post" action="">
<tr class=Hxcmsss>
<td colspan="3" align="right" style="padding-top:2px;">
<select style="margin:-3px" name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
<option value="">选择显示方式</option>
<option value="admin_flash.asp?action=sites">显示所有动漫</option>
<%sql="select * from f_cat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof%>
<option value="admin_flash.asp?action=sites&cat_id=<%=rs2("cat_id")%>"><%=rs2("cat_name")%></option>
<%rs2.movenext
loop
if rs2.bof and rs2.eof then%><option value="">当前没有分类</option>
<%end if
rs2.close
set rs2=nothing%>
</select></td>
    </tr></form>
<%
Dim CurPage,Url_Add
Url_Add="?action=sites&"
If Request.QueryString("Page")<>"" Then

⌨️ 快捷键说明

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