<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!--#include file="top.asp"-->
<!--#include file="../include/page.asp"-->
<!--#include file="../include/news_lb.asp"-->
<!--#include file="../bbs/ubb.asp"-->
    <style type="text/css" media="screen">
	@import url("../home/css/sys/detail.php@t=20060522.css");
</style>
<table width="762" border="0" align="center" cellpadding="2" cellspacing="0" style='BORDER-COLLAPSE: collapse;MARGIN: 3px'>
  <tr> 
    <td height="15" colspan="2"></td>
  </tr>
  <tr> 
    <td width="180" valign="top"> 
      <!--#include file="left.asp"-->
    </td>
    <td width="582" height="280" align="center" valign="top">
<%hy "login.asp"
Select case request("abc")
case "del"
conn.execute("Delete * from news where name='"&Request.Cookies(Rikee)("huiyuan")&"' and zt=0 and id="&shopnet("id")&"")
Response.Write("<script>alert(""您已成功删除了您的稿件"");location.href=""?abc=admin&page="&request("page")&""";</script>")
case "admin"%>
      <table width="450" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="35" align="right" valign="middle"><a href="?"><strong>&gt;&gt; 
            会员在线投稿</strong></a></td>
        </tr>
      </table>
      <table width="550" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
        <tr align="center" valign="middle" bgcolor="#f1f1f1"> 
          <td height="22">投稿标题</td>
          <td width="90" height="22">投稿时间</td>
          <td width="35" height="22">审核</td>
          <td width="70" height="22">修改|删除</td>
        </tr>
<%Set rs=Server.CreateObject("ADODB.Recordset")
sql="select id,bt,sj,html,zt from news where name='"&Request.Cookies(Rikee)("huiyuan")&"' order by id desc"
rs.open sql,conn,3,1 
page1("15")
i=1
do while not rs.eof and i<=rs.pagesize%>
        <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
          <td height="22" align="left">&nbsp;<a href=<%If rs(4)=0 Then Response.Write "?abc=xiu&page="&page&"&id="&rs(0)&"" else Response.Write "/html/"&rs(3)&" target=_blank"%>>·<%=InterceptString(rs(1),36)%></a></td>
          <td width="90" height="22" align="center"><%=formatdatetime(rs(2),2)%></td>
          <td width="35" height="22" align="center"><%if rs(4)=0 then Response.Write"<font color=red>否</font>" else Response.Write "已"%></td>
          <td width="70" height="22" align="center"><%if rs(4)=0 then Response.Write "<a href=?abc=xiu&page="&page&"&id="&rs(0)&">修改</a>" else Response.Write "<font color=#999999>锁定</font>"%>|<%if rs(4)=0 then Response.Write "<a href=?abc=del&page="&page&"&id="&rs(0)&">删除</a>" else Response.Write "<font color=#999999>锁定</font>"%></td>
        </tr>
<%i=i+1
rs.MoveNext                                              
loop%>
        <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
          <td height="22" colspan="4"> <%page2("abc=admin&")
rs.close
set rs=nothing%> </td>
        </tr>
      </table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
          <td height="25" valign="bottom">注：发布或修改后的稿件只有经过<%=my_name%>工作人员审核后的才能显示，期间您可以重新编辑修改。审核一般在工作时间24小时内通过，审核通过后您的投稿将被锁定。</td>
  </tr>
</table>
<%case "xiu_ok"
id=shopnet("id")
a=shopnet("lbid")
b=len(a)
c=instr(a,"_")
lbid=clng(left(a,c-1))
xlbid=clng(mid(a,c+1,b-2))
if shopnet("lb_cookie")="yes" then Response.Cookies(Rikee)("news_lb")=a else Response.Cookies(Rikee)("news_lb")=""
demo_id=shopnet("demo_id")
if shopnet("demo_cookie")="yes" then Response.Cookies(Rikee)("news_demo")=demo_id else Response.Cookies(Rikee)("news_demo")=""
bt=shopnet("bt")
nr=ubb(Replace(Replace(shopnet("nr"), chr(32), "&nbsp;"), vbCrLf, "<br>"))
gj=shopnet("gj")
ly=shopnet("ly")
name=Request.Cookies(Rikee)("huiyuan")
If bt="" or nr="" Then
response.write "<script>alert(""标题或内容不能为空，请检查！"");history.back();</script>"
else
'写入数据库
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from news where id="&clng(id)&""
rs.open sql,conn,1,3
rs("lbid")=lbid
rs("xlbid")=xlbid
rs("bt")=bt
rs("nr")=nr
rs("gj")=gj
rs("ly")=ly
rs("demo_id")=demo_id
rs("zt")=0
rs.update
rs.close
set rs=nothing
Response.Write("<script>alert(""已成功编辑您的投稿，请等待审核"");location.href=""?abc=admin"";</script>")
end if
case "xiu"
function judges(a,b)
if (a=b) then
ress =" selected"
end if
judges = ress
end function
set news = conn.execute("select * from news where id="&shopnet("id")&"")%>
<table width="520" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
        <form action="?abc=xiu_ok" method="post" name="form" id="form" onSubmit="return VerifySubmit()">
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td height="25" colspan="4">&nbsp;<strong><font color="#FF0000">&nbsp;* 
              网上投稿--编辑</font></strong>(投稿后，需要客服人员审核才会在网站显示)</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center" nowrap>&nbsp;投稿归类&nbsp;</td>
            <td width="569" height="25" colspan="3"> 
              <%Response.Write "<select name=lbid size=1 id=lbid style='color: #000000;border: 1px inset #cccccc;font-size: 9pt;background-color: #f1f1f1;'>"
for i=1 to ubound(news_lb,1)
Response.Write "<optgroup label='╋ "&news_lb(i,0)&"&nbsp;&nbsp;&nbsp;&nbsp;'>"
for j=1 to ubound(news_lb,2)
if isempty(news_lb(i,j)) then exit for
tmpmenu=split(news_lb(i,j),",")
menuname=tmpmenu(0)
Response.Write "<option value="&i&"_"&j&""
if news("lbid")&"_"&news("xlbid")=i&"_"&j then Response.Write(" selected")
Response.Write ">├"&menuname&"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>"
next
next
Response.Write "</select>"%> <input name="lb_cookie" type="checkbox" id="lb_cookie" value="yes" checked>
              记忆选择&nbsp;</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">模板调用</td>
            <td height="25" colspan="3"> 
              <select name="demo_id" id="demo_id">
<% set rs = conn.execute("select id,mc,wj from news_demo where lx=0 order by id desc")
do while not rs.eof%>
<option value=<%=rs("id")%> <%=judges(news("demo_id"),rs("id"))%>><%=rs("mc")%></option>
<%rs.movenext
loop
rs.close%>
        </select>
              记忆选择</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">投稿标题</td>
            <td height="25" colspan="3"> 
              <input name="bt" type="text" class="wenbenkuang" id="bt" value="<%=news("bt")%>" size="50" maxlength="100"> 
            </td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">信息来源</td>
            <td height="25" colspan="3"> 
              <input name="ly" type=text class="wenbenkuang" id="ly" value="<%=news("ly")%>" size=20> 
            </td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">关 键 字</td>
            <td height="25" colspan="3"> 
              <input name="gj" type="text" class="wenbenkuang" id="gj" value="<%=news("gj")%>" size="35" maxlength="100"> 
              <br>
              多个关键字之间请用“<font color="#FF0000">|</font>”分隔，系统会自动按关键字形成相关新闻</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="25" colspan="4"> 
              <script src=../edit/ubb//code.js></script> 
              <div id="ubbDiv"></div>
              <iframe name="ubbFrame" width=0 height=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=no src="../edit/ubb/ubb.htm" ></iframe></td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="25" colspan="4"> 
              <iframe name=ad frameborder=0 width=100% height=20 scrolling=no src=../bbs/shangchuan.asp></iframe></td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="25" colspan="4"> <textarea name="nr" cols="85" rows="12" class="wenbenkuang" id="nr"><%=Replace(Replace(news("nr"), "&nbsp;", chr(32)), "<br>", vbCrLf)%></textarea></td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="40" colspan="4" align="center"> 
              <input type="submit" value="OK，编辑我的稿件" class="go-wenbenkuang"> 
              <input type="reset" value="No,重写" class="go-wenbenkuang">
              <input name="Submit3" type="button" class="go-wenbenkuang" value="html2ubb工具" onClick="javascript:window.open('/bbs/html2ubb.htm','','toolbar=no,scrollbars=no,resizable=no,width=450,height=220,left=20,top=20')">
              <input name="but_Reset" type="button" class="go-wenbenkuang"  value="返回上页" onclick="javascript:window.history.go(-1)">
              <input name="page" type="hidden" id="page" value="<%=request("page")%>"> 
              <input name="id" type="hidden" id="id" value="<%=news("id")%>">
              <script language=javascript>
function VerifySubmit(){
if (document.form.lbid.value.length == 0) {
alert("类别没有选择");
return false;}
if (document.form.bt.value.length == 0){
alert("标题没有填写!");
return false;}
if (document.form.nr.value.length == 0){
alert("内容没有填写!");
return false;}
if (document.form.nr.value.length > 10000){
alert("内容请保持在每稿10000字内!");
return false;}
return true;}
</script> </td>
          </tr>
        </form>
</table>
<%news.close:set news=nothing
case "add"
if datediff("s",cdate(Request.Cookies(Rikee)("addnews_sj")),now())<30 then
width="500"
my_bt="操 作 失 败 ！<font color=red>对不起！您不能成功地发出投稿！！！<br>·本系统为了防止灌水，限制了同一人每篇投稿的时间间隔为 <b>30</b> 秒！</font>"
my_nr="<meta http-equiv=refresh content=4;url=javascript:history.go(-1)><img src=../../pics/2k5/sys/component/icon_arrow_r.gif><a href=../index.asp>返回首页</a><br><img src=../../pics/2k5/sys/component/icon_arrow_r.gif><a href=# onclick='javascript:window.history.go(-1)'>返回上一页</a><meta http-equiv='refresh' content='8; url="&Request.Cookies(rikee)("url")&"'>"
xitongtishi()
response.end
end if
a=shopnet("lbid")
b=len(a)
c=instr(a,"_")
lbid=clng(left(a,c-1))
xlbid=clng(mid(a,c+1,b-2))
if shopnet("lb_cookie")="yes" then Response.Cookies(Rikee)("news_lb")=a else Response.Cookies(Rikee)("news_lb")=""
demo_id=shopnet("demo_id")
if shopnet("demo_cookie")="yes" then Response.Cookies(Rikee)("news_demo")=demo_id else Response.Cookies(Rikee)("news_demo")=""
bt=shopnet("bt")
nr=ubb(Replace(Replace(shopnet("nr"), chr(32), "&nbsp;"), vbCrLf, "<br>"))
gj=shopnet("gj")
ly=shopnet("ly")
name=Request.Cookies(Rikee)("huiyuan")
If bt="" or nr="" Then
response.write "<script>alert(""标题或内容不能为空，请检查！"");history.back();</script>"
else
set s_html = new Html_31
html = s_html.fso_html()
set s_html=nothing
bh=year(date) & right("00"&month(date),2)
fname=bh&"/"&html
'写入数据库
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from news"
rs.open sql,conn,1,3
rs.addnew
rs("lbid")=lbid
rs("xlbid")=xlbid
rs("bt")=bt
rs("nr")=nr
rs("gj")=gj
rs("rq")=0
rs("lx")=0
rs("ly")=ly
rs("name")=name 
rs("html")=fname
rs("demo_id")=demo_id
rs("zt")=0
rs.update
rs.close
set rs=nothing
Response.Cookies(Rikee)("addnews_sj")=now()
Response.Write("<script>alert(""已成功投稿，请等待审核"");location.href=""?abc=admin"";</script>")
end if
case else%>
      <table width="450" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="35" align="right" valign="middle"><a href="?abc=admin"><strong>&gt;&gt; 
            管理我的投稿</strong></a></td>
        </tr>
      </table> 
      <table width="520" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
        <form action="?abc=add" method="post" name="form" id="form" onSubmit="return VerifySubmit()">
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td height="25" colspan="4">&nbsp;<strong><font color="#FF0000">&nbsp;* 
              网上投稿</font></strong>(投稿后，需要客服人员审核才会在网站显示)</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center" nowrap>&nbsp;投稿归类&nbsp;</td>
            <td width="569" height="25" colspan="3"> 
              <%Response.Write "<select name=lbid size=1 id=lbid style='color: #000000;border: 1px inset #cccccc;font-size: 9pt;background-color: #f1f1f1;'>"
Response.Write "<option value=''></option>"
for i=1 to ubound(news_lb,1)
Response.Write "<optgroup label='╋ "&news_lb(i,0)&"&nbsp;&nbsp;'>"
for j=1 to ubound(news_lb,2)
if isempty(news_lb(i,j)) then exit for
tmpmenu=split(news_lb(i,j),",")
menuname=tmpmenu(0)
Response.Write "<option value="&i&"_"&j&""
if Request.Cookies(Rikee)("news_lb")=i&"_"&j then Response.Write(" selected")
Response.Write ">├"&menuname&"&nbsp;&nbsp;&nbsp;&nbsp;</option>"
next
next
Response.Write "</select>"%> <input name="lb_cookie" type="checkbox" id="lb_cookie" value="yes" checked>
              记忆选择&nbsp;</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">模板调用</td>
            <td height="25" colspan="3"> 
              <%Response.Write "<select name=demo_id id=demo_id>"
set rs = conn.execute("select id,mc,wj from news_demo where lx=0 order by id desc")
do while not rs.eof
Response.Write "<option value="&rs("id")&""
if cstr(rs("id"))=Request.Cookies(Rikee)("news_demo") then Response.Write(" selected")
Response.Write ">&nbsp;"&rs("mc")&"&nbsp;</option>"
rs.movenext
loop
rs.close
set rs=nothing
Response.Write "</select>"%> <input name="demo_cookie" type="checkbox" id="demo_cookie" value="yes" checked>
              记忆选择</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">投稿标题</td>
            <td height="25" colspan="3"> 
              <input name="bt" type="text" class="wenbenkuang" id="bt" size="50" maxlength="100"> 
            </td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">信息来源</td>
            <td height="25" colspan="3"> 
              <input name="ly" type=text class="wenbenkuang" id="ly" value="转载" size=20> 
            </td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td width="65" height="25" align="center">关 键 字</td>
            <td height="25" colspan="3"> 
              <input name="gj" type="text" class="wenbenkuang" id="gj" size="35" maxlength="100"> 
              <br>
              多个关键字之间请用“<font color="#FF0000">|</font>”分隔，系统会自动按关键字形成相关新闻</td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="25" colspan="4"> 
              <script src=../edit/ubb//code.js></script> 
              <div id="ubbDiv"></div>
              <iframe name="ubbFrame" width=0 height=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=no src="../edit/ubb/ubb.htm" ></iframe></td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="25" colspan="4"> 
              <iframe name=ad frameborder=0 width=100% height=20 scrolling=no src=../bbs/shangchuan.asp></iframe></td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="25" colspan="4"> <textarea name="nr" cols="85" rows="12" class="wenbenkuang" id="nr"></textarea></td>
          </tr>
          <tr valign="middle" bgcolor="#FFFFFF"> 
            <td height="40" colspan="4" align="center"> 
              <input type="submit" value="OK，提交文章" class="go-wenbenkuang"> 
              <input type="reset" value="No,重写" class="go-wenbenkuang">
              <input name="Submit" type="button" class="go-wenbenkuang" value="html2ubb工具" onClick="javascript:window.open('/bbs/html2ubb.htm','','toolbar=no,scrollbars=no,resizable=no,width=450,height=220,left=20,top=20')">
              &nbsp;<font color=red>请注意要将投稿添加在二级分类下</font> 
              <SCRIPT language=javascript>
function VerifySubmit(){
if (document.form.lbid.value.length == 0) {
alert("类别没有选择");
return false;}
if (document.form.bt.value.length == 0){
alert("标题没有填写!");
return false;}
if (document.form.nr.value.length == 0){
alert("内容没有填写!");
return false;}
if (document.form.nr.value.length > 10000){
alert("内容请保持在每稿10000字内!");
return false;}
return true;}
</script> </td>
          </tr>
        </form>
      </table>
	  <%End Select%>
 </td>
  </tr>
</table>
<!--#include file="bottom.asp"-->
