📄 adminphoto_body.asp
字号:
<%sub adminphoto_body()%>
<HTML><HEAD><TITLE>管理中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="inc/djcss" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
<SCRIPT LANGUAGE="JavaScript">
<!--
function openwin(URL)
{ showModalDialog(URL,"","dialogWidth:10px;status:no;dialogHeight:10px;resizable:no");
}
function pic(URL)
{ window.open(URL,"pic","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=300,height=300,left=0,top=0");
}
function link()
{win = window.open("","link","width=400,height=150")}
function vote()
{win = window.open("","vote","status=yes,scrollbars=yes,width=600,height=350")}
// -->
</SCRIPT>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) background=inc/dj_bg.gif>
<%
if request.querystring("action")="phcat" then
sql="select * from phcat order by phcat_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse" align="center">
<tr>
<td colspan="3" bgcolor="#E8E8E8">图片分类管理</font></td>
</tr>
<tr bgcolor="#FFFFFF" align="center">
<td width="10%" class="chinese">编号</td>
<td width="70%" class="chinese">分类名称</td>
<td width="20%" class="chinese">操作</td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#FFFFFF">
<td align="center" class="chinese"><%=rs("phcat_id")%> </td>
<td class="chinese"><a href="../web.asp?phcat_id=<%=rs("phcat_id")%>" target="_blank"><%=rs("phcat_name")%></a> </td>
<td align="center" class="chinese"><a href="admin_photo.asp?id=<%=rs("phcat_id")%>&action=editphcat">edit</a>
<a href="admin_photo.asp?id=<%=rs("phcat_id")%>&action=delphcat">del</a> <a href="../photo.asp?phcat_id=<%=rs("phcat_id")%>" target="_blank">view</a></td>
</tr>
<%rs.movenext
loop
if rs.bof and rs.eof then%>
<tr bgcolor="#FFFFFF" align="center">
<td colspan="3" class="chinese">当前没有图片分类!</td>
</tr>
<%rs.close
set rs=nothing
end if%>
</table>
<br>
<%end if
if request.querystring("action")="newphcat" then%>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form1" method="post" action="">
<tr>
<td bgcolor="#E8E8E8">新增图片分类</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="chinese">分类名称-
<input type="text" name="phcat_name" size="40" class="textarea">
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" 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="newphcat">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.QueryString("action")="editphcat" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>请指定操作的对象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的图片分类ID参数!"
call diserror()
response.end
end if
end if
sql="select * from phcat where phcat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form1" method="post" action="">
<tr>
<td bgcolor="#E8E8E8">修改图片分类</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="chinese">分类名称-
<input name="phcat_name" type="text" class="textarea" id="phcat_name" size="40" value="<%=rs("phcat_name")%>">
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" 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("phcat_id")%>">
<input type="hidden" name="action" value="editphcat">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.QueryString("action")="delphcat" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>请指定操作的对象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的图片分类ID参数!"
call diserror()
response.end
end if
end if
sql="select * from phcat where phcat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form1" method="post" action="">
<tr>
<td bgcolor="#E8E8E8">删除图片分类</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="chinese">分类名称- <%=rs("phcat_name")%>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" align="center">
<input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
</td>
</tr>
<input type="hidden" name="id" value="<%=rs("phcat_id")%>">
<input type="hidden" name="action" value="delphcat">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.querystring("action")="sites" then
sql="select * from photo order by ph_id desc"
if request.querystring("phcat_id")<>"" then
sql="select * from photo where phcat_id="&cint(request.querystring("phcat_id"))&" order by ph_id desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalph=rs.recordcount
%>
<table width="98%" border="0" cellspacing="1" cellpadding="0" class="chinese">
<form name="form3" method="post" action="">
<tr>
<td align="right">
<select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
<option value="">选择显示方式</option>
<option value="admin_photo.asp?action=sites">显示所有图片</option>
<%sql="select * from phcat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof%>
<option value="admin_photo.asp?action=sites&phcat_id=<%=rs2("phcat_id")%>"><%=rs2("phcat_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>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
if not rs.eof then
rs.movefirst
rs.pagesize=coolsitesperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totalcs=rs.recordcount
if currentpage<>1 then
if (currentpage-1)*coolsitesperpage<totalcs then
rs.move(currentpage-1)*coolsitesperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalcs mod coolsitesperpage)=0 then
totalpages=totalcs\coolsitesperpage
else
totalpages=totalcs\coolsitesperpage+1
end if
i=0
do while not rs.eof and i<coolsitesperpage
%>
<td><table border='0' cellpadding='0' cellspacing='5'>
<tr>
<td align='center' width='135'><table width="100%" border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td height='10'><img src='../img/bg_0ltop.gif' width='10' height='10'></td>
<td height='10' background='../img/bg_01.gif'></td>
<td height='10'><img src='../img/bg_0rtop.gif' width='10' height='10'></td>
</tr>
<tr>
<td width=10 background=../img/bg_03.gif> </td>
<td align='center' valign='middle' bgcolor='#FFFFFF'> <a href="../rephoto.asp?ph_id=<%=rs("ph_id")%>" target="_blank">
<img src="<%=rs("ph_pic")%>" width="100" height="125" border="0" title="图片名称:<%=rs("ph_name")%>
上传时间:<%=rs("ph_date")%>
点击次数:<%=rs("ph_count")%>次"> </a> </td>
<td width='10' background='../img/bg_04.gif'> </td>
</tr>
<tr>
<td height='10'><img src='../img/bg_0lbottom.gif' width='10' height='10'></td>
<td height='10' background='../img/bg_02.gif'></td>
<td height='10'><img src='../img/bg_0rbottom.gif' width='10' height='10'></td>
</tr>
</table></td>
</tr>
<tr>
<td style="border-top:#cccccc 1px solid;border-bottom:#cccccc 1px solid;border-left:#cccccc 1px solid;border-right:#cccccc 1px solid;" width="120" align='center'>图片简介:<br>
<%=rs("ph_desc")%></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -