📄 admin_pic.asp
字号:
<!--#include file="admin_conn.asp"-->
<!--#include file="../include/admin_setting.asp"-->
<!--#include file="admin_function.asp"-->
<%
'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1 Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com www.maosin.net
' QQ:57861417
'电子邮箱:maosin@163.com maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
Call admin_top()
Call navMenu()
dim catname:catname="图片"
Select Case LCase(Request.QueryString("action"))
Case LCase("maosin_adminClassList")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call adminClass("ms_pic_cat","ms_pic_class","catName","catID")
end if
Case LCase("maosin_appchildclass")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call addChildClass("ms_pic_cat","ms_pic_class","catName","catID")
end if
Case LCase("maosin_mdfChild")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call modifyChildClass("ms_pic_cat","ms_pic_class","catName","catID")
end if
Case LCase("maosin_delchild")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call deleteChild("ms_pic_class","ms_pic")
end if
Case LCase("maosin_appbigclass")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call addBigClass("ms_pic_cat","catName")
end if
Case LCase("maosin_mdfbigclass")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call modifyBigclass("ms_pic_cat","catName","catID")
end if
Case LCase("maosin_delbigclass")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call deleteBigClass("ms_pic_cat","ms_pic","catID")
end if
Case LCase("maosin_appbigclass")
if getPopedom("picClassAdmin")=false then
popedomMsg
else
Call addBigClass()
end if
Case LCase("maosin_apppic")
Call addPic()
Case LCase("maosin_editPic")
Call editPic()
Case LCase("maosin_delpic")
Call deletepic()
Case LCase("maosin_savePic")
Call savePic()
Case LCase("allpl")
if getPopedom("picPlAdmin")=false then
popedomMsg
else
url="admin_pic.asp?action=allpl&"
Call adminpl("ms_pic_pl",true)
end if
Case LCase("adminpl")
if getPopedom("picPlAdmin")=false then
popedomMsg
else
url="admin_pic.asp?action=adminpl&"
Call adminpl("ms_pic_pl",false)
end if
Case LCase("maosin_delpl")
if getPopedom("picPlAdmin")=false then
popedomMsg
else
Call deletepl("ms_pic_pl")
end if
Case LCase("accessories")
if getPopedom("picFileAdmin")=false then
popedomMsg
else
Call accessories("../upfile/picture/")
end if
Case Lcase("delfile")
if getPopedom("picFileAdmin")=false then
popedomMsg
else
Call deletefile("../upfile/picture/")
end if
Case Else
Call adminPicList()
End Select
Call admin_foot()
Sub navMenu()%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
<tr><td colspan="2" class="td_titleT">图片管理</td></tr>
<tr><td width="95" height="30" class="td_bgcolor">管理快捷导航:</td><td class="td_bgcolor">
<a href="admin_pic.asp?action=maosin_adminclasslist">分类管理</a> |
<a href="admin_pic.asp?action=maosin_appbigclass">添加分类</a> |
<a href="admin_pic.asp">图片管理</a> |
<a href="admin_pic.asp?action=maosin_apppic">添加图片</a> |
<a href="admin_pic.asp?action=allpl">评论管理</a> |
<a href="admin_pic.asp?action=accessories">图片附件管理</a>
</td></tr>
</table>
<%table(5)%>
<%End Sub
Sub adminPicList()
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="searchNav">
<form cation="?action=adminPicList" name="seform" method="post">
<tr><td class="Navtitle text">
关键字:<input type="text" name="keyword">
<select name="seMode">
<option value="title">按图片标题</option>
<option value="content">按图片简介</option>
</select>
<input type="submit" name="search" value="搜索图片">
跳转到
<select name="class" onChange='window.location=this.options[this.selectedIndex].value'>
<option value="">****选择分类****</option>
<option value="admin_pic.asp" style="font-weight:bold;">查看全部图片</option>
<option value="admin_pic.asp?pass=true" style="color:#ff0000;">已通过审核图片</option>
<option value="admin_pic.asp?pass=false" style="color:#ff0000;">没通过审核图片</option>
<%sql="select * from ms_pic_cat"
Set rs1=Server.CreateObject("ADODB.RecordSet")
rs1.Open sql,connstr,1,1
If Not rs1.Bof And Not rs1.Eof Then
Do While Not rs1.Eof
sql="select * from ms_pic_class where catID="&rs1("catID")
Set rs2=Server.CreateObject("ADODB.RecordSet")
rs2.Open sql,connstr,1,1
If Not rs2.Eof And Not rs2.Bof Then%>
<option value="?catID=<%=rs1("catID")%>">----<%=rs1("catName")%>----</option>
<%Do While Not rs2.Eof%>
<option value="?catID=<%=rs1("catID")%>&classID=<%=rs2("classID")%>"><%=rs2("class")%></option>
<%rs2.MoveNext
Loop
rs2.close
Set rs2=Nothing
Else%>
<option>请添加子分类</option>
<%rs2.close
Set rs2=Nothing
End If
rs1.MoveNext
Loop
rs1.close
Set rs1=Nothing
Else%>
<option>----请添加大分类----</option>
<%rs1.close
Set rs1=Nothing
End If%>
</select>
</td></tr>
</form>
</table>
<%table(5)%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
<tr valign="middle">
<%
dim pass
pass=Request("pass")
if Request.Form("keyword")<>"" then
keyword=Request.form("keyword")
end if
if Request.Form("seMode")<>"" then
seMode="pic_"&Request.form("seMode")
end if
if Request.QueryString("catID")<>"" then
catID=Request.QueryString("catID")
end if
if Request.QueryString("classID")<>"" then
classID=Request.QueryString("classID")
end if
if (keyword<>"") and (seMode<>"") then
sql="select * from ms_pic,ms_pic_class where ms_pic.classID=ms_pic_class.classID and "&seMode&" like '%"&keyword&"%'"&" order by id desc"
url="?seMode="&seMode&"&keyword="&keyword&"&"
elseif (catID<>"") and (classID="") then
sql="select * from ms_pic,ms_pic_class where ms_pic.classID=ms_pic_class.classID and ms_pic_class.catID="&catID&" order by id desc"
url="?catID="&catID&"&"
elseif (catID<>"") and (classID<>"") then
sql="select * from ms_pic,ms_pic_class where ms_pic.classID=ms_pic_class.classID and ms_pic_class.catID="&catID&" and ms_pic_class.classID="&classID&" order by id desc"
url="?catID="&catID&"&classID="&classID&"&"
elseif pass="true" then
sql="select * from ms_pic,ms_pic_class where ms_pic.classID=ms_pic_class.classID and pass=true order by id desc"
url="admin_pic.asp?pass=true&"
elseif pass="false" then
sql="select * from ms_pic,ms_pic_class where ms_pic.classID=ms_pic_class.classID and pass=false order by id desc"
url="admin_pic.asp?pass=false&"
else
sql="select * from ms_pic,ms_pic_class where ms_pic.classID=ms_pic_class.classID order by id desc"
url="admin_pic.asp?"
end if
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,connstr,1,1
%>
<td height="32" colspan="4" class="td_titleT">图片管理 | 共有<font color="#ff0000"><%=rs.RecordCount%></font>条图片</td>
</tr><tr class="td_topT">
<td width="40" height="24" align="center" valign="middle">ID</td>
<td width="620" align="center" valign="middle">图片标题</td>
<td width="120" align="center" valign="middle">操作</td>
</tr>
<%
if not rs.bof and not rs.eof then
nextpage=pagetitle(rs,20,url,"个图片")
lineNo=1
Do While Not rs.Eof And lineNo<=rs.pagesize%>
<tr class="td_bgcolor" onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
<td height="25" align="center" valign="middle"><%=rs("id")%></td>
<td valign="middle"><font color="#3399ff">[<%=rs("class")%>]</font> <a href="../showpic.asp?id=<%=rs("id")%>" target="_blank" title="点击查看 点击:<%=rs("pic_clicks")%> 发布时间:<%=rs("pic_date")%>"><font color="<%=rs("titlecolor")%>"><%=rs("pic_title")%></font></a> <%if rs("pic_isgood")=true then:response.Write("[<font color=""#ff0000"">推荐</font>]"):end if%></td>
<td align="center" valign="middle">
<a href="?action=maosin_editPic&id=<%=rs("id")%>">编辑</a>
<a href="#" onClick="javascript:{if(confirm('您确定要删除此项目吗?')){window.location.href='?action=maosin_delpic&id=<%=rs("id")%>';}return false;}">删除</a>
<a href="?action=adminpl&id=<%=rs("id")%>&title=<%=rs("pic_title")%>">评论(<font color="#ff0000"><%=conn.execute("select count(*) from ms_pic_pl where id="&rs("id"))(0)%></font>)</a></td></tr>
<%
lineNo=lineNo+1
rs.MoveNext
Loop%>
<tr><td colspan="5" class="td_titleB">
<%response.write(nextpage)%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -