All_Label_Stock.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="../../FS_InterFace/NS_Function.asp" -->
  6. <!--#include file="../../FS_InterFace/HS_Function.asp" -->
  7. <!--#include file="../../FS_InterFace/AP_Function.asp" -->
  8. <!--#include file="../../FS_Inc/Func_Page.asp" -->
  9. <%
  10. Response.Buffer = True
  11. Response.Expires = -1
  12. Response.ExpiresAbsolute = Now() - 1
  13. Response.Expires = 0
  14. Response.CacheControl = "no-cache"
  15. Dim Conn,obj_Label_Rs,SQL,strShowErr
  16. MF_Default_Conn
  17. 'session判断
  18. MF_Session_TF 
  19. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,strpage
  20. int_RPP=50 '设置每页显示数目
  21. int_showNumberLink_=8 '数字导航显示数目
  22. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  23. str_nonLinkColor_="#999999" '非热链接颜色
  24. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  25. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  26. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  27. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  28. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  29. toL_="<font face=webdings title=""最后一页"">:</font>"
  30. Dim str_StyleName,txt_Content,Labelclass_SQL,obj_Labelclass_rs,obj_Count_rs
  31. if Request("type")="del" then
  32. if trim(Request("id"))="" then
  33. strShowErr = "<li>请选择标签</li>"
  34. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  35. Response.end
  36. end if
  37. Conn.execute("Delete From FS_MF_Lable where id in ("&NoSqlHack(Request("id"))&")")
  38. strShowErr = "<li>删除成功</li>"
  39. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=label/All_Label_stock.asp")
  40. Response.end
  41. end if
  42. if Request("type")="deltobak" then
  43. if trim(Request("id"))="" then
  44. strShowErr = "<li>请选择标签</li>"
  45. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  46. Response.end
  47. end if
  48. Conn.execute("Update FS_MF_Lable set isDel=1 where id in ("&NoSqlHack(Request("id"))&")")
  49. strShowErr = "<li>加入标签辈分库成功</li>"
  50. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=label/All_Label_stock.asp")
  51. Response.end
  52. end if
  53. if Request("type")="bakto" then
  54. if trim(Request("id"))="" then
  55. strShowErr = "<li>请选择标签</li>"
  56. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  57. Response.end
  58. end if
  59. Conn.execute("Update FS_MF_Lable set isDel=0 where id in ("&NoSqlHack(Request("id"))&")")
  60. strShowErr = "<li>还原成功</li>"
  61. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=label/All_Label_stock.asp")
  62. Response.end
  63. end if
  64. %>
  65. <html>
  66. <head>
  67. <title>标签管理</title>
  68. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  69. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  70. </head>
  71. <script language="JavaScript" src="../../editer/editer.js" type="text/JavaScript"></script>
  72. <script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
  73. <body>
  74. <table width="98%" height="66" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  75.   <tr class="hback" > 
  76.     <td width="100%" height="20"  align="Left" class="xingmu">标签库</td>
  77.   </tr>
  78.   <tr class="hback" > 
  79.     <td height="27" align="center" class="hback"><div align="left"><a href="All_Label_Stock.asp">所有标签</a>┆<a href="All_Label_Stock.asp?isDel=1">备份库</a>┆<a href="label_creat.asp">创建标签</a>┆<a href="Label_Class.asp" target="_self">标签分类</a>&nbsp;┆<a href="All_label_style.asp">样式管理</a>&nbsp;<a href="../../help?Label=MF_Label_Stock" target="_blank" style="cursor:help;"><img src="../Images/_help.gif" width="50" height="17" border="0"></a></div></td>
  80.   </tr>
  81. </table>
  82. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  83.   <tr>
  84.     <td width="7%" class="xingmu"><div align="center">序号</div></td>
  85.     <td width="39%" class="xingmu"><div align="center">标签名称</div></td>
  86.     <td width="27%" class="xingmu"><div align="center">描述/操作</div></td>
  87.     <td width="27%" class="xingmu">选择</td>
  88.   </tr>
  89.   <%
  90.   dim rs_class,str_ParentID
  91.   if trim(Request.QueryString("ParentID"))<>"" then
  92. str_ParentID = " and ParentID="&Request.QueryString("ParentID")&""
  93.   elseif not isnumeric(trim(Request.QueryString("ParentID"))) then
  94. str_ParentID = " and ParentID=0"
  95.   else
  96. str_ParentID = " and ParentID=0"
  97.   end if
  98.   set rs_class=Conn.execute("select id,ClassName,ClassContent,ParentID From FS_MF_LableClass where 1=1"&str_ParentID&" order by id desc")
  99.   do while not rs_class.eof 
  100.   %>
  101.   <tr class="hback">
  102.   <td valign="top"><div align="center"><img src="../Images/Folder/folder.gif" alt="文件夹" width="20" height="16"></div></td>
  103.   <td><a href="All_Label_Stock.asp?ClassId=<% = rs_class("id")%>&isdel=<%=Request.QueryString("isdel")%>&ParentID=<%=rs_class("id")%>"><% = rs_class("ClassName")%></a></td>
  104.   <td><% = rs_class("ClassContent")%></td>
  105.   <td>&nbsp;</td>
  106.   </tr>
  107.   <%
  108.   rs_class.movenext
  109.   loop
  110.   rs_class.close:set rs_class = nothing
  111.   %>
  112.   <tr class="hback_1">
  113. <td colspan="4" height="2"></td>
  114.   </tr>
  115.  <%
  116. dim rs_stock,i,ClassId,ides,tmp_ParentID
  117. tmp_ParentID = Request.QueryString("ParentID")
  118. strpage=Trim(request("page"))
  119. If len(strpage)=0 Or strpage<"1" Or Trim(strpage)="" Then:strpage="1":End If
  120. if Request.QueryString("ClassId")<>"" then
  121. ClassId = " and LableClassID="&NoSQLHack(Request.QueryString("ClassID"))&""
  122. else
  123. ClassId = " and LableClassID=0"
  124. end if
  125. if Request.QueryString("isDel")="1" then
  126. ides = " and isdel=1"
  127. else
  128. ides = " and isdel=0"
  129. end if
  130. set rs_stock= Server.CreateObject(G_FS_RS)
  131. rs_stock.open "select ID,LableName,LableContent,isDel From FS_MF_Lable Where 1=1 "& ides & ClassId &" order by ID desc",Conn,1,1
  132. if rs_stock.eof then
  133.    rs_stock.close
  134.    set rs_stock=nothing
  135.    Response.Write"<TR  class=""hback""><TD colspan=""4""  class=""hback"" height=""40"">没有记录。</TD></TR>"
  136. else
  137. rs_stock.PageSize=int_RPP
  138. cPageNo=NoSqlHack(Request.QueryString("Page"))
  139. If cPageNo="" Then cPageNo = 1
  140. If not isnumeric(cPageNo) Then cPageNo = 1
  141. cPageNo = Clng(cPageNo)
  142. If cPageNo<=0 Then cPageNo=1
  143. If cPageNo>rs_stock.PageCount Then cPageNo=rs_stock.PageCount 
  144. rs_stock.AbsolutePage=cPageNo
  145. for i=1 to rs_stock.pagesize
  146. if rs_stock.eof Then exit For 
  147. %>
  148.  <form name="form1" method="post" action=""> <tr  onMouseOver=overColor(this) onMouseOut=outColor(this)>
  149.     <td class="hback"><div align="center"><%=i%></div></td>
  150.     <td class="hback" id=item$pval[CatID]) style="CURSOR: hand"  onmouseup="opencat(lable_<% = rs_stock("ID")%>);"  language=javascript><%=rs_stock("LableName")%></td>
  151.     <td class="hback"><a href="label_creat.asp?id=<%=rs_stock("id")%>&type=edit">修改</a>┆<a href="All_Label_Stock.asp?id=<%=rs_stock("id")%>&type=del"  onClick="{if(confirm('确定清除您所选择的记录吗?n此操作不可逆!')){return true;}return false;}">删除</a>┆
  152. <%if Request.QueryString("isDel")="1" then%>
  153. <a href="All_Label_Stock.asp?id=<%=rs_stock("id")%>&type=bakto" onClick="{if(confirm('确定还原吗')){return true;}return false;}">还原标签</a></td>
  154. <%else%>
  155. <a href="All_Label_Stock.asp?id=<%=rs_stock("id")%>&type=deltobak" onClick="{if(confirm('确定把标签移动到标签备份库中?n移动后此标签在前台不调用')){return true;}return false;}">加入备份库</a></td>
  156.     <%end if%>
  157. <td class="hback">
  158.       <label>
  159.         <input name="id" type="checkbox" id="id" value="<%=rs_stock("id")%>">
  160.         </label>    </td>
  161.   </tr>
  162.    <tr id="lable_<% = rs_stock("ID")%>" style="display:none;">
  163.     <td height="43" colspan="4" class="hback_1"><div align="left"><font style="font-family:Courier New"><%=rs_stock("LableContent")%></font></div></td>
  164.   </tr>
  165. <%
  166. rs_stock.movenext
  167. next
  168. %>
  169.    <tr>
  170.      <td height="26" colspan="4" class="hback"><div align="right">
  171.        <input type="checkbox" name="chkall" value="checkbox" onClick="CheckAll(this.form)">
  172.       选中所有<input name="type" type="hidden" id="type">
  173. <input type="button" name="Submit" value="删除"  onClick="document.form1.type.value='del';{if(confirm('确定清除您所选择的记录吗?')){this.document.form1.submit();return true;}return false;}">
  174. <%if Request.QueryString("isDel")="1" then%>
  175. <input type="button" name="Submit" value="还原标签"  onClick="document.form1.type.value='bakto';{if(confirm('确定还原标签吗')){this.document.form1.submit();return true;}return false;}">
  176. <%else%>
  177. <input type="button" name="Submit" value="删除到标签备份库"  onClick="document.form1.type.value='deltobak';{if(confirm('确定把标签移动到标签备份库中?n移动后此标签在前台不调用')){this.document.form1.submit();return true;}return false;}">
  178.       <%end if%>
  179.  </div></td>
  180.    </tr>
  181.   </form>
  182. <tr class="hback">
  183. <td colspan="4">
  184. <%
  185. response.Write "<p>"&  fPageCount(rs_stock,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
  186. rs_stock.close:set rs_stock=nothing
  187. end if
  188. %></td>
  189. </tr>
  190. </table>
  191. </body>
  192. <% 
  193. Set Conn=nothing
  194. %>
  195. </html>
  196. <script language="JavaScript" type="text/JavaScript">
  197. function insert(insertContent)
  198. {
  199. obj=window.frames.item('NewsContent').EditArea.document.body;
  200. obj.focus();
  201. if(document.selection==null)
  202. {
  203. var iStart = obj.selectionStart
  204. var iEnd = obj.selectionEnd;
  205. obj.value = obj.value.substring(0, iEnd) +insertContent+ obj.value.substring(iEnd, obj.value.length);
  206. }else
  207. {
  208. var range = document.selection.createRange();
  209. range.text=insertContent;
  210. }
  211. }
  212. function opencat(cat)
  213. {
  214.   if(cat.style.display=="none"){
  215.      cat.style.display="";
  216.   } else {
  217.      cat.style.display="none"; 
  218.   }
  219. }
  220. function CheckAll(form)  
  221.   {  
  222.   for (var i=0;i<form.elements.length;i++)  
  223.     {  
  224.     var e = form1.elements[i];  
  225.     if (e.name != 'chkall')  
  226.        e.checked = form1.chkall.checked;  
  227.     }  
  228.   }
  229. </script>
  230. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->