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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp" -->
  5. <!--#include file="../lib/strlib.asp" -->
  6. <!--#include file="../lib/UserCheck.asp" -->
  7. <!--#include file="../../FS_Inc/Func_Page.asp" -->
  8. <%
  9. dim rs_mysys
  10. set rs_mysys = User_Conn.execute("select id From FS_ME_InfoiLogParam where UserNumber='"& Fs_User.UserNumber&"'")
  11. if rs_mysys.eof then
  12. Response.write("<br>要发布日志,请开通您的日志空间,5秒后转向...")
  13. Response.Write("<meta http-equiv=""refresh"" content=""5;url=PublicParam.asp"">")
  14. response.end
  15. end if
  16. if request("Action")="del" then
  17. if Request("id")="" then
  18. strShowErr = "<li>错误的参数!</li>"
  19. Response.Redirect("../lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  20. Response.end
  21. else
  22. User_Conn.execute("Delete from FS_ME_Infoilog where iLogID in ("&NoSqlHack(Request("id"))&")")
  23. strShowErr = "<li>删除成功!</li>"
  24. Response.Redirect("../lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../i_Blog/index.asp")
  25. Response.end
  26. end if
  27. end if
  28. if request("Action")="Lock" then
  29. if Request("id")="" then
  30. strShowErr = "<li>错误的参数!</li>"
  31. Response.Redirect("../lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  32. Response.end
  33. else
  34. User_Conn.execute("Update FS_ME_Infoilog set islock=1 where iLogID in ("&NoSqlHack(Request("id"))&")")
  35. strShowErr = "<li>锁定成功!</li>"
  36. Response.Redirect("../lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../i_Blog/index.asp")
  37. Response.end
  38. end if
  39. end if
  40. if request("Action")="UnLock" then
  41. if Request("id")="" then
  42. strShowErr = "<li>错误的参数!</li>"
  43. Response.Redirect("../lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  44. Response.end
  45. else
  46. User_Conn.execute("Update FS_ME_Infoilog set islock=0 where iLogID in ("&NoSqlHack(Request("id"))&")")
  47. strShowErr = "<li>解琐成功!</li>"
  48. Response.Redirect("../lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../i_Blog/index.asp")
  49. Response.end
  50. end if
  51. end if
  52. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,strpage,rs,i
  53. int_RPP=20 '设置每页显示数目
  54. int_showNumberLink_=8 '数字导航显示数目
  55. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  56. str_nonLinkColor_="#999999" '非热链接颜色
  57. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  58. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  59. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  60. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  61. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  62. toL_="<font face=webdings title=""最后一页"">:</font>"
  63. strpage=request("page")
  64. if len(strpage)=0 Or strpage<1 or trim(strpage)=""Then:strpage="1":end if
  65. %>
  66. <html xmlns="http://www.w3.org/1999/xhtml">
  67. <title>User Manage Center-网站内容管理系统</title>
  68. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  69. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  70. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  71. <link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  72. <head></head>
  73. <body>
  74. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  75.   <tr>
  76.     <td>
  77.       <!--#include file="../top.asp" -->
  78.     </td>
  79.   </tr>
  80. </table>
  81. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  82.     <tr class="back"> 
  83.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="../Top_navi.asp" -->
  84.     </td>
  85.     </tr>
  86.     <tr class="back"> 
  87.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  88.           <!--#include file="../menu.asp" -->
  89.         </div></td>
  90.       <td width="82%" valign="top" class="hback">
  91.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  92.         <tr class="hback"> 
  93.           <td  valign="top">你的位置:<a href="../../">网站首页</a> &gt;&gt; <a href="../main.asp">会员首页</a> 
  94.             &gt;&gt; <a href="index.asp">日志管理</a> &gt;&gt;日志管理</td>
  95.         </tr>
  96.         <tr class="hback"> 
  97.           <td  valign="top"><a href="index.asp">日志首页</a>┆<a href="PublicLog.asp">发表日志</a>┆<a href="index.asp?type=box">草稿箱</a>┆<a href="../PhotoManage.asp">相册管理</a>┆<a href="PublicParam.asp">参数设置</a>┆<a href="../Review.asp">评论管理</a></td>
  98.         </tr>
  99.       </table>
  100.         
  101.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  102.         <form name="myform" method="post" action="">
  103.           <tr> 
  104.             <td width="4%" class="xingmu"><div align="center"> 
  105.                 <input name="chkall" type="checkbox" id="chkall" onClick="CheckAll(this.form);" value="checkbox" title="点击选择所有或者撤消所有选择">
  106.               </div></td>
  107.             <td width="31%" class="xingmu"><div align="center">标题</div></td>
  108.             <td width="15%" class="xingmu"><div align="center">分类</div></td>
  109.             <td width="17%" class="xingmu"><div align="center">日期</div></td>
  110.             <td width="14%" class="xingmu"><div align="center">状态</div></td>
  111.             <td width="19%" class="xingmu"><div align="center">操作</div></td>
  112.           </tr>
  113.           <%
  114.    dim o_class,o_draff
  115.    if request.QueryString("classid")<>"" then
  116. o_class= " and ClassId="&NoSqlHack(clng(request.QueryString("classid")))&""
  117. else
  118. o_class= ""
  119. end if
  120.    if request.QueryString("type")="box" then
  121. o_draff= " and isDraft=1"
  122. else
  123. o_draff= ""
  124. end if
  125. set rs = Server.CreateObject(G_FS_RS)
  126. rs.open "select * from FS_ME_Infoilog where UserNumber='"& Fs_User.UserNumber&"' "&o_draff&o_class&" order by isTop desc,AddTime desc,iLogID desc",User_Conn,1,3
  127. if rs.eof then
  128.    rs.close
  129.    set rs=nothing
  130.    Response.Write"<tr  class=""hback""><td colspan=""8""  class=""hback"" height=""40"">没有记录。</td></tr>"
  131. else
  132. rs.PageSize=int_RPP
  133. cPageNo=NoSqlHack(Request.QueryString("Page"))
  134. If cPageNo="" Then cPageNo = 1
  135. If not isnumeric(cPageNo) Then cPageNo = 1
  136. cPageNo = Clng(cPageNo)
  137. If cPageNo<=0 Then cPageNo=1
  138. If cPageNo>rs.PageCount Then cPageNo=rs.PageCount 
  139. rs.AbsolutePage=cPageNo
  140. for i=1 to rs.pagesize
  141. if rs.eof Then exit For 
  142. %>
  143.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)> 
  144.             <td class="hback"><div align="center"> 
  145.                 <input name="id" type="checkbox" id="id" value="<%=rs("iLogID")%>">
  146.               </div></td>
  147.             <td class="hback"><a href="PublicLogEdit.asp?id=<%=rs("iLogID")%>"><%=rs("Title")%></a></td>
  148.             <td class="hback"><div align="center">
  149. <%
  150. if rs("ClassID")=0 then
  151. response.Write"<a href=index.asp?classid=0>未分类</a>"
  152. else
  153. dim c_rs
  154. set c_rs= Server.CreateObject(G_FS_RS)
  155. c_rs.open "select ClassID,ClassCName From FS_ME_InfoClass where UserNumber='"&Fs_User.UserNumber&"' and ClassTypes=7 and ClassID="&rs("ClassID"),User_Conn,1,3
  156. if not c_rs.eof then
  157. Response.Write "<a href=index.asp?classid="&rs("ClassID")&">"&c_rs("ClassCName")&"</a>"
  158. c_rs.close:set c_rs=nothing
  159. else
  160. response.Write"<a href=index.asp?classid=0>未分类</a>"
  161. c_rs.close:set c_rs=nothing
  162. end if
  163. end if
  164. %> </div></td>
  165.             <td class="hback"><div align="center"><%=rs("addtime")%> </div></td>
  166.             <td class="hback"> 
  167.               <div align="center">
  168.   <%
  169. if rs("adminLock")=1 then
  170. Response.Write("<span class=tx>管理员审核中.或用户锁定</span>")
  171. else
  172. if rs("islock")=1 then
  173. response.Write("用户锁定")
  174. else
  175. response.Write("正常")
  176. end if
  177. end if
  178. %>
  179.               </div></td>
  180.             <td class="hback"><div align="center"><a href="PublicLogEdit.asp?id=<%=rs("iLogID")%>">修改</a>┆<a href="index.asp?id=<%=rs("iLogID")%>&Action=Lock">锁定</a>┆<a href="index.asp?id=<%=rs("iLogID")%>&Action=UnLock">解锁</a>┆<a href="index.asp?id=<%=rs("iLogID")%>&Action=del">删除</a> 
  181.               </div></td>
  182.           </tr>
  183.           <%
  184. rs.movenext
  185. next
  186. %>
  187.           <tr> 
  188.             <td colspan="6" class="hback"> 
  189.               <%
  190. response.Write "<p>"&  fPageCount(rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
  191.   end if
  192.   %>
  193.                 
  194.               <input name="Action" type="hidden" id="Action">
  195.   <input type="button" name="Submit" value="删除"  onClick="document.myform.Action.value='del';{if(confirm('确定清除您所选择的记录吗?')){this.document.myform.submit();return true;}return false;}"> 
  196.               <input type="button" name="Submit2" value="批量解锁"  onClick="document.myform.Action.value='UnLock';{if(confirm('确定解锁吗')){this.document.myform.submit();return true;}return false;}"> 
  197.               <input name="Submit3" type="button"  onClick="document.myform.Action.value='Lock';{if(confirm('确定锁定吗??n锁定后将不能显示')){this.document.myform.submit();return true;}return false;}" value="批量锁定"> 
  198.             </td>
  199.           </tr>
  200.         </form>
  201.       </table>
  202.        </td>
  203.     </tr>
  204.     <tr class="back"> 
  205.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  206.           <!--#include file="../Copyright.asp" -->
  207.         </div></td>
  208.     </tr>
  209. </table>
  210. </body>
  211. </html>
  212. <%
  213. Set Fs_User = Nothing
  214. %>
  215. <script language="JavaScript" type="text/JavaScript">
  216. function CheckAll(form)  
  217.   {  
  218.   for (var i=0;i<form.elements.length;i++)  
  219.     {  
  220.     var e = myform.elements[i];  
  221.     if (e.name != 'chkall')  
  222.        e.checked = myform.chkall.checked;  
  223.     }  
  224. }
  225. </script>
  226. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->