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

数据库编程

开发平台:

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. <%
  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 house_rs,mystatus,order,sqlstatement,order_status,audit
  35. Dim HouseName_order,Class_order,OpenDate_order
  36. if not isCorp() then 
  37. response.Redirect("HS_Tenancy.asp")
  38. End if
  39. session("audit")=request.querystring("audit")
  40. order=request.QueryString("order")
  41. mystatus=trim(request.QueryString("status"))
  42. if mystatus="" then
  43. mystatus=1
  44. End if
  45. if session("orderstatus")="" then
  46. session("orderstatus")="asc"
  47. End if
  48. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,i
  49. '---------------------------------分页定义
  50. int_RPP=15 '设置每页显示数目
  51. int_showNumberLink_=8 '数字导航显示数目
  52. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  53. str_nonLinkColor_="#999999" '非热链接颜色
  54. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  55. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  56. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  57. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  58. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  59. toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
  60. '--------------------------------------------------
  61. select case order
  62. case "orderbyname" 
  63. if session("audit")="1" then 
  64. sqlstatement="select ID,HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&" and Audited=1 and Usernumber='"&session("FS_UserNumber")&"' order  by HouseName "&session("orderstatus") 
  65. else 
  66. sqlstatement="select ID,HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&"  and Usernumber='"&session("FS_UserNumber")&"' order by HouseName "&session("orderstatus") 
  67. end if
  68. case "orderbyclass" 
  69. if session("audit")="1" then 
  70. sqlstatement="select ID,HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&" and Audited=1 and Usernumber='"&session("FS_UserNumber")&"' order  by class "&session("orderstatus") 
  71. else
  72. sqlstatement="select ID, HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&" and Usernumber='"&session("FS_UserNumber")&"' order by Class "&session("orderstatus")
  73. end if
  74. case "orderbytime" 
  75. if session("audit")="1" then
  76. sqlstatement="select ID,HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&" and Audited=1 and Usernumber='"&session("FS_UserNumber")&"' order  by OpenDate "&session("orderstatus") 
  77. else
  78. sqlstatement="select ID ,HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&" and Usernumber='"&session("FS_UserNumber")&"' order by OpenDate "&session("orderstatus")
  79. End if
  80. case else 
  81. if session("audit")="1" then
  82. sqlstatement="select ID,HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation where status="&mystatus&" and Audited=1 and Usernumber='"&session("FS_UserNumber")&"' order  by id desc"
  83. else
  84. sqlstatement="select ID, HouseName,Position,Direction,Class,OpenDate,PreSaleNumber,IssueDate,PreSaleRange,Status,Price,PubDate,Tel,Click,UserNumber,Audited from FS_HS_Quotation  where status="&mystatus&" and Usernumber='"&session("FS_UserNumber")&"' order by id desc"
  85. End if
  86. end select
  87. '排序状态
  88. Function changeOrderStatus()
  89. Dim order_desc
  90. if session("orderstatus")="asc" then
  91. session("orderstatus")="desc"
  92. order_desc="<font color='red'>↑</font>"
  93. else
  94. session("orderstatus")="asc"
  95. order_desc="<font color='red'>↓</font>"
  96. End if
  97. select case order
  98. case "orderbyname"  HouseName_order=order_desc
  99. Class_order=""
  100. OpenDate_order=""
  101. case "orderbyclass" Class_order=order_desc
  102. HouseName_order=""
  103. OpenDate_order=""
  104. case "orderbytime" OpenDate_order=order_desc
  105. HouseName_order=""
  106. Class_order=""
  107. end select
  108. End Function
  109. if trim(order)<>"" then
  110. changeOrderStatus()
  111. End if
  112. %>
  113. <html xmlns="http://www.w3.org/1999/xhtml">
  114. <title>User Manage Center-网站内容管理系统</title>
  115. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  116. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  117. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  118. <link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  119. <head>
  120. <script language="javascript" src="../../FS_Inc/CheckJs.js"></script>
  121. <script language="javascript" src="../../FS_Inc/prototype.js"></script>
  122. <script language="javascript" src="../../FS_Inc/PublicJS.js"></script>
  123. </head>
  124. <body>
  125. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  126.   <tr>
  127.     <td><!--#include file="../top.asp" -->
  128.     </td>
  129.   </tr>
  130. </table>
  131. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  132.   <tr class="back">
  133.     <td   colspan="2" class="xingmu" height="26"><!--#include file="../Top_navi.asp" -->
  134.     </td>
  135.   </tr>
  136.   <tr class="back">
  137.     <td width="18%" valign="top" class="hback"><div align="left">
  138.         <!--#include file="../menu.asp" -->
  139.       </div></td>
  140.     <td width="82%" valign="top" class="hback">
  141. <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  142.         <tr class="xingmu">
  143.           <td align="center"><a href="houseManage.asp" style="color:#FF0000"  class="sd">楼盘信息</a></td>
  144.           <td align="center"><a href="HS_Tenancy.asp"  class="sd">租赁信息</a></td>
  145.           <td align="center"><a href="HS_Second.asp"  class="sd">二手房信息</a></td>
  146.         <tr>
  147.           <td colspan="3">
  148.   <div id="container">
  149.               <!--ajax容器-->
  150.               <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  151.                 
  152.                 <tr>
  153.                   <td align="center" <%if mystatus=1 or mystatus="" then response.Write("class='xingmu'") else response.Write("class='hback'")%>><a href="houseManage.asp?status=1&audit=<%=session("audit")%>" class="sd">形象展示楼盘</a></td>
  154.                   <td align="center" <%if mystatus=2 then response.Write("class='xingmu'") else response.Write("class='hback'")%>><a href="houseManage.asp?status=2&audit=<%=session("audit")%>" class="sd">期房楼盘信息</a></td>
  155.                   <td align="center" <%if mystatus=3 then response.Write("class='xingmu'") else response.Write("class='hback'")%>><a href="houseManage.asp?status=3&audit=<%=session("audit")%>" class="sd">现房楼盘信息信息</a></td>
  156.                   <td align="center" class="hback"><a href="#" class="sd" title="选中复选框,查看已经审核信息" onClick="linkShowaudit();showaudit();">已审核信息</a><input type="checkbox" name="myaudit" id="audit" value="audit" onClick="showaudit()" <%if session("audit")="1" then response.Write("checked")%>/></td>
  157. <tr>
  158.               </table>
  159.               <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  160.                 <tr class="hback_1">
  161.                   <td class="hback_1" align="center" width="30%"><a href="houseManage.asp?order=orderbyname&status=<%=mystatus%>&audit=<%=session("audit")%>" class="sd">楼盘名称<%=HouseName_order%></a></td>
  162.                   <td class="hback_1" align="center" width="25%"><a href="houseManage.asp?order=orderbyclass&status=<%=mystatus%>&audit=<%=session("audit")%>" class="sd">项目类别<%=Class_order%></a></td>
  163.                   <td class="hback_1" align="center" width="15%"><a href="houseManage.asp?order=orderbytime&status=<%=mystatus%>&audit=<%=session("audit")%>" class="sd">开盘日期<%=OpenDate_order%></a></td>
  164.                   <td class="hback_1" align="center" width="20%"><a href="#" class="sd">操作</a></td>
  165.                   <td class="hback_1" align="center" width="5%"><input type="checkbox" value="" name="quotationlist"  onclick="selectAll(document.all('quotationlist'))"/></td>
  166.                 </tr>
  167.                 <%
  168. Set house_rs=Server.CreateObject(G_FS_RS)
  169. house_rs.open sqlstatement,Conn,1,1
  170. If Not house_rs.eof then
  171. '分页使用-----------------------------------
  172. house_rs.PageSize=int_RPP
  173. cPageNo=NoSqlHack(Request.QueryString("page"))
  174. If cPageNo="" Then cPageNo = 1
  175. If not isnumeric(cPageNo) Then cPageNo = 1
  176. cPageNo = Clng(cPageNo)
  177. If cPageNo<=0 Then cPageNo=1
  178. If cPageNo>house_rs.PageCount Then cPageNo=house_rs.PageCount 
  179. house_rs.AbsolutePage=cPageNo
  180. End if
  181. for i=0 to int_RPP
  182. if house_rs.eof then exit for
  183. if house_rs("audited")="0" then
  184. audit="<font color='red'>未审核</font>"
  185. else
  186. audit="已审核"
  187. End if
  188. Response.Write("<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>"&vbcrlf)
  189. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('detail"&house_rs("ID")&"','_detail"&house_rs("ID")&"')""><a href='HS_Quotation_Edit.asp?action=edit&id="&house_rs("ID")&"'>"&house_rs("HouseName")&"</a></td>"&vbcrlf)
  190. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('detail"&house_rs("ID")&"','_detail"&house_rs("ID")&"')"">"&house_rs("Class")&"</td>"&vbcrlf)
  191. response.Write("<td align='center' class='hback' onmousedown=""Element.toggle('detail"&house_rs("ID")&"','_detail"&house_rs("ID")&"')"">"&house_rs("OpenDate")&"</td>"&vbcrlf)
  192. response.Write("<td align='center' class='hback'><span id='audit"&house_rs("ID")&"'>"&audit&"</span>|<span id='edit"&house_rs("ID")&"'><a href='HS_Quotation_Edit.asp?action=edit&id="&house_rs("ID")&"'>修改</a></span>|<span id='delete"&house_rs("ID")&"'><a href='#' class='sd' onclick=""deleteAction('delete"&house_rs("ID")&"','"&house_rs("ID")&"')"">删除</a></span></td>"&vbcrlf)
  193. response.Write("<td align='center' class='hback'><input type='checkbox' name='quotationlist' value='"&house_rs("ID")&"'</td>"&vbcrlf)
  194. response.Write("</tr>"&vbcrlf)
  195. Response.Write("<tr id=""detail"&house_rs("ID")&""" style=""display:none"">"&vbcrlf)
  196. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  197. Response.Write("├位置:"&house_rs("Position")&"|方向:"&house_rs("Direction")&vbcrlf)
  198. response.Write("</td>"&vbcrlf)
  199. response.Write("</tr>"&vbcrlf)
  200. response.Write("<tr id=""_detail"&house_rs("ID")&""" style=""display:none"">"&vbcrlf)
  201. response.Write("<td colspan='7' class='hback'>"&vbcrlf)
  202. response.Write("├预售许可证:["&house_rs("PreSaleNumber")&"]|报价:¥"&house_rs("Price")&"万|联系电话:"&house_rs("Tel")&vbcrlf)
  203. response.Write("</td>"&vbcrlf)
  204. Response.Write("</tr>"&vbcrlf)
  205. response.Write("</div>"&vbcrlf)
  206. house_rs.movenext
  207. next
  208. %>
  209.                 <tr>
  210.                   <td colspan="5" align="right" class="hback"><button onClick="javascript:location='HS_Quotation_Edit.asp?action=add'">发布信息</button>
  211.                     <button onClick="deleteBatAction()">批量删除</button>
  212.                     &nbsp; </td>
  213.                 </tr>
  214.                 <%
  215. Response.Write("<tr>"&vbcrlf)
  216. Response.Write("<td align='right' colspan='7'  class=""hback"">"&fPageCount(house_rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)&"</td>"&vbcrlf)
  217. Response.Write("</tr>"&vbcrlf)
  218. %>
  219.               </table>
  220.             </div></tr>
  221.       </table></td>
  222.   </tr>
  223.   <tr class="back">
  224.     <td height="20"  colspan="2" class="xingmu"><div align="left">
  225.         <!--#include file="../Copyright.asp" -->
  226.       </div></td>
  227.   </tr>
  228. </table>
  229. </body>
  230. </html>
  231. <%
  232. Set Fs_User = Nothing
  233. Set User_Conn=nothing
  234. Set Conn=nothing
  235. house_rs.close
  236. Set house_rs=nothing
  237. %>
  238. <script language="javascript">
  239. function linkShowaudit()
  240. {
  241. if($('audit').checked)
  242. $('audit').checked=false;
  243. else
  244. $('audit').checked=true;
  245. }
  246. function showaudit()
  247. {
  248. if($('audit').checked)
  249. {
  250. location="houseManage.asp?audit=1&status=<%=mystatus%>"
  251. }else
  252. {
  253. location="houseManage.asp?audit=0&status=<%=mystatus%>";
  254. }
  255. }
  256. //操作
  257. //删除
  258. function deleteAction(container,id)
  259. {
  260. var url="HS_Quotation_Open_Action.asp?rad="+Math.random();
  261. var param="action=delete"+"&id="+id;
  262. if(confirm("确认要删除该条信息?"))
  263. var myAjax = new Ajax.Request(url,{method: 'get', parameters: param, onComplete: showResponse});
  264. function showResponse(originalRequest)
  265. {
  266. var value= originalRequest.responseText;
  267. if(value=="ok")
  268. {
  269. $(container).parentNode.parentNode.style.display='none';
  270. $('recordcount').innerHTML=parseInt($('recordcount').innerHTML)-1
  271. alert('删除成功!')
  272. }
  273. else
  274. {
  275. alert("发生异常,请与客服人员联系!");
  276. }
  277. }
  278. }
  279. //批量删除
  280. function deleteBatAction()
  281. {
  282. var url="HS_Quotation_Open_Action.asp?rad="+Math.random();
  283. var elements=document.all('quotationlist');
  284. var id="";
  285. var count=0;
  286. for(var i=1;i<elements.length;i++)
  287. {
  288. if(elements[i].checked)
  289. {
  290. id=elements[i].value+","+id;
  291. if(elements[i].parentNode.parentNode.style.display!="none")
  292. count+=1;
  293. }
  294. }
  295. if(id.length<2)
  296. {
  297. alert("请选择要删除的记录!");
  298. return;
  299. }
  300. param="action=delete"+"&id="+id;
  301. if(confirm("确认要删除该条信息?"))
  302. var myAjax = new Ajax.Request(url,{method: 'get', parameters: param, onComplete: showResponse});
  303. function showResponse(originalRequest)
  304. {
  305. var value= originalRequest.responseText;
  306. if(value=="ok")
  307. {
  308. for(var i=1;i<elements.length;i++)
  309. {
  310. if(elements[i].checked)
  311. {
  312. elements[i].parentNode.parentNode.style.display='none';
  313. }
  314. }
  315. $('recordcount').innerHTML=parseInt($('recordcount').innerHTML)-count;
  316. alert(count+'条信息删除成功!')
  317. count=0;
  318. }
  319. else
  320. {
  321. alert("发生异常,请与客服人员联系!");
  322. }
  323. }
  324. }
  325. </script>
  326. </html>
  327. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->