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

📄 adminpic_body.asp

📁 一个不错的企业网站
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%sub adminpic_body()
%>
<HTML><HEAD><TITLE>管理中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="inc/adminstyle.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey))>
     <%if request.querystring("action")="piccat" then
sql="select * from piccat order by piccat_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>   
<table cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">
        <tr class="a1"> 
          <td colspan="3">图片分类管理</td></tr><tr class="a4">
          <td width="10%">编号</td>
          <td width="70%">分类名称</td>
          <td width="20%">操作</td>
        </tr>
        <%do while not rs.eof%>
        <tr class="a3"> 
          <td align="center"><%=rs("piccat_id")%> </td>
          <td><a href="play.asp?piccat_id=<%=rs("piccat_id")%>" target="_blank"><%=rs("piccat_name")%></a> </td>
          <td align="center"><a href="admin_pic.asp?id=<%=rs("piccat_id")%>&action=editpiccat">edit</a> 
            <a href="admin_pic.asp?id=<%=rs("piccat_id")%>&action=delpiccat">del</a> <a href="pic.asp?piccat_id=<%=rs("piccat_id")%>" target="_blank">view</a></td>
        </tr>
        <%rs.movenext
loop
if rs.bof and rs.eof then%>
        <tr align="center" class="a3"> 
          <td colspan="3">当前没有分类!</td>
        </tr>
        <%rs.close
set rs=nothing
		end if%>
      </table>
      <br>
     <%end if
	 if request.querystring("action")="newpiccat" then%> 
<table cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">      
        <form name="form1" method="post" action="">
		<tr class="a1"> 
            <td>
            <font color="#333333">新增分类</font></td>
        </tr>
        <tr class="a3"> 
            <td>分类名称- 
              <input type="text" name="piccat_name" size="40">
          </td>
        </tr>
        <tr class="a4"> 
            <td height="30" align="center">
              <input type="submit" name="Submit" value="确定新增">
              <input type="reset" name="Reset" value="清空重填">
            </td>
        </tr>
		<input type="hidden" name="action" value="newpiccat">
		<input type="hidden" name="MM_insert" value="true">
		</form>
      </table>
	  <%end if
	  if request.QueryString("action")="editpiccat" 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 piccat where piccat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
	  %>
<table cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">      
        <form name="form1" method="post" action="">
          <tr class="a1"> 
            <td>修改分类</td>
          </tr>
          <tr class="a4"> 
            <td>分类名称- 
              <input name="piccat_name" type="text" id="piccat_name" size="40" value="<%=rs("piccat_name")%>"> 
            </td>
          </tr>
          <tr class="a3"> 
            <td height="30" align="center"> <input name="Submit" type="submit" id="Submit" value="确定修改"> 
              <input name="Reset" type="reset" id="Reset" value="清空重填"> </td>
          </tr>
		  <input type="hidden" name="id" value="<%=rs("piccat_id")%>">
          <input type="hidden" name="action" value="editpiccat">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
	  <%end if
	  if request.QueryString("action")="delpiccat" 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 piccat where piccat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
	  %>
<table cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">      
        <form name="form1" method="post" action="">
          <tr class="a1"> 
            <td>删除分类</td>
          </tr>
          <tr class="a3"> 
            <td>分类名称- <%=rs("piccat_name")%>
            </td>
          </tr>
          <tr class="a4"> 
            <td height="30" align="center"> 
              <input name="Submit" type="submit" id="Submit" value="确定删除">
            </td>
          </tr>
          <input type="hidden" name="id" value="<%=rs("piccat_id")%>">
          <input type="hidden" name="action" value="delpiccat">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
      <%end if
if request.querystring("action")="pic" then
sql="select * from pic order by pic_id desc"
if request.querystring("piccat_id")<>"" then
sql="select * from pic where piccat_id="&cint(request.querystring("piccat_id"))&" order by pic_id desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalpic=rs.recordcount
%>
<table cellpadding="1" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">
	    <form name="form3" method="post" action="">
        <tr class="a1"> <td>图片管理</td>
          <td align="right">
              <select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
			  <option value="">选择显示方式</option>
			  <option value="admin_pic.asp?action=pic">显示所有图片</option>
<%sql="select * from piccat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof%>
<option value="admin_pic.asp?action=pic&piccat_id=<%=rs2("piccat_id")%>"><%=rs2("piccat_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 cellpadding="2" cellspacing="1" border="0" width="760" cellpadding="4" align=center class="a2">
        <tr class="a3"> 
<%
if not rs.eof then
rs.movefirst
rs.pagesize=picperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   totalpic=rs.recordcount
   if currentpage<>1 then
       if (currentpage-1)*picperpage<totalpic then
	       rs.move(currentpage-1)*picperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalpic mod picperpage)=0 then
      totalpages=totalpic\picperpage
   else
      totalpages=totalpic\picperpage+1
   end if
i=0
do while not rs.eof and i<picperpage
%>
<td align="center" valign="middle">
<table width="144" height="109" border="0" cellpadding="0" cellspacing="0">
<TR>
<td><a href="repic.asp?pic_id=<%=rs("pic_id")%>" target="_blank">
<img src="<%=rs("pic_pic")%>" border="0" width="140" height="105" border="0" title="图片名称:<%=rs("pic_name")%>"></a></td>
</tr>
<tr><td align="center">            <a href="admin_pic.asp?id=<%=rs("pic_id")%>&action=editpic">edit</a> 
            <a href="admin_pic.asp?id=<%=rs("pic_id")%>&action=delpic">del</a></td></tr>
</table>
</td>
      <%
i=i+1
if i mod 3 = 0 then%>
</tr>        <tr class="a3"> 
<%
end if
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
        <tr class="a3"> 
          <td colspan="2" height="22" align="center">当前没有图片!</td>
        </tr>
      <%end if
end if%>
      </table>
      <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
        <form name="form1" method="post" action="admin_pic.asp?action=pic&piccat_id=<%=request.querystring("piccat_id")%>">
          <tr> 
            <td align="right"> <%=currentpage%> /<%=totalpages%>页,<%=totalpic%>条记录/<%=picperpage%>篇每页. 
              <%

⌨️ 快捷键说明

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