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

📄 admin_art.asp

📁 网站整站
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#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>&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>&nbsp;<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>&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(){
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;发布文章&nbsp;[发布人:<%if superuser="" then YC("您已经超时!") else YC(superuser) end if%>]</b></td></tr>	
<tr class=bg height="25"><td>&nbsp;文章标题:<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>&nbsp;文章作者:<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">&nbsp;<a onClick="writer.value='未知'" href="#">未知</a>&nbsp;<a href="#" onClick="writer.value='网络'">网络</a>&nbsp;<a onClick="writer.value='<%=webceo%>'" href="#"><%=webceo%></a></td></tr>
<tr height="25" class=bg><td>&nbsp;文章来源:<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">&nbsp;<a onClick="copyright.value='未知'" href="#">未知</a>&nbsp;<a href="#" onClick="copyright.value='网络'">网络</a>&nbsp;<a onClick="copyright.value='<%=webname%>'" href="#"><%=webname%></a></td></tr>
<tr height="25" class=bg><td>&nbsp;文章图片:<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">&nbsp;<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>&nbsp;推荐程度:<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>&nbsp;
</td></tr>
<tr class=bg height="25"><td>&nbsp;文章分类:<%call newclass("YC_artclass")%></td></tr>
<tr height="25" class=bg><td>&nbsp;分页方式:<input name="showpage" type="radio" value="0" checked>&nbsp;不分页&nbsp;<input name="showpage" type="radio" value="1" >&nbsp;自动&nbsp;<input name="showpage" type="radio" value="2">&nbsp;手动需要输入[page]</td></tr>
<tr height="25" class=bg><td>&nbsp;查看权限:<input onclick="document.getElementById('expers').style.display='none';document.getElementById('moneys').style.display='none';" 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="best" type="checkbox"  id="best" value="1" /> 推荐
<input name="new" type="submit" class="adminbutton" id="new" value="发 布">&nbsp;<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>&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" 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">&nbsp;文章作者:<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">&nbsp;<a onClick="writer.value='未知'" href="#">未知</a>&nbsp;<a href="#" onClick="writer.value='网络'">网络</a>&nbsp;<a onClick="writer.value='<%=webceo%>'" href="#"><%=webceo%></a>
</td></tr>
<tr height="25" class=bg><td>&nbsp;文章来源:<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">&nbsp;<a onClick="copyright.value='未知'" href="#">未知</a>&nbsp;<a href="#" onClick="copyright.value='网络'">网络</a>&nbsp;<a onClick="copyright.value='<%=webname%>'" href="#"><%=webname%></a></td></tr>
<tr height="25" class=bg><td>&nbsp;文章图片:<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">&nbsp;<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>&nbsp;推荐程度:<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>&nbsp;文章分类:<%call editclass("YC_artclass",rs("class"))%></td></tr>

<tr height="25" class=bg><td>&nbsp;分页方式:<input name="showpage" type="radio" value="0" <%if rs("showpage")=0 then response.write "checked" end if%>>&nbsp;不分页&nbsp;<input name="showpage" type="radio" value="1" <%if rs("showpage")=1 then response.write "checked" end if%>>&nbsp;自动&nbsp;<input name="showpage" type="radio" value="2" <%if rs("showpage")=2 then response.write "checked" end if%>>&nbsp;手动需要输入[page]</td></tr>

⌨️ 快捷键说明

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