<!-- #include file="include/con_user.asp" -->
<!-- #include file="include/jk_put.asp" -->
<!-- #include file="include/jk_frm.asp" -->
<!-- #include file="include/jk_nsort.asp" -->
<!-- #include file="include/jk_upload.asp" -->
<!-- #include file="include/common_music.asp"-->
<%

call time_lock()
dim c_id,s_id,n_id,d_id
c_id=Request.QueryString ("c_id")
s_id=Request.QueryString ("s_id")
n_id=Request.QueryString ("n_id")
d_id=Request.QueryString ("d_id")
dim nsort,data_name,session_for,go_back,dim_down,types
session_for=joekoe_cms.web_cookies&"_put_"
go_back="<input type=button name=go_back value='返回上一页' onclick=""javascript:history.back(1);"">"
class_td=" class=bg_td"
tit="发布信息"
call web_head(0,1,0,0,0)
call web_center(0)
%>
<table  width=777>
<tr><td  width=777>&nbsp;<%response.write img_skin("m_user")&tit%></td></tr>
<form name=add_frm action='?action=<%response.write action%>' method=post onsubmit="javascript:frm_submitonce(this);">
<form name=add_frm action='?action=<%response.write action%>' method=post onsubmit=<%if action="job" then%>"return job_true()"<%else%>"javascript:frm_submitonce(this);"<%end if%>>
<input type=hidden name=chk value='yes'>
<input type=hidden name=upid value=''>
<%
select case action
  case "house"
  nsort=action
  index_url="house"
  data_name="house"
  tit_fir="房源"
  if int(format_mid_num(46))=1 then
   if int(dim_num(46))>login_emoney then
    call admin_error("注意：发布"&tit_fir&"需要 <font class=red>"&dim_num(46)&"</font> "&web_dim(9)&"，您只拥有 <font class=blue>"&login_emoney&"</font> "&web_dim(9)&"，不够支付！")
   else
      call put_house()
   end if
  else
    call put_close("发布")
  end if
case "pris"
  nsort=action
  index_url="pris"
  data_name="pris"
  tit_fir="企业"
  if int(format_mid_num(45))=1 then
   if int(dim_num(45))>login_emoney then
    call admin_error("注意：发布"&tit_fir&"需要 <font class=red>"&dim_num(45)&"</font> "&web_dim(9)&"，您只拥有 <font class=blue>"&login_emoney&"</font> "&web_dim(9)&"，不够支付！")
   else
      call put_pris()
   end if
  else
    call put_close("发布")
  end if
case "eat"
  nsort=action
  index_url="eat"
  data_name="eat"
  tit_fir="休闲街"
  if int(format_mid_num(4))=1 then
    call put_eat()
  else
    call put_close("推荐")
  end if
case "car"
  nsort=action
  index_url="car"
  data_name="car"
  tit_fir="汽车城"
  if int(format_mid_num(6))=1 then
    call put_car()
  else
    call put_close("推荐")
  end if
case "flea"
  nsort=action
  index_url="flea"
  data_name="flea"
  tit_fir="市场"
  if int(format_mid_num(40))=1 then
    call put_flea()
  else
    call put_close("发布")
  end if
end select
response.write vbcrlf&"</table>"
response.write ukong
'----------------------------中间 结束----------------------------
call web_end(0,0)
sub put_close(tvar)
  response.write "<tr class=bg_td><td colspan=2 height=200 align=center><font class=red>对不起！本站暂时关闭 <font class=blue>"&tvar&tit_fir&"</font> 的功能。</font><br><br>如有需要，请与管理员联系。谢谢！</td></tr>"
end sub

sub admin_error(tvar)
  response.write vbcrlf&"<tr class=bg_td><td colspan=2 align=center><br>"&tvar&"<br><br>"&go_back&"<br><br></td></tr>"
end sub

function chk()
  chk=joekoe_cms.chk()
  if session(session_for&"addfrm")=false then chk=false
end function

sub form_first()
  session(session_for&"addfrm")=true
end sub

sub admin_msg(tvar)
  session(session_for&"addfrm")=false
if action="music" then
    call joekoe_cms.exec("update user_data set integral=integral+"&int(music_dim(8))&" where username='"&login_username&"'",0)
  else
    call joekoe_cms.exec("update user_data set integral=integral+"&int(dim_num(24))&" where username='"&login_username&"'",0)
  end if
%>
<tr ><td  align=center><font class=red>已成功<%response.write tvar%>了一个<%response.write tit_fir%>！</font><br><br>请等待管理审核通过……</td></tr>
<%
end sub

sub put_eat()
  dim topic,keyes,comto,lxfs,lxr,username,tim,counter,istop,hidden,pic,ispic,word
  if chk() then
    topic=code_admin("topic",1,40)
    word=request.form("word")
    csid=trim(request.form("c_id"))
    if cs_nd(csid)=false then
      call admin_error("请选择 "&tit_fir&"类型 ！")
      exit sub
    end if
    if topic="" or word="" then
      call admin_error(tit_fir&"标题 和 "&tit_fir&"内容 不能为空！")
      exit sub
    end if
    keyes=code_admin("keyes",1,20)
    comto=code_admin("comto",1,20)
	lxfs=code_admin("lxfs",1,20)
	lxr=code_admin("lxr",1,20)
    username=code_admin("username",1,20)
    if symbol_name(username)=false then username=login_username
    tim=joekoe_cms.now_time
    pic=code_admin("pic",1,100)
    ispic=true
    if pic="" then ispic=false
    counter=0
    istop=0
    hidden=false
    call chk_cid_sid()
    sql="select * from "&data_name
    call joekoe_cms.exec(sql,-1)
    rs.open sql,conn,1,3
    rs.addnew
    rs("c_id")=cid
    rs("s_id")=sid
    rs("cod")=cod_type()
    rs("topic")=topic
    rs("comto")=comto
	rs("lxfs")=lxfs
	rs("lxr")=lxr
    rs("username")=username
    rs("tim")=tim
    rs("counter")=counter
    rs("istop")=istop
    rs("hidden")=hidden
    rs("keyes")=keyes
    rs("pic")=pic
    rs("ispic")=ispic
    rs("word")=word
    rs.update
    rs.close
    call upload_note(index_url,first_id(data_name,"id"))
    call admin_msg("发布")
    exit sub
  end if
  call form_first()
  ispic=joekoe_cms.rand_file(index_url)
%>
<tr class=bg_td>
<td width='15%'><%response.write tit_fir%>标题：</td>
<td width='85%'><input type=text name=topic size=60 maxlength=40><%response.write redx%></td>
</tr>
<tr class=bg_td>
<td><%response.write tit_fir%>分类：</td>
<td><%call chk_csid(nsort,cid,sid)%></td>
</tr>
<tr class=bg_td>
<td><%response.write tit_fir%>关键字：</td>
<td><%call frm_keyes("")%></td>
</tr>
<tr class=bg_td>
<td>地 址：</td>
<td><input type=text name=comto size=20 maxlength=50>&nbsp;&nbsp;<%response.write tit_fir%>发布人：<input type=text name=username value='<%response.write login_username%>' size=20 maxlength=20></td>
</tr>
<tr class=bg_td>
<td>联系方式：</td>
<td><input type=text name=lxfs size=20 maxlength=20>&nbsp;&nbsp; 联 系 人：<input type=text name=lxr size=20 maxlength=20></td>
</tr>
<%call html_edit(1,"add_frm","word"," class=bg_td")%>
<tr class=bg_td>
<td valign=top><%response.write tit_fir%>内容：</td>
<td><textarea name=word rows=15 cols=65></textarea></td>
</tr>
<tr class=bg_td>
<td><%response.write tit_fir%>图片：</td>
<td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100>&nbsp;&nbsp;&nbsp;<a href='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a>&nbsp;&nbsp;<a href='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write left(index_url,1)%>&uptext=word' target=upload_frame>上传至内容</a></td>
</tr>
<tr class=bg_td>
<td>上传图片：</td>
<td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
</tr>
<%
  call submit_add()
end sub
sub put_car()
  dim topic,keyes,comto,lxfs,lxr,username,tim,counter,istop,hidden,pic,ispic,word
  if chk() then
    topic=code_admin("topic",1,40)
    word=request.form("word")
    csid=trim(request.form("c_id"))
    if cs_nd(csid)=false then
      call admin_error("请选择 "&tit_fir&"类型 ！")
      exit sub
    end if
    if topic="" or word="" then
      call admin_error(tit_fir&"标题 和 "&tit_fir&"内容 不能为空！")
      exit sub
    end if
    keyes=code_admin("keyes",1,20)
    comto=code_admin("comto",1,20)
	lxfs=code_admin("lxfs",1,20)
	lxr=code_admin("lxr",1,20)
    username=code_admin("username",1,20)
    if symbol_name(username)=false then username=login_username
    tim=joekoe_cms.now_time
    pic=code_admin("pic",1,100)
    ispic=true
    if pic="" then ispic=false
    counter=0
    istop=0
    hidden=false
    call chk_cid_sid()
    sql="select * from "&data_name
    call joekoe_cms.exec(sql,-1)
    rs.open sql,conn,1,3
    rs.addnew
    rs("c_id")=cid
    rs("s_id")=sid
    rs("cod")=cod_type()
    rs("topic")=topic
    rs("comto")=comto
	rs("lxfs")=lxfs
	rs("lxr")=lxr
    rs("username")=username
    rs("tim")=tim
    rs("counter")=counter
    rs("istop")=istop
    rs("hidden")=hidden
    rs("keyes")=keyes
    rs("pic")=pic
    rs("ispic")=ispic
    rs("word")=word
    rs.update
    rs.close
    call upload_note(index_url,first_id(data_name,"id"))
    call admin_msg("发布")
    exit sub
  end if
  call form_first()
  ispic=joekoe_cms.rand_file(index_url)
%>
<tr class=bg_td>
<td width='15%'><%response.write tit_fir%>标题：</td>
<td width='85%'><input type=text name=topic size=60 maxlength=40><%response.write redx%></td>
</tr>
<tr class=bg_td>
<td><%response.write tit_fir%>分类：</td>
<td><%call chk_csid(nsort,cid,sid)%></td>
</tr>
<tr class=bg_td>
<td><%response.write tit_fir%>关键字：</td>
<td><%call frm_keyes("")%></td>
</tr>
<tr class=bg_td>
<td>地 址：</td>
<td><input type=text name=comto size=20 maxlength=50>&nbsp;&nbsp;<%response.write tit_fir%>发布人：<input type=text name=username value='<%response.write login_username%>' size=20 maxlength=20></td>
</tr>
<tr class=bg_td>
<td>联系方式：</td>
<td><input type=text name=lxfs size=20 maxlength=20>&nbsp;&nbsp; 联 系 人：<input type=text name=lxr size=20 maxlength=20></td>
</tr>
<%call html_edit(1,"add_frm","word"," class=bg_td")%>
<tr class=bg_td>
<td valign=top><%response.write tit_fir%>内容：</td>
<td><textarea name=word rows=15 cols=65></textarea></td>
</tr>
<tr class=bg_td>
<td><%response.write tit_fir%>图片：</td>
<td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100>&nbsp;&nbsp;&nbsp;<a href='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a>&nbsp;&nbsp;<a href='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write left(index_url,1)%>&uptext=word' target=upload_frame>上传至内容</a></td>
</tr>
<tr class=bg_td>
<td>上传图片：</td>
<td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
</tr>
<%
  call submit_add()
end sub
sub put_flea()
  dim name,isgood,remark,nname,email,price,url,phone,types,pic,ispic,username,tim,address,otim,submit_add 
  if chk() then
    name=code_admin("name",1,50)
    csid=trim(request.form("c_id"))
    nname=code_admin("nname",1,100)
    email=code_admin("email",1,100)
    remark=code_admin("remark",1,250)
	address=code_admin("address",1,100)
	tim=code_admin("tim",1,20)
    tim=joekoe_cms.time_type(tim,1)
    if tim="" then tim=joekoe_cms.now_time
	otim=code_admin("otim",1,20)
    if cs_nd(csid)=false then
      call admin_error("请选择 "&tit_fir&"类型 ！")
      exit sub
    end if    
	if not(isdate(otim)) or instr(otim,"-")=0 or instr(otim,":")>0 then
      call admin_error(tit_fir&"的 <font class=red>过期时间</font> 为空或不符合规则！")
      exit sub
    end if
    if name="" or nname="" or remark="" or email_ok(email,50)=false then 
      call admin_error(tit_fir&"名称、联系人、电子邮件、"&tit_fir&"说明 为空或电子邮件不符合规则！")
      exit sub
    end if
	if trim(request.form("read"))<>"yes" then
      call admin_error("抱歉，必须阅读并同意下面的声明才能发布！")
      exit sub
    end if
    isgood=0
    username=code_admin("username",1,20)
    types=code_admin("types",1,100)  
    price=code_admin("price",1,100)
    url=code_admin("url",1,100)
    if url="http://" or isnull(url) then url=""
    phone=code_admin("phone",1,100)
    pic=code_admin("pic",1,100)
      call chk_cid_sid()
      sql="select * from "&data_name
      rs.open sql,conn,1,3
      rs.addnew
      rs("c_id")=cid
      rs("s_id")=sid
      rs("username")=login_username
      rs("types")=types
      rs("hidden")=true_hidden
      rs("name")=name
      rs("nname")=nname
      rs("remark")=remark
      rs("email")=email
      rs("price")=price
      rs("url")=url
      rs("phone")=phone
      rs("isgood")=isgood
      if len(pic)<3 then
        rs("pic")=""
      else
        rs("pic")=pic
      end if
      rs("tim")=tim
	  rs("otim")=otim
      rs("counter")=0
	  rs("address")=address
      rs.update
      rs.close
      call upload_note(index_url,first_id(data_name,"id"))
      call joekoe_cms.exec("update user_data set emoney=emoney-"&dim_num(27)&" where username='"&login_username&"'",0)
      call admin_msg("推荐")
    exit sub
  end if
  call form_first()
  ispic=joekoe_cms.rand_file(nsort)
%>
  <tr class=bg_td><td  align=center height=30>发布信息注意事项：发布一条信息将扣取您 <font class=red2><%response.write dim_num(27)%></font> <%response.write joekoe_cms.web_unit%>，标有“<%response.write redx%>”为必填项。</td></tr>
  <tr class=bg_td>
  <td width='18%'><%response.write tit_fir%>名称：</td>
  <td width='82%'><input type=text size=50 name=name value='' maxlength=50><%response.write redx%></td>
  </tr>
  <tr class=bg_td>
  <td><%response.write tit_fir%>类型：</td>
  <td><%call chk_csid(nsort,cid,sid)%></td>
  </tr> 
  <tr class=bg_td>
  <td>供需类型：</td>
  <td><select name=types size=1>
  <option value='供方' selected>供方</option>
  <option value='求方'>求方</option>
  </select></td>
  </tr>
  <tr class=bg_td>
  <td>发布时间：</td>
  <td><input type=text name=tim value='<%response.write joekoe_cms.now_time%>' size=28 maxlength=40>&nbsp;<input type=button name=st_btn value="选择" onclick="javascript:select_time(tim);return false;"></td>
  </tr>
  <tr class=bg_td>
  <td>过期时间：</td>
  <td><input type=text name=otim value='' size=28>&nbsp;<input type=button name=st_btn value="选择" onclick="javascript:select_time(otim);return false;">&nbsp;&nbsp;<%response.write redx%></td>
  </tr>
  <tr class=bg_td>
  <td>联 系 人：</td>
  <td><input type=text size=10 name=nname maxlength=50><%=redx%>&nbsp;&nbsp;发 布 人：<input type=text size=11 name=username  value='<%response.write login_username%>' maxlength=50 disabled>&nbsp;&nbsp;交易价格：<input type=text size=20 name=price value='' maxlength=20></td></tr>
  <tr class=bg_td>
  <td>联系地址：</td>
  <td><input type=text size=62 name=address value='' maxlength=100></td>
  </tr>
  <tr class=bg_td>
  <td>电子邮件：</td>
  <td><input type=text size=20 name=email maxlength=50><%response.write redx%>&nbsp;&nbsp;联系电话：<input type=text size=20 name=phone value='' maxlength=50></td>
  </tr>
  <tr class=bg_td>
  <td>相关网址：</td>
  <td><input type=text size=54 name=url value='http://' maxlength=100></td>
  </tr>
  <tr class=bg_td>
  <td valign=top class=htd><br><%response.write tit_fir%>说明：<br><=250B</td>
  <td>
  <table border=0><tr>
  <td><textarea name=remark rows=8 cols=65></textarea></td>
  <td width=5></td>
  <td valign=bottom><%call textarea_resize("remark")%></td>
  </tr></table>
  </td>
  </tr>
  <tr class=bg_td>
  <td><%response.write tit_fir%>图片：</td>
  <td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100></td></tr>
  <tr class=bg_td>
  <td>上传图片：</td>
  <td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
  </tr>
  <tr class=bg_tds>
	<td></td>
	<td height=30><input type=submit value='提交<%response.write tit_fir%>发布'>　　<input type=reset value='重新填写'>　　<input type=checkbox name=read value='yes' class=bg_tds> 请阅读并同意下面的声明</td>
	</tr></form>
<tr><td align=middle class=bg_td>
<table class=bg_td>
<tbody><tr>
<td align=middle>
<fieldset style="width: 100%" align=center><legend>
<table style="border-right: #808080 1px solid; border-top: #808080 1px solid; border-left: #808080 1px solid; border-bottom: #808080 1px solid" cellspacing=0 cellpadding=0 width=200 border=0>
<tbody>
<tr><td valign=bottom align=middle height=18><font color=#ff0000><b>请您仔细阅读下面的郑重声明</b></font></td></tr>
</tbody></table></legend>
<table cellspacing=0 cellpadding=0 width="98%" align=center border=0>
<tbody>
<tr><td height=5></td></tr>
<tr><td class=htd>1、禁止发布含有色情和反动言论以及与国家法律法规相抵触的任何信息；禁止发布在网上对他人进行人身攻击评议的言论……等信息。
<br>2、信息发布者提供的信息必须是真实可靠的，不得有欺骗行为否则后果自负；每条信息的发布不得超过二百五十个字节；敬请不要进行重复发布。
<br>3、这里的信息发布是全免费的，<%response.write web_dim(1)%>对其不负任何的法律责任（由发布者自负责任敬请郑重），<%response.write web_dim(1)%>有选择和删除权。</td></tr>
<tr><td height=5></td></tr>
</tbody></table></fieldset> 
</td></tr></tbody></table>
</td></tr>
<%
end sub
sub submit_add()
  response.write vbcrlf&"<tr class=bg_tds>" & _
		 vbcrlf&"<td></td>" & _
		 vbcrlf&"<td height=30><input type=submit value='提交添加'>　　<input type=reset value='重新填写'>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
end sub

sub put_flea()
dim name,isgood,remark,nname,email,price,url,sdays,phone,types,tim,pic,ispic,username,hidden,now_time,m,p,pe:pe=dim_num(27)
m=dim_num(27)
p=login_emoney
if chk() then
name=code_admin("name",1,50)
csid=trim(request.form("c_id"))
nname=code_admin("nname",1,100)
email=code_admin("email",1,100)
remark=code_admin("remark",1,250)
if len(p)<-len(m)<0 then 
response.write vbcrlf&"<tr class=bg_td><td colspan=2 align=center><br><font class=blue>您没有足够的"&web_dim(9)&"<font class=red> <b></b></font> 发布市场信息！</font><br><br><font class=red>（每发布一次市场信息需要 <b>"&pe&"</b> !您拥有"&login_emoney&""&web_dim(9)&"不够支付！）</font><br><br><a href='user_emoney.asp'><b>去购买或兑换 </b></a></td></tr>"
exit sub
end if
if cs_nd(csid)=false then
call admin_error("请选择 "&tit_fir&"类型 ！")
exit sub
end if
if name="" or nname="" or email="" or remark="" then 
call admin_error(tit_fir&"你的姓名、交易名称、地址和联系方法 不能为空！")
exit sub
end if
isgood=false
hidden=false
username=code_admin("username",1,20)
types=code_admin("types",1,100) 
price=code_admin("price",1,100)
tim=code_admin("tim",1,100)
url=code_admin("url",1,100)
phone=code_admin("phone",1,100)
pic=code_admin("pic",1,100)
sdays=trim(request("days"))
call chk_cid_sid()
sql="select * from "&data_name
rs.open sql,conn,1,3
rs.addnew
rs("c_id")=cid
rs("s_id")=sid
rs("username")=login_username
rs("types")=types
rs("hidden")=hidden
rs("name")=name
rs("ip")=user_ip
rs("nname")=nname
rs("remark")=remark
rs("email")=email
rs("price")=price
rs("tim")=now()
rs("dqsj")= dateadd("d", sdays, now)
rs("url")=url
rs("phone")=phone
rs("isgood")=isgood
if len(pic)<3 then
rs("pic")="no_pic.gif"
else
rs("pic")=pic
end if
rs("counter")=0
rs.update
rs.close
call upload_note(index_url,first_id(data_name,"id"))
sql="update user_data set emoney=emoney-"&pe&" where username='"&login_username&"'"
conn.execute(sql)
call admin_msg("推荐")
exit sub
end if
call form_first()
ispic=joekoe_cms.rand_file(nsort)
%>
<tr class=bg_td><td colspan=2 align=center height=30>发布信息注意事项：发布一条信息将扣取您 <font class=red2><%response.write dim_num(27)%></font> <%response.write joekoe_cms.web_unit%>，标有“*”为必填项。</td></tr>
<tr class=bg_td><td width='15%'><%response.write tit_fir%>名称：</td><td width='85%'><input type=text size=60 name=name value='' maxlength=50><%response.write redx%></td></tr>
<tr class=bg_td><td><%response.write tit_fir%>类型：</td><td><font color=blue><b><%call chk_csid(nsort,cid,sid)%></b></font>   
供需类型：<select name=types size=1>
<option value='供方' selected>供方</option>
<option value='求方'>求方</option>
</select><%response.write redx%></td></tr>

<tr class=bg_td>
  <td>有效期限：</td>
  <td>&nbsp;<select name="days">
<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" selected>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>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
</select></td>
  </tr>
<tr class=bg_td><td>交易价格：</td><td><input type=text size=20 name=price value='元' maxlength=20>  联 系 人：<input type=text size=20 name=nname maxlength=50 value='延安生活信息网'><%=redx%></td></tr>
<tr class=bg_td><td>联系地址：</td><td><input type=text size=70 name=url value='' maxlength=100></td></tr>
<tr class=bg_td><td>联系电话：</td><td><input type=text size=20 name=phone value='未知' maxlength=50>  电子邮件：<input type=text size=20 name=email maxlength=50 value='@'></td></tr>
<tr class=bg_td>
<td><%response.write tit_fir%>图片：</td>
<td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100>   <a href='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a></td></tr>
<tr class=bg_td>
<td>上传图片：</td>
<td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
</tr>
<tr class=bg_td><td valign=top class=htd><br>交易说明：<br><=250B</td><td><textarea name=remark rows=5 cols=70></textarea></td></tr>
<%
call submit_add()
end sub


sub put_pris()
  dim name,isgood,remark,dname,fname,yzbm,sname,nname,yname,email,price,url,phone,types,pic,ispic,username,hidden,tim,address
  if chk() then
    name=code_admin("name",1,50)
    csid=trim(request.form("c_id"))
    nname=code_admin("nname",1,100)
	sname=code_admin("sname",1,100)
	yname=code_admin("yname",1,100)
	dname=code_admin("dname",1,100)
	fname=code_admin("fname",1,100)
	yzbm=code_admin("yzbm",1,100)
    email=code_admin("email",1,100)
    remark=code_admin("remark",1,250)
	address=code_admin("address",1,100)
    if trim(request.form("read"))<>"yes" then
      call admin_error("抱歉，必须阅读并同意下面的声明才能发布！")
      exit sub
    end if
    if cs_nd(csid)=false then
      call admin_error("请选择 "&tit_fir&"类型 ！")
      exit sub
    end if
    if name="" or nname="" or remark=false then 
      call admin_error(tit_fir&"名称、联系人、电子邮件、"&tit_fir&"说明 为空或电子邮件不符合规则！")
      exit sub
    end if
    tim=joekoe_cms.now_time
    isgood=false
    hidden=false
    username=code_admin("username",1,20)
    types=code_admin("types",1,100)  
    price=code_admin("price",1,100)
    url=code_admin("url",1,100)
    if url="http://" or isnull(url) then url=""
    phone=code_admin("phone",1,100)
    pic=code_admin("pic",1,100)
      call chk_cid_sid()
      sql="select * from "&data_name
      rs.open sql,conn,1,3
      rs.addnew
      rs("c_id")=cid
      rs("s_id")=sid
      rs("username")=login_username
      rs("types")=types
      rs("hidden")=hidden
      rs("name")=name
      rs("dname")=dname
	  rs("fname")=fname
      rs("nname")=nname
	  rs("sname")=sname
	  rs("yname")=yname
      rs("remark")=remark
	  rs("yzbm")=yzbm
	  rs("fname")=fname
      rs("remark")=remark
      rs("email")=email
      rs("price")=price
      rs("url")=url
      rs("phone")=phone
      rs("isgood")=isgood
      if len(pic)<3 then
        rs("pic")=""
      else
        rs("pic")=pic
      end if
      rs("tim")=tim
      rs("counter")=0
	  rs("address")=address
      rs.update
      rs.close
      call upload_note(index_url,first_id(data_name,"id"))
      call joekoe_cms.exec("update user_data set emoney=emoney-"&dim_num(42)&" where username='"&login_username&"'",0)
      call admin_msg("推荐")
    exit sub
  end if
  call form_first()
  ispic=joekoe_cms.rand_file(nsort)
%>
  <tr class=bg_td><td colspan=2 align=center height=30>发布企业信息注意事项：发布一条企业信息将扣取您 <font class=red2><%response.write dim_num(45)%></font> <%response.write joekoe_cms.web_unit%>，标有“*”为必填项。</td></tr>
  <tr class=bg_td><td width='15%'><%response.write tit_fir%>名称：</td><td width='85%'><input type=text size=62 name=name value='' maxlength=50><%response.write redx%></td></tr>
  <tr class=bg_td><td><%response.write tit_fir%>类型：</td><td><font color=blue><b><%call chk_csid(nsort,cid,sid)%></b></font>&nbsp;
 <%response.write tit_fir%>性质：<select name=types size=1>
  <option value='社会团体'>社会团体</option>
  <option value='事业单位'>事业单位</option>
  <option value='国有企业'>国有企业</option>
  <option value='三资企业'>三资企业</option>
  <option value='集体企业'>集体企业</option>
  <option value='乡镇企业'>乡镇企业</option>
  <option value='私营企业'>私营企业</option>
  </select><%response.write redx%></td></tr>
  <tr class=bg_td><td>注册资金：</td><td><input type=text size=20 name=price value='未填写' maxlength=20><%response.write redx%>万人民币&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;联 系 人：<input type=text size=10 name=nname maxlength=50 value='未填写'><%=redx%></td></tr>
  <tr class=bg_td><td>法人代表：</td><td><input type=text size=20 name=fname value='未填写' maxlength=20><%response.write redx%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发布人：<font class=blue><%=login_username%></font></td></tr>
  <tr class=bg_td><td>员工人数：</td><td><input type=text size=20 name=yname value='未填写' maxlength=50><%response.write redx%>个人&nbsp;&nbsp;&nbsp;&nbsp;成立时间：<input type=text size=20 name=sname maxlength=50 value='2004-10-01'><%response.write redx%></td></tr>
  <tr class=bg_td><td>所在地区：</td><td><select name=dname size=1>
  <option value='北京市' selected>北京市</option>
  <option value='天津市'>天津市</option>
  <option value='上海市'>上海市</option>
  <option value='重庆市'>重庆市</option>
  <option value='山西省'>山西省</option>
  <option value='安徽省'>安徽省</option>
  <option value='福建省'>福建省</option>
  <option value='甘肃省'>甘肃省</option>
  <option value='广东省'>广东省</option>
  <option value='广西省'>广西省</option>
  <option value='河南省'>河南省</option>
  <option value='河北省'>河北省</option>
  <option value='四川省'>四川省</option>
  <option value='贵州省'>贵州省</option>
  <option value='湖北省'>湖北省</option>
  <option value='湖南省'>湖南省</option>
  <option value='吉林省'>吉林省</option>
  <option value='江苏省'>江苏省</option>
  <option value='江西省'>江西省</option>
  <option value='辽宁省'>辽宁省</option>
  <option value='青海省'>青海省</option>
  <option value='山东省'>山东省</option>
  <option value='陕西省'>陕西省</option>
  <option value='云南省'>云南省</option>
  <option value='浙江省'>浙江省</option>
  <option value='台湾省'>台湾省</option>
  <option value='黑龙江省'>黑龙江省</option>
  <option value='宁夏自治区'>宁夏自治区</option>
  <option value='新疆自治区'>新疆自治区</option>
  <option value='西藏自治区'>西藏自治区</option>
  <option value='内蒙古自治区'>内蒙古自治区</option>
  <option value='香港特别行政区'>香港特别行政区</option>
  <option value='澳门特别行政区'>澳门特别行政区</option>
  </select><%response.write redx%>&nbsp;&nbsp;邮政编码：<input type=text size=20 name=yzbm value='未填写' maxlength=100><%response.write redx%></td></tr>
  <tr class=bg_td><td>联系地址：</td><td><input type=text size=62 name=address value='' maxlength=100><%response.write redx%></td></tr>
  <tr class=bg_td><td>联系电话：</td><td><input type=text size=20 name=phone value='未填写' maxlength=50><%response.write redx%>&nbsp;&nbsp;电子邮件：<input type=text size=20 name=email maxlength=50 value='@'><%response.write redx%></td></tr>
  <tr class=bg_td><td>相关网址：</td><td><input type=text size=54 name=url value='http://' maxlength=100></td></tr>
  <tr class=bg_td><td valign=top class=htd><br><%response.write tit_fir%>说明：<br><=250B</td><td><textarea name=remark rows=5 cols=65></textarea></td></tr>
  <tr class=bg_td>
  <td><%response.write tit_fir%>图片：</td>
  <td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100></td></tr>
  <tr class=bg_td>
  <td>上传图片：</td>
  <td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
  </tr>
  <tr class=bg_tds>
	<td></td>
	<td height=30><input type=submit value='提交<%response.write tit_fir%>发布'>　　<input type=reset value='重新填写'>　　<input type=checkbox name=read value='yes' checked class=bg_tds style='display:none'> 发布前请阅读并同意下面的声明</td>
	</tr></form>
