📄 admin_art.asp
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/adminfunction.asp"-->
<%
call hacker()
call checkadmin("art")
%>
<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 style="padding:0;margin:0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" rules=none class=3d><tr class="bg" height="22"><td> <img src=img/admin.gif border=0 width=15 height=15 align=absMiddle> <a href="admin_art.asp?action=type">分类管理</a> <a href="admin_art.asp?action=addtype">添加分类</a> <a href="admin_art.asp">文章管理</a> <a href="admin_art.asp?action=add">添加文章</a> <a href="html/buy.htm" target="ddd">批量上传文件</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> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 上传文章图片</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(){
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> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 发布文章 [发布人:<%if superuser="" then YC("您已经超时!") else YC(superuser) end if%>]</b></td></tr>
<tr class=bg height="25"><td> 文章标题:<input name="title" type="text" id="title" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' class="put" style="width:285px"><%call addcolor()%></td></tr>
<tr height="25" class=bg><td> 文章作者:<input name="writer" type="text" id="writer" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' value='未知' class="put" style="width:120px"> <a onClick="writer.value='未知'" href="#">未知</a> <a href="#" onClick="writer.value='网络'">网络</a> <a onClick="writer.value='<%=webceo%>'" href="#"><%=webceo%></a></td></tr>
<tr height="25" class=bg><td> 文章来源:<input name="copyright" type="text" id="copyright" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' value='未知' class="put" style="width:120px"> <a onClick="copyright.value='未知'" href="#">未知</a> <a href="#" onClick="copyright.value='网络'">网络</a> <a onClick="copyright.value='<%=webname%>'" href="#"><%=webname%></a></td></tr>
<tr height="25" class=bg><td> 文章图片:<input name="pic" type="text" id="pic" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' class="put" style="width:285px"> <button onclick="document.all.upart.style.display=(document.all.upart.style.display=='none')?'':'none'" class=button>上传文章图片</button></td></tr>
<tr class=bg height="25"><td> 推荐程度:<select name="commend" class="yecao" class=yecao style="width:200px">
<option value="★☆☆☆☆">[一星级]★☆☆☆☆</option>
<option value="★★☆☆☆">[二星级]★★☆☆☆</option>
<option value="★★★☆☆" selected>[三星级]★★★☆☆</option>
<option value="★★★★☆">[四星级]★★★★☆</option>
<option value="★★★★★">[五星级]★★★★★</option>
</select>
</td></tr>
<tr class=bg height="25"><td> 文章分类:<%call newclass("YC_artclass")%></td></tr>
<tr height="25" class=bg><td> 分页方式:<input name="showpage" type="radio" value="0" checked> 不分页 <input name="showpage" type="radio" value="1" > 自动 <input name="showpage" type="radio" value="2"> 手动需要输入[page]</td></tr>
<tr height="25" class=bg><td> 查看权限:<input onclick="document.getElementById('expers').style.display='none';document.getElementById('moneys').style.display='none';" name="reads" type="radio" value="0" checked> 访问游客 <input name="reads" type="radio" value="1" > 普通用户 <input name="reads" type="radio" value="2"> 收费用户 积分:<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="best" type="checkbox" id="best" value="1" /> 推荐
<input name="new" type="submit" class="adminbutton" id="new" value="发 布"> <input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()">
<input name="pass" type="checkbox" id="pass" value="1" checked /> 通过
</td></tr>
</table>
</form>
<%
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功 能:处理添加记录 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "addok"
title=replace(trim(request.Form("title")),"'","")
color=replace(trim(request.Form("color")),"'","")
writer=replace(trim(request.Form("writer")),"'","")
copyright=replace(trim(request.Form("copyright")),"'","")
pic=replace(trim(request.Form("pic")),"'","")
content=replace(trim(request.Form("content")),"'","")
showpage=cint(request.Form("showpage"))
commend=replace(trim(request.Form("commend")),"'","")
minclass=cint(trim(request.Form("class")))
exper=cint(request.Form("exper"))
reads=cint(request.Form("reads"))
if minclass="" then
response.write"<script>alert('请选择分类!若没有请添加!');history.back()</script>"
response.end
end if
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("user")=superuser
rs("title")=title
rs("color")=color
rs("pic")=pic
rs("content")=content
rs("writer")=writer
rs("copyright")=copyright
rs("commend")=commend
rs("showpage")=showpage
rs("class")=minclass
rs("bigclass")=cint(rs7("class"))
rs("exper")=exper
rs("reads")=reads
if request.Form("best")=1 then
rs("best")=1
end if
if request.Form("pass")=1 then
rs("pass")=1
end if
rs.update
call addexper("2","1")
rs.close
set rs=nothing
rs7.close
set rs7=nothing
YCGO("admin_art.asp")
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功 能:编辑记录 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
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 chk(){
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> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 修改文章</b></td></tr>
<tr class=bg height=25><td> 文章标题:<input name="title" type="text" id="title" value="<%=rs("title")%>" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' class="put" style="width:220px"><%call editcolor()%></td></tr>
<tr class=bg height="25"><td height="25"> 文章作者:<input name="writer" type="text" id="write" value="<%=rs("writer")%>" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' class="put" style="width:120px"> <a onClick="writer.value='未知'" href="#">未知</a> <a href="#" onClick="writer.value='网络'">网络</a> <a onClick="writer.value='<%=webceo%>'" href="#"><%=webceo%></a>
</td></tr>
<tr height="25" class=bg><td> 文章来源:<input name="copyright" type="text" id="copyright" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' class="put" value="<%=rs("copyright")%>" style="width:120px"> <a onClick="copyright.value='未知'" href="#">未知</a> <a href="#" onClick="copyright.value='网络'">网络</a> <a onClick="copyright.value='<%=webname%>'" href="#"><%=webname%></a></td></tr>
<tr height="25" class=bg><td> 文章图片:<input name="pic" value="<%=rs("pic")%>" type="text" id="pic" size="20" put="0"
onmouseover='this.className="overput";'
onmouseout='if (this.put=="0")this.className="put";'
onclick="document.getElementByid("code").style.display='';"
onblur='this.className="put";this.put="0";'
onfocus='this.className="overput";this.put="1";' class="put" style="width:300px"> <button onclick="document.all.upart.style.display=(document.all.upart.style.display=='none')?'':'none'" class=button>重新上传文章图片</button></td></tr>
<tr class=bg height="25"><td> 推荐程度:<select name=commend style="width:200px">
<option value="★☆☆☆☆" <%if rs("commend")="★☆☆☆☆" then response.write "selected"%>>★☆☆☆☆</option>
<option value="★★☆☆☆" <%if rs("commend")="★★☆☆☆" then response.write "selected"%>>★★☆☆☆</option>
<option value="★★★☆☆" <%if rs("commend")="★★★☆☆" then response.write "selected"%>>★★★☆☆</option>
<option value="★★★★☆" <%if rs("commend")="★★★★☆" then response.write "selected"%>>★★★★☆</option>
<option value="★★★★★" <%if rs("commend")="★★★★★" then response.write "selected"%>>★★★★★</option>
</select></td></tr>
<tr class=bg height="25"><td> 文章分类:<%call editclass("YC_artclass",rs("class"))%></td></tr>
<tr height="25" class=bg><td> 分页方式:<input name="showpage" type="radio" value="0" <%if rs("showpage")=0 then response.write "checked" end if%>> 不分页 <input name="showpage" type="radio" value="1" <%if rs("showpage")=1 then response.write "checked" end if%>> 自动 <input name="showpage" type="radio" value="2" <%if rs("showpage")=2 then response.write "checked" end if%>> 手动需要输入[page]</td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -