<!-- #include file="include/config_user.asp" -->
<!-- #include file="include/config_upload.asp" -->
<!-- #include file="include/config_frm.asp" -->
<!-- #include file="include/config_put.asp" -->
<!-- #include file="include/conn.asp" -->
<%
dim cid,sid,ispic,pic,nsort,data_name,nid,rs2,sql2,now_id,add_integral,ddim,csid,gongao
add_integral=web_varn(web_num,15)

select case action
case "down"
  tit="添加软件"
case "video"
  tit="添加影视"
case "gallery"
  tit="上传贴图"
case "flash"
  tit="推荐动画"
case "website"
  tit="推荐网站"
case "business"
  tit="交易发布"
case "gongao"
  tit="发表滚动广告"
case "news"
  tit="发布新闻"
case else
  action="article"
  tit="发表文章"
end select

call web_head(2,0,0,0,0)

if int(popedom_format(login_popedom,41)) then call close_conn():call cookies_type("locked")
'------------------------------------left----------------------------------
call left_user()
'----------------------------------left end--------------------------------
call web_center(0)
'-----------------------------------center---------------------------------
response.write ukong&table1
%>
<tr<%response.write table2%>><td class=end>&nbsp;<%response.write img_small(us)%>&nbsp;&nbsp;<b>查看可以发表的信息</b></td></tr>
<tr<%response.write table3%>><td align=center height=30>
<%response.write img_small("jt1")%><a href='?action=news'<%if action="news" then response.write "class=red_3"%>>发布新闻</a>
<%response.write img_small("jt1")%><a href='?action=business'<%if action="business" then response.write "class=red_3"%>>发布交易</a>
<%response.write img_small("jt1")%><a href='?action=article'<%if action="article" then response.write "class=red_3"%>>发表文章</a>
<%response.write img_small("jt1")%><a href='?action=video'<%if action="video" then response.write "class=red_3"%>>添加影视</a>
<%response.write img_small("jt1")%><a href='?action=gongao'<%if action="gongao" then response.write "class=red_3"%>>发布广告</a>
<%response.write img_small("jt1")%><a href='?action=down'<%if action="down" then response.write "class=red_3"%>>添加软件</a>
<%response.write img_small("jt1")%><a href='?action=gallery'<%if action="gallery" then response.write "class=red_3"%>>上传贴图</a>
<%response.write img_small("jt1")%><a href='?action=flash'<%if action="flash" then response.write "class=red_3"%>>推荐动画</a>
<%response.write img_small("jt1")%><a href='?action=website'<%if action="website" then response.write "class=red_3"%>>推荐网站</a>
</td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='94%'>
  <tr><td class=htd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您在发表相关信息后，您的积分将自动增加积分<font class=red><%response.write add_integral%></font>分。如您发表的相关信息示被审核通过而删除，您的积分将被减去相同的数值。请勿乱发表，多次发现乱发表者，将<font class=red>加倍扣除积分</font>！</td></tr>
  </table>