<tr><td align=middle colspan=2 class=bg_td>
<table class=bg_td>
<tbody><tr>
<td align=middle>
<fieldset style="width: 100%" align=center><legend>
<table style="border-right: #808080 1px solid; border-top: #808080 1px solid; border-left: #808080 1px solid; border-bottom: #808080 1px solid" cellspacing=0 cellpadding=0 width=200 border=0>
<tbody>
<tr><td valign=bottom align=middle height=18><font color=#ff0000><b>请您仔细阅读下面的郑重声明</b></font></td></tr>
</tbody></table></legend>
<table cellspacing=0 cellpadding=0 width="98%" align=center border=0>
<tbody>
<tr><td height=5></td></tr>
<tr><td class=htd>1、禁止发布含有色情和反动言论以及与国家法律法规相抵触的任何信息；禁止发布在网上对他人进行人身攻击评议的言论……等信息。
<br>2、信息发布者提供的信息必须是真实可靠的，不得有欺骗行为否则后果自负；每条信息的发布不得超过二百五十个字节；敬请不要进行重复发布。
<br>3、这里的信息发布是全免费的，<%response.write web_dim(1)%>对其不负任何的法律责任（由发布者自负责任敬请郑重），<%response.write web_dim(1)%>有选择和删除权。</td></tr>
<tr><td height=5></td></tr>
</tbody></table></fieldset> 
</td></tr></tbody></table>
</td></tr>
<%
end sub
sub put_house()
  dim name,isgood,remark,dname,fname,yzbm,sname,nname,yname,email,price,url,phone,types,pic,ispic,username,hidden,tim,address
  if chk() then
    name=code_admin("name",1,50)
    csid=trim(request.form("c_id"))
    nname=code_admin("nname",1,100)
	sname=code_admin("sname",1,100)
	yname=code_admin("yname",1,100)
	dname=code_admin("dname",1,100)
	fname=code_admin("fname",1,100)
	yzbm=code_admin("yzbm",1,100)
    email=code_admin("email",1,100)
    remark=code_admin("remark",1,250)
	address=code_admin("address",1,100)
    if trim(request.form("read"))<>"yes" then
      call admin_error("抱歉，必须阅读并同意下面的声明才能发布！")
      exit sub
    end if
    if cs_nd(csid)=false then
      call admin_error("请选择 "&tit_fir&"类型 ！")
      exit sub
    end if
    if name="" or nname="" or remark=false then 
      call admin_error(tit_fir&"名称、联系人、电子邮件、"&tit_fir&"说明 为空或电子邮件不符合规则！")
      exit sub
    end if
    if address=""  then 
      call admin_error("地址不能为空！")
      exit sub
    end if

    tim=joekoe_cms.now_time
    isgood=false
    hidden=false
    username=code_admin("username",1,20)
    types=code_admin("types",1,100)  
    price=code_admin("price",1,100)
    url=code_admin("url",1,100)
    if url="http://" or isnull(url) then url=""
    phone=code_admin("phone",1,100)
    pic=code_admin("pic",1,100)
      call chk_cid_sid()
      sql="select * from "&data_name
      rs.open sql,conn,1,3
      rs.addnew
      rs("c_id")=cid
      rs("s_id")=sid
      rs("username")=login_username
      rs("types")=types
      rs("hidden")=hidden
      rs("name")=name
      rs("dname")=dname
	  rs("fname")=fname
      rs("nname")=nname
	  rs("sname")=sname
	  rs("yname")=yname
      rs("remark")=remark
	  rs("yzbm")=yzbm
	  rs("fname")=fname
      rs("remark")=remark
      rs("email")=email
      rs("price")=price
      rs("url")=url
      rs("phone")=phone
      rs("isgood")=isgood
      if len(pic)<3 then
        rs("pic")=""
      else
        rs("pic")=pic
      end if
      rs("tim")=tim
      rs("counter")=0
	  rs("address")=address
      rs.update
      rs.close
      call upload_note(index_url,first_id(data_name,"id"))
      call joekoe_cms.exec("update user_data set emoney=emoney-"&dim_num(42)&" where username='"&login_username&"'",0)
      call admin_msg("推荐")
    exit sub
  end if
  call form_first()
  ispic=joekoe_cms.rand_file(nsort)
