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

📄 admin_art.asp

📁 学校网站管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="sqlx.asp"-->
<%
call hacker()
if session("superlogin")<>yecao then
response.Write "<script>alert('本站提示:您还没有登陆!');this.location.href='index.asp';</script>"
Response.End
end if
if session("superadmin")<>"art" then
if session("superadmin")<>"admin" then
response.Write "<script>alert('\n错误提示:您的权限不足!\n\n您不是文章管理员!');this.location.href='index.asp';</script>"
Response.End
end if
end if
%>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css"> 
<script src=img/adminjs.js></script>
</head>
<body <%if request("action")="edit" then%>onload="return cc();"<%end if%> style="padding:0;margin:0">
<%call titlecolor()%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" rules=none class=3d><tr class="bg"  height="22"><td>&nbsp;<img src=img/admin.gif border=0 width=15 height=15 align=absMiddle>&nbsp;<a href="admin_art.asp?action=type">分类管理</a>&nbsp;<a href="admin_art.asp?action=addtype">添加分类</a>&nbsp;<a href="admin_art.asp">文章管理</a>&nbsp;<a href="admin_art.asp?action=add">添加文章</a></td></tr></table>
<table  align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d  id=upart style="position:absolute;left:270;top:40;display:none">
<tr onmousedown="MDown(upart)" style="cursor:move" height=22><td colspan="2" class="uptitle"><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;上传文章图片</b>
<img onclick="document.all.upart.style.display=(document.all.upart.style.display=='none')?'':'none'" style="position:absolute;right:2;top:5;cursor:hand" border="0" src="img/adminclose.gif" align=absMiddle></td></tr>
<tr class=bg>
<td align=center height=30><iframe frameborder=0 width=290 height=35 scrolling=no src="up.asp?action=art"></iframe>
</td></tr></table>
<%
select case request("action")
case"delnopass"
user=request.querystring("user")
id=request.querystring("id")
conn.execute("update YC_user set user_money=user_money-10,user_all=user_all-1 where user_name="""&user&"""")
Conn.Execute("Delete * From YC_art Where id="&id&"")
response.write"<script>location.href='admin_art.asp';</script>"
case"type"
call alltype("YC_artclass","文章")
case"edittype"
call edittype("YC_artclass",request("id"))
case"edittypename"
call submittype("YC_artclass",request("id"),request("classname"))
case"addtype"
call addtype()
case"addtypeok"
call addtypeok("YC_artclass",request("classname"))
case"addtype2"
call addtype2(request("id"))
case"addtype2ok"
call addtype2ok("YC_artclass",request("classname"),request("id"))
case"deltype"
call deltype("YC_artclass",request("id"))
case "list" 		
call list()
case "add"%>		
<script language="javascript">
function chk(){
document.all("content").value=IframeID.document.body.innerHTML; 
if(document.form.title.value==""){
alert("文章标题不能为空");
document.form.title.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("文章内容不能为空");
IframeID.document.body.focus();
return false;}
if(document.form.writer.value==""){
alert("文章作者不能为空");
document.form.writer.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=addok">
<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:220px"></td></tr>
<tr class=bg height="25"><td>&nbsp;标题颜色:<input name="color" type="text" onfocus="colordialog()" class=yecao 
value="#000000" style="width:120px"></td></tr>
<tr height="25" class=bg><td>&nbsp;文章作者:<input name="writer" type="text" id="writer" size="20" class=yecao style="width:120px">&nbsp;<button onClick="writer.value='未知'" class=button>未知</button>&nbsp;<button onClick="writer.value='网络'" class=button>网络</button>&nbsp;<button onClick="writer.value='<%=webceo%>'" class=button><%=webceo%></button></td></tr>
<tr class=bg height="25"><td>&nbsp;文章分类:<%call newclass("YC_artclass")%></td></tr>
<tr height="25" class=bg><td>&nbsp;文章版权:<input name="copyright" type="radio" value="原创" checked>&nbsp;原创&nbsp;<input name="copyright" type="radio" value="转载">&nbsp;转载</td></tr>
<tr height="25" class=bg><td>&nbsp;文章图片:<input name="pic" type="text" id="pic" size="20" class=yecao style="width:300px">&nbsp;<button onclick="document.all.upart.style.display=(document.all.upart.style.display=='none')?'':'none'" class=button>上传文章图片</button></td></tr>
<tr height="25" class=bg><td>&nbsp;是否通过:<input name="pass" type="radio" value="true" checked>&nbsp;通过&nbsp;<input name="pass" type="radio" value="false">&nbsp;不通过</td></tr>
<tr height="25" class=bg><td>&nbsp;是否推荐:<input name="best" type="radio" value="true" >&nbsp;推荐&nbsp;<input name="best" type="radio" value="false" checked>&nbsp;不推荐</td></tr>
<tr height="25" class=bg><td>&nbsp;分页方式:<input name="showContent" type="radio" value="0" checked>&nbsp;不分页&nbsp;<input name="showContent" type="radio" value="1" >&nbsp;自动&nbsp;<input name="showContent" type="radio" value="2">&nbsp;手动  注意:手动方式要输入“  [NextPage]  ”</td></tr>
<tr height="25" class=bg><td>&nbsp;查看权限:<input name="read" type="radio" value="0" checked>&nbsp;访问游客&nbsp;<input name="read" type="radio" value="1" >&nbsp;普通会员&nbsp;<input name="read" type="radio" value="2">&nbsp;VIP会员</td></tr>
<tr><td><%call html()%></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td  align="center"> 
<input name="user" type="hidden"  value="<%=session("superuser")%>">
<input name="new" type="submit" class="adminbutton" id="new" value="发 布">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr>
<textarea name="content" cols="50" rows="50" id="content" style="display:none"></textarea>
</table> 
</form>
<%
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功  能:处理添加记录            ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "addok"
set rs7=server.CreateObject("adodb.recordset")
sql7="select * from [YC_artclass] where id="&Cint(Trim(request.Form("class")))
rs7.open sql7,conn,1,1
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_art",conn,1,3
rs.addnew
rs("title")=request.Form("title")
rs("color")=request.Form("color")
rs("bigclass")=Trim(rs7("class"))
rs("class")=request.Form("class")
rs("pic")=request.Form("pic")
rs("content")=request.Form("content")
rs("writer")=request.Form("writer")
rs("copyright")=request.Form("copyright")
rs("showContent")=request.Form("showContent")
rs("user")=request.Form("user")
rs("pass")=request.Form("pass")
rs("best")=request.Form("best")
rs("read")=request.Form("read")
rs.update
conn.execute("update YC_user set user_money = user_money + 5,user_all = user_all + 1 where user_name="""&session("superuser")&"""")
rs.close
set rs=nothing
rs7.close
set rs7=nothing
response.write"<script>location.href='admin_art.asp';</script>"
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功  能:编辑记录                ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "edit" 		
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_art where id="&request.QueryString("id")
rs.open sql,conn,1,3%>
<script language="javascript">
function cc(){
IframeID.document.body.innerHTML=document.all("content").value;
document.all("content").value="";}
function chk(){
document.all("content").value=IframeID.document.body.innerHTML;
if(document.form.title.value=="")
{alert("文章标题不能为空");
document.form.title.focus();
return false;}
if(document.form.writer.value==""){
alert("文章作者不能为空");
document.form.writer.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=editok">
<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;文章标题:<input name="title" type="text" id="title" value="<%=rs("title")%>" size="20" class=yecao style="width:220px"></td></tr>
<tr class=bg height="25"><td>&nbsp;标题颜色:<input name="color" type="text" onfocus="colordialog()" class=yecao value="<%=rs("color")%>" style="width:120px"></td></tr>
<tr class=bg height="25"><td height="25">&nbsp;文章作者:<input name="writer" type="text" id="write" value="<%=rs("writer")%>" size="20" class=yecao style="width:120px">&nbsp;<button onClick="writer.value='未知'" class=button>未知</button>&nbsp;<button onClick="writer.value='<%=webceo%>'" class=button><%=webceo%></button>
</td></tr>
<tr class=bg height="25"><td>&nbsp;文章分类:<%call editclass("YC_artclass",rs("class"))%></td></tr>
<tr class=bg height="25"><td>&nbsp;文章版权:<input name="copyright" type="radio" value="原创" checked>&nbsp;原创&nbsp;<input name="copyright" type="radio" value="转载">&nbsp;转载 </td></tr>
<tr height="25" class=bg><td>&nbsp;文章图片:<input name="pic" value="<%=rs("pic")%>" type="text" id="pic" size="20" class=yecao style="width:300px">&nbsp;<button onclick="document.all.upart.style.display=(document.all.upart.style.display=='none')?'':'none'" class=button>重新上传文章图片</button></td></tr>
<tr height="25" class=bg><td>&nbsp;是否通过:<input name="pass" type="radio" value="true" <%if rs("pass")=true then response.write "checked" end if%>>&nbsp;通过&nbsp;<input name="pass" type="radio" value="false" <%if rs("pass")=false then response.write "checked" end if%>>&nbsp;不通过</td></tr>
<tr height="25" class=bg><td>&nbsp;是否推荐:<input name="best" type="radio" value="true" <%if rs("best")=true then response.write "checked" end if%>>&nbsp;推荐&nbsp;<input name="best" type="radio" value="false" <%if rs("best")=false then response.write "checked" end if%>>&nbsp;不推荐</td></tr>
<tr height="25" class=bg><td>&nbsp;分页方式:<input name="showContent" type="radio" value="0" <%if rs("showContent")=0 then response.write "checked" end if%>>&nbsp;不分页&nbsp;<input name="showContent" type="radio" value="1" <%if rs("showContent")=1 then response.write "checked" end if%>>&nbsp;自动&nbsp;<input name="showContent" type="radio" value="2" <%if rs("showContent")=2 then response.write "checked" end if%>>&nbsp;手动  注意:手动方式要输入“   [NextPage] ”</td></tr>
<tr height="25" class=bg><td>&nbsp;查看权限:<input name="read" type="radio" value="0" <%if rs("read")=0 then response.write "checked" end if%>>&nbsp;访问游客&nbsp;<input name="read" type="radio" value="1"  <%if rs("read")=1 then response.write "checked" end if%>>&nbsp;普通会员&nbsp;<input name="read" type="radio" value="2"  <%if rs("read")=2 then response.write "checked" end if%>>&nbsp;VIP会员</td></tr>
<tr><td height="30" colspan=2><%call html()%></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td align="center">
<input name="id" type="hidden" id="id" 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>
<textarea name="content" id="content" style=display:none><%=Server.HtmlEncode(rs("content"))%></textarea>
</table></form></body></html>
<%rs.close
set rs=nothing
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功  能:处理编辑记录            ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "editok" 
set rs7=server.CreateObject("adodb.recordset")
sql7="select * from [YC_artclass] where id="&Cint(Trim(request.Form("class")))
rs7.open sql7,conn,1,1
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_art where id="&request("id")
rs.open sql,conn,1,3
rs("title")=request.Form("title")
rs("color")=request.Form("color")
rs("bigclass")=Trim(rs7("class"))
rs("class")=request.Form("class")
rs("pic")=request.Form("pic")
rs("content")=request.Form("content")
rs("writer")=request.Form("writer")
rs("copyright")=request.Form("copyright")
rs("showContent")=request.Form("showContent")
rs("pass")=request.Form("pass")
rs("best")=request.Form("best")
rs("read")=request.Form("read")
rs.update
rs.close
rs7.close
set rs7=nothing
response.Write "<script>alert('修改成功');location.href='admin_art.asp';</script>"
set rs=nothing
case "pllist" 		
     call pllist()
case "pledit" 		
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_pl where id="&request("id")
rs.open sql,conn,1,1%>

⌨️ 快捷键说明

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