<!--#include file="pysjzx_conn.asp"-->
<!--#include file="session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/style.css" rel="stylesheet" type="text/css">
</head>

<script language=JavaScript>
<%dim i1,j1
	set rs_s=server.createobject("adodb.recordset")
	sql="select * from anclass order by anclassidorder"
	rs_s.open sql,conn,1,1
%>
	var selects1=[];
	selects1['xxx']=new Array(new Option('--请选择品牌--','xxx'));
<%
	for i=1 to rs_s.recordcount
%>
	selects1['<%=rs_s("anclassid")%>']=new Array(

new Option('--请选择品牌--','xx'),
<%
	set rs_s1=server.createobject("adodb.recordset")
	sql="select * from nclass where anclassid="&rs_s("anclassid")&" order by nclassidorder"
	rs_s1.open sql,conn,1,1
	if rs_s1.recordcount>0 then 
	%>


	<%		for j1=1 to rs_s1.recordcount
		if j1=rs_s1.recordcount then 
%>
		new Option('<%=trim(rs_s1("nclass"))%>','<%=trim(rs_s1("nclassid"))%>'));
<%		else
%>
		new Option('<%=trim(rs_s1("nclass"))%>','<%=trim(rs_s1("nclassid"))%>'),
<%
		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 chsel1(){
		with (document.formpub){
			if(anclass.value) {
				nclass.options.length=0;
				for(var i=0;i<selects1[anclass.value].length;i++){
					nclass.add(selects1[anclass.value][i]);
				}
			}
		}
	}
</script>
<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('--不限城市--','xx'),
<%
	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 type="text/javascript">
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function checkform(){
 if(document.formpub.anclass.value == 'xxx') {
    alert("请选择品牌");
    formpub.anclass.focus();
    return false;
  }
      if(checkspace(document.formpub.model.value)) {
    alert("车型不能为空");
    formpub.model.focus();
    return false;
  }
     if(checkspace(document.formpub.address.value)) {
    alert("联系地址不能为空");
    formpub.address.focus();
    return false;
  }
   if(checkspace(document.formpub.linkname.value)) {
    alert("联系人不能为空");
    formpub.linkname.focus();
    return false;
  }
     if(checkspace(document.formpub.tel.value)) {
    alert("联系电话不能为空");
    formpub.tel.focus();
    return false;
  }

    }
</script>
<script>
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<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="savesecond_hand.asp?action=add">
  <td colspan="3" bgcolor="#E8F1FF">
   <p align="center">添加二手车
  </td>
  <tr>
   <td width="645" colspan="3" bgcolor="#F7F7F7">
   　</td>
  </tr>
  <tr>
   <td width="645" colspan="3" bgcolor="#F7F7F7"><span lang="zh-cn">基本信息</span></td>
  </tr>
  <tr>
   <td width="188" bgcolor="#F7F7F7">　</td>
   <td width="106" bgcolor="#F7F7F7">
	品牌</td>
   <td width="623" bgcolor="#F7F7F7">
					<select size="1" name="anclass" onChange=chsel1()  class="wenbenkuang">
          <option value="xxx" selected>--选择品牌--</option>
          <%dim tmppingpaiid
tmppingpaiid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * from anclass  order by anclassidorder"
rs_s.open sql,conn,1,1
while not rs_s.eof%>
    
          <option value="<%=rs_s("anclassid")%>" ><%=rs_s("letter")%>-<%=trim(rs_s("anclass"))%></option>
          <%
 
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
        </select> <font color="#ff6600">
					*</font></td>
  </tr>
  <tr>
   <td  bgcolor="#F7F7F7">　</td>
   <td width="106" bgcolor="#F7F7F7">系列</td>
   <td width="623" bgcolor="#F7F7F7">
<select size="1" size="18" name="nclass"  class="wenbenkuang" >
                        <option value="" >--选择系列--</option>

 <%
set rs_s=server.createobject("adodb.recordset")
sql="select * from nclass where nclassid="&tmppingpaiid&" order by nclassidorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
%>
          <option value="<%=rs_s("nclassid")%>" selected><%=trim(rs_s("nclass"))%></option>
          <%
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%></select></td>
   </font></td>
  </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">车型</td>
  <td width="623" bgcolor="#F7F7F7">
 					<input class="wenbenkuang" maxLength="40" name="model" > <font color="#ff6600">
					*</font></td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7"><span lang="zh-cn">购买年份</span></td>
  <td width="623" bgcolor="#F7F7F7">

							<select class="select" size="1" name="buy_time" >
							<option value="0">不详</option>
							<option value="2007">2007</option>
							<option value="2006">2006</option>
							<option value="2005">2005</option>
							<option value="2004">2004</option>
							<option value="2003">2003</option>
							<option value="2002">2002</option>
							<option value="2001">2001</option>
							<option value="2000">2000</option>
							<option value="1999">1999</option>
							<option value="1998">1998</option>
							<option value="1997">1997</option>
							<option value="1996">1996</option>
							<option value="1995">1995</option>
							<option value="1994">1994</option>
							<option value="1993">1993</option>
							<option value="1992">1992</option>
							<option value="1991">1991</option>
							<option value="1990">1990</option>
							<option value="1989">1989</option>
							<option value="1988">1988</option>
							</select> 年 <select class="select" size="1" name="buy_time_month" >
							<option value="0">不详</option>
							<option value="1">1</option>
							<option value="2">2</option>
							<option value="3">3</option>
							<option value="4">4</option>
							<option value="5">5</option>
							<option value="6">6</option>
							<option value="7">7</option>
							<option value="8">8</option>
							<option value="9">9</option>
							<option value="10">10</option>
							<option value="11">11</option>
							<option value="12">12</option>

							</select><font color="#ff6600"> </font>
							<span lang="zh-cn">月</span><font color="#ff6600"> *</font></td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">原购车价</td>
  <td width="623" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="40" name="essentially_price" > 元</td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">转让价格</td>
  <td width="623" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="40" name="sell_price" ONKEYPRESS="event.returnValue=IsDigit();"><font color="#ff6600">
					* </font>元(不填<span lang="zh-cn">或0</span> 表示面议) (<span lang="zh-cn">限数字</span>)</td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">颜色</td>
  <td width="623" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="15" name="color" ></td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">变速器</td>
  <td width="623" bgcolor="#F7F7F7">
					
					<select class="select" class="wenbenkuang" size="1" name="derailleur" >
					<option value="自动档" selected>自动档</option>
					<option value="手动档">手动档</option>
					</select></td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">行驶路程</td>
  <td width="623" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="15" name="journey">(公里)</td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">百里油耗</td>
  <td width="623" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="20" name="oil_wear" >(升/100公里)</td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">排量</td>
  <td width="623" bgcolor="#F7F7F7">
					
					<input class="wenbenkuang" maxLength="20" name="displacement">(升)</td>
 </tr>
 
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td width="106" bgcolor="#F7F7F7">车牌过户</td>
  <td width="623" bgcolor="#F7F7F7">
					<input id="transfer_1" type="radio" CHECKED value="0" name="transfer"><label for="transfer_1"> 能 &nbsp;</label>
					<input id="transfer_2" type="radio" value="1" name="transfer" ><label for="transfer_2"> 不能&nbsp;</label></td>
 </tr>
 
  <tr> 
   <td height="18"  bgcolor="#F7F7F7">　</td>
   <td height="18" width="106" bgcolor="#F7F7F7">最初图片</td>
   <td height="18" width="623" bgcolor="#F7F7F7"><%
					ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
					%><input name="pic" type="text" id="pic" size="30" class="wenbenkuang" >　<input  type="button" name="Submit2" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=formpub&editname=pic&byshopuppath=upload/second&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang">
   </td>
 </tr>
 <tr> 
   <td height="18"  bgcolor="#F7F7F7"></td>
   <td height="18" width="106" bgcolor="#F7F7F7"> 图1</td>
   <td height="18" width="623" bgcolor="#F7F7F7"> 
   					<input name="pic1" type="text" id="pic1" size="30" class="wenbenkuang" >　<input  type="button" name="Submit3" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=formpub&editname=pic1&byshopuppath=upload/second&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"></td>
 </tr>
 <tr> 
   <td height="18"  bgcolor="#F7F7F7"></td>
   <td height="18" width="106" bgcolor="#F7F7F7"> 图2</td>
   <td height="18" width="623" bgcolor="#F7F7F7"> 
   					<input name="pic2" type="text" id="pic2" size="30" class="wenbenkuang" >　<input  type="button" name="Submit4" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=formpub&editname=pic2&byshopuppath=upload/second&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"></td>
 </tr>
 <tr> 
   <td height="18"  bgcolor="#F7F7F7"></td>
   <td height="18" width="106" bgcolor="#F7F7F7"> 图3</td>
   <td height="18" width="623" bgcolor="#F7F7F7"> 
   <input name="pic3" type="text" id="pic3" size="30" class="wenbenkuang" >　<input  type="button" name="Submit5" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=formpub&editname=pic3&byshopuppath=upload/second&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"></td>
 </tr>
 <tr> 
   <td height="18"  bgcolor="#F7F7F7"></td>
   <td height="18" width="106" bgcolor="#F7F7F7">图4</td>
   <td height="18" width="623" bgcolor="#F7F7F7"> 
   					<input name="pic4" type="text" id="pic4" size="30" class="wenbenkuang">　<input  type="button" name="Submit6" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=formpub&editname=pic4&byshopuppath=upload/second&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"> 
   </td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" align="left" bgcolor="#F7F7F7">
	<p align="left">车况描述</td>
  <td width="623" bgcolor="#F7F7F7">

					<textarea class="smallarea" style="FONT-FAMILY: 宋体" name="description" rows="5" cols="49" class="wenbenkuang" ></textarea> <font color="#FF6600">(最多500字)</font><font color="#ff6600">*</font></td>
 </tr>
 <tr> 
  <td valign="top" width="639" colspan="3" bgcolor="#F7F7F7">手续</td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="579" colspan="2" bgcolor="#F7F7F7">
					<table border="0" width="100%" cellspacing="0">
						<tr>
							<td width=25%>
							<input id="drivers_license" type="checkbox"  name="drivers_license" value="1"><label for="drivers_license"> 行驶证</label></td>
							<td width=25%>
							<input id="purchases_license"  type="checkbox"  name="purchases_license" value="1"><label for="purchases_license"> 购置费凭证</label></td>
							<td width=25%>
							<input id="car_boat_licens"  type="checkbox"  name="car_boat_license" value="1"><label for="car_boat_licens"> 车船税</label></td>
							<td width=25%>
							<input id="vehicle_license" type="checkbox"  name="vehicle_license" value="1"><label for="vehicle_license"> 机动车登记证</label></td>
						</tr>
					</table>
					</td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="579" colspan="2" bgcolor="#F7F7F7">
					<table border="0" width="100%" cellspacing="0" cellpadding="0">
												
						<tr>
							<td width=25%>
							<input id="buy_car_license"  type="checkbox"   name="buy_car_license" value="1"><label for="buy_car_license"> 购车发票</label></td>
							<td width=25% >　</td>
							<td width=25%>　</td>
							<td width=25%>　</td>
						</tr>
					</table>
					</td>
 </tr>
 <tr> 
  <td valign="top" width="639" colspan="3" bgcolor="#F7F7F7" height="21">联系方式</td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" bgcolor="#F7F7F7"><span lang="zh-cn">交易地区</span></td>
  <td width="623" bgcolor="#F7F7F7">

					<select size="1" name="province" onChange=chsel()  class="wenbenkuang"  >
          <option value="xxx" selected>--不限市--</option>
          <%dim tmpShengid
tmpShengid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * from province  order by shengorder"
rs_s.open sql,conn,1,1
while not rs_s.eof%>
    
          <option value="<%=rs_s("ShengNo")%>" ><%=trim(rs_s("ShengName"))%></option>
          <%
 
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%></select><select size="1" size="18" name="city"  class="wenbenkuang"  >
                        <option value="" >--不限县--</option>

            

 <%
set rs_s=server.createobject("adodb.recordset")
sql="select * from city where shengid="&tmpShengid&" order by shiorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
%>
          <option value="<%=rs_s("ShiNo")%>" selected><%=trim(rs_s("ShiName"))%></option>
          <%
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
					 </select></td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" bgcolor="#F7F7F7">联系地址</td>
  <td width="623" bgcolor="#F7F7F7">

					<input class="wenbenkuang" maxLength="40" name="address"><font color="#ff6600"> *</font></td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" bgcolor="#F7F7F7">联 系 人</td>
  <td width="623" bgcolor="#F7F7F7">

					<input class="wenbenkuang" maxLength="15" name="linkname" ><font color="#ff6600"> *</font></td>
 </tr>
 <tr> 
  <td valign="top"  bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" bgcolor="#F7F7F7">
					联系电话</td>
  <td width="623" bgcolor="#F7F7F7">

					<input class="wenbenkuang" maxLength="15" name="tel"  ><font color="#ff6600"> *</font></td>
 </tr>
 <tr> 
  <td valign="top"  height="25" bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" height="25" bgcolor="#F7F7F7">手机号码</td>
  <td width="623" height="25" bgcolor="#F7F7F7">

					<input class="wenbenkuang" maxLength="11" name="mobile"></td>
 </tr>  <tr>
   <td width="188" bgcolor="#F7F7F7">　</td>
   <td width="110" bgcolor="#F7F7F7">
	即时通讯</td>
   <td width="454" bgcolor="#F7F7F7">

					<input id="Contract_QQ" type="radio" CHECKED value="qq" name="Contract" class="input1"><label for="Contract_QQ">QQ</label>
	<input id="Contract_MSN" type="radio" value="msn" name="Contract" class="input1"><label for="Contract_MSN" >MSN</label> 
					<input class="wenbenkuang" maxLength="15" name="Contract2" ></td>
  </tr>
 <tr> 
  <td valign="top"  height="25" bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" height="25" bgcolor="#F7F7F7">电子邮件</td>
  <td width="623" height="25" bgcolor="#F7F7F7">

					<input class="wenbenkuang" maxLength="40" name="email"></td>
 </tr>
 <tr> 
  <td valign="top"  height="25" bgcolor="#F7F7F7">　</td>
  <td valign="top" width="106" height="25" bgcolor="#F7F7F7">
					<span lang="zh-cn">传真号码</span></td>
  <td width="623" height="25" bgcolor="#F7F7F7">

					<input class="wenbenkuang" maxLength="15" name="fax" ></td>
 </tr>
 <tr> 
  <td  bgcolor="#F7F7F7" colspan="3">信息状态</td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td  bgcolor="#F7F7F7">有限期限</td>
  <td  bgcolor="#F7F7F7">

					<select class="select" class="wenbenkuang" size="1" name="limit" >
					<option value="一周" selected>一周</option>
					<option value="半月">半月</option>
					<option value="一个月">一个月</option>
					<option value="三个月">三个月</option>
					<option value="六个月">六个月</option>
					<option value="一年">一年</option>
					<option value="长期">长期</option>
					</select></td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td  bgcolor="#F7F7F7">审核状态</td>
  <td  bgcolor="#F7F7F7"><select name="estate" >
  <option value="1" selected >通过</option>
   <option value="0" >待审核</option>
    <option value="-1" >未通过</option>
</select></td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td  bgcolor="#F7F7F7">发布类型</td>
  <td  bgcolor="#F7F7F7">
					　</td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td  bgcolor="#F7F7F7">销售状态</td>
  <td  bgcolor="#F7F7F7">
					<select id="Select19" name="distribution">
					<option value="1" selected>未成交</option>
					<option value="2">已成交</option>
					</select></td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td  bgcolor="#F7F7F7">浏览次数</td>
  <td  bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="40" name="browse_count" value="0"  ></td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7">　</td>
  <td  bgcolor="#F7F7F7">发布日期</td>
  <td  bgcolor="#F7F7F7"><%=now()%>　</td>
   </tr>
 <tr> 
  <td  bgcolor="#F7F7F7" colspan="3">　</td>
   </tr>
 <tr> 
  <td height="32" bgcolor="#F7F7F7" colspan="3"><div align="center"><input type="submit" name="Submit" value="添  加"  class=wenbenkuang >
	<input type="reset" name="Submit7" value="清  除"  class=wenbenkuang ></div>
	</td>
   </tr>
   </form>
   </table>
   	</div>
   
</body>
</html> 
  