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

数据库编程

开发平台:

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="../../FS_Inc/Func_page.asp" -->
  6. <!--#include file="../lib/strlib.asp" -->
  7. <!--#include file="../lib/UserCheck.asp" -->
  8. <%'Copyright (c) 2006 Foosun Inc. Code by Einstein.liu
  9. Dim straction
  10. straction = Request("action")
  11. if straction="Unmessage" then
  12. User_Conn.execute("update FS_ME_Users set ismessage= 0 where UserNumber='"& Fs_User.UserNumber &"'")
  13. strShowErr = "<li>订阅本站资料取消</li>"
  14. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  15. Response.end
  16. Elseif straction = "ismessage" then
  17. User_Conn.execute("update FS_ME_Users set ismessage= 1 where UserNumber='"& Fs_User.UserNumber &"'")
  18. strShowErr = "<li>订阅本站资料成功</li>"
  19. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  20. Response.end
  21. Elseif straction = "Open" then
  22. User_Conn.execute("update FS_ME_Users set isOpen= 1 where UserNumber='"& Fs_User.UserNumber &"'")
  23. strShowErr = "<li>对外开放资料开启</li>"
  24. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  25. Response.end
  26. Elseif straction = "Close" then
  27. User_Conn.execute("update FS_ME_Users set isOpen= 0 where UserNumber='"& Fs_User.UserNumber &"'")
  28. strShowErr = "<li>对外开放资料取消</li>"
  29. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  30. Response.end
  31. End if
  32. %>
  33. <%
  34. Dim Second_rs,mytype,order,sqlstatement,order_status,tClass,HouseStyleArray,HouseStyle,Decoration,UseFor,Floor,FloorType,equip
  35. Dim BelongType,Structure
  36. Dim id_order,usefor_order,Class_order,price_order,time_order
  37. session("audit")=request.querystring("audit")
  38. order=request.QueryString("order")
  39. mytype=trim(request.QueryString("type"))
  40. if mytype="" then
  41. mytype=1
  42. End if
  43. if session("orderstatus")="" then
  44. session("orderstatus")="asc"
  45. End if
  46. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,i
  47. '---------------------------------分页定义
  48. int_RPP=15 '设置每页显示数目
  49. int_showNumberLink_=8 '数字导航显示数目
  50. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  51. str_nonLinkColor_="#999999" '非热链接颜色
  52. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  53. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  54. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  55. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  56. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  57. toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
  58. '--------------------------------------------------
  59. select case order
  60. case "orderbyid" 
  61. if session("audit")="1"  then 
  62. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where  Usernumber='"&session("FS_UserNumber")&"' and Audited=1 order by sid "&session("orderstatus")
  63. else 
  64. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' order by sid "&session("orderstatus")
  65. end if
  66. case "orderbyusefor" 
  67. if session("audit")="1"  then 
  68. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' and Audited=1 order by UseFor "&session("orderstatus")
  69. else
  70. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second  where Usernumber='"&session("FS_UserNumber")&"' order by UseFor "&session("orderstatus")
  71. end if
  72. case "orderbyclass" 
  73. if session("audit")="1"  then 
  74. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' and Audited=1 order by Class "&session("orderstatus")
  75. else
  76. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' order by Class "&session("orderstatus")
  77. end if
  78. case "orderbyprice" 
  79. if session("audit")="1"  then
  80. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' and Audited=1 order by Price "&session("orderstatus")
  81. else
  82. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' order by Price "&session("orderstatus")
  83. End if
  84. case "orderbytime" 
  85. if session("audit")="1"  then
  86. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' and Audited=1 order by PubDate "&session("orderstatus")
  87. else
  88. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' order by PubDate "&session("orderstatus")
  89. End if
  90. case else 
  91. if session("audit")="1"  then
  92. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second where Usernumber='"&session("FS_UserNumber")&"' and Audited=1 order by sid desc"
  93. else
  94. sqlstatement="select SID,Class,UserNumber,Label,UseFor,FloorType,BelongType,HouseStyle,Structure,Area,BuildDate,Price,CityArea,Address,Floor,Position,Decoration,LinkMan,Contact,equip,Remark,PubDate,Audited,PicNumber from FS_HS_Second  where Usernumber='"&session("FS_UserNumber")&"' order by sid desc"
  95. End if
  96. end select
  97. '排序状态
  98. Function changeOrderStatus()
  99. Dim order_desc
  100. if session("orderstatus")="asc" then
  101. session("orderstatus")="desc"
  102. order_desc="<font color='red'>↑</font>"
  103. else
  104. session("orderstatus")="asc"
  105. order_desc="<font color='red'>↓</font>"
  106. End if
  107. select case order
  108. case "orderbyid"    id_order=order_desc
  109. usefor_order=""
  110. Class_order=""
  111. price_order=""
  112. time_order=""
  113. case "orderbyusefor" usefor_order=order_desc
  114.  id_order=""
  115.  class_order=""
  116.  price_order=""
  117.  time_order=""
  118. case "orderbyclass" Class_order=order_desc
  119. id_order=""
  120. time_order=""
  121. usefor_order=""
  122. price_order=""
  123. case "orderbyprice" price_order=order_desc
  124. id_order=""
  125. Class_order=""
  126. time_order=""
  127. usefor_order=""
  128. case "orderbytime"  time_order=order_desc
  129. id_order=""
  130. Class_order=""
  131. usefor_order=""
  132. price_order=""
  133. end select
  134. End Function
  135. if trim(order)<>"" then
  136. changeOrderStatus()
  137. End if%>
  138. <html xmlns="http://www.w3.org/1999/xhtml">
  139. <title>User Manage Center-网站内容管理系统</title>
  140. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  141. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  142. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  143. <link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  144. <head>
  145. <script language="javascript" src="../../FS_Inc/CheckJs.js"></script>
  146. <script language="javascript" src="../../FS_Inc/prototype.js"></script>
  147. <script language="javascript" src="../../FS_Inc/PublicJS.js"></script>
  148. </head>
  149. <body>
  150. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  151.   <tr>
  152.     <td><!--#include file="../top.asp" -->
  153.     </td>
  154.   </tr>
  155. </table>
  156. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  157.   <tr class="back">
  158.     <td   colspan="2" class="xingmu" height="26"><!--#include file="../Top_navi.asp" -->
  159.     </td>
  160.   </tr>
  161.   <tr class="back">
  162.     <td width="18%" valign="top" class="hback"><div align="left">
  163.         <!--#include file="../menu.asp" -->
  164.       </div></td>
  165.     <td width="82%" valign="top" class="hback"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  166.         <tr>
  167.           <td class="xingmu" align="center" <%if not isCorp() then Response.Write("style=""display:none""")%>><a href="houseManage.asp">楼盘信息</a></td>
  168.           <td class="xingmu" align="center"><a href="HS_Tenancy.asp">租赁信息</a></td>
  169.           <td class="xingmu" align="center"><a href="HS_Second.asp" style="color:#FF0000">二手房信息</a></td>
  170.         <tr>
  171.           <td colspan="3"><table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  172.               <tr>
  173.                 <td class="xingmu" colspan="4">二手房信息&nbsp;|&nbsp;<a href="#" onClick="history.back()">后退</a>&nbsp;|&nbsp;<a href="#" class="sd" title="选中复选框,查看个人二手房" onClick="linkShowclass();showclass();">已审核</a>
  174.                   <input type="checkbox" name="ifaudit" id="audit" value="" onClick="showclass()" <%if session("audit")="1"  then response.Write("checked")%>/></td>
  175.               </tr>
  176.             </table>
  177.             <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  178.               <tr>
  179.                 <td class="hback_1" align="center" width="10%"><a href="HS_Second.asp?order=orderbyid&type=<%=mytype%>&class=<%=session("class")%>" class="sd">编号<%=id_order%></a></td>
  180.                 <td class="hback_1" align="center" width="20%"><a href="HS_Second.asp?order=orderbyusefor&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">用途<%=usefor_order%></a></td>
  181.                 <td class="hback_1" align="center" width="15%"><a href="HS_Second.asp?order=orderbyclass&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">类型<%=class_order%></a></td>
  182.                 <td class="hback_1" align="center" width="15%"><a href="HS_Second.asp?order=orderbyprice&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">价格<%=price_order%></a></td>
  183.                 <td class="hback_1" align="center" width="15%"><a href="HS_Second.asp?order=orderbytime&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">发布时间<%=time_order%></a></td>
  184.                 <td class="hback_1" align="center" width="20%"><a href="#" class="sd">操作</a></td>
  185.                 <td class="hback_1" align="center" width="5%"><input type="checkbox" value="" name="Secondlist"  onclick="selectAll(document.all('Secondlist'))"/></td>
  186.               </tr>
  187.               <%
  188. Set Second_rs=Server.CreateObject(G_FS_RS)
  189. Second_rs.open sqlstatement,Conn,1,1
  190. If Not Second_rs.eof then
  191. '分页使用-----------------------------------
  192. Second_rs.PageSize=int_RPP
  193. cPageNo=NoSqlHack(Request.QueryString("page"))
  194. If cPageNo="" Then cPageNo = 1
  195. If not isnumeric(cPageNo) Then cPageNo = 1
  196. cPageNo = Clng(cPageNo)
  197. If cPageNo<=0 Then cPageNo=1
  198. If cPageNo>Second_rs.PageCount Then cPageNo=Second_rs.PageCount 
  199. Second_rs.AbsolutePage=cPageNo
  200. End if
  201. Dim audit
  202. for i=0 to int_RPP
  203. if Second_rs.eof then exit for
  204. select case Second_rs("Class")
  205. case "1"  tClass="个人"
  206. case "2"  tClass="中介"
  207. end select
  208. if Second_rs("UseFor")="1" then
  209. UseFor="住房"
  210. elseif Second_rs("UseFor")="2" then
  211. UseFor="写字间"
  212. Else
  213. UseFor="其他"
  214. end if
  215. if Second_rs("audited")="1" then
  216. audit="已审核"
  217. else
  218. audit="<font color='red'>未审核</font>"
  219. End if
  220. Response.Write("<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>"&vbcrlf)
  221. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&Second_rs("sid")&"','2_detail"&Second_rs("sid")&"','3_detail"&Second_rs("sid")&"','4_detail"&Second_rs("sid")&"')"">"&Second_rs("sid")&"</td>"&vbcrlf)
  222. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&Second_rs("sid")&"','2_detail"&Second_rs("sid")&"','3_detail"&Second_rs("sid")&"','4_detail"&Second_rs("sid")&"')"">"&UseFor&"</td>"&vbcrlf)
  223. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&Second_rs("sid")&"','2_detail"&Second_rs("sid")&"','3_detail"&Second_rs("sid")&"','4_detail"&Second_rs("sid")&"')"">"&tClass&"</td>"&vbcrlf)
  224. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&Second_rs("sid")&"','2_detail"&Second_rs("sid")&"','3_detail"&Second_rs("sid")&"','4_detail"&Second_rs("sid")&"')"">¥"&Second_rs("price")&"元/月</td>"&vbcrlf)
  225. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&Second_rs("sid")&"','2_detail"&Second_rs("sid")&"','3_detail"&Second_rs("sid")&"','4_detail"&Second_rs("sid")&"')"">"&Second_rs("PubDate")&"</td>"&vbcrlf)
  226. response.Write("<td align='center' class='hback'><span id='audit"&Second_rs("sid")&"'>"&audit&"</span>&nbsp;|&nbsp;<span id='edit"&Second_rs("sid")&"'><a href='HS_Second_Edit.asp?action=edit&id="&Second_rs("sid")&"'>修改</a></span>&nbsp;|&nbsp;<span id='delete"&Second_rs("sid")&"'><a href='#' class='sd' onclick=""deleteAction('delete"&Second_rs("sid")&"','"&Second_rs("sid")&"')"">删除</a></span></td>"&vbcrlf)
  227. response.Write("<td align='center' class='hback' onmousedown='document.body.onmousedown=null'><input type='checkbox' name='Secondlist' value='"&Second_rs("sid")&"'</td>"&vbcrlf)
  228. response.Write("</tr>"&vbcrlf)
  229. Response.Write("<tr id=""1_detail"&Second_rs("sid")&""" style=""display:none"">"&vbcrlf)
  230. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  231. Response.Write("├位置:"&Second_rs("Position")&"&nbsp;|&nbsp;区县:"&Second_rs("CityArea")&vbcrlf)
  232. response.Write("</td>"&vbcrlf)
  233. response.Write("</tr>"&vbcrlf)
  234. '户型处理
  235. if trim(Second_rs("HouseStyle"))<>"" then
  236. HouseStyleArray=split(Second_rs("HouseStyle"),",")
  237. HouseStyle=HouseStyleArray(0)&"室"&HouseStyleArray(1)&"厅"&HouseStyleArray(2)&"卫"
  238. else
  239. HouseStyle="暂无信息"
  240. End if
  241. '楼层处理
  242. if trim(Second_rs("Floor"))<>"" then
  243. Floor="总"&split(Second_rs("Floor"),",")(0)&"层,第"&split(Second_rs("Floor"),",")(1)&"层"
  244. else
  245. Floor="暂无信息"
  246. end if
  247. '楼层类型
  248. if Second_rs("FloorType")="1" then 
  249. FloorType="多层"
  250. Else
  251. FloorType="单层"
  252. End if
  253. '处理装修情况
  254. select case Second_rs("Decoration")
  255. case "1" Decoration="简单装修"
  256. case "2" Decoration="中档装修"
  257. case "3" Decoration="高档装修"
  258. case else  Decoration="暂无信息"
  259. end select
  260. '处理设施
  261. if Second_rs("equip")<>"" then
  262. equip=replace(replace(replace(replace(replace(replace(Second_rs("equip"),"l","通水"),"m","电"),"n","气"),"x","电话"),"y","光纤"),"z","宽带")
  263. else
  264. equip="无相关信息"
  265. End if
  266. '产权性质
  267. if Second_rs("BelongType")="1" then
  268. BelongType="商品房"
  269. else
  270. BelongType="集资房"
  271. End if
  272. '1钢筋混凝土结构、2砖混结构、3砖木结构、4简易结构
  273. select case Second_rs("Structure")
  274. case "1" Structure="钢筋混凝土"
  275. case "2" Structure="砖混"
  276. case "3" Structure="砖木"
  277. case "4" Structure="简易"
  278. End select
  279. response.Write("<tr id=""2_detail"&Second_rs("sid")&""" style=""display:none"">"&vbcrlf)
  280. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  281. Response.Write("├户型:"&HouseStyle&"&nbsp;|&nbsp;性质:"&BelongType&"&nbsp;|&nbsp;结构:"&Structure&"&nbsp;|&nbsp;面积:"&Second_rs("Area")&"平米&nbsp;|&nbsp;楼层信息:["&FloorType&"]"&Floor&vbcrlf)
  282. response.Write("</td>"&vbcrlf)
  283. Response.Write("</tr>"&vbcrlf)
  284. response.Write("<tr id=""3_detail"&Second_rs("sid")&""" style=""display:none"">"&vbcrlf)
  285. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  286. Response.Write("├配套设施:"&equip&"&nbsp;|&nbsp;装修情况:"&Decoration&"&nbsp;|&nbsp;建筑面积:"&Second_rs("BuildDate")&vbcrlf)
  287. response.Write("</td>"&vbcrlf)
  288. Response.Write("</tr>"&vbcrlf)
  289. response.Write("<tr id=""4_detail"&Second_rs("sid")&""" style=""display:none"">"&vbcrlf)
  290. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  291. response.Write("├联系人:"&Second_rs("LinkMan")&"&nbsp;|&nbsp;联系方式:"&Second_rs("Contact")&vbcrlf)
  292. response.Write("</td>"&vbcrlf)
  293. Response.Write("</tr>"&vbcrlf)
  294. response.Write("</div>"&vbcrlf)
  295. Second_rs.movenext
  296. next
  297. %>
  298.               <tr>
  299.                 <td colspan="7" align="right" class="hback"><button onClick="javascript:location='HS_Second_Edit.asp?action=add'">发布信息</button>
  300.                   <button onClick="deleteBatAction()">批量删除</button></td>
  301.               </tr>
  302.               <%
  303. Response.Write("<tr>"&vbcrlf)
  304. Response.Write("<td align='right' colspan='7'  class=""hback"">"&fPageCount(Second_rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)&"</td>"&vbcrlf)
  305. Response.Write("</tr>"&vbcrlf)
  306. %>
  307.             </table></td>
  308.         </tr>
  309.       </table></td>
  310.   </tr>
  311.   <tr class="back">
  312.     <td height="20"  colspan="2" class="xingmu"><div align="left">
  313.         <!--#include file="../Copyright.asp" -->
  314.       </div></td>
  315.   </tr>
  316. </table>
  317. </body>
  318. </html>
  319. <%
  320. Set Fs_User = Nothing
  321. Set User_Conn=nothing
  322. Set Conn=nothing
  323. Second_rs.close
  324. Set Second_rs=nothing
  325. %>
  326. <script language="javascript">
  327. function linkShowclass()
  328. {
  329. if($('audit').checked)
  330. {
  331. $('audit').checked=false;
  332. }else
  333. {
  334. $('audit').checked=true;
  335. }
  336. }
  337. function showclass()
  338. {
  339. if($('audit').checked)
  340. {
  341. location="HS_Second.asp?audit=1&type=<%=mytype%>";
  342. }
  343. else
  344. {
  345. location="HS_Second.asp?audit=&type=<%=mytype%>";
  346. }
  347. }
  348. //删除
  349. function deleteAction(container,id)
  350. {
  351. var url="HS_Second_Action.asp?rad="+Math.random();
  352. var param="action=delete"+"&id="+id;
  353. if(confirm("确认要删除该条信息?"))
  354. var myAjax = new Ajax.Request(url,{method: 'get', parameters: param, onComplete: showResponse});
  355. function showResponse(originalRequest)
  356. {
  357. var value= originalRequest.responseText;
  358. if(value=="ok")
  359. {
  360. $(container).parentNode.parentNode.style.display='none';
  361. $('recordcount').innerHTML=parseInt($('recordcount').innerHTML)-1
  362. alert('删除成功!')
  363. }
  364. else
  365. {
  366. alert("发生异常,请与客服人员联系!");
  367. }
  368. }
  369. }
  370. //批量删除
  371. function deleteBatAction()
  372. {
  373. var url="HS_Second_Action.asp?rad="+Math.random();
  374. var elements=document.all('Secondlist');
  375. var id="";
  376. var count=0;
  377. for(var i=1;i<elements.length;i++)
  378. {
  379. if(elements[i].checked)
  380. {
  381. id=elements[i].value+","+id;
  382. if(elements[i].parentNode.parentNode.style.display!="none")
  383. count+=1;
  384. }
  385. }
  386. if(id.length<2)
  387. {
  388. alert("请选择要删除的记录!");
  389. return;
  390. }
  391. param="action=delete"+"&id="+id;
  392. if(confirm("确认要删除该条信息?"))
  393. var myAjax = new Ajax.Request(url,{method: 'get', parameters: param, onComplete: showResponse});
  394. function showResponse(originalRequest)
  395. {
  396. var value= originalRequest.responseText;
  397. if(value=="ok")
  398. {
  399. for(var i=1;i<elements.length;i++)
  400. {
  401. if(elements[i].checked)
  402. {
  403. elements[i].parentNode.parentNode.style.display='none';
  404. }
  405. }
  406. $('recordcount').innerHTML=parseInt($('recordcount').innerHTML)-count;
  407. alert(count+'条信息删除成功!')
  408. count=0;
  409. }
  410. else
  411. {
  412. alert("发生异常,请与客服人员联系!");
  413. }
  414. }
  415. }
  416. </script>
  417. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->