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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <%'Copyright (c) 2006 Foosun Inc. Code by 邓西%> 
  3. <!--#include file="../../FS_Inc/Const.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp"-->
  5. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  6. <!--#include file="../../FS_InterFace/NS_Function.asp" -->
  7. <!--#include file="../../FS_Inc/Func_page.asp" -->
  8. <%
  9. response.buffer=true
  10. Response.CacheControl = "no-cache"
  11. Dim Conn,User_Conn
  12. MF_Default_Conn
  13. MF_Session_TF
  14. if not MF_Check_Pop_TF("NS_Genal") then Err_Show
  15. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,strShowErr,showMorePageGo_Type_
  16. Dim Page,cPageNo
  17. Call MF_Check_Pop_TF("NS_Class_000001")
  18. int_RPP=30 '设置每页显示数目
  19. int_showNumberLink_=8 '数字导航显示数目
  20. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  21. str_nonLinkColor_="#999999" '非热链接颜色
  22. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  23. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  24. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  25. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  26. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  27. toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
  28.  
  29. Dim OM_OP,OM_OP_Sql_Str,obj_OM_OP_Rs,OM_OP_ID,obj_OM_OP_Rs_EofFlag,obj_OM_OP_Up_Rs,OM_OP_IDFlag,ShowList
  30. OM_OP=Request.QueryString("OM_OP")
  31. obj_OM_OP_Rs_EofFlag=False
  32. If OM_OP="" Or Isnull(OM_OP) Then
  33. OM_OP="OM_ShowList"
  34. End If
  35. OM_OP_ID=Request.QueryString("ID")
  36. If IsNull(OM_OP_ID) or OM_OP_ID="" Then
  37. OM_OP_IDFlag=True
  38. Else
  39. OM_OP_IDFlag=False
  40. End If
  41. If OM_OP="S_AddNew" Then
  42. Dim OM_Temp_Add_Type,OM_Temp_Add_Name,OM_Temp_Add_LinkUrl,OM_Temp_Add_Email,OM_Temp_Add_Explanation,Re_ID,Up_Action
  43. OM_Temp_Add_Type=Cint(Request.Form("Sel_Type"))
  44. Up_Action=Request.QueryString("Up_Action")
  45. OM_Temp_Add_Name=Replace(Replace(Request.Form("Txt_Name"),"<","&lt;"),">","&gt;")
  46. OM_Temp_Add_LinkUrl=Replace(Replace(Request.Form("Txt_LinkUrl"),"<","&lt;"),">","&gt;")
  47. OM_Temp_Add_Email=Replace(Replace(Request.Form("Txt_Email"),"<","&lt;"),">","&gt;")
  48. OM_Temp_Add_Explanation=Replace(Replace(Request.Form("Txt_Explanation"),"<","&lt;"),">","&gt;")
  49. If Up_Action="Submit" Then
  50. Conn.execute("Update FS_NS_General Set G_Type="&OM_Temp_Add_Type&",G_Name='"&OM_Temp_Add_Name&"',G_URL='"&OM_Temp_Add_LinkUrl&"',G_Email='"&OM_Temp_Add_Email&"',G_Content='"&OM_Temp_Add_Explanation&"' where GID="&Cint(OM_OP_ID)&"")
  51. strShowErr = "<li>修改成功</li>"
  52. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  53. Response.end
  54. Else
  55. Conn.Execute("insert into FS_NS_General(G_Type,G_Name,G_URL,G_Email,G_Content,isLock) values ("&OM_Temp_Add_Type&",'"&OM_Temp_Add_Name&"','"&OM_Temp_Add_LinkUrl&"','"&OM_Temp_Add_Email&"','"&OM_Temp_Add_Explanation&"',0)")
  56. strShowErr = "<li>添加成功</li>"
  57. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  58. Response.end
  59. End If
  60. End If
  61. If OM_OP="S_DelAll" Then
  62. Conn.execute("Delete From FS_NS_General")
  63. strShowErr = "<li>删除成功</li>"
  64. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=adminnewsother_manage.asp?OM_OP=OM_ShowList")
  65. Response.end
  66. End If
  67. %>
  68. <html>
  69. <head>
  70. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  71. <title>常规管理___Powered by foosun Inc.</title>
  72. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  73. </head>
  74. <body>
  75. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  76.   <tr class="hback"> 
  77.     <td class="xingmu"><a href="#" onmouseover="this.T_BGCOLOR='#404040';this.T_FONTCOLOR='#FFFFFF';return escape('<div align='center'>FoosunCMS4.0<br> Code by 邓西 <BR>Copyright (c) 2006 Foosun Inc</div>')" class="sd"><strong>常规管理</strong></a></td>
  78.   </tr>
  79.   <tr> 
  80.       <td width="100%" height="18" class="hback"><div align="left"> <a href="javascript:Sy();">管理首页</a> 
  81. |<a href="javascript:KeyWord();"> 关键字</a> | <a href="javascript:Source();">来源</a> | 
  82. <a href="javascript:ZouZe();">作者</a> | <a href="javascript:LinkUrl();">内部链接</a> 
  83. <a href="javascript:AddOne();">添加</a> | 
  84. <a href="javascript:DelAll();">删除全部</a>  </div></td>
  85.   </tr>
  86. </table>
  87. <div align="center">
  88. <%
  89. Dim OM_OP_Up_Type,OM_OP_Up_Name,OM_OP_Up_Email,OM_OP_Up_Content,OM_OP_Up_Url,Temp_Action
  90. If OM_OP_IDFlag=False Then
  91. Set obj_OM_OP_Up_Rs=Conn.Execute("SELECT G_Type,G_Name,G_URL,G_Email,G_Content from FS_NS_General where GID="&Cint(OM_OP_ID)&"")
  92. If Not obj_OM_OP_Up_Rs.Eof Then
  93. OM_OP_Up_Type=Cint(obj_OM_OP_Up_Rs("G_Type"))
  94. OM_OP_Up_Name=obj_OM_OP_Up_Rs("G_Name")
  95. OM_OP_Up_Url=obj_OM_OP_Up_Rs("G_URL")
  96. OM_OP_Up_Email=obj_OM_OP_Up_Rs("G_Email")
  97. OM_OP_Up_Content=obj_OM_OP_Up_Rs("G_Content")
  98. End If
  99. Set obj_OM_OP_Up_Rs=Nothing
  100. Temp_Action="&Up_Action=Submit&ID="&OM_OP_ID
  101. End If
  102. %>
  103. <table width="98%" border="0" cellpadding="5" cellspacing="1" class="table" id="OM_AddNew" style="display:none">
  104.   <tr class="hback"> 
  105.     <td class="xingmu" colspan="2">添加</td>
  106.   </tr>
  107.  <form name="form_OM_AddNew" id="form_OM_AddNew" method="post" action="other_manage.asp?OM_OP=S_AddNew<%=Temp_Action%>" onSubmit="javascript:return Check_Type();">
  108.   <tr> 
  109.       <td width="290" height="29" class="hback" align="right">类型</td>
  110.       <td width="652" height="29" class="hback">
  111. <select size="1" name="Sel_Type" onChange="javascript:SelectOpType(this.value);">
  112. <% If IsNull(OM_OP_ID)=True Or OM_OP_ID="" Then %>
  113. <option value="0" selected>请选择</option>
  114. <% End If %>
  115. <option value="1" <% If OM_OP_Up_Type=1 Then Response.write "selected" %>>关键字</option>
  116. <option value="2" <% If OM_OP_Up_Type=2 Then Response.write "selected" %>>来源</option>
  117. <option value="3" <% If OM_OP_Up_Type=3 Then Response.write "selected" %>>作者</option>
  118. <option value="4" <% If OM_OP_Up_Type=4 Then Response.write "selected" %>>内部连接</option>
  119. </select></td>
  120.   </tr>
  121. <tr id="Tr_Title" style="display:none">
  122.       <td height="28" class="hback" align="right">标题</td>
  123.       <td height="28" class="hback">
  124. <input type="text" name="Txt_Name" size="50" maxlength="50" value="<%=OM_OP_Up_Name%>">(<font color=red size=2>*</font>)</td>
  125.     </tr>
  126. <tr id="Tr_Url" style="display:none">
  127.       <td height="-5" class="hback" align="right">链接地址</td>
  128.       <td height="-5" class="hback">
  129. <input type="text" name="Txt_LinkUrl" size="50" maxlength="50" value="<%=OM_OP_Up_Url%>"></td>
  130.     </tr>   
  131.   <tr id="Tr_Email" style="display:none">
  132.       <td height="-5" class="hback" align="right">电子邮件</td>
  133.       <td height="-5" class="hback">
  134. <input type="text" name="Txt_Email" size="50" maxlength="50" value="<%=OM_OP_Up_Email%>"></td>
  135.     </tr>
  136. <tr id="Tr_Explanation" style="display:none"> 
  137.       <td height="-5" class="hback" align="right">说明</td>
  138.       <td height="-5" class="hback">
  139. <textarea rows="4" name="Txt_Explanation" cols="50" maxlength="200"><%=OM_OP_Up_Content%></textarea></td>
  140.     </tr>
  141. <tr id="Tr_SubMit" style="display:none">
  142.       <td  height="-5" class="hback" align="center" colspan="2">
  143. <input type="submit" value=" 提 交 " name="But_AddNew">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  144. <input type="reset" value=" 重 置 " name="But_Clear">(注:(<font color=red size=2>*</font>)为必填)</td>
  145.     </tr>
  146.   </form>
  147. </table>
  148. <table width="98%" border="0" cellpadding="5" cellspacing="1" class="table" id="OM_ShowList" style="display:none">
  149.   <tr class="hback"> 
  150.     <td class="xingmu" width="20%" align="center">标题</td>
  151.     <td class="xingmu" width="8%" align="center">类型</td>
  152.     <td class="xingmu" width="21%" align="center">链接地址</td>
  153.     <td class="xingmu" width="20%" align="center">电子邮件</td>
  154.     <td class="xingmu" width="5%" align="center">状态</td>
  155.     <td class="xingmu" width="26%" align="center">操作</td>
  156.   </tr>
  157.   <form name="form_OM_OP" id="form_OM_OP" method="post" action="other_manage.asp?OM_OP=OM_ShowList&OM_OP_P=P"><input name="Hi_OP_Type" type="hidden" value="">
  158. <%
  159. If OM_OP="OM_ShowList" Then
  160. Dim OM_OP_Action,OM_OP_P
  161. OM_OP_Action=Request.QueryString("Action")
  162. OM_OP_P=Request.QueryString("OM_OP_P")
  163. If OM_OP_Action="Lock" Then
  164. Conn.execute("Update FS_NS_General Set isLock=1 Where GID="&Cint(OM_OP_ID)&"")
  165. 'Response.Write("<script language=javascript>alert('"&Request.QueryString("ShowList")&"')<script>")
  166. 'Response.End()
  167. End If
  168. If OM_OP_Action="UnLock" Then
  169. Conn.execute("Update FS_NS_General Set isLock=0 Where GID="&Cint(OM_OP_ID)&"")
  170. End If
  171. If OM_OP_Action="DelOne" Then
  172. Conn.execute("Delete * From FS_NS_General Where GID="&Cint(OM_OP_ID)&"")
  173. strShowErr = "<li>删除成功</li>"
  174. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  175. Response.end
  176. End If
  177. If OM_OP_P="P" Then
  178. Dim OM_OP_Temp_P_Type,OM_OP_Temp_P_ID,OM_OP_IOM_OP_Temp_P_Flag,OM_OP_IOM_OP_Temp_P_I,i,int_tempID
  179. OM_OP_Temp_P_Type=Request.Form("hi_OP_Type")
  180. OM_OP_Temp_P_ID=Request.Form("Che_OPType")
  181. If OM_OP_Temp_P_ID="" or IsNull(OM_OP_Temp_P_ID) Then
  182. strShowErr = "<li>请选择要批量操作的内容!</li>"
  183. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  184. Response.end
  185. End If
  186. 'int_tempID=Split(OM_OP_Temp_P_ID,",")
  187. ' For i=1 To Ubound(OM_OP_Temp_P_ID)
  188. ' int_tempID=int_tempID&OM_OP_Temp_P_ID(i)
  189. ' Next
  190. 'Response.Write(int_tempID)
  191. 'Response.End()
  192. Select Case OM_OP_Temp_P_Type
  193. Case "P_Lock"
  194. Conn.execute("Update FS_NS_General Set isLock=1 Where GID in("&OM_OP_Temp_P_ID&")")
  195. strShowErr = "<li>批量锁定成功</li>"
  196. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  197. Response.end
  198. Case "P_UnLock"
  199. Conn.execute("Update FS_NS_General Set isLock=0 Where GID in("&OM_OP_Temp_P_ID&")")
  200. strShowErr = "<li>批量解锁成功</li>"
  201. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  202. Response.end
  203. Case "P_Del"
  204. Conn.execute("Delete * From FS_NS_General Where GID in("&OM_OP_Temp_P_ID&")")
  205. strShowErr = "<li>批量删除成功</li>"
  206. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=adminnewsother_manage.asp?OM_OP=OM_ShowList")
  207. Response.end
  208. End Select
  209. End If
  210. ShowList=Request.QueryString("ShowList")
  211. If ShowList="" or Isnull(ShowList) Then
  212. OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Order By G_Type"
  213. Else
  214. Select Case Cstr(ShowList)
  215. Case "Keyword"
  216. OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=1"
  217. Case "Source"
  218. OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=2"
  219. Case "ZouZe"
  220. OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=3"
  221. Case "LinkUrl"
  222. OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=4"
  223. End Select
  224. End If
  225. Set obj_OM_OP_Rs=CreateObject(G_FS_RS)
  226. obj_OM_OP_Rs.Open OM_OP_Sql_Str,Conn,1,1
  227. Dim OM_Temp_Type,OM_Temp_IsLock,OM_Temp_Url,OM_Temp_Email,OM_Temp_Name
  228. If Not obj_OM_OP_Rs.Eof Then
  229. obj_OM_OP_Rs_EofFlag=True
  230. obj_OM_OP_Rs.PageSize=int_RPP
  231. cPageNo=NoSqlHack(Request.QueryString("page"))
  232. If cPageNo="" Then cPageNo = 1
  233. If not isnumeric(cPageNo) Then cPageNo = 1
  234. cPageNo = Clng(cPageNo)
  235. If cPageNo>obj_OM_OP_Rs.PageCount Then cPageNo=obj_OM_OP_Rs.PageCount 
  236. If cPageNo<=0 Then cPageNo=1
  237. obj_OM_OP_Rs.AbsolutePage=cPageNo
  238. For int_Start=1 TO int_RPP  
  239. %>
  240.   <tr>
  241. <%
  242. OM_Temp_Name=obj_OM_OP_Rs("G_Name")
  243. OM_Temp_Type=Cint(obj_OM_OP_Rs("G_Type"))
  244. Select Case OM_Temp_Type
  245. Case 1
  246. OM_Temp_Type="关键字"
  247. Case 2
  248. OM_Temp_Type="来源"
  249. Case 3
  250. OM_Temp_Type="作者"
  251. Case 4
  252. OM_Temp_Type="内部链接"
  253. End Select
  254. OM_Temp_IsLock=Cint(obj_OM_OP_Rs("isLock"))
  255. Select Case OM_Temp_IsLock
  256. Case 0
  257. OM_Temp_IsLock="正常"
  258. Case 1
  259. OM_Temp_IsLock="<font color=""red"">锁定</font>"
  260. End Select 
  261. If obj_OM_OP_Rs("G_URL")="" or Isnull(obj_OM_OP_Rs("G_URL")) then
  262. OM_Temp_Url="-"
  263. Else
  264. OM_Temp_Url=obj_OM_OP_Rs("G_URL")
  265. End If
  266. If obj_OM_OP_Rs("G_Email")="" or Isnull(obj_OM_OP_Rs("G_Email")) Then
  267. OM_Temp_Email="-"
  268. Else
  269. OM_Temp_Email=obj_OM_OP_Rs("G_Email")
  270. End If
  271. %>
  272.     <td class="hback" align="center" height="20"><%=OM_Temp_Name%></td>
  273.     <td class="hback" align="center"><%=OM_Temp_Type%></td>
  274.     <td class="hback" align="center"><%=OM_Temp_Url%></td>
  275.     <td class="hback" align="center"><%=OM_Temp_Email%></td>
  276.     <td class="hback" align="center"><%=OM_Temp_IsLock%></td>
  277.     <td class="hback" align="center"><a href="javascript:Update('<%=obj_OM_OP_Rs("GID")%>');">修改</a> | <a href="javascript:DelOne('<%=obj_OM_OP_Rs("GID")%>');">删除</a> | <a href="javascript:Lock('<%=obj_OM_OP_Rs("GID")%>');">锁定</a> | <a href="javascript:UnLock('<%=obj_OM_OP_Rs("GID")%>');">解锁</a>  |<input type="checkbox" value="<%=obj_OM_OP_Rs("GID")%>" name="Che_OPType"></td>
  278.   </tr>
  279. <%
  280. obj_OM_OP_Rs.MoveNext
  281. If obj_OM_OP_Rs.Eof or obj_OM_OP_Rs.Bof Then Exit For
  282. Next
  283. Response.Write "<tr><td class=""hback"" colspan=""6"" align=""left"">"&fPageCount(obj_OM_OP_Rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)&"&nbsp;&nbsp;<input type=""button"" value="" 批量锁定 "" name=""But_P_Lock"" onclick=""javascript:P_Lock();"">&nbsp;<input type=""button"" value="" 批量解锁 "" name=""But_P_UnLock"" onclick=""javascript:P_UnLock();"">&nbsp;<input type=""button"" value="" 批量删除 "" name=""But_P_Del"" onclick=""javascript:P_Del();"">&nbsp;全选<input type=""checkbox"" name=""Che_OPType"" onclick=""CheckAll();"" value=""""></td></tr>"
  284. Else
  285. Response.write"<table width=""98%"" border=0 align=center cellpadding=2 cellspacing=1 class=table><tr><td>当前没有内容!</td></tr></table>"
  286. End If
  287. obj_OM_OP_Rs.Close
  288. Set obj_OM_OP_Rs=Nothing
  289. End If
  290. Response.write "<script language=""javascript"">document.all.OM_ShowList.style.display=""none"";</script>"
  291. %>
  292. </form> 
  293. </table>
  294. </div>
  295. <script language="javascript" type="text/javascript" src="../../FS_Inc/wz_tooltip.js"></script>
  296. </body>
  297. </html>
  298. <script language="javascript">
  299. function SelectTableShow(ShowType)
  300. {
  301. switch(ShowType)
  302. {
  303. case 0://显示常规管理首页
  304. document.all.OM_ShowList.style.display="";
  305. document.all.OM_AddNew.style.display="none";
  306. break;
  307. case 1://显示常规管理添加页
  308. document.all.OM_ShowList.style.display="none";
  309. document.all.OM_AddNew.style.display="";
  310. break;
  311. case 2://显示常规管理修改页
  312. break;
  313. //case 3://显示删除提示对话框
  314. // if(confirm('你将删除所有信息!n你确定删除吗?'))location='?OM_OP=S_DelAll';
  315. // break;
  316. case 4://显示列表信息
  317. <%
  318. If obj_OM_OP_Rs_EofFlag=True Then
  319. %>
  320. document.all.OM_ShowList.style.display="";
  321. <%
  322. Else
  323. %>
  324. document.all.OM_ShowList.style.display="none";
  325. <%
  326. End If
  327. %>
  328. document.all.OM_AddNew.style.display="none";
  329. break;
  330. }
  331. }
  332. function SelectOpType(OpType)
  333. {
  334. switch(parseInt(OpType))
  335. {
  336. case 0://默认全部不显示
  337. document.all.Tr_Url.style.display="none";
  338. document.all.Tr_Title.style.display="none";
  339. document.all.Tr_Email.style.display="none";
  340. document.all.Tr_Explanation.style.display="none";
  341. document.all.Tr_SubMit.style.display="none";
  342. break;
  343. case 1://关键字
  344. document.all.Tr_Url.style.display="none";
  345. document.all.Tr_Title.style.display="";
  346. document.all.Tr_Email.style.display="none";
  347. document.all.Tr_Explanation.style.display="";
  348. document.all.Tr_SubMit.style.display="";
  349. break;
  350. case 2://来源
  351. document.all.Tr_Url.style.display="";
  352. document.all.Tr_Title.style.display="";
  353. document.all.Tr_Email.style.display="none";
  354. document.all.Tr_Explanation.style.display="";
  355. document.all.Tr_SubMit.style.display="";
  356. break;
  357. case 3://作者
  358. document.all.Tr_Url.style.display="none";
  359. document.all.Tr_Title.style.display="";
  360. document.all.Tr_Email.style.display="";
  361. document.all.Tr_Explanation.style.display="";
  362. document.all.Tr_SubMit.style.display="";
  363. document.form_OM_AddNew.Sel_Type.value="3";
  364. break;
  365. case 4://内部连接
  366. document.all.Tr_Url.style.display="";
  367. document.all.Tr_Title.style.display="";
  368. document.all.Tr_Email.style.display="none";
  369. document.all.Tr_Explanation.style.display="";
  370. document.all.Tr_SubMit.style.display="";
  371. break;
  372. }
  373. }
  374. function Check_Type()
  375. {
  376. if (document.form_OM_AddNew.Sel_Type.value=="0") 
  377. {
  378. alert("请选择类型!");
  379. document.form_OM_AddNew.Sel_Type.focus();
  380. return false;
  381. }
  382. if (document.form_OM_AddNew.Txt_Name.value=="")
  383. {
  384. alert("请添加标题!");
  385. document.form_OM_AddNew.Txt_Name.focus();
  386. return false;
  387. }
  388. if (document.form_OM_AddNew.Sel_Type.value=="3"&&document.form_OM_AddNew.Txt_Email.value=="")
  389. {
  390. alert("请输入电子邮件地址!");
  391. document.form_OM_AddNew.Txt_Email.focus();
  392. return false;
  393. }
  394. if( document.form_OM_AddNew.Sel_Type.value=="3"&&document.form_OM_AddNew.Txt_Email.value.length<6 || document.form_OM_AddNew.Sel_Type.value=="3"&&document.form_OM_AddNew.Txt_Email.value.length>36 || document.form_OM_AddNew.Sel_Type.value=="3"&&!validateEmail() ) 
  395. {
  396.       alert("请您输入正确的邮箱地址 !");
  397.      document.form_OM_AddNew.Txt_Email.focus();
  398.      return false;
  399.     }
  400. return true
  401. }
  402. //检查电子邮件格式
  403. function validateEmail(){
  404. var re=/^[w-]+(.*[w-]+)*@([0-9a-z]+[0-9a-z-]*[0-9a-z]+.)+[a-z]{2,3}$/i;
  405. if(re.test(document.form_OM_AddNew.Txt_Email.value))
  406. return true;
  407. else
  408. return false;
  409. }
  410. function CheckAll()
  411. {
  412. var checkBoxArray=document.all("Che_OPType")
  413. if(checkBoxArray[checkBoxArray.length-1].checked)
  414. {
  415. for(var i=0;i<checkBoxArray.length-1;i++)
  416. {
  417. checkBoxArray[i].checked=true;
  418. }
  419. }else
  420. {
  421. for(var i=0;i<checkBoxArray.length-1;i++)
  422. {
  423. checkBoxArray[i].checked=false;
  424. }
  425. }
  426. }
  427. function P_Lock()
  428. {
  429. document.form_OM_OP.Hi_OP_Type.value="P_Lock";
  430. document.form_OM_OP.action='?OM_OP=OM_ShowList&OM_OP_P=P&ShowList=<%=Request.QueryString("Showlist")%>';
  431. document.form_OM_OP.submit();
  432. }
  433. function P_UnLock()
  434. {
  435. document.form_OM_OP.Hi_OP_Type.value="P_UnLock";
  436. document.form_OM_OP.action='?OM_OP=OM_ShowList&OM_OP_P=P&ShowList=<%=Request.QueryString("Showlist")%>';
  437. document.form_OM_OP.submit();
  438. }
  439. function P_Del()
  440. {
  441. if(confirm('此操作将删除选中的内容?n你确定删除吗?'))
  442. {
  443. document.form_OM_OP.Hi_OP_Type.value="P_Del";
  444. document.form_OM_OP.action='?OM_OP=OM_ShowList&OM_OP_P=P&ShowList=<%=Request.QueryString("Showlist")%>';
  445. document.form_OM_OP.submit();
  446. }
  447. }
  448. function DelAll()
  449. {
  450. if(confirm('将删除所有内容!n你确定删除吗?'))
  451. {
  452. location='?OM_OP=S_DelAll';
  453. }
  454. }
  455. function Lock(GID)
  456. {
  457. location='?OM_OP=OM_ShowList&ID='+GID+'&Action=Lock&Page=<%=Request.QueryString("Page")%>&ShowList=<%=Request.QueryString("ShowList")%>';
  458. }
  459. function UnLock(GID)
  460. {
  461. location='?OM_OP=OM_ShowList&ID='+GID+'&Action=UnLock&Page=<%=Request.QueryString("Page")%>&ShowList=<%=Request.QueryString("ShowList")%>';
  462. }
  463. function Update(GID)
  464. {
  465. location='?OM_OP=AddNew&ID='+GID+'&Action=Update&Page=<%=Request.QueryString("Page")%>&ShowList=<%=Request.QueryString("ShowList")%>';
  466. }
  467. function DelOne(GID)
  468. {
  469. if (confirm('确定要删除该记录吗?'))
  470. {
  471. location='?OM_OP=OM_ShowList&ID='+GID+'&Action=DelOne&Page=<%=Request.QueryString("Page")%>&ShowList=<%=Request.QueryString("ShowList")%>';
  472. }
  473. }
  474. function KeyWord()
  475. {
  476. location="other_manage.asp?OM_OP=OM_ShowList&ShowList=Keyword";
  477. }
  478. function Source()
  479. {
  480. location="other_manage.asp?OM_OP=OM_ShowList&ShowList=Source";
  481. }
  482. function ZouZe()
  483. {
  484. location='other_manage.asp?OM_OP=OM_ShowList&ShowList=ZouZe';
  485. }
  486. function LinkUrl()
  487. {
  488. location='other_manage.asp?OM_OP=OM_ShowList&ShowList=LinkUrl';
  489. }
  490. function AddOne()
  491. {
  492. location='other_manage.asp?OM_OP=AddNew';
  493. }
  494. function Sy()
  495. {
  496. location='other_manage.asp?OM_OP=OM_ShowList';
  497. }
  498. </script>
  499. <%
  500. If OM_OP="" Then
  501. Response.write"<script language=""javascript"">SelectTableShow(0);</script>"
  502. Else
  503. OM_OP=Cstr(OM_OP)
  504. Select Case OM_OP
  505. Case "AddNew"
  506. Response.write"<script language=""javascript"">SelectTableShow(1);</script>"
  507. Case "Update"
  508. Response.write"<script language=""javascript"">SelectTableShow(2);</script>"
  509. Case "DelAll"
  510. Response.write"<script language=""javascript"">SelectTableShow(3);</script>"
  511. Case "OM_ShowList"
  512. Response.write"<script language=""javascript"">SelectTableShow(4);</script>"
  513. Case else
  514. Response.write"<script language=""javascript"">SelectTableShow(0);</script>"
  515. End Select
  516. End IF
  517. If OM_OP_Up_Type=4 Then Response.write "<script language=""javascript"">SelectOpType(4);</script>" 
  518. If OM_OP_Up_Type=1 Then Response.write "<script language=""javascript"">SelectOpType(1);</script>"
  519. If OM_OP_Up_Type=2 Then Response.write "<script language=""javascript"">SelectOpType(2);</script>"
  520. If OM_OP_Up_Type=3 Then Response.write "<script language=""javascript"">SelectOpType(3);</script>"
  521. Set Conn=Nothing
  522. %><!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->