<!--#include file="usertop.asp"-->
<!--#include file="usercookies.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>张贴广告--<%=title%>--<%=web%></title>
</head>

<body>
<script LANGUAGE=JavaScript>
  function textLimitCheck1(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
    /*回写span的值，当前填写文字的数量*/
    messageCount1.innerText = thisArea.value.length;
  }
</script>
<script LANGUAGE=JavaScript>
  function textLimitCheck(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
    /*回写span的值，当前填写文字的数量*/
    messageCount.innerText = thisArea.value.length;
  }
</script>
<div align="center">
<script language="JavaScript">
  function isDigit(c)
{
    if(c.length > 1){
        return false;
    }
    ic = c - '0';
    return ic >= 0 && ic <= 9;
}
function checkinput(){

        	if(form_fox.company.value.length<2 || form_fox.company.value.length>12 ){
            alert("标题名称在2-12字之间！");
            form_fox.company.focus();
            return false;
        }
	       if(form_fox.ad.value.length<1 || form_fox.ad.value.length>50 ){
            alert("张贴内容！");
            form_fox.ad.focus();
            return false;
        } 
	       if(form_fox.memo.value.length<1 || form_fox.memo.value.length>500 ){
            alert("内容不合要求！");
            form_fox.memo.focus();
            return false;
        } 
			if(form_fox.class1.value == "0" || form_fox.class1.value == ""){
            alert("请选择广告大类！");
            form_fox.class1.focus();
            return false;
        } 
			if(form_fox.class2.value == "0" || form_fox.class2.value == ""){
            alert("请选择广告小类！");
            form_fox.class2.focus();
            return false;
        } 
            if(form_fox.youxiao.value == ""){
            alert("请输入有效期！");
            form_fox.youxiao.focus();
            return false;
        }  
            if(form_fox.jiage.value == ""){
            alert("请输入参考价格！");
            form_fox.jiage.focus();
            return false;
        }
            if(form_fox.lxrname.value == ""){
            alert("请输入您真实姓名！");
            form_fox.lxrname.focus();
            return false;
        } 
　　　　　　if(form_fox.usertel.value == ""){
            alert("请输入联系电话！");
            form_fox.usertel.focus();
            return false;
        } 

			if(form_fox.dizhi.value == ""){
            alert("请输入通讯地址！");
            form_fox.dizhi.focus();
            return false;
        } 
		　　if(form_fox.code.value == ""){
            alert("请输入邮编！");
            form_fox.code.focus();
            return false;
        } 
 
	if(form_fox.email.value == ""){
            alert("请输入您有效的电子邮件,方便我们能联系到您！");
            form_fox.email.focus();
            return false;
        }
    return true;
}  
function isEmail(strEmail) {
 if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
  return true;
 else
  alert("请输入您有效的电子邮件,方便我们能联系到您！");
}
</script>
<table cellSpacing="0" cellPadding="0" width="760" border="0" id="table1">
		<tr>
			<td  height="25" colspan="2" class="tdtop"><b>&nbsp;<img border="0" src="images/z1.gif" width="50" height="18"> 您的位置  
			<font color="#FFFFFF">-></font> <a class="scap1" href="index.htm"><%=title%></a>
			<font color="#FFFFFF">-></font> 张贴广告：</b></td>
		</tr>
		<tr bgColor="#d9ebe5">
			<td  width="255" bgcolor="#FFFFFF" rowspan="2" valign="top">
            <!--#include file="caozuo.asp"-->
			</td>
		<tr bgColor="#d9ebe5">
			<td valign="top" width="505" height="315" bgcolor="#FFFFFF">
			<table border="1" width="100%" id="table2" bordercolorlight="#D9EBE5" bordercolordark="#D9EBE5" style="border-collapse: collapse" cellpadding="0" cellspacing="0">
				<tr>
					<td class="tdtxt07" bgcolor="#D9EBE5">&nbsp;<img border="0" src="images/a01.gif" width="25" height="25">
用户：<font color="#FF0000"><%=username%></font>，您好，欢迎来到会员中心！您登陆本站共<font color="#FF0000"><%=rsuser("dlcs")%></font>次。<br>
您目前级别：<%if rsuser("huitype")="0" then%><font color="#FF0000"><%=aname%>会员</font><%elseif rsuser("huitype")="1" then%><font color="#FF0000"><%=bname%>会员</font><%elseif rsuser("huitype")="2" then%><font color="#FF0000"><%=cname%>会员</font><%end if%>
，验证状态：<%if rsuser("yz")="0" then%><font color="#FF0000">没有通过验证</font>，验证后才可以享受更多权利！<%elseif rsuser("yz")="1" then%><font color="#FF0000">已通过验证</font>，祝您愉快！<%end if%></td>
				</tr>
				<tr>
					<td class="tdtxt07" bgcolor="#D9EBE5" height="20">
					<table border="0" width="100%" id="table3" cellspacing="1">
						<tr>
							<td bgcolor="#FFFFFF" colspan="2" height="40" class="tdtxt07">
							<p align="center">
							<img border="0" src="images/a01.gif" width="25" height="25"><b>广告发布</b>（
							成功发布将获赠 <font color="#FF0000"><%=xxjf%></font> 分/条；被删除扣<font color="#FF0000"> <%=xxjf*xxjf%> </font>分/条）
							<%if rsuser("huitype")=1 then%><table border="0" width="100%" cellpadding="4">
										<tr>
											<td>
											<p align="right">您是<font color="#FF0000"><%=bname%></font>会员，张贴广告每条将扣您 <font color="#FF0000"><%=hxb%></font> <%=bname%></td>
										</tr>
										</table><%end if%></td>
						</tr>
	<form name="form_fox" onsubmit="return checkinput()" method="post" action="addztchk.asp">

						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							广告ID：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%"><%dim aa,sid
					aa=rsuser("id")
					sid=now()&aa
		sid=replace(sid,"-","")
        sid=replace(sid," ","")
        sid=replace(sid,":","")%><b><font color="#FF0000"><%=sid%>
</font></b><input name="xxid" type="hidden" value="<%=sid%>"><input name="ts" type="hidden" value="1">
</td>
						</tr>

						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							<font color="#FF0000">广告标题：</font></td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic6" maxLength="12" size="20" name="company" class="button01"> <font color="#FF0000">
			*</font></td>
						</tr>
<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							广告所属：</td>
							<td bgcolor="#FFFFFF" width="77%" height="30" align="right">
							<p align="left">
<%
dim rsclass
dim sqlclass
dim count
set rsclass=server.createobject("adodb.recordset")
sqlclass = "select * from FOX_class2 order by paixu desc"
rsclass.open sqlclass,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rsclass.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rsclass("class2"))%>","<%= trim(rsclass("class1"))%>","<%= trim(rsclass("id"))%>");
        <%
        count = count + 1
        rsclass.movenext
        loop
        rsclass.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form_fox.class2.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.form_fox.class2.options[document.form_fox.class2.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
                      </SCRIPT><%
sqlclass = "select * from FOX_class1 order by paixu desc"
rsclass.open sqlclass,conn,1,1
if rsclass.eof and rsclass.bof then
response.write "请先添加栏目。"
response.end
else
%><SELECT name="class1" onChange="changelocation(document.form_fox.class1.options[document.form_fox.class1.selectedIndex].value)" size="1" class="right_bg01">
<OPTION selected value="0">==分类==</OPTION>
                                <%do while not rsclass.eof
%>
                                <OPTION value="<%=trim(rsclass("id"))%>"><%=trim(rsclass("class1"))%></OPTION>
                                <%
        rsclass.movenext
        loop
	    end if
        rsclass.close
        set rsclass=nothing
%>
                              </SELECT>
                              <SELECT name="class2" size="1" class="right_bg01">
                                <OPTION selected value="0">==二级分类==</OPTION>
                              </SELECT> <font color="#FF0000">*</font></td>
						</tr>
<%
dim rs1,sql1
set rs1=server.createobject("adodb.recordset")
sql1 = "select * from [FOX_lei] order by paixu desc"
rs1.open sql1,conn,1,1
%>    
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							广告类型：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
	<select size="1" name="leixing" style="BACKGROUND-COLOR: #eeeeee; BORDER-BOTTOM: #FFFFFF 1px solid; BORDER-LEFT: #a2a2a2 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #a2a2a2 1px solid; COLOR: red; FONT-SIZE: 9pt; HEIGHT: 19px;">
                                <%do while not rs1.eof
%><option value="<%=rs1("id")%>"><%=rs1("leixing")%></option>
<%rs1.movenext
loop
rs1.close
set rs1=nothing%>						</select> <font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							参考报价：</td>
							<td bgcolor="#FFFFFF" width="77%" height="30" align="right">
							<p align="left">
							<input id="topic8" maxLength="6" size="6" name="jiage" class="button01" value="0"> 
			元&nbsp;<font color="#FF0000">* （“0”为面议）</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							张贴内容：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<textarea  class="button02" rows="3" onkeyUp="textLimitCheck1(this, 30);" name="ad" cols="21"></textarea>&nbsp;<font color="#FF0000">*</font><br><font color=#666666>限 5-30 个字符  已输入 <font color="#CC0000"><span id="messageCount1">0</span></font> 个字</font></td>
						</tr>
						
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							广告内容：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<textarea  class="button02" rows="8" onkeyUp="textLimitCheck(this, 500);" name="memo" cols="48"></textarea>&nbsp;<font color="#FF0000">*</font><br><font color=#666666>限 5-500 个字符  已输入 <font color="#CC0000"><span id="messageCount">0</span></font> 个字</font></td>
						</tr>
						
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							相关图片：</td>
							<td bgcolor="#FFFFFF" width="77%" height="30" align="left">
							<%if rsuser("huitype")=0 then%><input type="text" name="xinxipic" size="20" class="button01" value="http://">您是<%=aname%>会员，不能上传，可用网上图片链接！
							<%elseif rsuser("huitype")>0 and rsuser("yz")="0" then%><input type="text" name="xinxipic" size="20" class="button01" value="http://">未通过本站认证，暂不能上传，可用网上图片链接！
							<%elseif rsuser("huitype")=1 and rsuser("yz")="1" and rsuser("dxb")-tdxb-hxb>"0"then%><iframe name="I1" src="xinxiup.asp?xxid=<%=sid%>&username=<%=rsuser("username")%>&huitype=<%=rsuser("huitype")%>" marginwidth="1" marginheight="1" height="30" width="100%" scrolling="no" border="0" frameborder="0"></iframe>您是<font color="#FF0000"><%=bname%></font>会员，上传图片将扣您 <font color="#FF0000"><%=tdxb%></font> <%=bname%>。
							<%elseif rsuser("huitype")=1 and rsuser("yz")="1" and rsuser("dxb")-tdxb-hxb<"0" then%><input type="text" name="xinxipic" size="20" class="button01" value="http://">您的<%=bname%>不够上传，可用网上图片链接！
							<%elseif rsuser("huitype")=2 and rsuser("yz")="1" then%><iframe name="I1" src="xinxiup.asp?xxid=<%=sid%>&username=<%=rsuser("username")%>&huitype=<%=rsuser("huitype")%>" marginwidth="1" marginheight="1" height="30" width="100%" scrolling="no" border="0" frameborder="0"></iframe>
							<%end if%></td>
						</tr>

						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							<font color="#FF0000">广告有效期：</font></td>
							<td bgcolor="#FFFFFF" width="77%" height="30" align="right">
							<p align="left">
			<%if rsuser("huitype")="0" then%><input id="topic7" maxLength="3" size="3" name="youxiao" class="button01" value="<%=dqsja%>">天  
			<font color="#FF0000">必须小于 <b> <%=dqsja%></b> 天，否则提交将失败！</font>
			<%elseif rsuser("huitype")="1" then%><input id="topic7" maxLength="3" size="3" name="youxiao" class="button01" value="<%=dxb%>">天  
			<font color="#FF0000">以您<%=bname%>而定，必须小于 <b> <%=dxb%></b> 天，否则提交将失败！</font>
			<%elseif rsuser("huitype")="2" then%><input id="topic7" maxLength="3" size="3" name="youxiao" class="button01" value="<%=dqsjc%>">天  
			<font color="#FF0000">必须小于 <b> <%=dqsjc%></b> 天，否则提交将失败！</font>
			<%end if%>
			<font color="#FF0000">* </font></td>
						</tr>
							<tr>

							<td bgcolor="#FFFFFF" width="50%" height="30" align="right">
							参加竞价置顶：</td>

							<td bgcolor="#FFFFFF" width="49%" height="30" align="right">
		                <p align="left">
		                <%
                          dim b,bi
                          b=rsuser("b")
                          %>
                                <%if b>0 then%>
                                <select name="b" class="button01">
                                  <option value="0">不使用</option>
                                  <%for bi=1 to b%>
                                  <option value="<%=bi%>"><%=bi%></option>
                                  <%next%>
                                </select>
                                <%else%>
                                <font color="#999999">没有竞价置顶道具</font>
                                <%end if%>
                              </font><a href="gmdj.asp">购买</a></td>
						</tr>
							<td bgcolor="#D9EBE5" width="99%" height="30" align="right" colspan="2">
							<p align="left">
							<b>联系方式：</b></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							联系人：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic0" maxLength="4" size="14" name="lxrname" class="button01" value="<%=rsuser("lxrname")%>">
			<font color="#FF0000">*</font><input name="username" type="hidden" value="<%=rsuser("username")%>"><input name="huitype" type="hidden" value="<%=rsuser("huitype")%>">
			<input name="yz" type="hidden" value="<%=rsuser("yz")%>"></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							联系电话：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic1" maxLength="30" size="14" name="usertel" class="button01" value="<%=rsuser("usertel")%>">
			<font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							常用手机：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic2" maxLength="12" size="14" name="phone" class="button01" value="<%=rsuser("phone")%>">
			<font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							联系QQ：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic9" maxLength="12" size="14" name="qq" class="button01" value="<%=rsuser("qq")%>"></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							EMAIL：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic3" maxLength="30" size="23" onblur="isEmail(this.value)" name="email" class="button01" value="<%=rsuser("email")%>">
			<font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							所属地区：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
<%dim rsq,sqlq,xiangc,shic,shengc
set rsq=server.createobject("adodb.recordset") 
sqlq = "select * from [FOX_xiang] where id="&rsuser("xiang")&""
rsq.open sqlq,conn,1,1
xiangc=rsq("xiang")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select * from [FOX_shi] where id="&rsuser("shi")&""
rsq.open sqlq,conn,1,1
shic=rsq("shi")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select * from [FOX_sheng] where id="&rsuser("sheng")&""
rsq.open sqlq,conn,1,1
shengc=rsq("sheng")
rsq.close
set rsq=nothing
%><%=shengc%>-><%=shic%>-><%=xiangc%>&nbsp;<font color="#FF0000">*</font><input name="sheng" type="hidden" value="<%=rsuser("sheng")%>"><input name="shi" type="hidden" value="<%=rsuser("shi")%>"><input name="xiang" type="hidden" value="<%=rsuser("xiang")%>"></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							详细地址：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic4" maxLength="40" size="30" name="dizhi" class="button01" value="<%=rsuser("dizhi")%>">
			<font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							邮政编码：</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input id="topic5" maxLength="6" size="6" name="code" class="button01" value="<%=rsuser("code")%>">
			<font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td bgcolor="#FFFFFF" width="22%" height="30" align="right">
							　</td>
							<td bgcolor="#FFFFFF" height="30" width="77%">
			<input class="inputb" border="0" name="I5" type="submit" value="张贴广告"></td>
						</tr></form>
					</table>
					</td>
				</tr>
			</table>
			</td>
			</tr>

</table>
<%rsuser.close
set rsuser=nothing%>
</div>

</body>
<!--#include file="userbottom.asp"--></body></html>

</body></html>