</td></tr>
</table>
<%
response.write ukong&table1
%>
<tr<%response.write table2%>><td class=end>&nbsp;<%response.write img_small(us)%>&nbsp;&nbsp;<b><%response.write tit%></b></td></tr>
<tr<%response.write table3%>><td align=center height=350>
<%
response.write kong
dim fssj:fssj=int(web_var(web_num,25))        '防刷时间设置(单位：秒)
select case action
case "article"
  if int(mid(web_var(web_config,9),2,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="art"
  sql="select top 1 username,tim from article where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_article()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_article()
  end if 
  end if
  end if
case "video"
  if int(mid(web_var(web_config,9),6,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="video"
  sql="select top 1 username,tim from video where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call video_add()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call video_add()
  end if 
  end if
  end if
case "gongao"
  if int(mid(web_var(web_config,9),7,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="art"
  sql="select top 1 username,tim from gongao where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_gongao()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_gongao()
  end if 
  end if
  end if
case "down"
  if int(mid(web_var(web_config,9),3,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="down"
  sql="select top 1 username,tim from down where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_down()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_down()
  end if 
  end if
  end if
case "gallery"
  if int(mid(web_var(web_config,9),4,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="gall"
  sql="select top 1 username,tim from gallery where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_gallery()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_gallery()
  end if 
  end if
  end if
case "flash"
  if int(mid(web_var(web_config,9),8,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="flash"
  sql="select top 1 username,tim from gallery where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_flash()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_flash()
  end if 
  end if
  end if
case "website"
  if int(mid(web_var(web_config,9),5,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="web"
  sql="select top 1 username,tim from website where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_website()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_website()
  end if 
  end if
  end if
case "news"
  if int(mid(web_var(web_config,9),5,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="news"
  sql="select top 1 username,tim from news where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_news()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_news()
  end if 
  end if
  end if
case else
  if int(mid(web_var(web_config,9),9,1))=0 then
    call put_close()
  else
    data_name=action
    nsort="busin"
  sql="select top 1 username,tim from business where username='"&login_username&"' order by id desc"
  set rs=conn.execute(sql)
  if rs.eof then
  rs.close:set rs=nothing
    call put_business()
  else
  if now()-rs("tim")<fssj*0.000011574 then           '大约 0.000011574 为 1 秒
  rs.close:set rs=nothing
  call put_fs()
  else
    call put_business()
  end if 
  end if
  end if
end select

sub put_fs()
  response.write "<font class=red_2>对不起！<font class=blue>"&tit&"</font>起用了防刷新机制，<font class=blue>"&fssj&"</font>秒后才能重新发布，谢谢！</font>"
end sub

%>
</td></tr>
</table>
<br>
<%
'---------------------------------center end-------------------------------
call web_end(0)

sub put_close()
  response.write "<font class=red_2>对不起！本站暂时关闭用户 <font class=blue>"&tit&"</font> 的功能。</font><br><br>如有需要，请与管理员联系。谢谢！"
end sub

sub put_website()
  if trim(request.form("put"))="yes" then
    dim name,url,isgood,country,lang,remark
    name=code_form(request.form("name"))
    csid=trim(request.form("csid"))
    url=code_form(request.form("url"))
    isgood=trim(request.form("isgood"))
    remark=request.form("remark")
    country=trim(request.form("country"))
    lang=trim(request.form("lang"))
    pic=trim(request.form("pic"))
    if len(csid)<1 then
      response.write "<font class=red_2>请选择网站类型！</font><br><br>"&go_back
    elseif len(name)<1 or len(url)<1 then
      response.write "<font class=red_2>网站名称和地址不能为空！</font><br><br>"&go_back
    elseif len(remark)>250 then
      response.write "<font class=red_2>网站说明不能长于250个字符！</font><br><br>"&go_back
    else
      call chk_cid_sid()
      set rs=server.createobject("adodb.recordset")
      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
      if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip"  then
rs("hidden")=true
else
rs("hidden")=false
      end if
      rs("name")=name
      rs("url")=url
      rs("country")=country
      rs("lang")=lang
      rs("remark")=remark
      if isgood="yes" then
        rs("isgood")=true
      else
        rs("isgood")=false
      end if
      rs("username")=login_username
      if len(pic)<3 then
        rs("pic")="no_pic.gif"
      else
        rs("pic")=pic
      end if
      rs("tim")=now_time
      rs("counter")=0
      rs.update
      rs.close:set rs=nothing
      call user_integral("add",web_var(web_num,15),login_username)
      call user_cp("add",web_var(web_num,28),login_username)
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
         response.write "<font class=red>已成功推荐了一个网站</font><br><br>"
      else
	conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功推荐了一个网站</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
  else
%><table border=0 cellspacing=0 cellpadding=3>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%'>网站名称：</td><td width='85%'><input type=text size=70 name=name maxlength=50><%=redx%></td></tr>
  <tr><td>网站类型：</td><td><%call chk_csid(cid,sid)%></td></tr>
  <tr><td>网站地址：</td><td><input type=text size=70 name=url value='http://' maxlength=100><%=redx%></td></tr>
  <tr><td>国家地区：</td><td><select name=country size=1>
<option>中国</option>
<option>香港</option>
<option>台湾</option>
<option>美国</option>
<option>英国</option>
<option>日本</option>
<option>韩国</option>
<option>加拿大</option>
<option>澳大利亚</option>
<option>新西兰</option>
<option>俄罗斯</option>
<option>意大利</option>
<option>法国</option>
<option>西班牙</option>
<option>德国</option>
<option>其它国家</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;站点语言：<select name=lang size=1>
<option>简体中文</option>
<option>繁体中文</option>
<option>English</option>
<option>其它语言</option>
</select>&nbsp;&nbsp;&nbsp;推荐：<input type=checkbox name=isgood value='yes'></td></tr>
<% ispic="w"&upload_time(now_time) %>
  <tr><td>图片地址：</td><td><input type=test name=pic size=70 maxlength=100></td></tr>
  <tr><td>上传图片：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=website&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr><td valign=top class=htd><br>网站内容：<br><=250B</td><td><textarea name=remark rows=5 cols=70></textarea></td></tr>
  <tr><td colspan=2 align=center height=25><input type=submit value=' 推 荐 网 站 '>　　<input type=reset value='重新填写'></td></tr>
</form></table><%
  end if
end sub

sub put_news()
  if trim(request.form("put"))="yes" then
    dim topic,comto,istop,word,ispic,pic,keyes
    topic=code_form(request.form("topic"))
    csid=trim(request.form("csid"))
    comto=code_form(request.form("comto"))
    keyes=code_form(request.form("keyes"))
    istop=trim(request.form("istop"))
    word=request.form("word")
    ispic=trim(request.form("ispic"))
    pic=trim(request.form("pic"))
    if len(csid)<1 then
      response.write "<font class=red_2>请选择动态类型！</font><br><br>"&go_back
    elseif len(topic)<1 or len(word)<10 then
      response.write "<font class=red_2>动态标题和内容不能为空！</font><br><br>"&go_back
    else
      call chk_cid_sid()
      set rs=server.createobject("adodb.recordset")
      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
     if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip"  then
rs("hidden")=true
else
rs("hidden")=false
      end if
      rs("topic")=topic
      rs("comto")=comto
      rs("keyes")=keyes
      rs("word")=word
      if istop="yes" then
        rs("istop")=true
      else
        rs("istop")=false
      end if
      if ispic="yes" then
        rs("ispic")=true
      else
        rs("ispic")=false
      end if
      rs("pic")=pic
      rs("tim")=now_time
      rs("counter")=0
      rs.update
      rs.close:set rs=nothing
      call user_integral("add",web_var(web_num,15),login_username)
      call user_cp("add",web_var(web_num,28),login_username)
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin" then
         response.write "<font class=red>已成功发布了一篇动态！</font><br><br>"
      else
         conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功发布了一篇动态！</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
      else
%><table border=0 cellspacing=0 cellpadding=3 align=center>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>新闻标题：</td><td width='85%'><input type=text size=70 name=topic maxlength=100><%=redx%></td></tr>
  <tr><td align=center>新闻类型：</td><td><%call chk_csid(cid,sid)%>&nbsp;&nbsp;&nbsp;&nbsp;出处：<input type=text size=30 name=comto maxlength=10></td></tr>
  <tr><td align=center>关 键 字：</td><td><input type=text size=20 name=keyes maxlength=20>&nbsp;&nbsp;&nbsp;&nbsp;推荐：<input type=checkbox name=istop value='yes'>&nbsp;选上为新闻首页显示</td></tr>
  <tr height=35<%response.write format_table(3,1)%>><td align=center><%call frm_ubb_type()%></td><td><%call frm_ubb("put_frm","word","&nbsp;&nbsp;")%></td></tr>
  <tr><td valign=top align=center><br>新闻内容：</td><td><textarea name=word rows=15 cols=70></textarea></td></tr>
<%ispic="n"&upload_time(now_time)%>
  <tr><td align=center>图片新闻：</td><td rowspan="2"><input type=checkbox name=ispic value='yes'>&nbsp;&nbsp;&nbsp;&nbsp;图片：<input type=test name=pic size=30 maxlength=100><br>
<iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=news&upname=a&uptext=word'></iframe></td></tr>
  <tr><td align=center>上传到内容</td></tr>
  <tr><td align=center>上传图片：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=news&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr><td colspan=2 align=center height=30><input type=submit value='发 布 我 的 新 闻'>　　<input type=reset value='重新填写'></td></tr>
</form></table><%
  end if
end sub

sub put_article()
  if trim(request.form("put"))="yes" then
    dim topic
    topic=code_form(request.form("topic"))
    csid=trim(request.form("csid"))
    if len(csid)<1 then
      response.write "<font class=red_2>请选择文章类型！</font><br><br>"&go_back
    elseif topic="" then
      response.write "<font class=red_2>文章标题不能为空！</font><br><br>"&go_back
    else
      call chk_cid_sid()
      set rs=server.createobject("adodb.recordset")
      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
     if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip"  then
rs("hidden")=true
else
rs("hidden")=false
      end if
      rs("topic")=topic
      rs("word")=request.form("word")
      if isnumeric(trim(request.form("emoney"))) then
        rs("emoney")=trim(request.form("emoney"))
      else
        rs("emoney")=0
      end if
      rs("author")=code_admin(request.form("author"))
      rs("power")=replace(replace(trim(request.form("power"))," ",""),",",".")
      rs("keyes")=code_admin(request.form("keyes"))
      if trim(request.form("istop"))="yes" then
        rs("istop")=1
      else
        rs("istop")=0
      end if
      rs("tim")=now_time
      rs("counter")=0
      rs.update
      rs.close:set rs=nothing
     call user_integral("add",web_var(web_num,15),login_username)
      call user_cp("add",web_var(web_num,28),login_username)
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
         response.write "<font class=red>已成功发布了一篇文章！</font><br><br>"
      else
         conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功发布了一篇文章！</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
  else
%><table border=0 width='100%' cellspacing=0 cellpadding=2 align=center>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>文章标题：</td><td width='85%'><input type=text size=70 name=topic maxlength=40><%=redx%></td></tr>
  <tr><td align=center>文章类型：</td><td><%call chk_csid(cid,sid):call chk_emoney(0)%></td></tr>
  <tr><td align=center>浏览权限：</td><td><%call chk_power("",1)%></td></tr>
  <tr><td align=center>文章作者：</td><td><input type=text size=12 name=author maxlength=20>&nbsp;&nbsp;关键字：<input type=text name=keyes size=12 maxlength=20>&nbsp;&nbsp;推荐：<input type=checkbox name=istop value='yes'></td></tr>
  <tr height=35<%response.write format_table(3,1)%>><td align=center><%call frm_ubb_type()%></td><td><%call frm_ubb("put_frm","word","&nbsp;&nbsp;")%></td></tr>
  <tr><td valign=top align=center><br>文章内容：</td><td><textarea name=word rows=15 cols=70></textarea></td></tr>
  <tr><td align=center>上传文件：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=article&upname=a&uptext=word'></iframe></td></tr>
  <tr><td></td><td height=30><input type=submit value='发 布 我 的 文 章'>　　<input type=reset value='重新填写'></td></tr>
</form></table><%
  end if
end sub

sub put_down()
  if trim(request.form("put"))="yes" then
    dim name,sizes,url,url2,homepage,remark,types,keyes,pic
    csid=trim(request.form("csid"))
    name=code_form(request.form("name"))
    sizes=code_form(request.form("sizes"))
    url=code_form(request.form("url"))
    url2=code_form(request.form("url2"))
    homepage=code_form(request.form("homepage"))
    keyes=code_form(request.form("keyes"))
    remark=request.form("remark")
    pic=request.form("pic")
    if len(pic)<3 then pic="no_pic.gif"
    types=request.form("types")
    if len(csid)<1 or var_null(name)="" or var_null(url)="" then
      response.write("<font class=red_2>软件的类型、名称和下载地址不能为空！</font><br><br>"&go_back)
    else
      call chk_cid_sid()
      sql="select * from down"
      set rs=server.createobject("adodb.recordset")
      rs.open sql,conn,1,3
      rs.addnew
      rs("c_id")=cid
      rs("s_id")=sid
      rs("username")=login_username
      if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip"  then
rs("hidden")=true
else
rs("hidden")=false
      end if
      rs("name")=name
      rs("sizes")=sizes
      if isnumeric(trim(request.form("emoney"))) then
        rs("emoney")=trim(request.form("emoney"))
      else
        rs("emoney")=0
      end if
      rs("genre")=trim(request.form("genre"))
      rs("os")=replace(trim(request.form("os"))," ","")
      rs("power")=replace(replace(trim(request.form("power"))," ",""),",",".")
      rs("url")=url
      rs("url2")=url2
      rs("homepage")=homepage
      rs("remark")=remark
      rs("keyes")=keyes
      rs("pic")=pic
      rs("tim")=now_time
      rs("counter")=0
      rs("types")=types
      rs.update
      rs.close:set rs=nothing
     call user_integral("add",web_var(web_num,15),login_username)
      call user_cp("add",web_var(web_num,28),login_username)
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
         response.write "<font class=red>已成功添加了一个软件！</font><br><br>"
      else
         conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功添加了一个软件！</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
else

%>
<table border=0 width=560 cellspacing=0 cellpadding=2>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>软件名称：</td><td width='85%'><input type=text name=name size=70 maxlength=40><% response.write redx %></td></tr>
  <tr><td align=center>软件类型：</td><td><%call chk_csid(cid,sid):call chk_emoney(0)%></td></tr>
  <tr><td align=center>下载权限：</td><td><%call chk_power("",1)%></td></tr>
  <tr><td align=center>软件大小：</td><td><input type=text name=sizes value='KB' size=10 maxlength=10>&nbsp;&nbsp;&nbsp;推荐等级：<select name=types size=1>
<option value='0'>没有等级</option>
<option value='1'>一星级</option>
<option value='2'>二星级</option>
<option value='3'>三星级</option>
<option value='4'>四星级</option>
<option value='5'>五星级</option>
</select>&nbsp;&nbsp;&nbsp;授权类型：<select name=genre size=1><%
  ddim=split(web_var(web_down,4),":")
  for i=0 to ubound(ddim)
    response.write vbcrlf&"<option>"&ddim(i)&"</option>"
  next
  erase ddim
%></select></td></tr>
  <tr><td align=center>运行环境：</td><td><%
  ddim=split(web_var(web_down,3),":")
  for i=0 to ubound(ddim)
    response.write "<input type=checkbox name=os value='"&ddim(i)&"' class=bg_1>"&ddim(i)
  next
  erase ddim
%></td></tr>
  <tr><td align=center>本站下载：</td><td><input type=text name=url size=70 maxlength=200><% response.write redx %></td></tr>
  <tr><td align=center>镜像下载：</td><td><input type=text name=url2 value='http://' size=70 maxlength=200></td></tr>
  <tr><td align=center>软件主页：</td><td><input type=text name=homepage value='http://' size=50 maxlength=50></td></tr>
  <tr height=35<%response.write format_table(3,1)%>><td align=center><%call frm_ubb_type()%></td><td><%call frm_ubb("add_frm","remark","&nbsp;&nbsp;")%></td></tr>
  <tr><td valign=top align=center><br>软件备注</td><td><textarea rows=6 name=remark cols=70></textarea></td></tr>
<%ispic="d"&upload_time(now_time)%>
  <tr><td align=center>关 键 字：</td><td rowspan="2"><input type=text name=keyes size=12 maxlength=20>&nbsp;&nbsp;&nbsp;&nbsp;图片：<input type=text name=pic size=30 maxlength=100><br>
<iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=down&upname=a&uptext=remark'></iframe></td></tr>
  <tr><td align=center>上传到内容</td></tr>
  <tr><td align=center>上传文件：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=down&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr height=30><td></td><td><input type=submit value=' 添 加 我 的 软 件 '></td></tr>
</form></table><%
  end if
end sub

sub put_business()
  if trim(request.form("put"))="yes" then
    dim name,csid,url,isgood,country,lang,tel,lxname,email,jg,remark
    name=code_form(request.form("name"))
    csid=trim(request.form("csid"))
    url=code_form(request.form("url"))
    isgood=trim(request.form("isgood"))
    remark=request.form("remark")
    country=trim(request.form("country"))
    lang=trim(request.form("lang"))
    jg=trim(request.form("jg"))      
    tel=trim(request.form("tel"))
    email=trim(request.form("email"))
    lxname=trim(request.form("lxname"))
    pic=request.form("pic")
    if len(pic)<3 then pic="no_pic.gif"

    if isnumeric(csid) or len(csid)<1 then
      response.write "<font class=red_2>请选择信息类型！</font><br><br>"&go_back
    
    elseif len(name)<1 then
      response.write "<font class=red_2>信息名称不能为空！</font><br><br>"&go_back 
    elseif email_ok(email)<>"yes" or len(email)>50  then
      response.write "<font class=red_2>邮件格式不符合规定或邮件地址不能为空！</font><br><br>"&go_back
    elseif len(tel)<1 then
      response.write "<font class=red_2>联系电话不能为空！</font><br><br>"&go_back  
    elseif len(lxname)<1 then
      response.write "<font class=red_2>联系人名称不能为空！</font><br><br>"&go_back  
    elseif len(jg)<1 then 
      response.write "<font class=red_2>价格不能为空！</font><br><br>"&go_back
    elseif len(remark)>250 then
      response.write "<font class=red_2>信息说明不能长于250个字符！</font><br><br>"&go_back
    else
      cid=mid(csid,1,instr(csid,"-")-1)
      sid=mid(csid,instr(csid,"-")+1,len(csid))
      set rs=server.createobject("adodb.recordset")
      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("hidden")=false
      rs("name")=name
      rs("url")=url
      rs("country")=country
      rs("lang")=lang
      rs("jg")=jg
      rs("tel")=tel
      rs("email")=email
      rs("lxname")=lxname
      rs("remark")=remark
      if isgood="yes" then
        rs("isgood")=true
      else
        rs("isgood")=false
      end if
      rs("username")=login_username
      rs("pic")=pic
      rs("tim")=now_time
      rs("counter")=0
      rs.update
      rs.close:set rs=nothing
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin"  or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
         response.write "<font class=red>已成功发布了一条信息！</font><br><br>"
      else
         conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功发布了一条信息！</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
else
%><table border=0 cellspacing=0 cellpadding=3>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'>
<input type=hidden name=upid value=''>
  <tr>
    <td width='12%'>信息名称：</td>
    <td width='88%'><input type=text size=40 name=name maxlength=50><%=redx%></td>
  </tr>
  <tr>
    <td>信息分类：</td>
    <td><select name=csid size=1><%
sql="select c_id,c_name from jk_class where nsort='"&nsort&"' order by c_order,c_id"
set rs=conn.execute(sql)
do while not rs.eof
  nid=int(rs(0))
  response.write vbcrlf&"<option value='"&nid&"' class=bg_2>"&rs(1)&"</option>"
  sql2="select s_id,s_name from jk_sort where c_id="&nid&" order by s_order,s_id"
  set rs2=conn.execute(sql2)
  do while not rs2.eof
    now_id=int(rs2(0))
    response.write vbcrlf&"<option value='"&nid&"-"&now_id&"'"
    if cid=nid and sid=now_id then response.write " selected"
    response.write ">　"&rs2(1)&"</option>"
    rs2.movenext
  loop
  rs2.close:set rs2=nothing
  rs.movenext
loop
rs.close:set rs=nothing
%></select><%=redx%>&nbsp;&nbsp;&nbsp;&nbsp;推荐：<input type=checkbox name=isgood value='yes'>&nbsp;选上为推荐显示</td></tr>
  
<tr><td>信息类型：</td><td><select name=country size=1>
<option>出售</option>
<option>求购</option>
<option>出租</option>
<option>求租</option>
<option>合作</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;交易方式：<select name=lang size=1>
<option>上门提货</option>
<option>款到付货</option>
<option>货到付款</option>
<option>其它方式</option>
</select></td></tr>
<tr><td>联 系 人：</td><td><input type=text size=19 name=lxname maxlength=30><%=redx%></td></tr>
<tr><td>联系电话：</td><td><input type=text size=19 name=tel maxlength=30><%=redx%>格式：0473-1234567</td></tr>
<tr><td>电子邮件：</td><td><input type=text size=19 name=email maxlength=30><%=redx%></td></tr>
<tr><td>交易价格：</td><td><input type=text size=15 name=jg maxlength=30>  元<%=redx%>如果不确定可以填面议</td></tr>
<tr><td>相关地址：</td><td><input type=text size=60 name=url value='http://' maxlength=100></td></tr>
<% ispic="w"&upload_time(now_time) %>
  <tr><td>图片地址：</td><td><input type=test name=pic size=40 maxlength=30 readonly></td></tr>
  <tr><td>上传图片：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=business&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr><td valign=top class=htd><br>信息内容：<br><=250B</td><td><textarea name=remark rows=6 cols=60></textarea></td></tr>
  <tr><td colspan=2 align=center height=25><input type=submit value=' 推 荐 信 息  '>　　<input type=reset value='重新填写'></td></tr>
</form></table>
<%
  end if
end sub

sub video_add()
%><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td align=center height=300><%
dim nsort,sqladd,data_name,downtype,xzhuafei,movie
nsort="video":sqladd="":data_name="video"
if request.querystring("types")="add" then
  dim csid,title,pic,sql1,no,url,vid
no=request.form("no")
  csid=trim(request.form("cid"))
  title=code_admin(request.form("title"))
  pic=request.form("pic")

  if len(pic)<3 then pic="no_pic.gif"

  if len(csid)<1 or var_null(title)="" or request.form("movie")="" then
    response.write("<font class=red_2>影片的类型、名称、格式和影片地址不能为空！</font><br><br>"&go_back)
  else

    sql="select * from "&data_name
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,3
    rs.addnew
	rs("type")=request.form("movie")
    rs("c_id")=csid
    rs("title")=title
    rs("username")=login_username
    rs("lang")=request.form("lang")
	rs("howlong")=request.form("long")
	rs("where")=request.form("where")
	rs("remark")=request.form("remark")
    rs("name")=request.form("name")
    if format_power(login_mode,0)="admin" then
      rs("hidden")=true
    else
      rs("hidden")=false
    end if

    if isnumeric(trim(request.form("emoney"))) then
      rs("emoney")=trim(request.form("emoney"))
    else
      rs("emoney")=0
    end if
    rs("power")=replace(replace(trim(request.form("power"))," ",""),",",".")

    rs("hot")=request.form("hot")
    rs("ld")=request.form("ld")
    rs("pic")=pic
    rs("tim")=now_time
    rs("counter")=0

    rs.update
	vid=rs("id")
    rs.close

set rs=server.createobject("adodb.recordset")
sql1="select * from videourl where (id is null)"
rs.open sql1,conn,1,3
for i=1 to no
rs.addnew
url=request.form("url"&i&"")
rs("nameid")=vid
rs("url")=url
rs.update
next
rs.close
set rs=nothing
    call upload_note(data_name,first_id(data_name))
      if format_power(login_mode,0)="admin"  or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
      response.write "<font class=red>已成功添加了一个影片！</font><br><br>"
      else
	  conn.execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
      response.write "<font class=red>已成功添加了一个影片！</font><br><br>请等待管理员审核通过……<br><br>"
      end if
	end if
else
%>
<table border=0 width='98%' cellspacing=0 cellpadding=2>
<form name='add_frm' action='?action=video&types=add' method=post>
<input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>影片名称：</td><td width='85%'><input type=text name=title size=70 maxlength=40><% response.write redx %></td></tr>
  <tr><td align=center>影片类型：</td><td>
  <select name=cid size=1>
  <%
  sql="select * from videotype order by typeid"
  set rs=conn.execute(sql)
  do while not rs.eof
    response.write vbcrlf&"<option value='"&rs("typeid")&"' class=bg_2>"&rs("type")&"</option>"
	rs.movenext
  loop
  rs.close:set rs=nothing
  ispic="d"&upload_time(now_time)
%>
</select>
<% response.write redx %></td></tr>
  <tr>
            <td align=center>影片信息：</td>
            <td>语言类型： 
              <select name=lang size=1>
<option value='汉语'>汉语</option>
<option value='粤语'>粤语</option>
<option value='日语'>日语</option>
<option value='英语'>英语</option>
<option value='韩语'>韩语</option>
<option value='其他'>其他</option>
</select>	
			
			
			&nbsp;&nbsp;&nbsp;推荐等级：<select name=hot size=1>
<option value='0'>没有等级</option>
<option value='1'>一星级</option>
<option value='2'>二星级</option>
<option value='3'>三星级</option>
<option value='4'>四星级</option>
<option value='5'>五星级</option>
</select>
</td>
</tr>

		  <tr>
            <td><div align="center">观看权限：</div></td>
            <td><%call chk_power("",1)%></td>  
          </tr>
          <tr>
            <td align=center>所需货币：</td>
            <td><%call chk_emoney(0)%>&nbsp;&nbsp;影片产地：<select size="1" name="where">
          <option value="大陆">大陆</option>
          <option value="台湾">台湾</option>
          <option value="香港">香港</option>
          <option value="日韩">日本</option>
          <option value="韩国">韩国</option>
          <option value="欧美">欧美</option>
          <option value="其他">其他</option>
          <option selected value="未知" name="where">出产地区</option>
          </select></td>
          </tr>
          <tr>
            <td><div align="center">影片类型：</div></td>
            <td>[ <img src="images/video/real.gif" width="16" height="16"> <input type="radio" value="rm" name="movie">  
              ]&nbsp; [<img src="images/video/mov.gif" width="18" height="18"> <input type="radio" value="mov" name="movie">
              ]&nbsp; [<img src="images/video/media.gif" width="17" height="17"> <input type="radio" value="md" name="movie">
              ]&nbsp;&nbsp;&nbsp; </td>  
          </tr>
<tr>
<td><div align="center">开放方式：</div></td>
<td> <input type="radio" value="1" name="ld" checked>在线观看 <input type="radio" value="0" name="ld">影片下载 <input type="radio" value="2" name="ld">即能观看也可下载</td>  
</tr>
   <tr><td align=center>影片主演：</td><td><input type=text name=name value='无' size=50 maxlength=50></td></tr>
<script language="javascript">
function setid()
{
str='';
if(!window.add_frm.no.value)
window.add_frm.no.value=1;
for(i=1;i<=window.add_frm.no.value;i++)
str+='&nbsp;影片地址：&nbsp;&nbsp;<input type="text" name="url'+i+'" class="button" style="padding-left:1pt"  size=65 value="">&nbsp;第'+i+'集<BR>';
window.upid.innerHTML=str+'<br>';
}
</script>
 <tr><td align=center>影片地址：</td><td>集数 <input type="text" name="no" class="button" value="2" size="2">
                  <input type="button" name="Button" class="buttonface" onclick="setid();" value="设定"> 
                  (在点击“设定”按钮后才可输入影片对应地址) <% response.write redx %>
				  </td></tr>
               <tr>
                  <td colspan="2" id="upid" width="564"></td>
                </tr>

  <tr height=35<%response.write format_table(3,1)%>><td align=center><%call frm_ubb_type()%></td><td><%call frm_ubb("add_frm","remark","&nbsp;&nbsp;")%></td></tr>
  <tr><td valign=middle align=center><br>影片备注：</td><td><textarea rows=6 name=remark cols=70></textarea></td></tr>
  <tr><td align=center>影片长度：</td><td><input type=text name=long size=12 value='90分钟'>&nbsp;&nbsp;图片：<input type=test name=pic size=28>&nbsp;<a href='upload.asp?uppath=video&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a>&nbsp;<a href='upload.asp?uppath=video&upname=n&uptext=remark' target=upload_frame>上传至内容</a></td></tr>
  <tr><td align=center>上传文件：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=video&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr height=30><td></td><td><input type=submit value=' 提 交 添 加 '></td></tr>
</form></table><%

  end if
%></td></tr></table><%
end sub


sub put_gallery()
  dim name,pic,ispic,types
  if trim(request.form("put"))="yes" then
    name=code_form(request.form("name"))
    csid=trim(request.form("csid"))
    pic=code_form(request.form("pic"))
    types=trim(request.form("types"))
    if len(csid)<1 then
      response.write "<font class=red_2>请选择图片分类！</font><br><br>"&go_back
    elseif len(name)<1 then
      response.write "<font class=red_2>图片名称说明不能为空！</font><br><br>"&go_back
    elseif len(pic)<8 then
      response.write "<font class=red_2>请上传图片或输入图片的地址！</font><br><br>"&go_back
    else
      call chk_cid_sid()
      set rs=server.createobject("adodb.recordset")
      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("name")=name
      if len(code_admin(request.form("spic")))<3 then
        rs("spic")="no_pic.gif"
      else
        rs("spic")=code_admin(request.form("spic"))
      end if
      rs("pic")=pic
      rs("remark")=left(request.form("remark"),250)
      rs("power")=replace(replace(trim(request.form("power"))," ",""),",",".")
      if isnumeric(trim(request.form("emoney"))) then
        rs("emoney")=trim(request.form("emoney"))
      else
        rs("emoney")=0
      end if
      if trim(request.form("istop"))="yes" then
        rs("istop")=1
      else
        rs("istop")=0
      end if
      rs("counter")=0
      rs("tim")=now_time
      if format_power(login_mode,0)="admin" or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip"  then
rs("hidden")=true
else
rs("hidden")=false
      end if
      rs.update
      rs.close:set rs=nothing
      call user_integral("add",web_var(web_num,15),login_username)
      call user_cp("add",web_var(web_num,28),login_username)
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin"  or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
         response.write "<font class=red>已成功添加了一个图片！</font><br><br>"
      else
         conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功添加了一个图片！</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
  else
%><table border=0 cellspacing=0 cellpadding=3>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>文件名称：</td><td width='85%'><input type=text size=70 name=name maxlength=50><%=redx%></td></tr>
  <tr><td align=center>文件分类：</td><td><%call chk_csid(cid,sid)%>&nbsp;&nbsp;文件类型：<select name=types size=1>
<option value='paste'<%if types="paste" then response.write " selected"%>>贴图</option>
</select><%response.write redx%>&nbsp;&nbsp;<%call chk_emoney(0)%></td></tr>
  <tr><td align=center>浏览权限：</td><td><%call chk_power("",1)%></td></tr>
<%ispic="gs"&upload_time(now_time)%>
  <tr><td align=center>小 图 片：</td><td><input type=test name=spic size=70 maxlength=100></td></tr>
  <tr><td align=center>上传图片：</td><td><iframe frameborder=0 name=upload_frames width='100%' height=28 scrolling=no src='upload.asp?uppath=gallery&upname=<%response.write ispic%>&uptext=spic'></iframe></td></tr>
<%ispic="g"&upload_time(now_time)%>
  <tr><td align=center>文件地址：</td><td><input type=test name=pic size=70 maxlength=100><%response.write redx%></td></tr>
  <tr><td align=center>上传文件：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=28 scrolling=no src='upload.asp?uppath=gallery&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr><td align=center>文件说明：<br><br><=250字符</td><td><textarea name=remark rows=5 cols=70></textarea></td></tr>
  <tr><td colspan=2 align=center height=30><input type=submit value=' 上 传 我 的 文 件 '>　　<input type=reset value='重新填写'></td></tr>
</form></table><%
  end if
end sub

sub put_flash()
  dim name,pic,ispic,types,url,remark,counter
  if trim(request.form("put"))="yes" then
    name=code_form(request.form("name"))
    csid=trim(request.form("csid"))
    url=code_form(request.form("url"))
    remark=request.form("remark")
    pic=request.form("pic")
    if len(pic)<3 then pic="no_pic.gif"
    types=trim(request.form("types"))
    if len(csid)<1 then
      response.write "<font class=red_2>请选择FLASH分类！</font><br><br>"&go_back
    elseif len(name)<1 or len(url)<1 then
      response.write "<font class=red_2>FLASH名称和地址不能为空！</font><br><br>"&go_back
    elseif len(remark)>250 then
      response.write "<font class=red_2>FLASH说明不能长于250个字符！</font><br><br>"&go_back
    else
    cid=mid(csid,1,instr(csid,"-")-1)
     sid=mid(csid,instr(csid,"-")+1,len(csid))
      call chk_cid_sid()
      set rs=server.createobject("adodb.recordset")
      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("name")=name
       rs("url")=url
      rs("remark")=remark
      if len(code_admin(request.form("spic")))<3 then
        rs("spic")="no_pic.gif"
      else
        rs("spic")=code_admin(request.form("spic"))
      end if
      rs("pic")=pic
      rs("power")=replace(replace(trim(request.form("power"))," ",""),",",".")
      if isnumeric(trim(request.form("emoney"))) then
        rs("emoney")=trim(request.form("emoney"))
      else
        rs("emoney")=0
      end if
      if trim(request.form("istop"))="yes" then
        rs("istop")=1
      else
        rs("istop")=0
      end if
      rs("counter")=0
      rs("tim")=now_time
      rs("hidden")=false
      rs.update
      rs.close:set rs=nothing
      call user_integral("add",web_var(web_num,15),login_username)
      call user_cp("add",web_var(web_num,28),login_username)
      call upload_note(action,first_id(action))
      if format_power(login_mode,0)="admin"  or format_power(login_mode,0)="super" or format_power(login_mode,0)="vip" then
         response.write "<font class=red>已成功添加了一个FLASH！</font><br><br>"
      else
         conn.Execute("insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&web_var(web_config,3)&"','"&login_username&"','请管理员审核','"&data_name&" 中有新发布！',Now(),1,false)")
         response.write "<font class=red>已成功添加了一个FLASH！</font><br><br>请等待管理审核通过……<br><br>"
      end if
	  end if
  else
%><table border=0 cellspacing=0 cellpadding=3>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>FLASH名称：</td><td width='85%'><input type=text size=70 name=name maxlength=50><%=redx%></td></tr>
  <tr><td align=center>FLASH分类：</td><td><%call chk_csid(cid,sid)%>&nbsp;&nbsp;文件类型：<select name=types size=1>
<option value='flash'<%if types="flash" then response.write " selected"%>>FLASH</option>
</select><%response.write redx%>&nbsp;&nbsp;<%call chk_emoney(0)%></td></tr>
  <tr><td align=center>浏览权限：</td><td><%call chk_power("",1)%></td></tr>
  <tr><td align=center>FLASH地址：</td><td><input type=text size=60 name=url value='http://' maxlength=100><%=redx%></td></tr>
<%ispic="gs"&upload_time(now_time)%>
  <tr><td align=center>小 图 片：</td><td><input type=test name=spic size=70 maxlength=100><%=redx%></td></tr>
  <tr><td align=center>上传图片：</td><td><iframe frameborder=0 name=upload_frames width='100%' height=28 scrolling=no src='upload.asp?uppath=flash&upname=<%response.write ispic%>&uptext=spic'></iframe></td></tr>
  <tr><td align=center>FLASH说明：<br><br><=250字符</td><td><textarea name=remark rows=5 cols=70></textarea></td></tr>
  <tr><td colspan=2 align=center height=30><input type=submit value=' 添 加 我 的 FLASH '>　　<input type=reset value='重新填写'></td></tr>
</form></table><%
  end if
end sub

sub put_gongao()
     if trim(request.form("put"))="yes" then
        dim username,topic,word,tim
        topic=code_form(request.form("topic"))
        word=request.form("word")
        sql="select emoney from user_data where username='"&login_username&"'"
       set rs=conn.execute(sql)
       if rs("emoney")<1 or login_username="" then
         response.write "<font class=red_2>你的金钱不够或者您还没有登陆本站，请登陆or去论坛浇点水吧！</font><br><br>"&go_back 
         rs.close:set rs=nothing
       else

        if len(topic)<1 then
           response.write "<font class=red_2>滚动广告标题不能为空！</font><br><br>"&go_back
        else 
           if len(word)>500 then
           response.write "<font class=red_2>滚动广告内容不能长于500个字符！</font><br><br>"&go_back
           end if
      set rs=server.createobject("adodb.recordset")
      sql="select * from "&data_name
      rs.open sql,conn,1,3
      rs.addnew
      rs("username")=login_username
      rs("topic")=topic
      rs("word")=word
      rs("tim")=now_time
      rs("count")=0
      rs("sort")=0
      rs.update
      rs.close:set rs=nothing
      sql="select emoney from user_data where username='"&login_username&"'"
      set rs=conn.execute(sql)
      sql="update user_data set emoney=emoney-"&web_var(web_num,23)&" where username='"&login_username&"'"
      conn.execute(sql)
      rs.close:set rs=nothing
      response.write "<font class=red>已成功的发布啦一个广告！</font><br><br>"&go_back
    end if
    end if
  else
%><table border=0 cellspacing=0 cellpadding=3>
<form name=put_frm action='?action=<%response.write action%>' method=post>
<input type=hidden name=put value='yes'><input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>广告标题：</td><td width='85%'>
  <input type=text size=70 name=topic maxlength=40><%=redx%></td></tr> 
  <tr height=35<%response.write format_table(3,1)%>><td align=center><%call frm_ubb_type()%></td><td><%call frm_ubb("put_frm","word","&nbsp;&nbsp;")%></td></tr>
  <tr><td valign=top align=center><br>广告内容：</td><td><textarea name=word rows=15 cols=70></textarea></td></tr>
  <tr><td align=center>上传文件：</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=article&upname=a&uptext=word'></iframe></td></tr>
  <tr><td align=center>发布说明：</td><td><b>1.</b>  在本站发布广告将您将付<font color=red><b><% response.write  web_var(web_num,23) %></b></font>个虚拟货币的费用</td></tr>
  <tr><td align=center>          </td><td><b>2.</b>  <b><% response.write  web_var(web_num,22) %></b></font>天内发表的广告将随机抽取<font color=red><b>5</b></font>条滚动显示于网站顶部<br></td></tr>  
  <tr><td align=center>          </td><td><b>3.</b>  内容不得超过<font color=red><b>500</b></font>字<br></td></tr>
  <tr><td align=center>          </td><td><b>4.</b>  请不要发布煽动抗拒、破坏宪法和法律、行政法规实施等等的违法广告<br></td></tr>
<tr><td valign=top class=htd>
</td></tr>
  <tr><td colspan=2 align=center height=25><input type=submit value=' 发表滚动广告'>　　<input type=reset value='重新填写'></td></tr>
</form></table><%
  end if
end sub
%>