%>
  <tr class=bg_td><td colspan=2 align=center height=30>发布信息注意事项：发布一条信息将扣取您 <font class=red2><%response.write dim_num(46)%></font> <%response.write joekoe_cms.web_unit%>，标有“*”为必填项。</td></tr>
  <tr class=bg_td><td width='15%'><%response.write tit_fir%>地址：</td>
  <td width='85%'><input type=text size=62 name=name value='' maxlength=50><%response.write redx%></td></tr>
  <tr class=bg_td><td><%response.write tit_fir%>类别：</td><td><%call chk_csid(nsort,cid,sid)%>&nbsp;&nbsp;&nbsp;
 物业类型：<select name=types size=1>
  <option value='普通住房'>普通住房</option>
  <option value='商用房'>商用房</option>
  <option value='二手房'>二手房</option>
  <option value='门面'>门面</option>
  </select><%response.write redx%></td></tr>
  <tr class=bg_td><td>房 价：</td><td><input type=text size=15 name=price value='500/月' maxlength=20><%response.write redx%>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;房屋结构：<select name=dname size=1>
  <option value='仅单间' selected>仅单间</option>
  <option value='单间1卫'>单间1卫</option>
  <option value='单间1厨1卫'>单间1厨1卫</option>
  <option value='1室1厅1厨1卫'>1室1厅1厨1卫</option>
  <option value='2室1厅1厨1卫'>2室1厅1厨1卫</option>
  <option value='2室2厅1厨1卫'>2室2厅1厨1卫</option>
  <option value='2室2厅2厨2卫'>2室2厅2厨2卫</option>
  <option value='3室1厅1厨1卫'>3室1厅1厨1卫</option>
  <option value='3室1厅2厨2卫'>3室1厅2厨2卫</option>
  <option value='3室2厅1厨1卫'>3室2厅1厨1卫</option>
  <option value='3室2厅2厨2卫'>3室2厅2厨2卫</option>
  <option value='其它'>其它</option>
  </select><%response.write redx%> &nbsp;建筑面积<input type=text size=4 name=url value='100' maxlength=100>平方米</td></tr>
  <tr class=bg_td><td>设施设备：</td><td><input type=text size=26 name=fname value='水、电齐全' maxlength=20><%response.write redx%>如：水、电、宽带、家具。&nbsp;&nbsp;注册用户：<font class=blue><%=login_username%></font></td></tr>
  <tr class=bg_td><td>楼 层：</td><td><input type=text size=20 name=yname value='2楼' maxlength=50><%response.write redx%>如：4楼、平街&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;有效时间：<input type=text value='7'  size=4 name=sname maxlength=50>天<%response.write redx%></td></tr>
  <tr class=bg_td><td>联 系 人：</td><td> 
    <input type=text size=10 name=nname maxlength=50 value='未公布'><%=redx%>&nbsp;&nbsp;邮政编码：<input type=text size=20 name=yzbm value='未公布' maxlength=100><%response.write redx%></td></tr>
  <tr class=bg_td><td>联系地址：</td><td><input type=text size=62 name=address value='' maxlength=100><%response.write redx%></td></tr>
  <tr class=bg_td><td>联系电话：</td><td><input type=text size=20 name=phone value='未公布' maxlength=50><%response.write redx%>&nbsp;&nbsp;电子邮件：<input type=text size=20 name=email maxlength=50 value='@'><%response.write redx%></td></tr>
  <tr class=bg_td><td valign=top class=htd><br><%response.write tit_fir%>说明：<br><=250B</td><td><textarea name=remark rows=5 cols=65></textarea></td></tr>
  <tr class=bg_td>
  <td><%response.write tit_fir%>图片：</td>
  <td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100></td></tr>
  <tr class=bg_td>
  <td>上传图片：</td>
  <td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
  </tr>
  <tr class=bg_tds>
	<td></td>
	<td height=30><input type=submit value='提交<%response.write tit_fir%>发布'>　　<input type=reset value='重新填写'>　　<input type=checkbox name=read value='yes' class=bg_tds checked style='display:none'> 发布前请阅读并同意下面的声明</td>
	</tr></form>
<tr><td align=middle colspan=2 class=bg_td>
<table class=bg_td>
<tbody><tr>
<td align=middle>
<fieldset style="width: 100%" align=center><legend>
<table style="border-right: #808080 1px solid; border-top: #808080 1px solid; border-left: #808080 1px solid; border-bottom: #808080 1px solid" cellspacing=0 cellpadding=0 width=200 border=0>
<tbody>
<tr><td valign=bottom align=middle height=18><font color=#ff0000><b>请您仔细阅读下面的郑重声明</b></font></td></tr>
</tbody></table></legend>
<table cellspacing=0 cellpadding=0 width="98%" align=center border=0>
<tbody>
<tr><td height=5></td></tr>
<tr><td class=htd>1、禁止发布含有色情和反动言论以及与国家法律法规相抵触的任何信息；禁止发布在网上对他人进行人身攻击评议的言论……等信息。
<br>2、信息发布者提供的信息必须是真实可靠的，不得有欺骗行为否则后果自负；每条信息的发布不得超过二百五十个字节；敬请不要进行重复发布。
<br>3、这里的信息发布是全免费的，本站对其不负任何的法律责任（由发布者自负责任敬请郑重），我们有选择和删除权。</td></tr>
<tr><td height=5></td></tr>
</tbody></table></fieldset> 
</td></tr></tbody></table>
</td></tr>

<%
end sub
%>

