<!--#include file="byshop_conn.asp"-->
<!--#include file="session.asp"-->
<script language=JavaScript>
<%dim i_1,j_1
	set rs_s=server.createobject("adodb.recordset")
	sql="select * from province order by shengorder"
	rs_s.open sql,conn,1,1
%>
	var selects=[];
	selects['xxx']=new Array(new Option('-请选择市-','xxx'));
<%
	for i=1 to rs_s.recordcount
%>
	selects['<%=rs_s("ShengNo")%>']=new Array(

new Option('-请选择县-','xxx'),
<%
	set rs_s1=server.createobject("adodb.recordset")
	sql="select * from city where shengid="&rs_s("id")&" order by shiorder"
	rs_s1.open sql,conn,1,1
	if rs_s1.recordcount>0 then 
	%>


	<%		for j=1 to rs_s1.recordcount
		if j=rs_s1.recordcount then 
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'));
<%		else
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'),
<%
		end if
		rs_s1.movenext
		next
	else 
%>
		new Option('','0'));
<%
	end if
	rs_s1.close
	set rs_s1=nothing
	rs_s.movenext
	next
rs_s.close
set rs_s=nothing
%>
	function chsel(){
		with (document.formpub){
			if(province.value) {
				city.options.length=0;
				for(var i=0;i<selects[province.value].length;i++){
					city.add(selects[province.value][i]);
				}
			}
		}
	}



</script>
<script language="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function checkform() {
    if(checkspace(document.formpub.address.value)) {
    alert("请输入详细地址！");
	formpub.address.focus();
	return false;
	  }
	     if(checkspace(document.formpub.company.value)) {
    alert("请输入放贷期限！");
	formpub.company.focus();
	return false;
	  }

	   if(checkspace(document.formpub.area.value)) {
    alert("请输入建筑面积！"); 
	formpub.area.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.area.value.length ; iii++ ) {
        chara =formpub.area.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 && chara != ".") {
        alert("建筑面积格式错误！");
        formpub.area.focus(); 
        		return false;
         }
  }
   
      if(checkspace(document.formpub.usearea.value)) {
    alert("请输入使用面积！"); 
	formpub.usearea.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.usearea.value.length ; iii++ ) {
        chara =formpub.usearea.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 && chara != ".") {
        alert("使用面积格式错误！");
        formpub.usearea.focus(); 
        		return false;
         }
  }
        if(checkspace(document.formpub.floor.value)) {
    alert("请输入楼！"); 
	formpub.floor.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.floor.value.length ; iii++ ) {
        chara =formpub.floor.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.floor.focus(); 
        		return false;
         }
  }
     if(checkspace(document.formpub.floor2.value)) {
    alert("请输入层！"); 
	formpub.floor2.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.floor2.value.length ; iii++ ) {
        chara =formpub.floor2.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.floor2.focus(); 
        		return false;
         }
  }
      if(checkspace(document.formpub.floor2.value)) {
    alert("请输入层！"); 
	formpub.floor2.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.floor2.value.length ; iii++ ) {
        chara =formpub.floor2.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.floor2.focus(); 
        		return false;
         }
  }
  
     if(checkspace(document.formpub.money.value)) {
    alert("请输入房屋售价！"); 
	formpub.money.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.money.value.length ; iii++ ) {
        chara =formpub.money.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 && chara != ".") {
        alert("房屋售价格式错误！");
        formpub.money.focus(); 
        		return false;
         }
  }
      if(checkspace(document.formpub.content.value)) {
    alert("请输入详细介绍！"); 
	formpub.content.focus();
	return false;
  }

  if(formpub.content.value.length > 1000){
  	alert("详细介绍不得超过1000个字符！");
	formpub.content.focus();	
	return false;		
  }
  if(checkspace(document.formpub.linkman.value)) {
    alert("请输入联系人！"); 
	formpub.linkman.focus();
	return false;
  }
  if(checkspace(document.formpub.mobile.value)) {
    alert("请输入电话号码！"); 
	formpub.mobile.focus();
	return false;
  }
    for ( iii = 1 ; iii <= formpub.mobile.value.length ; iii++ ) {
        chara =formpub.mobile.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.mobile.focus(); 
        		return false;
         }
  }

} 
// -->
</script>


