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

数据库编程

开发平台:

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 tenancy_rs,mytype,order,sqlstatement,order_status,tClass,HouseStyleArray,HouseStyle,Decoration,UseFor,Floor,equip
  35. Dim id_order,usefor_order,Class_order,price_order,time_order
  36. session("audit")=request.querystring("audit")
  37. order=request.QueryString("order")
  38. mytype=trim(request.QueryString("type"))
  39. if mytype="" then
  40. mytype=1
  41. End if
  42. if session("orderstatus")="" then
  43. session("orderstatus")="asc"
  44. End if
  45. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,i
  46. '---------------------------------分页定义
  47. int_RPP=15 '设置每页显示数目
  48. int_showNumberLink_=8 '数字导航显示数目
  49. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  50. str_nonLinkColor_="#999999" '非热链接颜色
  51. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  52. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  53. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  54. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  55. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  56. toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
  57. '--------------------------------------------------
  58. select case order
  59. case "orderbyid" 
  60. if session("audit")="1" then 
  61. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' and Audited=1 and order by tid "&session("orderstatus")
  62. else 
  63. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' order by tid "&session("orderstatus")
  64. end if
  65. case "orderbyusefor" 
  66. if session("audit")="1" then 
  67. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' and Audited=1 order by UseFor "&session("orderstatus")
  68. else
  69. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy  where UserNumber='"&session("FS_UserNumber")&"' order by UseFor "&session("orderstatus")
  70. end if
  71. case "orderbyclass" 
  72. if session("audit")="1" then 
  73. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' and Audited=1 order by Class "&session("orderstatus")
  74. else
  75. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' order by Class "&session("orderstatus")
  76. end if
  77. case "orderbyprice" 
  78. if session("audit")="1" then
  79. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where Audited=1 order by Price "&session("orderstatus")
  80. else
  81. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' order by Price "&session("orderstatus")
  82. End if
  83. case "orderbytime" 
  84. if session("audit")="1" then
  85. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' and Audited=1 order by PubDate "&session("orderstatus")
  86. else
  87. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' order by PubDate "&session("orderstatus")
  88. End if
  89. case else 
  90. if session("audit")="1" then
  91. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' and Audited=1 order by tid desc"
  92. else
  93. sqlstatement="select tid,UseFor,class,Position,CityArea,Price,HouseStyle,Area,Floor,BuildDate,equip,Decoration,LinkMan,Contact,Period,Remark,PubDate,Audited,UserNumber  from FS_HS_Tenancy where UserNumber='"&session("FS_UserNumber")&"' order by tid desc"
  94. End if
  95. end select
  96. '排序状态
  97. Function changeOrderStatus()
  98. Dim order_desc
  99. if session("orderstatus")="asc" then
  100. session("orderstatus")="desc"
  101. order_desc="<font color='red'>↑</font>"
  102. else
  103. session("orderstatus")="asc"
  104. order_desc="<font color='red'>↓</font>"
  105. End if
  106. select case order
  107. case "orderbyid"    id_order=order_desc
  108. usefor_order=""
  109. Class_order=""
  110. price_order=""
  111. time_order=""
  112. case "orderbyusefor" usefor_order=order_desc
  113.  id_order=""
  114.  class_order=""
  115.  price_order=""
  116.  time_order=""
  117. case "orderbyclass" Class_order=order_desc
  118. id_order=""
  119. time_order=""
  120. usefor_order=""
  121. price_order=""
  122. case "orderbyprice" price_order=order_desc
  123. id_order=""
  124. Class_order=""
  125. time_order=""
  126. usefor_order=""
  127. case "orderbytime"  time_order=order_desc
  128. id_order=""
  129. Class_order=""
  130. usefor_order=""
  131. price_order=""
  132. end select
  133. End Function
  134. if trim(order)<>"" then
  135. changeOrderStatus()
  136. End if
  137. %>
  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">
  166. <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  167.         <tr>
  168.           <td class="xingmu" align="center" <%if not isCorp() then Response.Write("style=""display:none""")%>><a href="houseManage.asp">楼盘信息</a></td>
  169.           <td class="xingmu" align="center"><a href="HS_Tenancy.asp" style="color:#FF0000">租赁信息</a></td>
  170.           <td class="xingmu" align="center"><a href="HS_Second.asp" >二手房信息</a></td>
  171.         <tr>
  172.           <td colspan="3">
  173.   <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  174. <tr>
  175. <td class="xingmu" colspan="4">租赁信息 <a href="#" onClick="history.back()">后退</a> <a href="#" class="sd" title="选中复选框,查看已审核信息" onClick="linkShowaudit();showaudit();">已审核信息</a>
  176.   <input type="checkbox" name="myaudit" id="audit" value="" onClick="showaudit()" <%if session("audit")="1" then response.Write("checked")%>/></td>
  177. </tr>
  178. </table>
  179. <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  180. <tr>
  181. <td class="hback_1" align="center" width="10%"><a href="HS_Tenancy.asp?order=orderbyid&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">编号<%=id_order%></a></td>
  182. <td class="hback_1" align="center" width="20%"><a href="HS_Tenancy.asp?order=orderbyusefor&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">用途<%=usefor_order%></a></td>
  183. <td class="hback_1" align="center" width="15%"><a href="HS_Tenancy.asp?order=orderbyclass&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">类型<%=class_order%></a></td>
  184. <td class="hback_1" align="center" width="15%"><a href="HS_Tenancy.asp?order=orderbyprice&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">价格<%=price_order%></a></td>
  185. <td class="hback_1" align="center" width="15%"><a href="HS_Tenancy.asp?order=orderbytime&type=<%=mytype%>&audit=<%=session("audit")%>" class="sd">发布时间<%=time_order%></a></td>
  186. <td class="hback_1" align="center" width="20%"><a href="#" class="sd">操作</a></td>
  187. <td class="hback_1" align="center" width="5%"><input type="checkbox" value="" name="tenancylist"  onclick="selectAll(document.all('tenancylist'))"/></td>
  188. </tr>
  189. <%
  190. Set tenancy_rs=Server.CreateObject(G_FS_RS)
  191. tenancy_rs.open sqlstatement,Conn,1,1
  192. If Not tenancy_rs.eof then
  193. '分页使用-----------------------------------
  194. tenancy_rs.PageSize=int_RPP
  195. cPageNo=NoSqlHack(Request.QueryString("page"))
  196. If cPageNo="" Then cPageNo = 1
  197. If not isnumeric(cPageNo) Then cPageNo = 1
  198. cPageNo = Clng(cPageNo)
  199. If cPageNo<=0 Then cPageNo=1
  200. If cPageNo>tenancy_rs.PageCount Then cPageNo=tenancy_rs.PageCount 
  201. tenancy_rs.AbsolutePage=cPageNo
  202. End if
  203. Dim audit
  204. for i=0 to int_RPP
  205. if tenancy_rs.eof then exit for
  206. select case tenancy_rs("Class")
  207. case "1"  tClass="出租"
  208. case "2"  tClass="求租"
  209. case "3"  tClass="出售"
  210. case "4"  tClass="求购"
  211. case "5"  tClass="合租"
  212. case "6"  tClass="转让" 
  213. end select
  214. if tenancy_rs("UseFor")="1" then
  215. UseFor="住房"
  216. else
  217. UseFor="写字间"
  218. end if
  219. if tenancy_rs("audited")="1" then
  220. audit="已审核"
  221. else
  222. audit="<font color='red'>未审核</font>"
  223. End if
  224. Response.Write("<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>"&vbcrlf)
  225. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&tenancy_rs("TID")&"','2_detail"&tenancy_rs("TID")&"','3_detail"&tenancy_rs("TID")&"','4_detail"&tenancy_rs("TID")&"')"">"&tenancy_rs("TID")&"</td>"&vbcrlf)
  226. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&tenancy_rs("TID")&"','2_detail"&tenancy_rs("TID")&"','3_detail"&tenancy_rs("TID")&"','4_detail"&tenancy_rs("TID")&"')"">"&UseFor&"</td>"&vbcrlf)
  227. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&tenancy_rs("TID")&"','2_detail"&tenancy_rs("TID")&"','3_detail"&tenancy_rs("TID")&"','4_detail"&tenancy_rs("TID")&"')"">"&tClass&"</td>"&vbcrlf)
  228. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&tenancy_rs("TID")&"','2_detail"&tenancy_rs("TID")&"','3_detail"&tenancy_rs("TID")&"','4_detail"&tenancy_rs("TID")&"')"">¥"&tenancy_rs("price")&"元/月</td>"&vbcrlf)
  229. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('1_detail"&tenancy_rs("TID")&"','2_detail"&tenancy_rs("TID")&"','3_detail"&tenancy_rs("TID")&"','4_detail"&tenancy_rs("TID")&"')"">"&tenancy_rs("PubDate")&"</td>"&vbcrlf)
  230. response.Write("<td align='center' class='hback'><span id='audit"&tenancy_rs("TID")&"'>"&audit&"</span>&nbsp;|&nbsp;<span id='edit"&tenancy_rs("TID")&"'><a href='HS_Tenancy_Edit.asp?action=edit&id="&tenancy_rs("TID")&"'>修改</a></span>&nbsp;|&nbsp;<span id='delete"&tenancy_rs("TID")&"'><a href='#' class='sd' onclick=""deleteAction('delete"&tenancy_rs("TID")&"','"&tenancy_rs("TID")&"')"">删除</a></span></td>"&vbcrlf)
  231. response.Write("<td align='center' class='hback' onmousedown='document.body.onmousedown=null'><input type='checkbox' name='tenancylist' value='"&tenancy_rs("TID")&"'</td>"&vbcrlf)
  232. response.Write("</tr>"&vbcrlf)
  233. Response.Write("<tr id=""1_detail"&tenancy_rs("TID")&""" style=""display:none"">"&vbcrlf)
  234. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  235. Response.Write("├位置:"&tenancy_rs("Position")&"&nbsp;|&nbsp;区县:"&tenancy_rs("CityArea")&vbcrlf)
  236. response.Write("</td>"&vbcrlf)
  237. response.Write("</tr>"&vbcrlf)
  238. '户型处理
  239. if trim(tenancy_rs("HouseStyle"))<>"" then
  240. HouseStyleArray=split(tenancy_rs("HouseStyle"),",")
  241. HouseStyle=HouseStyleArray(0)&"室"&HouseStyleArray(1)&"厅"&HouseStyleArray(2)&"卫"
  242. else
  243. HouseStyle="暂无信息"
  244. End if
  245. '楼层处理
  246. if trim(tenancy_rs("Floor"))<>"" then
  247. Floor="总"&split(tenancy_rs("Floor"),",")(0)&"层,第"&split(tenancy_rs("Floor"),",")(1)&"层"
  248. else
  249. Floor="暂无信息"
  250. end if
  251. response.Write("<tr id=""2_detail"&tenancy_rs("TID")&""" style=""display:none"">"&vbcrlf)
  252. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  253. Response.Write("├户型:"&HouseStyle&"&nbsp;|&nbsp;面积:"&tenancy_rs("Area")&"平米&nbsp;|&nbsp;楼层:"&Floor&vbcrlf)
  254. response.Write("</td>"&vbcrlf)
  255. Response.Write("</tr>"&vbcrlf)
  256. '处理装修情况
  257. select case tenancy_rs("Decoration")
  258. case "1" Decoration="简单装修"
  259. case "2" Decoration="中档装修"
  260. case "3" Decoration="高档装修"
  261. case else  Decoration="暂无信息"
  262. end select
  263. '处理设施
  264. if tenancy_rs("equip")<>"" then
  265. equip=replace(replace(replace(replace(replace(replace(tenancy_rs("equip"),"l","通水"),"m","电"),"n","气"),"x","电话"),"y","光纤"),"z","宽带")
  266. else
  267. equip="无相关信息"
  268. End if
  269. response.Write("<tr id=""3_detail"&tenancy_rs("TID")&""" style=""display:none"">"&vbcrlf)
  270. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  271. Response.Write("├配套设施:"&equip&"&nbsp;|&nbsp;装修情况:"&Decoration&vbcrlf)
  272. response.Write("</td>"&vbcrlf)
  273. Response.Write("</tr>"&vbcrlf)
  274. response.Write("<tr id=""4_detail"&tenancy_rs("TID")&""" style=""display:none"">"&vbcrlf)
  275. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  276. response.Write("├联系人:"&tenancy_rs("LinkMan")&"&nbsp;|&nbsp;联系方式:"&tenancy_rs("Contact")&vbcrlf)
  277. response.Write("</td>"&vbcrlf)
  278. Response.Write("</tr>"&vbcrlf)
  279. response.Write("</div>"&vbcrlf)
  280. tenancy_rs.movenext
  281. next
  282. %>
  283. <tr>
  284. <td colspan="7" align="right" class="hback">
  285. <button onClick="javascript:location='HS_Tenancy_Edit.asp?action=add'">发布信息</button>&nbsp;
  286. <button onClick="auditBatAction('audit')">批量审核</button>&nbsp;
  287. <button onClick="auditBatAction('unaudit')">批量撤消审核</button>&nbsp;
  288. <button onClick="deleteBatAction()">批量删除</button>&nbsp;
  289. </td>
  290. </tr>
  291. <%
  292. Response.Write("<tr>"&vbcrlf)
  293. Response.Write("<td align='right' colspan='7'  class=""hback"">"&fPageCount(tenancy_rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)&"</td>"&vbcrlf)
  294. Response.Write("</tr>"&vbcrlf)
  295. %>
  296. </table>
  297.   </td>
  298.         </tr>
  299.       </table></td>
  300.   </tr>
  301.   <tr class="back">
  302.     <td height="20"  colspan="2" class="xingmu"><div align="left">
  303.         <!--#include file="../Copyright.asp" -->
  304.       </div></td>
  305.   </tr>
  306. </table>
  307. </body>
  308. </html>
  309. <%
  310. Set Fs_User = Nothing
  311. Set User_Conn=nothing
  312. Set Conn=nothing
  313. tenancy_rs.close
  314. Set tenancy_rs=nothing
  315. %>
  316. <script language="javascript">
  317. function linkShowaudit()
  318. {
  319. if($('audit').checked)
  320. $('audit').checked=false;
  321. else
  322. $('audit').checked=true;
  323. }
  324. function showaudit()
  325. {
  326. if($('audit').checked)
  327. {
  328. location="HS_Tenancy.asp?audit=1";
  329. }else
  330. {
  331. location="HS_Tenancy.asp?audit=0";
  332. }
  333. }
  334. //操作
  335. //删除
  336. function deleteAction(container,id)
  337. {
  338. var url="HS_Quotation_Open_Action.asp?rad="+Math.random();
  339. var param="action=delete"+"&id="+id;
  340. if(confirm("确认要删除该条信息?"))
  341. var myAjax = new Ajax.Request(url,{method: 'get', parameters: param, onComplete: showResponse});
  342. function showResponse(originalRequest)
  343. {
  344. var value= originalRequest.responseText;
  345. if(value=="ok")
  346. {
  347. $(container).parentNode.parentNode.style.display='none';
  348. $('recordcount').innerHTML=parseInt($('recordcount').innerHTML)-1
  349. alert('删除成功!')
  350. }
  351. else
  352. {
  353. alert("发生异常,请与客服人员联系!");
  354. }
  355. }
  356. }
  357. //批量删除
  358. function deleteBatAction()
  359. {
  360. var url="HS_Quotation_Open_Action.asp?rad="+Math.random();
  361. var elements=document.all('quotationlist');
  362. var id="";
  363. var count=0;
  364. for(var i=1;i<elements.length;i++)
  365. {
  366. if(elements[i].checked)
  367. {
  368. id=elements[i].value+","+id;
  369. if(elements[i].parentNode.parentNode.style.display!="none")
  370. count+=1;
  371. }
  372. }
  373. if(id.length<2)
  374. {
  375. alert("请选择要删除的记录!");
  376. return;
  377. }
  378. param="action=delete"+"&id="+id;
  379. if(confirm("确认要删除该条信息?"))
  380. var myAjax = new Ajax.Request(url,{method: 'get', parameters: param, onComplete: showResponse});
  381. function showResponse(originalRequest)
  382. {
  383. var value= originalRequest.responseText;
  384. if(value=="ok")
  385. {
  386. for(var i=1;i<elements.length;i++)
  387. {
  388. if(elements[i].checked)
  389. {
  390. elements[i].parentNode.parentNode.style.display='none';
  391. }
  392. }
  393. $('recordcount').innerHTML=parseInt($('recordcount').innerHTML)-count;
  394. alert(count+'条信息删除成功!')
  395. count=0;
  396. }
  397. else
  398. {
  399. alert("发生异常,请与客服人员联系!");
  400. }
  401. }
  402. }
  403. </script>
  404. </html>
  405. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->