PhotoManage.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:10k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_Inc/Function.asp" -->
  4. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  5. <!--#include file="lib/strlib.asp" -->
  6. <!--#include file="lib/UserCheck.asp" -->
  7. <!--#include file="../FS_Inc/Func_Page.asp" -->
  8. <%
  9. if request("Action")="del" then
  10. if Request("id")="" then
  11. strShowErr = "<li>错误的参数!</li>"
  12. Response.Redirect("lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  13. Response.end
  14. else
  15. User_Conn.execute("Delete from FS_ME_Photo where ID in ("&NoSqlHack(Request("id"))&")")
  16. strShowErr = "<li>删除成功!</li>"
  17. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../PhotoManage.asp")
  18. Response.end
  19. end if
  20. end if
  21. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,strpage,rs,i
  22. int_RPP=15 '设置每页显示数目
  23. int_showNumberLink_=8 '数字导航显示数目
  24. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  25. str_nonLinkColor_="#999999" '非热链接颜色
  26. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  27. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  28. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  29. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  30. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  31. toL_="<font face=webdings title=""最后一页"">:</font>"
  32. strpage=request("page")
  33. 'if len(strpage)=0 Or strpage<1 or trim(strpage)=""Then:strpage="1":end if
  34. %>
  35. <html xmlns="http://www.w3.org/1999/xhtml">
  36. <title>相册管理-网站内容管理系统</title>
  37. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  38. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  39. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  40. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  41. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  42. <link rel="stylesheet" href="lib/css/lightbox.css" type="text/css" media="screen" />
  43. <script type="text/javascript" src="../FS_INC/prototype.js"></script>
  44. <script type="text/javascript" src="lib/js/scriptaculous.js?load=effects"></script>
  45. <script type="text/javascript" src="lib/js/lightbox.js"></script>
  46. <head>
  47. <body onload="initLightbox()">
  48. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  49.   <tr>
  50.     <td>
  51.       <!--#include file="top.asp" -->
  52.     </td>
  53.   </tr>
  54. </table>
  55. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  56.   
  57.     <tr class="back"> 
  58.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  59.     </tr>
  60.     <tr class="back"> 
  61.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  62.           <!--#include file="menu.asp" -->
  63.         </div></td>
  64.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  65.         <tr class="hback"> 
  66.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  67.             <a href="main.asp">会员首页</a> &gt;&gt; <a href="PhotoManage.asp">相册管理</a> 
  68.             &gt;&gt;</td>
  69.         </tr>
  70.       </table> 
  71.   
  72.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  73.         <tr>
  74.           <td class="hback"><a href="PhotoManage.asp">相册首页</a>┆<a href="Photo_add.asp">增加图片</a>┆<a href="PhotoManage.asp?isRec=1">被推荐的图片</a>┆<a href="Photo_filt.asp">幻灯片播放</a>┆<a href="Photo_Class.asp">相册分类</a></td>
  75.         </tr>
  76.         <tr> 
  77.           <td class="hback"> 
  78.             <%
  79.   response.Write(" <table width=""98%"" align=center cellpadding=""2"" cellspacing=""1""><tr>")
  80.   dim t_k,rec_str
  81.   t_k=0
  82.   set rs = Server.CreateObject(G_FS_RS)
  83.   rs.open "select id,title,UserNumber From FS_ME_PhotoClass where UserNumber='"&Fs_User.UserNumber&"'",User_Conn,1,3
  84.   do while not rs.eof 
  85.    Response.Write(" <td width=""24%"" valign=bottom><img src=""images/folderopened.gif""></img><a href=PhotoManage.asp?classid="&rs("id")&">"&rs("title")&"</a></td>")
  86.   rs.movenext
  87.   t_k = t_k+1
  88.   if t_k mod 4 =0 then
  89.    Response.Write(" </tr>")
  90.   end if
  91.   loop
  92.   response.Write(" </table>")
  93.   rs.close:set rs=nothing
  94.   %>
  95.           </td>
  96.         </tr>
  97.       </table> 
  98.       
  99.         <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  100.           <form name="myform" method="post" action="">
  101.   <%
  102.   dim o_class
  103.   if NosqlHack(Request.QueryString("Classid"))<>"" then
  104.    o_class=" and classid="&NosqlHack(Request.QueryString("Classid"))&""
  105.   else
  106.    o_class =""
  107.   end if
  108.   if NoSqlHack(Request.QueryString("isRec"))="1" then
  109.     rec_str = " and isRec=1"
  110.   else
  111.     rec_str = ""
  112.   end if
  113. set rs = Server.CreateObject(G_FS_RS)
  114. rs.open "select * from FS_ME_Photo where UserNumber='"& Fs_User.UserNumber&"' "&o_class&rec_str&" order by id desc",User_Conn,1,1
  115. if rs.eof then
  116.    rs.close
  117.    set rs=nothing
  118.    Response.Write"<tr  class=""hback""><td colspan=""1""  class=""hback"" height=""40"">没有记录。</td></tr>"
  119. else
  120. rs.PageSize=int_RPP
  121. cPageNo=NoSqlHack(Request.QueryString("Page"))
  122. If cPageNo="" Then cPageNo = 1
  123. If not isnumeric(cPageNo) Then cPageNo = 1
  124. cPageNo = Clng(cPageNo)
  125. If cPageNo>rs.PageCount Then cPageNo=rs.PageCount 
  126. If cPageNo<=0 Then cPageNo=1
  127. rs.AbsolutePage=cPageNo
  128. for i=1 to rs.pagesize
  129. if rs.eof Then exit For
  130. %>
  131.           <tr class="hback"> 
  132.             <td width="21%" rowspan="5" class="hback_1">
  133. <table border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  134.                 <tr> 
  135.                   <td class="hback"><%if isnull(trim(rs("PicSavePath"))) then%><img src="Images/nopic_supply.gif" width="90"  id="pic_p_1"><%else%><a href="<%=rs("PicSavePath")%>" rel="lightbox" title="<%=rs("title")%>"><img src="<%=rs("PicSavePath")%>" width="90" border="0" id="pic_p_1"></a><%end if%>
  136.                   </td>
  137.                 </tr>
  138.               </table></td>
  139.             <td width="12%" class="hback"><div align="center"><strong>相片名称:</strong></div></td>
  140.             <td width="40%" class="hback"><%if rs("isRec")=1 then response.Write"<span class=""tx"">[此图片已经被推荐]</span>"%><font style="font-size:14px"><span class="hback_1"><strong><%=rs("title")%></strong>;</span></font></td>
  141.             <td width="10%"><div align="center">浏览次数:</div></td>
  142.             <td width="17%"><%=rs("hits")%></td>
  143.           </tr>
  144.           <tr class="hback"> 
  145.             <td><div align="center">创建日期:</div></td>
  146.             <td><%=rs("Addtime")%></td>
  147.             <td><div align="center">图片大小:</div></td>
  148.             <td><%=rs("PicSize")%>byte</td>
  149.           </tr>
  150.           <tr class="hback"> 
  151.             <td><div align="center">相片地址:</div></td>
  152.             <td colspan="3"><%=rs("PicSavePath")%></td>
  153.           </tr>
  154.           <tr class="hback"> 
  155.             <td><div align="center">相片描述:</div></td>
  156.             <td colspan="3"><%=rs("Content")%></td>
  157.           </tr>
  158.           <tr class="hback"> 
  159.             <td><div align="center">相片分类:</div></td>
  160.             <td><%
  161. dim c_rs
  162. if rs("ClassID")=0 then
  163. response.Write("没分类")
  164. else
  165. set c_rs=User_Conn.execute("select ID,title From Fs_me_photoclass where id="&rs("classid"))
  166. Response.Write "<a href=PhotoManage.asp?ClassiD="&c_rs("ID")&">"&c_rs("title")&"</a>"
  167. c_rs.close:set c_rs=nothing
  168. end if
  169. %></td>
  170.             <td colspan="2"><div align="center"><a href="Photo_Edit.asp?Id=<%=rs("id")%>">修改</a>┆<a href="PhotoManage.asp?id=<%=rs("id")%>&Action=del" onClick="{if(confirm('确定通过删除吗?')){return true;}return false;}">删除</a> 
  171.                 <input name="ID" type="checkbox" id="ID" value="<%=rs("id")%>">
  172.               </div></td>
  173.           </tr>
  174.           <tr class="hback"> 
  175.             <td colspan="5" height="3" class="xingmu"></td>
  176.           </tr>
  177.           <%
  178. rs.movenext
  179. next
  180. %>
  181.           <tr class="hback"> 
  182.             <td colspan="5"> 
  183.               <%
  184. response.Write "<p>"&  fPageCount(rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
  185.   end if
  186.   %>
  187.                
  188. <input name="chkall" type="checkbox" id="chkall" onClick="CheckAll(this.form);" value="checkbox" title="点击选择所有或者撤消所有选择">
  189.               全选择
  190.               <input name="Action" type="hidden" id="Action"> <input type="button" name="Submit" value="删除"  onClick="document.myform.Action.value='del';{if(confirm('确定清除您所选择的记录吗?')){this.document.myform.submit();return true;}return false;}"></td>
  191.           </tr></form>
  192.         </table>
  193.        </td>
  194.     </tr>
  195.     <tr class="back"> 
  196.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  197.           <!--#include file="Copyright.asp" -->
  198.         </div></td>
  199.     </tr>
  200.  
  201. </table>
  202. </body>
  203. </html>
  204. <%
  205. Set Fs_User = Nothing
  206. %>
  207. <script language="JavaScript" type="text/JavaScript">
  208. function CheckAll(form)  
  209.   {  
  210.   for (var i=0;i<form.elements.length;i++)  
  211.     {  
  212.     var e = myform.elements[i];  
  213.     if (e.name != 'chkall')  
  214.        e.checked = myform.chkall.checked;  
  215.     }  
  216. }
  217. </script>
  218. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->