<%
id=trim(request("id"))
		if IsNumeric(request.QueryString("id"))=False or request.QueryString("id")="" then
		response.write"<SCRIPT language=JavaScript>alert('参数错误！');"
		response.end	
		end if
set rs=server.CreateObject ("adodb.recordset")
sql="select * from rent2 where  id="&id
rs.open sql,conn,1,1
if rs.eof then
response.write"<SCRIPT language=JavaScript>alert('参数错误！');"
response.end	
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div align="center">
  <table width="95%" border="1" bordercolor="#C0C0C0" style="border-collapse: collapse" cellspacing="1" cellpadding="3">
    <form name="formpub" method="post"  onsubmit="return checkform()" action="saverent2.asp?id=<%=id%>&action=edit">
      <tr> 
        <td  colspan="3" bgcolor="#E8F1FF"> <p align="center"><b>修改放贷信息</b></td>
      </tr>
      <tr> 
        <td  colspan="3" bgcolor="#F7F7F7"> <p align="right">审核： 
            <select name="by_shenhe" >
              <option value="1" <%if rs("by_shenhe")=1 then %>selected <%end if%> >通过</option>
              <option value="0" <%if rs("by_shenhe")=0    then %>selected <%end if%> >待审核</option>
              <option value="-1" <%if rs("by_shenhe")=-1    then %>selected <%end if%> >未通过</option>
            </select>
            <font color="#ff6600">*</font></td>
      </tr>
      <tr> 
        <td width="711" colspan="3" bgcolor="#F7F7F7">放贷信息</td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7"> 放贷数额</td>
        <td width="711" bgcolor="#F7F7F7"> <input class="wenbenkuang" maxLength="40" name="address" value="<%=rs("address")%>" > 
          <font color="#ff0000">&nbsp; * 请注明</font></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7"> 放贷期限</td>
        <td width="711" bgcolor="#F7F7F7"><input name="company" class="wenbenkuang" style="WIDTH: 60px"  maxLength="40"value="<%=rs("company")%>"> 
          <font color="#ff0000"> *</font></td>
      </tr>
      <tr> 
        <td bgcolor="#F7F7F7">　</td>
        <td bgcolor="#F7F7F7">借款方式</td>
        <td bgcolor="#F7F7F7"> <select id="Select10" name="sort">
            <option value="4">房地产</option>
            <option value="5">金融债券</option>
            <option value="7">厂房</option>
            <option value="11">其他</option>
          </select> <font color="#ff0000">&nbsp; </font></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">期望利息</td>
        <td width="711" bgcolor="#F7F7F7"> <input name="area" class="wenbenkuang"  style="WIDTH: 60px" value="<%=rs("area")%>" maxLength="10" >
          % <font color="#ff0000">&nbsp; </font></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">拟放贷地区</td>
        <td width="711" bgcolor="#F7F7F7"> <input name="floor" id="floor" value="<%=rs("floor")%>"  maxlength="40"> 
          &nbsp;<font color="#ff0000">*</font> </td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7" colspan="3">详细介细</td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7" colspan="2"> （最多1000字。当前字数：<span id="spanCommentContentLength356431584" style="COLOR: red">0</span>）<font color="red">*</font><br> 
          <textarea onkeyup="if(event.ctrlKey &amp;&amp; (10 == event.keyCode || 13 == event.keyCode) &amp;&amp; form.onsubmit()) form.submit(); else onchange();" onpropertychange="onchange()" name="content" rows="5" cols="60" onchange="document.getElementById('spanCommentContentLength356431584').innerHTML=value.length;" class="wenbenkuang"><%=rs("content")%></textarea> 
        </td>
      </tr>
      <tr> 
        <td width="711" colspan="3" bgcolor="#F7F7F7">联系方式</td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">联 系 人</td>
        <td width="711" bgcolor="#F7F7F7"> <input class="wenbenkuang" maxLength="40" name="linkman" value="<%=rs("linkman")%>"> 
          <font color="#ff0000"> *</font></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">电话号码</td>
        <td width="711" bgcolor="#F7F7F7"> <input class="wenbenkuang" maxLength="40" name="mobile" value="<%=rs("mobile")%>"> 
          <font color="#ff0000"> *</font></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">手机号码</td>
        <td width="711" bgcolor="#F7F7F7"> <input class="wenbenkuang" maxLength="40" name="tel" value="<%=rs("tel")%>" > 
          <font color="#ff0000"> *</font></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">电子邮件</td>
        <td width="711" bgcolor="#F7F7F7"> <input class="wenbenkuang" maxLength="15" name="email" value="<%=rs("email")%>" ></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">联系方式</td>
        <td width="711" bgcolor="#F7F7F7"> <input id="Contract_QQ" type="radio"  value="qq" <%if rs("Contract")="qq" then %> CHECKED <%end if%> name="Contract"> 
          <label for="Contract_QQ">QQ</label> <input id="Contract_MSN" type="radio" value="msn" name="Contract"  <%if rs("Contract")="msn" then %> CHECKED <%end if%>> 
          <label for="Contract_MSN">MSN</label> <input class="wenbenkuang" maxLength="15" name="Contract2" value=<%=rs("contract2")%> ></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">有 效 期</td>
        <td width="711" bgcolor="#F7F7F7"> <select id="period" name="period">
            <option value="7" <%if rs("period") =7 then%> selected <%end if%>>一星期</option>
            <option value="15" <%if rs("period") =15 then%> selected <%end if%>>半个月</option>
            <option value="30" <%if rs("period") =30 then%> selected <%end if%>>一个月</option>
            <option value="90" <%if rs("period") =90 then%> selected <%end if%>>一季度</option>
            <option value="180" <%if rs("period") =180 then%> selected <%end if%>>半年</option>
          </select></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">人气指数</td>
        <td width="711" bgcolor="#F7F7F7"> <input class="wenbenkuang" maxLength="5" name="count" value="<%=rs("count")%>"></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">信息类型</td>
        <td width="711" bgcolor="#F7F7F7"> <select id="Select18" name="pubsort">
            <option value="1" <%if rs("pubsort") =1 then%> selected <%end if%> >本站发布</option>
            <option value="2" <%if rs("pubsort") =2 then%> selected <%end if%> >中介发布</option>
            <option value="3" <%if rs("pubsort") =3 then%> selected <%end if%> >个人发布</option>
          </select></td>
      </tr>
      <tr> 
        <td width="711" bgcolor="#F7F7F7">　</td>
        <td width="711" bgcolor="#F7F7F7">登记日期</td>
        <td width="711" bgcolor="#F7F7F7"><%=rs("adddate")%></td>
      </tr>
      <tr> 
        <td bgcolor="#F7F7F7">　</td>
        <td bgcolor="#F7F7F7">交易状态</td>
        <td bgcolor="#F7F7F7"> <input id="radio" type="radio" CHECKED value="0" name="property" class="input1"> 
          <label for="radio">否</label> <input id="radio2" type="radio" value="1" name="property" class="input1">
          是 　 
          <label for="radio2">(&quot;是&quot;表示已交易，&quot;否&quot;表示未交易)</label> 
          <label for="property2"></label></td>
      </tr>
      <tr> 
        <td valign="top" width="711" colspan="3" bgcolor="#F7F7F7">　</td>
      </tr>
      <tr> 
        <td valign="top" width="711" colspan="3" bgcolor="#F7F7F7"><div align="center">&nbsp;　 
            <input type="submit" name="Submit" value="修  改"  class=wenbenkuang >
            <input type="reset" name="Submit7" value="清  除"  class=wenbenkuang >
          </div></td>
      </tr>
    </form>
  </table>
</div>
</body>
</html>