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

数据库编程

开发平台:

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. <!--#include file="lib/cls_house.asp"-->
  9. <%'Copyright (c) 2006 Foosun Inc. Code by Einstein.liu
  10. Dim straction,currenttype
  11. currenttype=request.QueryString("currenttype")
  12. straction = Request("action")
  13. if straction="Unmessage" then
  14. User_Conn.execute("update FS_ME_Users set ismessage= 0 where UserNumber='"& Fs_User.UserNumber &"'")
  15. strShowErr = "<li>订阅本站资料取消</li>"
  16. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  17. Response.end
  18. Elseif straction = "ismessage" then
  19. User_Conn.execute("update FS_ME_Users set ismessage= 1 where UserNumber='"& Fs_User.UserNumber &"'")
  20. strShowErr = "<li>订阅本站资料成功</li>"
  21. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  22. Response.end
  23. Elseif straction = "Open" then
  24. User_Conn.execute("update FS_ME_Users set isOpen= 1 where UserNumber='"& Fs_User.UserNumber &"'")
  25. strShowErr = "<li>对外开放资料开启</li>"
  26. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  27. Response.end
  28. Elseif straction = "Close" then
  29. User_Conn.execute("update FS_ME_Users set isOpen= 0 where UserNumber='"& Fs_User.UserNumber &"'")
  30. strShowErr = "<li>对外开放资料取消</li>"
  31. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../main.asp")
  32. Response.end
  33. End if
  34. %>
  35. <%
  36. Dim house_rs,action,str_CurrPath,houseObj,id,i
  37. set houseObj=New cls_House
  38. action=request.QueryString("action")
  39. id=NoSqlHack(request.QueryString("id"))
  40. if action="edit" then
  41. houseObj.getQuotationInfo(id)
  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="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  73.         <tr>
  74.           <td class="xingmu">发布楼盘信息</td>
  75.         </tr>
  76.         <tr>
  77.           <td class="hback"><a href="houseManage.asp">楼盘信息</a>&nbsp;|&nbsp;<a href='#' onClick="history.back()">后退</a>&nbsp;</td>
  78.         </tr>
  79.       </table>
  80.       <form action="HS_Quotation_Open_Action.asp?action=<%=action%>" method="post" id="QuotationForm">
  81.         <input type="hidden" value="<%=id%>" name="id" />
  82.         <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table" id="inputpanel">
  83.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  84.             <td width="17%" align="right" class="hback">名称:</td>
  85.             <td width="83%" align="left" class="hback"><input name="txt_HouseName" type="text" id="txt_HouseName" style="width:60%" value="<%=houseObj.HouseName%>" onFocus="Do.these('txt_HouseName',function(){ return isEmpty('txt_HouseName','span_HouseName');})" onKeyUp="Do.these('txt_HouseName',function(){ return isEmpty('txt_HouseName','span_HouseName');})" onBlur="Do.these('txt_HouseName',function(){ return isEmpty('txt_HouseName','span_HouseName');})"/>
  86.               <span class="STYLE1">*</span> <span id="span_HouseName"></span></td>
  87.           </tr>
  88.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  89.             <td align="right" class="hback">楼盘位置:</td>
  90.             <td align="left" class="hback"><input name="txt_Position" type="text" id="txt_Position" style="width:60%" value="<%=houseObj.Position%>" onFocus="this.className='RightInput'" /></td>
  91.           </tr>
  92.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  93.             <td align="right" class="hback">楼盘方位:</td>
  94.             <td align="left" class="hback"><input name="txt_Direction" type="text" id="txt_Direction" style="width:60%" value="<%=houseObj.direction%>" onFocus="this.className='RightInput'" /></td>
  95.           </tr>
  96.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  97.             <td align="right" class="hback">项目类别:</td>
  98.             <td align="left" class="hback"><input name="txt_class" type="text" id="txt_class" style="width:60%" value="<%=houseObj.hclass%>"onfocus="this.className='RightInput'" /></td>
  99.           </tr>
  100.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  101.             <td align="right" class="hback">开盘日期:</td>
  102.             <td align="left" class="hback"><input name="txt_OpenDate" type="text" id="txt_OpenDate" style="width:60%" readonly="true" value="<%=houseObj.OpenDate%>" onFocus="this.className='RightInput'" />
  103.               <input type="button" name="chooseEndTime" value="日 期" onClick="OpenWindowAndSetValue('../../admin/CommPages/SelectDate.asp',280,110,window,document.all.QuotationForm.txt_OpenDate);document.all.QuotationForm.txt_OpenDate.focus();">
  104.             </td>
  105.           </tr>
  106.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  107.             <td align="right" class="hback">预售许可证:</td>
  108.             <td align="left" class="hback"><input name="txt_PreSaleNumber" type="text" id="txt_PreSaleNumber" style="width:60%" value="<%=houseObj.preSaleNumber%>" onFocus="this.className='RightInput'"/></td>
  109.           </tr>
  110.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  111.             <td align="right" class="hback">发证日期:</td>
  112.             <td align="left" class="hback"><input name="txt_IssueDate" type="text" id="txt_IssueDate" style="width:60%" readonly="true" value="<%=houseObj.IssueDate%>" onFocus="this.className='RightInput'" />
  113.               <input type="button" name="chooseEndTime" value="日 期" onClick="OpenWindowAndSetValue('../../admin/CommPages/SelectDate.asp',280,110,window,document.all.QuotationForm.txt_IssueDate);document.all.QuotationForm.txt_IssueDate.focus();">
  114.             </td>
  115.           </tr>
  116.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  117.             <td align="right" class="hback">预售范围:</td>
  118.             <td align="left" class="hback"><input name="txt_PreSaleRange" type="text" id="txt_PreSaleRange" style="width:60%" value="<%=houseObj.PreSaleRange%>" onFocus="this.className='RightInput'" /></td>
  119.           </tr>
  120.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  121.             <td align="right" class="hback">楼盘介绍:</td>
  122.             <td align="left" class="hback"><textarea name="txt_introduction" cols="80" rows="15" id="txt_introduction" onFocus="this.className='RightInput'" ><%=houseObj.introduction%></textarea></td>
  123.           </tr>
  124.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  125.             <td align="right" class="hback">房屋状况:</td>
  126.             <td align="left" class="hback"><select name="sel_Status" id="sel_Status">
  127.                 <option value="1" <%if houseObj.status="1" then Response.Write("selected")%>>形象展示</option>
  128.                 <option value="2" <%if houseObj.status="2" then Response.Write("selected")%>>期房</option>
  129.                 <option value="3" <%if houseObj.status="3" then Response.Write("selected")%>>现房</option>
  130.               </select></td>
  131.           </tr>
  132.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  133.             <td align="right" class="hback">报价:</td>
  134.             <td align="left" class="hback"><input name="txt_Price" type="text" id="txt_Price" style="width:60%" value="<%=houseObj.Price%>" onFocus="Do.these('txt_Price',function(){return isNumber('txt_Price','span_price','请填写正确的格式',false);})" onKeyUp="Do.these('txt_Price',function(){return isNumber('txt_Price','span_price','请填写正确的格式',false);})"/>
  135.               万<span id="span_price"></span> </td>
  136.           </tr>
  137.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  138.             <td align="right" class="hback">联系电话:</td>
  139.             <td align="left" class="hback"><input name="txt_tel" type="text" id="txt_tel" style="width:60%" value="<%=houseObj.tel%>" onFocus="this.className='RightInput'"  /></td>
  140.           </tr>
  141.           <tr id="tr_pic_num" onMouseOver=overColor(this) onMouseOut=outColor(this)>
  142.             <td align="right" class="hback">图片数量:</td>
  143.             <td align="left" class="hback"><input name="txt_PicNum" type="text" id="txt_PicNum" style="width:60%" value="<%=houseObj.picNumber%>" onFocus="if($('txt_PicNum').value==''){$('pictable').style.display='none';return;};Do.these('txt_PicNum',function(){return isNumber('txt_PicNum','span_picNum','请填写正确的格式',false);});" onKeyUp="Do.these('txt_PicNum',function(){return isNumber('txt_PicNum','span_picNum','请填写正确的格式',false);});;if(!isNaN(this.value)){addRow(this.value);$('pictable').style.display='';};" onBlur="if($('txt_PicNum').value==''){$('txt_PicNum').value='0'}Do.these('txt_PicNum',function(){return isNumber('txt_PicNum','span_picNum','请填写正确的格式',false);});"/>
  144.               &nbsp;<span id="span_picNum"></span></td>
  145.           </tr>
  146.           <tr class="hback" onMouseOver=overColor(this) onMouseOut=outColor(this)>
  147.             <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="1" id="pictable" style="display:none">
  148.                 <%
  149. if isnumeric(houseObj.picNumber) then
  150. if Cint(houseObj.picNumber)>0 and id<>"" then
  151. Dim pic_rs,picArray
  152. Set pic_rs=Conn.execute("select Pic from FS_HS_Picture where HS_type=1 and id="&id)
  153. for i=0 to houseObj.picNumber-1
  154. Response.Write("<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>"&vbcrlf)
  155. Response.Write("<td width='15%' align='right'>图片"&(i+1)&"</td>"&vbcrlf)
  156. response.Write("<td width='85%' align='left'>"&vbcrlf)
  157. if not pic_rs.eof then
  158. Response.Write("<input name='txt_PicNum_"&(i+1)&"' type='text' id='txt_PicNum' style='width:75%' value='"&pic_rs("pic")&"' onfocus=""this.className='RightInput'"" onblur=""this.className=''"" /><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)
  159. else
  160. 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)
  161. End if
  162. Response.Write("</td>"&vbcrlf)
  163. Response.Write("</tr>"&vbcrlf)
  164. pic_rs.movenext
  165. next
  166. pic_rs.close
  167. Set pic_rs=nothing
  168. End if
  169. End if
  170. %>
  171.               </table></td>
  172.           </tr>
  173.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  174.             <td align="right" class="hback">&nbsp;</td>
  175.             <td align="left" class="hback"><input type="Button" name="mysubmit" value="提交" onClick="submitForm()" />
  176.               <input type="Button" name="myrest" value="重置" onClick="javascript:if(confirm('是否重置所有表单项?'))$('QuotationForm').reset()" />
  177.             </td>
  178.           </tr>
  179.         </table>
  180.       </form></td>
  181.   </tr>
  182.   <tr class="back">
  183.     <td height="20"  colspan="2" class="xingmu"><div align="left">
  184.         <!--#include file="../Copyright.asp" -->
  185.       </div></td>
  186.   </tr>
  187. </table>
  188. </body>
  189. </html>
  190. <%
  191. Set Fs_User = Nothing
  192. Set Conn=nothing
  193. Set house_rs=nothing
  194. %>
  195. <script language="javascript">
  196. <!--
  197. if(!isNaN($F('txt_PicNum')))
  198. {
  199. $('pictable').style.display="";
  200. }else
  201. {
  202. $('pictable').style.display="none";
  203. }
  204. function addRow(number)
  205. {
  206. var oBody=$("pictable");
  207. oBody.firstChild.innerText="";
  208. for(var i=0;i<number;i++)
  209. {
  210. var myTR =oBody.insertRow();
  211. for(var j=0;j<2;j++) 
  212. {
  213. var myTD=myTR.insertCell();
  214. myTD.className="hback"
  215. if(j==0)
  216. {
  217. myTD.style.width="15%"
  218. myTD.align="right"
  219. myTD.innerHTML="图片"+(i+1).toString()+":";
  220. }
  221. else
  222. {
  223. myTD.style.width="80%"
  224. myTD.align="left"
  225. 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);">";
  226. }
  227. }
  228. }
  229. }
  230. function submitForm()
  231. {
  232. var flag1=isEmpty('txt_HouseName','span_HouseName');
  233. var falg2=isNumber('txt_Price','span_price','请填写正确的数字格式!',false);
  234. if(flag1&&falg2)
  235. $('QuotationForm').submit();
  236. }
  237. -->
  238. </script>
  239. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->