📄 adminphoto_body.asp
字号:
<tr>
<td align='center'><a href="admin_photo.asp?id=<%=rs("ph_id")%>&action=editph">edit</a>
<a href="admin_photo.asp?id=<%=rs("ph_id")%>&action=delph">del</a></td>
</tr>
</table></td>
<%
i=i+1
if i=4 then
i=4
response.write "</tr><tr>"
end if
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td bgcolor="#FFFFFF" colspan="2" height="22" align="center" class="chinese">当前没有图片!</td>
</tr>
</table>
<%end if
end if%>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center" class="chinese">
<form name="form1" method="post" action="admin_photo.asp?action=sites&phcat_id=<%=request.querystring("phcat_id")%>">
<tr>
<td align="right"> <%=currentpage%> /<%=totalpages%>页,<%=totalcs%>条记录/<%=coolsitesperpage%>篇每页.
<%
i=1
showye=totalpages
if showye>10 then
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
<%=i%>
<%else%>
<a href="admin_photo.asp?action=sites&page=<%=i%>&phcat_id=<%=request.querystring("phcat_id")%>"><%=i%></a>
<%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
<a href="admin_photo.asp?action=sites&page=<%=page%>&phcat_id=<%=request.querystring("phcat_id")%>" title="下一页">>></a>
<%end if%>
<input type="text" name="page" class="textarea" size="4">
<input type="submit" name="Submit" value="Go" class="button">
</td>
</tr>
</form>
</table>
<br>
<%end if
if request.querystring("action")="newph" then%>
<table width="98%" align="center" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form2" method="post" action="">
<tr>
<td bgcolor="#E8E8E8">新增图片</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片名称</td>
<td class="chinese" width="83%"> <input type="text" name="name" class="textarea" size="40">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">所属分类</td>
<td class="chinese" width="83%"> <select name="phcatid" class="textarea">
<%
sql="select * from phcat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof%>
<option value="<%=rs("phcat_id")%>"><%=rs("phcat_name")%></option>
<%rs.movenext
loop
if rs.eof and rs.bof then%>
<option value="0">当前没有图片分类</option>
<%end if%>
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片地址</td>
<td class="chinese" width="83%"> <input type="text" name="pic" class="textarea" size="60">
<a href="javascript:pic('UPLOAD.ASP')">上传图片 </a></td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片介绍</td>
<td class="chinese" width="83%"> <textarea name="desc" class="textarea" cols="65" rows="6"></textarea>
</td>
</tr>
<tr bgcolor="#E8E8E8" align="center">
<td colspan="2" height="30" class="chinese" bgcolor="#F5F5F5"> <input type="checkbox" name="isbest" value="1" class="textarea">
推荐 <input type="submit" name="Submit" value="确定新增" class="button">
<input type="reset" name="Reset" value="清空重填" class="button">
[<a href="admin_photo.asp?action=sites">返回</a>] </td>
</tr>
<input type="hidden" name="action" value="newph">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.QueryString("action")="editph" 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 photo where ph_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="form2" method="post" action="">
<tr>
<td colspan="2" bgcolor="#E8E8E8">修改图片</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片名称</td>
<td class="chinese" width="83%"> <input name="name" type="text" class="textarea" id="name" size="40" value="<%=rs("ph_name")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">所属分类</td>
<td class="chinese" width="83%"> <select name="phcatid" class="textarea" id="phcatid">
<%
sql="select * from phcat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof%>
<option value="<%=rs2("phcat_id")%>" <%if rs2("phcat_id")=rs("phcat_id") then response.write "selected" end if%>><%=rs2("phcat_name")%></option>
<%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
<option value="0">当前没有图片分类</option>
<%end if%>
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片地址</td>
<td class="chinese" width="83%"> <input name="pic" type="text" class="textarea" id="pic" size="60" value="<%=rs("ph_pic")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片介绍</td>
<td class="chinese" width="83%"> <textarea name="desc" cols="65" rows="6" class="textarea" id="desc"><%=rs("ph_desc")%></textarea>
</td>
</tr>
<tr bgcolor="#E8E8E8" align="center">
<td colspan="2" height="30" class="chinese" bgcolor="#F5F5F5"> <input name="isbest" type="checkbox" class="textarea" id="isbest" value="1" <%if rs("isbest")=1 then response.write "checked" end if%>>
推荐
<input name="Submit" type="submit" class="button" id="Submit" value="确定修改">
<input type="reset" name="Reset" value="清空重填" class="button">
[<a href="admin_photo.asp?action=sites">返回</a>] </td>
</tr>
<input type="hidden" name="id" value="<%=rs("ph_id")%>">
<input type="hidden" name="action" value="editph">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.QueryString("action")="delph" 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 photo where ph_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="form2" method="post" action="">
<tr>
<td colspan="2" bgcolor="#E8E8E8">删除图片</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片名称</td>
<td class="chinese" width="83%"> <%=rs("ph_name")%> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">所属分类</td>
<td class="chinese" width="83%">
<%
sql="select * from phcat where phcat_id="&rs("phcat_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
%>
<%=rs2("phcat_name")%> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片地址</td>
<td class="chinese" width="83%"><img src="<%=rs("ph_pic")%>"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="chinese" width="17%">图片介绍</td>
<td class="chinese" width="83%"><%=rs("ph_desc")%> </td>
</tr>
<tr bgcolor="#E8E8E8" align="center">
<td colspan="2" height="30" class="chinese" bgcolor="#F5F5F5"> <input name="isbest" type="checkbox" class="textarea" id="isbest" value="1" <%if rs("isbest")=1 then response.write "checked" end if%>>
推荐
<input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
[<a href="admin_photo.asp?action=sites">返回</a>] </td>
</tr>
<input type="hidden" name="id" value="<%=rs("ph_id")%>">
<input type="hidden" name="action" value="delph">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if%>
<br>
</td>
</tr>
<tr>
<td colspan="3" height="1" background="images/dotlineh.gif"></td>
</tr>
</table>
<%
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -