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

数据库编程

开发平台:

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/cls_second.asp"-->
  7. <!--#include file="../lib/strlib.asp" -->
  8. <!--#include file="../lib/UserCheck.asp" -->
  9. <%'Copyright (c) 2006 Foosun Inc. Code by Einstein.liu
  10. Dim straction
  11. straction = Request("action")
  12. if straction="Unmessage" then
  13. User_Conn.execute("update FS_ME_Users set ismessage= 0 where UserNumber='"& Fs_User.UserNumber &"'")
  14. strShowErr = "<li>订阅本站资料取消</li>"
  15. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  16. Response.end
  17. Elseif straction = "ismessage" then
  18. User_Conn.execute("update FS_ME_Users set ismessage= 1 where UserNumber='"& Fs_User.UserNumber &"'")
  19. strShowErr = "<li>订阅本站资料成功</li>"
  20. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  21. Response.end
  22. Elseif straction = "Open" then
  23. User_Conn.execute("update FS_ME_Users set isOpen= 1 where UserNumber='"& Fs_User.UserNumber &"'")
  24. strShowErr = "<li>对外开放资料开启</li>"
  25. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  26. Response.end
  27. Elseif straction = "Close" then
  28. User_Conn.execute("update FS_ME_Users set isOpen= 0 where UserNumber='"& Fs_User.UserNumber &"'")
  29. strShowErr = "<li>对外开放资料取消</li>"
  30. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  31. Response.end
  32. End if
  33. %>
  34. <%
  35. 'on error resume next
  36. Dim second_rs,action,str_CurrPath,SecondObj,sid,i,tmpArray
  37. set SecondObj=New cls_Second
  38. action=request.QueryString("action")
  39. sid=NoSqlHack(request.QueryString("id"))
  40. if action="edit" then
  41. SecondObj.getSecondInfo(sid)
  42. End if
  43. str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
  44. %>
  45. <html xmlns="http://www.w3.org/1999/xhtml">
  46. <title>User Manage Center-网站内容管理系统</title>
  47. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  48. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  49. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  50. <link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  51. <head>
  52. <script language="javascript" src="../../FS_Inc/CheckJs.js"></script>
  53. <script language="javascript" src="../../FS_Inc/prototype.js"></script>
  54. <script language="javascript" src="../../FS_Inc/PublicJS.js"></script>
  55. </head>
  56. <body>
  57. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  58.   <tr>
  59.     <td><!--#include file="../top.asp" -->
  60.     </td>
  61.   </tr>
  62. </table>
  63. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  64.   <tr class="back">
  65.     <td   colspan="2" class="xingmu" height="26"><!--#include file="../Top_navi.asp" -->
  66.     </td>
  67.   </tr>
  68.   <tr class="back">
  69.     <td width="18%" valign="top" class="hback"><div align="left">
  70.         <!--#include file="../menu.asp" -->
  71.       </div></td>
  72.     <td width="82%" valign="top" class="hback"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  73.         <tr>
  74.           <td class="xingmu" align="center"><a href="houseManage.asp">楼盘信息</a></td>
  75.           <td class="xingmu" align="center"><a href="HS_Tenancy.asp">租赁信息</a></td>
  76.           <td class="xingmu" align="center"><a href="HS_Second.asp" style="color:#FF0000">二手房信息</a></td>
  77.         <tr>
  78.           <td colspan="3"><table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  79.               <tr>
  80.                 <td class="xingmu"><a href="HS_Second.asp">二手房信息</a>&nbsp;|&nbsp;<a href='#' onClick="history.back()">后退</a></td>
  81.               </tr>
  82.             </table>
  83.             <form action="HS_Second_Action.asp?action=<%=action%>" method="post" id="TenancyForm">
  84.               <input type="hidden" value="<%=sid%>" name="id"/>
  85.               <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table" id="inputpanel">
  86.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  87.                   <td width="17%" align="right" class="hback">用途:</td>
  88.                   <td width="83%" align="left" class="hback"><select name="sel_usefor" id="sel_usefor">
  89.                       <option value="1" <%if SecondObj.UseFor="1" then response.Write("selected")%>>住房</option>
  90.                       <option value="2" <%if SecondObj.UseFor="2" then response.Write("selected")%>>写字间</option>
  91.                     </select>
  92.                     <select name="sel_class" id="sel_class">
  93.                       <option value="1" <%if SecondObj.sclass="1" then response.Write("selected")%>>个人</option>
  94.                       <option value="2" <%if SecondObj.sclass="2" then response.Write("selected")%>>中介</option>
  95.                     </select>
  96.                     &nbsp;产权性质:
  97.                     <select name="sel_BelongType" id="sel_BelongType">
  98.                       <option value="1" <%if SecondObj.BelongType="1" then response.Write("selected")%>>商品房</option>
  99.                       <option value="2" <%if SecondObj.BelongType="2" then response.Write("selected")%>>集资房</option>
  100.                     </select>
  101.                     </span></td>
  102.                 </tr>
  103.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  104.                   <td align="right" class="hback">会员编号:</td>
  105.                   <td align="left" class="hback"><input name="txt_UserNumber" type="text" id="txt_UserNumber" style="width:60%" value="<%=secondObj.UserNumber%>"  onFocus="this.className='RightInput'"/></td>
  106.                 </tr>
  107.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  108.                   <td align="right" class="hback">房屋编号:</td>
  109.                   <td align="left" class="hback"><input name="txt_Label" type="text" id="txt_Label" style="width:60%" value="<%=secondObj.label%>"  onFocus="this.className='RightInput'"/></td>
  110.                 </tr>
  111.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  112.                   <td align="right" class="hback">房源地址:</td>
  113.                   <td align="left" class="hback"><input name="txt_address" type="text" id="txt_address" style="width:60%" value="<%=secondObj.address%>"  onFocus="this.className='RightInput'"/></td>
  114.                 </tr>
  115.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  116.                   <td align="right" class="hback">地段:</td>
  117.                   <td align="left" class="hback"><input name="txt_Position" type="text" id="txt_Position" style="width:60%" value="<%=secondObj.Position%>" onFocus="this.className='RightInput'"/></td>
  118.                 </tr>
  119.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  120.                   <td align="right" class="hback">区县:</td>
  121.                   <td align="left" class="hback"><input name="txt_cityarea" type="text" id="txt_cityarea" style="width:60%" value="<%=secondObj.cityarea%>" onFocus="this.className='RightInput'"/></td>
  122.                 </tr>
  123.                 <%
  124. '户型处理
  125. Dim HouseStyleArray(3)
  126. HouseStyleArray(0)="1"
  127. HouseStyleArray(1)="1"
  128. HouseStyleArray(2)="1"
  129. if SecondObj.HouseStyle<>"" then
  130. tmpArray=split(SecondObj.HouseStyle,",")
  131. for i=0 to Ubound(tmpArray)
  132. if i>2 then exit for
  133. HouseStyleArray(i)=tmpArray(i)
  134. next
  135. End if
  136. %>
  137.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  138.                   <td align="right" class="hback">户型:</td>
  139.                   <td align="left" class="hback"><input name="txt_HouseStyle_1" type="text" id="txt_HouseStyle_1" size="15"  onFocus="Do.these('txt_HouseStyle_1',function(){return isNumber('txt_HouseStyle_1','span_housestyle','请填写正确的格式',true);})"
  140.   onkeyup="Do.these('txt_HouseStyle_1',function(){return isNumber('txt_HouseStyle_1','span_housestyle','请填写正确的格式',true);})" value="<%=HouseStyleArray(0)%>"/>
  141.                     室
  142.                     <input name="txt_HouseStyle_2" type="text" id="txt_HouseStyle_2" size="15"  onFocus="Do.these('txt_HouseStyle_2',function(){return isNumber('txt_HouseStyle_2','span_housestyle','请填写正确的格式',true);})" onKeyUp="Do.these('txt_HouseStyle_2',function(){return isNumber('txt_HouseStyle_2','span_housestyle','请填写正确的格式',true);})" value="<%=HouseStyleArray(1)%>"/>
  143.                     厅
  144.                     <input name="txt_HouseStyle_3" type="text" id="txt_HouseStyle_3" size="15"  onFocus="Do.these('txt_HouseStyle_3',function(){return isNumber('txt_HouseStyle_3','span_housestyle','请填写正确的格式',true);})" onKeyUp="Do.these('txt_HouseStyle_3',function(){return isNumber('txt_HouseStyle_3','span_housestyle','请填写正确的格式',true);})" value="<%=HouseStyleArray(2)%>"/>
  145.                     卫 <span id="span_housestyle"></span></td>
  146.                 </tr>
  147.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  148.                   <td align="right" class="hback">建筑年代:</td>
  149.                   <td align="left" class="hback"><input name="txt_BuildDate" type="text" id="txt_BuildDate" style="width:60%"  onFocus="Do.these('txt_BuildDate',function(){ return isNumber('txt_BuildDate','span_BuildDate','请填写正确的格式',true);})" onKeyUp="Do.these('txt_BuildDate',function(){ return isNumber('txt_BuildDate','span_BuildDate','请填写正确的格式',true);})" value="<%if secondObj.BuildDate<>"" then Response.Write(secondObj.BuildDate) else Response.Write("0")%>"/>
  150.                     <span id="span_BuildDate"></span>
  151.                 </tr>
  152.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  153.                   <td align="right" class="hback">面积:</td>
  154.                   <td align="left" class="hback"><input name="txt_Area" type="text" id="txt_Area" style="width:60%"  onFocus="Do.these('txt_Area',function(){ return isNumber('txt_Area','span_area','请填写正确的格式',true);})" onKeyUp="Do.these('txt_Area',function(){ return isNumber('txt_Area','span_area','请填写正确的格式',true);})" value="<%if secondObj.Area<>"" then Response.Write(secondObj.Area) else Response.Write("0")%>"/>
  155.                     <span id="span_area"></span></td>
  156.                 </tr>
  157.                 <%
  158. '楼层处理
  159. Dim FloorArray(2)
  160. FloorArray(0)="0"
  161. FloorArray(1)="0"
  162. if SecondObj.Floor<>"" then
  163. tmpArray=split(secondObj.Floor,",")
  164. for i=0 to Ubound(tmpArray)
  165. if i>1 then exit for
  166. FloorArray(i)=tmpArray(i)
  167. next
  168. End if
  169. %>
  170.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  171.                   <td align="right" class="hback">楼层:</td>
  172.                   <td align="left" class="hback"><select name="sel_FloorType" id="sel_FloorType">
  173.                       <option value="1" >多 层</option>
  174.                       <option value="2">单 层</option>
  175.                     </select>
  176.                     &nbsp;总
  177.                     <input name="txt_Floor_1" type="text" id="txt_Floor_1" size="15" onFocus="Do.these('txt_Floor_1',function(){ return isNumber('txt_Floor_1','span_floor','请填写正确的格式',true);})" onKeyUp="Do.these('txt_Floor_1',function(){ return isNumber('txt_Floor_1','span_floor','请填写正确的格式',true);})" value="<%=FloorArray(0)%>"/>
  178.                     层,位于
  179.                     <input name="txt_Floor_2" type="text" id="txt_Floor_2" size="15" onFocus="Do.these('txt_Floor_2',function(){ return isNumber('txt_Floor_2','span_floor','请填写正确的格式',true);})" onKeyUp="Do.these('txt_Floor_2',function(){ return isNumber('txt_Floor_2','span_floor','请填写正确的格式',true);})" value="<%=FloorArray(1)%>"/>
  180.                     层<span id="span_floor"></span></td>
  181.                 </tr>
  182.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  183.                   <td align="right" class="hback">结构:</td>
  184.                   <td align="left" class="hback"><select name="sel_Structure" id="sel_Structure">
  185.                       <option value="1" <%if secondObj.Structure="l" then Response.Write("selected")%>>钢筋混凝土</option>
  186.                       <option value="2" <%if secondObj.Structure="2" then Response.Write("selected")%>>砖混结构</option>
  187.                       <option value="3" <%if secondObj.Structure="3" then Response.Write("selected")%>>砖木结构</option>
  188.                       <option value="4" <%if secondObj.Structure="4" then Response.Write("selected")%>>简易结构</option>
  189.                     </select>
  190.                   </td>
  191.                 </tr>
  192.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  193.                   <td align="right" class="hback">配套设施:</td>
  194.                   <td align="left" class="hback"><input name="chk_equip" type="checkbox" id="chk_equip" value="l" <%if instr(secondObj.equip,"l")>0 then Response.Write("checked")%> />
  195.                     水
  196.                     <input name="chk_equip" type="checkbox" id="chk_equip" value="m" <%if instr(secondObj.equip,"m")>0 then Response.Write("checked")%> />
  197.                     电
  198.                     <input name="chk_equip" type="checkbox" id="chk_equip" value="n" <%if instr(secondObj.equip,"n")>0 then Response.Write("checked")%> />
  199.                     气
  200.                     <input name="chk_equip_x" type="checkbox" id="chk_equip_x" value="x" <%if instr(secondObj.equip,"x")>0 then Response.Write("checked")%> />
  201.                     电话
  202.                     <input name="chk_equip" type="checkbox" id="chk_equip" value="y" <%if instr(secondObj.equip,"y")>0 then Response.Write("checked")%> />
  203.                     光纤
  204.                     <input name="chk_equip" type="checkbox" id="chk_equip" value="z" <%if instr(secondObj.equip,"z")>0 then Response.Write("checked")%>  />
  205.                     宽带</td>
  206.                 </tr>
  207.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  208.                   <td align="right" class="hback">装修情况:</td>
  209.                   <td align="left" class="hback"><select name="sel_Decoration" id="sel_Decoration">
  210.                       <option value="1" <%if secondObj.Decoration="1" then Response.Write("selected")%>>简单装修</option>
  211.                       <option value="2" <%if secondObj.Decoration="2" then Response.Write("selected")%>>中档装修</option>
  212.                       <option value="3" <%if secondObj.Decoration="3" then Response.Write("selected")%>>高档装修</option>
  213.                     </select></td>
  214.                 </tr>
  215.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  216.                   <td align="right" class="hback">报价:</td>
  217.                   <td align="left" class="hback"><input name="txt_Price" type="text" id="txt_Price" style="width:60%" onFocus="Do.these('txt_Price',function(){ return isNumber('txt_Price','span_price','请填写正确的格式',true);})" onKeyUp="Do.these('txt_Price',function(){ return isNumber('txt_Price','span_price','请填写正确的格式',true);})" value="<%if secondObj.price<>"" then response.Write(secondObj.price) else Response.Write("0")%>"/>
  218.                     万<span id="span_price"></span></td>
  219.                 </tr>
  220.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  221.                   <td align="right" class="hback">联系人:</td>
  222.                   <td align="left" class="hback"><input name="txt_LinkMan" type="text" id="txt_LinkMan" style="width:60%" onFocus="this.className='RightInput'" value="<%=secondObj.linkMan%>"/></td>
  223.                 </tr>
  224.                 <tr onMouseOver="overColor(this)" onMouseOut="outColor(this)">
  225.                   <td align="right" class="hback">联系方式:</td>
  226.                   <td align="left" class="hback"><input name="txt_Contact" type="text" id="txt_Contact" style="width:60%" onFocus="this.className='RightInput'" value="<%=secondObj.Contact%>"/></td>
  227.                 </tr>
  228.                 <tr onMouseOver="overColor(this)" onMouseOut="outColor(this)">
  229.                   <td align="right" class="hback">备注:</td>
  230.                   <td align="left" class="hback"><textarea name="txt_Remark" cols="80" rows="15" id="txt_Remark" onFocus="this.className='RightInput'"><%=secondObj.remark%></textarea></td>
  231.                 </tr>
  232.                 <tr id="tr_pic_num" onMouseOver=overColor(this) onMouseOut=outColor(this)>
  233.                   <td align="right" class="hback">图片数量:</td>
  234.                   <td align="left" class="hback"><input name="txt_PicNum" type="text" id="txt_PicNum" style="width:60%" value="<%=secondObj.picNumber%>" onFocus="if(this.value==''){$('pictable').style.display='none';return;};Do.these('txt_PicNum',function(){ return isNumber('txt_PicNum','span_picNum','请填写正确的格式',true);});"    onKeyUp="Do.these('txt_PicNum',function(){ return isNumber('txt_PicNum','span_picNum','请填写正确的格式',true);});if(!isNaN(this.value)){addRow(this.value);$('pictable').style.display=''};" onBlur="if(this.value==''){$('txt_PicNum').value='0'};Do.these('txt_PicNum',function(){ return isNumber('txt_PicNum','span_picNum','请填写正确的格式',true);})"/>
  235.                     <span id="span_picNum"></span></td>
  236.                 </tr>
  237.                 <tr class="hback" onMouseOver=overColor(this) onMouseOut=outColor(this) >
  238.                   <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="1" id="pictable" style="display:none">
  239.                       <%
  240. if isnumeric(secondObj.picNumber) then
  241. if Cint(secondObj.picNumber)>0 and sid<>"" then
  242. Dim pic_rs,picArray
  243. Set pic_rs=Conn.execute("select Pic from FS_HS_Picture where HS_type=3 and id="&sid)
  244. for i=0 to secondObj.picNumber-1
  245. if pic_rs.eof then exit for
  246. Response.Write("<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>"&vbcrlf)
  247. Response.Write("<td width='15%' align='right'>图片"&(i+1)&"</td>"&vbcrlf)
  248. response.Write("<td width='85%' align='left'>"&vbcrlf)
  249. if not pic_rs.eof then
  250. Response.Write("<input name='txt_PicNum_"&(i+1)&"' type='text' id='txt_PicNum' style='width:75%' value='"&pic_rs("pic")&"'/><input type='button' name='PPPChoose"&(i+1)&"' value='选择图片' onClick=""penWindowAndSetValue('../CommPages/SelectPic.asp?CurrPath="&str_CurrPath&"&f_UserNumber="&session("FS_UserNumber")&"',500,320,window,this.parentNode.firstChild);"">"&vbcrlf)
  251. else
  252. Response.Write("<input name='txt_PicNum_"&(i+1)&"' type='text' id='txt_PicNum' style='width:75%'/><input type='button' name='PPPChoose"&(i+1)&"' value='选择图片' onClick=""penWindowAndSetValue('../CommPages/SelectPic.asp?CurrPath="&str_CurrPath&"&f_UserNumber="&session("FS_UserNumber")&"',500,320,window,this.parentNode.firstChild);"">"&vbcrlf)
  253. End if
  254. Response.Write("</td>"&vbcrlf)
  255. Response.Write("</tr>"&vbcrlf)
  256. pic_rs.movenext
  257. next
  258. End if
  259. End if
  260. %>
  261.                     </table></td>
  262.                 </tr>
  263.                 <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  264.                   <td align="right" class="hback">&nbsp;</td>
  265.                   <td align="left" class="hback"><input type="Submit" name="mysubmit" value="提交"  />
  266.                     <input type="Button" name="myrest" value="重置" onClick="javascript:if(confirm('是否重置所有表单项?'))$('TenancyForm').reset()" />
  267.                   </td>
  268.                 </tr>
  269.               </table>
  270.             </form></td>
  271.         </tr>
  272.       </table></td>
  273.   </tr>
  274.   <tr class="back">
  275.     <td height="20"  colspan="2" class="xingmu"><div align="left">
  276.         <!--#include file="../Copyright.asp" -->
  277.       </div></td>
  278.   </tr>
  279. </table>
  280. </body>
  281. </html>
  282. <%
  283. Set SecondObj = Nothing
  284. %>
  285. <script language="javascript">
  286. <!--
  287. if(!isNaN($F('txt_PicNum')))
  288. {
  289. $('pictable').style.display="";
  290. }else
  291. {
  292. $('pictable').style.display="none";
  293. }
  294. function addRow(number)
  295. {
  296. var oBody=$("pictable");
  297. oBody.firstChild.innerText="";
  298. for(var i=0;i<number;i++)
  299. {
  300. var myTR =oBody.insertRow();
  301. for(var j=0;j<2;j++) 
  302. {
  303. var myTD=myTR.insertCell();
  304. myTD.className="hback"
  305. if(j==0)
  306. {
  307. myTD.style.width="15%"
  308. myTD.align="right"
  309. myTD.innerHTML="图片"+(i+1).toString()+":";
  310. }
  311. else
  312. {
  313. myTD.style.width="80%"
  314. myTD.align="left"
  315. myTD.innerHTML="<input name='txt_PicNum_"+(i+1)+"' type='text' id='txt_PicNum' style='width:75%'/><input type='button' name='PPPChoose"+(i+1)+"' value='选择图片' onClick="OpenWindowAndSetValue('../CommPages/SelectPic.asp?CurrPath=<% = str_CurrPath %>&f_UserNumber=<% = session("FS_UserNumber")%>',500,320,window,this.parentNode.firstChild);">";
  316. }
  317. }
  318. }
  319. }
  320. -->
  321. </script>
  322. </html>
  323. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->