<!--#include file="../setting/conn.asp"--><!--#include file="../inc/cls_other.asp"-->
<%:SoonBiz.chkadmin:act=SoonBiz.ract:cid=SoonBiz.rid("cid"):SoonBiz.readchannel(cid):jinlan="<a href=?act=list&cid="& cid &">"&xmlchannel.getattribute("cha_name")&"管理</a>":Select Case act:Case "singlepage" : singlepage :Case "savesingle" : savesingle :Case "classadmin" : classlist :Case "savenewclass" : saveclassinfo(False) :Case "editclass" : classinfo(true) :Case "saveeditclass" : saveclassinfo(True):Case "delclass" : delclass:Case "classcontent" : editclasscontent :Case "sclasscontent" : sclasscontent :Case "creatnew" : fileinfo(false):Case "savenew" : saveinfo(false) :Case "list" : list :Case "recycle" : recycle:Case "del" : del:Case "editfile" : fileinfo(true):Case "saveedit" : saveinfo(true):Case "changeclass" : changeclass :Case "changetopic" : changetopic :Case "recls" : recls :Case "topicadmin" : topicadmin :Case "savenewtopic" : savenewtopic(false) :Case "edittopic" : topicinfo(true):Case "saveedittopic" : savenewtopic(true):Case "changetopic" : changetopic :Case "changechannel" : changechannel :Case "deltopic":SoonBiz.execute("delete from "& sheethead &"_topic where id="&SoonBiz.rid("id")):SoonBiz.loadtopic:SoonBiz.loadcachenum(cid):SoonBiz.ok:Case "bloglist" : bloglist :Case "userclass" : userclass :Case "blogispass":SoonBiz.execute("update "& sheethead &"_blog set ispass=1 where id in ("& SoonBiz.rids &")"):SoonBiz.loadcachenum(cid):SoonBiz.ok:Case "blogunpass":SoonBiz.execute("update "& sheethead &"_blog set ispass=0 where id in ("& SoonBiz.rids &")"):SoonBiz.loadcachenum(cid):SoonBiz.ok:Case "blogisgood":SoonBiz.execute("update "& sheethead &"_blog set isgood=1 where id in ("& SoonBiz.rids &")"):SoonBiz.loadcachenum(cid):SoonBiz.ok:Case "blogungood":SoonBiz.execute("update "& sheethead &"_blog set isgood=0 where id in ("& SoonBiz.rids &")"):SoonBiz.loadcachenum(cid):SoonBiz.ok:Case "delblog":SoonBiz.execute("delete from "& sheethead &"_blog where id in ("& SoonBiz.rids &")"):SoonBiz.loadcachenum(cid):SoonBiz.ok:Case "deluserclass" :SoonBiz.execute("delete from "& sheethead &"_userclass where id="&SoonBiz.rid("id")):SoonBiz.ok:Case "remove" : remove :Case "removeall" : removeall:Case "up":SoonBiz.execute ("update "& sheethead &"_article set cls=cls-1 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "down":SoonBiz.execute ("update "& sheethead &"_article set cls=cls+1 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "isgood":SoonBiz.execute ("update "& sheethead &"_article set isgood=1 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "ungood":SoonBiz.execute ("update "& sheethead &"_article set isgood=0 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "istop":SoonBiz.execute ("update "& sheethead &"_article set istop=1 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "untop":SoonBiz.execute ("update "& sheethead &"_article set istop=0 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "restore":SoonBiz.execute ("update ["& sheethead &"_article] set isdel=0 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:Case "ispass" :SoonBiz.execute ("update ["& sheethead &"_article] set ispass=1 where id in ("&SoonBiz.rids&")"):SoonBiz.loadcachenum (cid):SoonBiz.ok:End Select:SoonBiz.AdFoot():Setallnothing:Sub singlepage():Dim id,content:Dim sql,rs:sql="select id,content from "& sheethead &"_article where classid=-2 and cid="&cid:Set rs=SoonBiz.execute(sql)
If rs.eof Then 
rs.close:Set rs=Nothing:sql="insert into "& sheethead &"_article (cid,content,classid) values ("& cid &",'',-2)":SoonBiz.execute(sql):sql="select id from "& sheethead &"_article where classid=-2 and cid="&cid:Set rs=SoonBiz.execute(sql):id=rs(0):rs.close:Set rs=Nothing:content=""
Else:id=rs(0):content=rs(1):rs.close:Set rs=Nothing
End If:SoonBiz.LoadTemplatesAdmin("admin_article"):htmlstr=template.html(17):HtmlStr=Replace(HtmlStr,"{$cha_name}",xmlchannel.getattribute("cha_name")) :HtmlStr=Replace(HtmlStr,"{$cid}",cid):HtmlStr=Replace(HtmlStr,"{$id}",id):HtmlStr=Replace(HtmlStr,"{$editcontent}","<textarea id=""contentvalue"" name=""contentvalue"" class=""tempvalue"">{$content}</textarea><script type=""text/javascript"">wedonetedit('content','"& SoonBiz.Getcssnum(cid) &"');</script>"):HtmlStr=Replace(HtmlStr,"{$content}",server.htmlencode(content)):SoonBiz.iseditor=True:SoonBiz.adhead:SoonBiz.nstate("编辑"&xmlchannel.getattribute("cha_name")):Response.Write HtmlStr:End Sub:Sub savesingle():Dim content:Dim sql:id=SoonBiz.rid("id"):content=SoonBiz.RequestStr("内容","content","post",1,0,1000000,0,0):ShowErr("")
If saveoutimg=1 Then content=saveimg("ar"&id,content)
sql="update "& sheethead &"_article set content='"& SoonBiz.Checkstr(content) &"' where id="&id:SoonBiz.execute(sql):SoonBiz.loadcachenum(cid):SucMsg=SucMsg & "<li>保存记录成功.</li>"
If saveimgsuccess=False Then
SucMsg=SucMsg & "<li>由于网络原因,或对方限制采集,保存远程图片失败.</li>"
End If:SoonBiz.adsuccess(SucMsg):End Sub:Sub fileinfo(isedit):Dim showform:Set showform=New File_info:showform.isedit=isedit:showform.ShowFileInfo:Set showform=Nothing:End Sub:Class File_info:Private TransStr :Private id,fid:Private cha_field:Public IsEdit:Private Sub Class_Initialize:SoonBiz.LoadTemplatesAdmin("admin_article"):cha_field=xmlchannel.getattribute("cha_field"):cha_field=split(cha_field,"|"):cha_field(2)=split(cha_field(2),","):cha_field(3)=split(cha_field(3),","):cha_field(4)=split(cha_field(4),","):End Sub:Sub ShowFileInfo:Htmlstr=template.html(1):HtmlStr=Replace(HtmlStr,"{$cid}",cid):HtmlStr=Replace(HtmlStr,"{$optionclass}",optionclass(1)):HtmlStr=Replace(HtmlStr,"{$optiontopic}",SoonBiz.ReplaceXml(""& sheethead &"_topic","topic","<option value=""{$id}"">{$title}</option>","topic[@cid='"& cid &"']"))
If cha_field(0)="1" Then
HtmlStr=ReplaceProduct(HtmlStr) '::take':then:[::onbeen:andmake:have:is
Else:HtmlStr=Replace(HtmlStr,"{$productinfo}","")
End If
If cha_field(1)="1" Then
HtmlStr=Replace(HtmlStr,"{$downinfo}",template.html(3)) :HtmlStr=HtmlStr & DownPlus 
Else:HtmlStr=Replace(HtmlStr,"{$downinfo}","")
End If:HtmlStr=ReplaceField(HtmlStr) :HtmlStr=Replace(HtmlStr,"{$jsupdate}",jsupdate)'of'::that":get:behadbutnowsame:beingbymore
If isedit Then 
id=SoonBiz.rid("id"):HtmlStr=Replace(HtmlStr,"{$action}","?act=saveedit&comeurl="&Server.urlencode(Request.ServerVariables("HTTP_REFERER"))&"&cid="&cid&"&id="&id):HtmlStr=Replace(HtmlStr,"{$hailin}","编辑记录"):HtmlStr=Replace(HtmlStr,"{$fid}","ar"&id):HtmlStr=SoonBiz.ReplaceMdb("","select * from ["& sheethead &"_article] where id="&id,HtmlStr,"",1)
Else :HtmlStr=Replace(HtmlStr,"{$action}","?act=savenew&cid="&cid):HtmlStr=Replace(HtmlStr,"{$hailin}","添加新记录"):HtmlStr=Replace(HtmlStr,"{$fid}",""):HtmlStr=SoonBiz.EmptyTags(HtmlStr)
End If:SoonBiz.iseditor=True:SoonBiz.adhead:SoonBiz.nstate(jinlan):Response.Write htmlstr:End Sub:Private Function DownPlus():Dim yilin:yilin=template.html(7):yilin=Replace(yilin,"{$optionsoftos}",SoonBiz.optionlist(softos,",",1)):yilin=Replace(yilin,"{$optionsoftaccredit}",SoonBiz.optionlist(softaccredit,",",1)):DownPlus=yilin:End Function:Private Function ReplaceField(str):Dim yilin,shujun,i:For i=0 To 4
If cha_field(2)(i)="1" Then
shujun=template.html(4):shujun=Replace(shujun,"{$i}",i+1):shujun=Replace(shujun,"{$title}",cha_field(4)(i)):shujun=Replace(shujun,"{$mustfill}",ismustfill(cha_field(3)(i))):yilin=yilin&shujun'same;is:aboutoutitat:''^=:~:himthentheir
End If:Next:ReplaceField=Replace(str,"{$otherinfo}",yilin):End Function:Private Function ReplaceProduct(str):Dim yilin:yilin=template.html(2):yilin=Replace(yilin,"{$optiontrans}",SoonBiz.ReplaceMdb("","select * from ["& sheethead &"_trans] where typeid=0","<option value=""{$id}"">{$title}</option>","",1)) 
If isedit Then 
yilin=Replace(yilin,"{$transprice}",SoonBiz.ReplaceMdb("","select * from ["& sheethead &"_trans] where typeid=1","￥价格(元):<input type=""text"" id=""trans{$id}"" name=""trans{$id}"" size=""6"" value=""{$trans{$id}}"" />&nbsp; {$title}<br />","",1))
Else :yilin=Replace(yilin,"{$transprice}",SoonBiz.ReplaceMdb("","select * from ["& sheethead &"_trans] where typeid=1","￥价格(元):<input type=""text"" id=""trans{$id}"" name=""trans{$id}"" size=""6"" value=""0"" />&nbsp; {$title}<br />","",1))
End If:ReplaceProduct=Replace(str,"{$productinfo}",yilin):End Function:Private Function JsUpdate:Dim yilin
If isedit Then':'&:her!orare::did:"anyin:_:see
yilin=template.html(5)
If cha_field(0)="1" Then
yilin=yilin & template.html(9) 
End If
Else :yilin=template.html(6) 
If cha_field(0)="1" Then yilin=yilin & template.html(8) '`onlynever'#'::each:':butare+saidhiseach
yilin=Replace(yilin,"{$classid}",session("classid")):yilin=Replace(yilin,"{$topicid}",session("topicid")):yilin=Replace(yilin,"{$author}",session("author")):yilin=Replace(yilin,"{$comefrom}",session("comefrom"))
End If:JsUpdate="<script type=""text/javascript"">"& yilin &"</script>":End Function:Private Function ismustfill(num)
If clng(num)=1 Then
ismustfill="<cite>*</cite>"
End If:End Function:End Class:Sub saveinfo(isedit):Dim save:Set save=New Cls_save:save.isedit=isedit:save.saveinfo:Set save=Nothing:End Sub:Class Cls_Save :Public isedit:Private classid,topicid,title,titlestyle,titlestylecode,preimg,tags,descrip,readme,author,comefrom,isgood,istop,cls,content,hits :Private marketprice,price,weight,acounts,projectid:Private Atranslist,ApriceList:Private other1,other2,other3,other4,other5:Private downhits,accredit,mysize,myos,myver,myurl:Private rs,i,thisid:Private cha_field:Private pid:Private titlecolor,titleweight,titledecoration:private other(4):Private Sub Class_Initialize():cha_field=xmlchannel.getattribute("cha_field"):cha_field=split(cha_field,"|"):cha_field(2)=split(cha_field(2),","):cha_field(3)=split(cha_field(3),","):cha_field(4)=split(cha_field(4),","):End Sub:Public Sub SaveInfo():OpenSheet :GetUsual : GetProduct : GetDown : GetOther:ShowErr(""):UpdateInfo:CloseSheet:End Sub:Private Sub GetUsual:classid=SoonBiz.rid("classid"):topicid=SoonBiz.rid("topicid"):title=SoonBiz.RequestStr("标题","title","post",1,1,255,30,1):preimg=Trim(Request.Form("preimg")):tags=Trim(Request.Form("tags")):descrip=SoonBiz.RequestStr("描述","descrip","post",1,1,255,20,0):readme=Trim(Request.Form("readme")):author=Trim(Request.Form("author")):comefrom=Trim(Request.Form("comefrom")):isgood=SoonBiz.rid("isgood"):istop=SoonBiz.rid("istop"):cls=SoonBiz.rid("cls"):hits=SoonBiz.rid("hits"):titlecolor=Trim(Request.Form("titlecolor")):titleweight=Trim(Request.Form("titleweight")):titledecoration=Trim(Request.Form("titledecoration"))
If len(titlecolor)>0 Then titlestylecode="color:"& titlecolor &";"'over:|sincefromonly":likemost[mysuch:over\forgetcould
If len(titleweight)>0 Then titlestylecode=titlestylecode & "font-weight:"& titleweight &";"
If len(titledecoration)>0 Then titlestylecode=titlestylecode & "text-decoration:"& titledecoration &";"
If len(titlestylecode)>0 Then titlestylecode="style="""& titlestylecode &""""
titlestyle=titlecolor&"|"&titleweight&"|"&titledecoration
If isgood<0 Then isgood=0
If istop<0 Then istop=0'how:"}:""beendoheanother%":ourallatthemabout
If cls<0 Then cls=100
If hits<0 Then hits=0
content=SoonBiz.RequestStr("内容","content","post",1,1,200000,0,1)
If isedit Then
If saveoutimg=1 Then content=saveimg("ar"&id,content)
Else'betweenothermore"himself::ifshould:had:from:'there.hasbecause
If saveoutimg=1 Then content=saveimg(SoonBiz.fid,content)
End If
If Len(readme)=0 Then
readme=Left(Trim(SoonBiz.Replacehtml(content)),readmelength)
End If
If Len(preimg)<1 Then preimg=webdir&"images/nopic.jpg"'suchboth:histhan:there:alsomuchtheirthey:camealso::inout
If isedit Then
rs("etime")=now()
Else:rs("cid")=cid:rs("uid")=SoonBiz.user_id:rs("nickname")=SoonBiz.user_nickname:rs("stime")=now():rs("etime")=now()
End If:rs("classid")=classid:Rs("topicid")=topicid:rs("author")=author:rs("comefrom")=comefrom:rs("preimg")=preimg:Rs("title")=title:Rs("titlestyle")=titlestyle:Rs("titlestylecode")=titlestylecode:Rs("tags")=tags:Rs("descrip")=descrip:Rs("isgood")=isgood:Rs("istop")=istop:Rs("ispass")=1:Rs("cls")=cls:Rs("hits")=hits:Rs("readme")=readme:Rs("content")=content:End Sub:Private Sub GetProduct
If cha_field(0)="1" Then 
marketprice=SoonBiz.RequestStr("市场价格","marketprice","post",0,0,9999999,0,1):price=SoonBiz.RequestStr("本站价格","price","post",0,0,9999999,0,1):weight=SoonBiz.RequestStr("重量","weight","post",0,0,9999999,0,1):acounts=SoonBiz.Rid("acounts"):projectid=SoonBiz.Rid("projectid"):ATransList=GetTransList:For i=0 To Ubound(ATransList)':(:mostherehimselfhasme?canit:betweenbeforeseeheintobeing:
If Not IsNumeric (Trim(Request.Form("trans"&ATransList(i)))) Then
ShowErr("运费请填写数字")
Else
If Trim(Request.Form("trans"&ATransList(i)))<-1 Then 
ShowErr("非法操作")
End If'come::nowby#mydosome:manymakeanand:::!'
End If:Next:Rs("marketprice")=marketprice:Rs("price")=price:Rs("weight")=weight:Rs("acounts")=acounts:Rs("projectid")=projectid
If isarray(ATransList) Then
Select Case ProJectId:Case -1 :For i=0 To ubound(ATransList):Rs("trans"&ATransList(i))=Trim(Request.Form("trans"&ATransList(i))):Next:Case 0 :For i=0 To ubound(ATransList):Rs("trans"&ATransList(i))=0:Next:Case Else :Dim RsProject:Set RsProject=SoonBiz.execute("select translist,pricelist from "& sheethead &"_trans where id="&projectid):ATransList=Split(RsProject(0),","):APriceList=split(RsProject(1),","):RsProject.Close:Set RsProject=Nothing:For i=0 To ubound(ATransList):Rs("trans"&ATransList(i))=APriceList(i):Next:End Select
End If
Else 
If isedit Then'they{me%mightifcanthesestill'::'"allofother""
Else :Rs("marketprice")=0:Rs("price")=0:Rs("weight")=0:Rs("projectid")=0 :ATransList=GetTransList 
If isarray(ATransList) Then
For i=0 To ubound(ATransList):Rs("trans"&ATransList(i))=0:Next
End If
End If
End If:End Sub:Private Sub GetDown'/thanbecause:{::ashereafter:::@:mustgotmust)
If cha_field(1)="1" Then
downhits=SoonBiz.RequestStr("下载量","downhits","post",0,0,999999999,0,1):accredit=Trim(Request.Form("accredit")):mysize=SoonBiz.RequestStr("文件大小","mysize","post",0,0,999999999,0,1):myos=Trim(Request.Form("myos")):myver=Trim(Request.Form("myver")):myurl=Trim(Request.Form("myurl")):ShowErr("")
If downhits<0 Then downhits=0
If len(myurl)>0 Then
If instr(myurl,chr(34))>0 or instr(myurl,chr(39))>0 Then
ShowErr("下载地址中不能有引号")'somecouldthe$:since*theanother::take':then:[::
End If
If instr(myurl,"|")<1 Then
ShowErr("下载地址格式错误(必须有|号)")
End If
End If:Rs("downhits")=downhits:Rs("accredit")=accredit:Rs("mysize")=mysize:Rs("myos")=myos:Rs("myver")=myver:Rs("myurl")=myurl
Else'onbeen:andmake:have:isof'::that":get:be
If isedit Then
Else:Rs("downhits")=0:Rs("accredit")="":Rs("mysize")=0:Rs("myos")="":Rs("myver")="":Rs("myurl")=""
End If
End If:End Sub:Private Sub GetOther:Dim i:For i=0 To 4
If cha_field(2)(i)="1" Then 
other(i)=SoonBiz.RequestStr(cha_field(4)(i),"other"&(i+1),"post",1,1,255,0,cha_field(3)(i)):ShowErr(""):Rs("other"&(i+1))=other(i)'hadbutnowsame:beingbymoresame;is:aboutoutitat:'
End If:Next:End Sub:Private Sub OpenSheet:SoonBiz.ConnectionDatabase:Set rs=server.CreateObject("adodb.recordset")
If isedit Then
id=SoonBiz.rid("id"):rs.open ("select * from ["& sheethead &"_article] where id="&id),conn,1,3:rs("etime")=now()
Else:rs.open ""& sheethead &"_article",conn,1,3:rs.addnew:rs("cid")=cid:rs("uid")=SoonBiz.user_id:rs("nickname")=SoonBiz.user_nickname:rs("stime")=now():rs("etime")=now()
End If:End Sub:Private Sub CloseSheet:rs.update
If isedit Then''^=:~:himthentheir:'&:her!orare::
sucmsg="<li>保存记录成功</li>"
Else:sucmsg="<li><a href="&request.servervariables("http_referer")&" >继续添加</a><li><a href='?act=list&cid="&cid&"&classid="& classid &"'>返回"& xmlchannel.getattribute("cha_name") &"管理</a>"
End If:SoonBiz.adsuccess(SucMsg):End Sub:Private Sub UpdateInfo:thisid=Rs("id")
If Not isedit Then
SoonBiz.execute("update "& sheethead &"_channel set cha_count=cha_count+1 where id="&cid):SoonBiz.execute("update "& sheethead &"_class set postnum=postnum+1,todaynum=todaynum+1 where id="&classid):SoonBiz.UpXmlPostnum(classid):pid=SoonBiz.Getxmlvalue("class","class[@id="& classid &"]","pid")
If clng(pid)>0 Then'did:"anyin:_:see`onlynever'#'::each:
SoonBiz.execute("update "& sheethead &"_class set postnum=postnum+1,todaynum=todaynum+1 where id="&pid):SoonBiz.UpXmlPostnum(pid)
End If:session("classid")=classid:session("topicid")=topicid:session("author")=author:session("comefrom")=comefrom:SoonBiz.uplist "ar"&thisid
End If:SoonBiz.loadcachenum (cid)
If saveimgsuccess=False Then
SucMsg=SucMsg & "<li>由于网络原因,或对方限制采集,保存远程图片失败.</li>"
End If:End Sub:End Class:Sub List():SoonBiz.LoadTemplatesAdmin("admin_article"):Dim astr:astr=SoonBiz.PlusSQL("select * from ["& sheethead &"_article] where cid="& cid &" and classid<>-2 and isdel=0 ","?act=list&amp;cid="&cid):astr(0)=astr(0) & " order by istop desc, cls asc,id desc "'':butare+saidhiseachover:|sincefromonly":likemost
If CLng(split(xmlchannel.getattribute("cha_field"),"|")(0))<>1 Then
SoonBiz.TopPlus="<style type=""text/css"">i {display:none;}</style>" 
Else:SoonBiz.TopPlus="<style type=""text/css"">i {display:block;}</style>" 
End If:SoonBiz.adhead:SoonBiz.nstate(jinlan):Response.Write SoonBiz.JsClassName(cid):Response.Write SoonBiz.JsTopicName(cid):listfilter:htmlstr=template.html(12):HtmlStr=Replace(HtmlStr,"{$trhtml}",SoonBiz.ReplaceMdb("admin_article.asp",astr(0),template.html(13),"",0)):HtmlStr=Replace(HtmlStr,"{$pagelist}",SoonBiz.pagelist("")):HtmlStr=Replace(HtmlStr,"{$cid}",cid):HtmlStr=Replace(HtmlStr,"{$optionclasslist}",optionclasslist):HtmlStr=Replace(HtmlStr,"{$optiontopiclist}",optiontopiclist):HtmlStr=Replace(HtmlStr,"{$optionchannellist}",SoonBiz.ReplaceXml(sheethead&"_channel","channel","<option value=""{$id}"">{$cha_name}</option>","channel[(@cha_moduleid='3' or @cha_moduleid='4' or @cha_moduleid='5')]")):HtmlStr=Replace(HtmlStr,"{$astr(2)}",astr(2)):Response.Write Htmlstr:End Sub:Sub Recycle:Dim url:Dim shujun:Dim sql:jinlan=xmlchannel.getattribute("cha_name")&"回收站管理":sql="select * from ["& sheethead &"_article] where cid="& cid &" and isdel=1 order by id desc ":url="?page={$page}&amp;cid="&cid&"&act="&act:shujun="<tr onmouseover=""this.style.backgroundColor='#e2e8f4'"" onmouseout=""this.style.backgroundColor=''"" ><td align='center'>{$id}</td><td>{$title}</a></td><td align='center'><script type=""text/javascript"">document.write(classname[""{$classid}""]);</script></td><td align='center'>{$nickname}</td><td align='center'>{$cls}</td><td align='center'>{$stime_short}</td><td align='center'><a href='?act=editfile&id={$id}&cid="&cid&"'>编辑</a></td><td align='center'><input type='checkbox' name='id' id='id' value='{$id}'></td></tr>":SoonBiz.adhead:SoonBiz.nstate(jinlan):Response.Write SoonBiz.JsClassName(cid):Response.Write "<form method=post action=""?"" id=""myform"" name=""myform"">":Response.Write "<table class=tableborder1 cellspacing=""1"">":Response.Write " <tr>":Response.Write " <th width=40>ID</th>":Response.Write " <th width=*>标题</th>":Response.Write " <th width=120>分类</th>":Response.Write " <th width=80>添加</th>":Response.Write " <th width=40>排序</th>":Response.Write " <th width=80>时间</th>":Response.Write " <th width=40>操作</th>":Response.Write " <th width=40>选择</th>":Response.Write " </tr>":Response.Write SoonBiz.ReplaceMdb("文章回收站",sql,shujun,"",0):Response.Write "</table>":Response.write SoonBiz.PageList(""):Response.Write "<div id=""operate"">":Response.Write " <input type=""button"" onClick=""CheckAll(myform)"" value=""全选"">":Response.Write " <input type=""button"" onClick=""ContraSel(myform)"" value=""反选"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=remove&cid="& cid &"','确定删除原文件吗!\n删除后不可恢!')"" value=""移除"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=removeall&cid="& cid &"','确定要清空回收站!')"" value=""清空回收站"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=restore&cid="& cid &"','')"" value=""还原"">":Response.Write "</div>":Response.Write "</form>":End Sub:Sub del():Dim sql:id=SoonBiz.rids():sql="update "& sheethead &"_article set isdel=1 where id in ("& id &")":SoonBiz.execute(sql):SoonBiz.loadcachenum (cid) :SoonBiz.ok:End Sub:Sub changeclass():Dim toid,sql,id:id=SoonBiz.rids():toid=SoonBiz.rid("toclassid")
If toid<0 Then
ShowErr("请选择转移到哪个分类")'[mysuch:over\forgetcouldhow:"}:""beendohe
End If:sql="update "& sheethead &"_article set classid="& toid &" where id in("& id &")":SoonBiz.execute(sql):SoonBiz.loadcachenum (cid):SoonBiz.loadcachenum (toid):SoonBiz.adsuccess("转移分类成功!"):End Sub:Sub changetopic():Dim toid,sql,id:id=SoonBiz.rids():toid=SoonBiz.rid("totopicid")
If toid<0 Then
ShowErr("请选择转移到哪个专题")
End If:sql="update "& sheethead &"_article set topicid="& toid &" where id in("& id &")":SoonBiz.execute(sql):SoonBiz.loadcachenum (cid):SoonBiz.adsuccess("转移专题成功!"):End Sub:Sub changechannel():Dim toid,sql,id,i:id=SoonBiz.rids():toid=SoonBiz.rid("channelid")
If toid<0 Then
ShowErr("请选择转移到哪个频道")'another%":ourallatthemaboutbetweenothermore"himself::ifshould:
End If:sql="update "& sheethead &"_article set cid="& toid &",classid=0 where id in("& id &")":SoonBiz.execute(sql):id=split(id,","):For i=0 To ubound(id):id(i)="'ar"& id(i) &"'":Next:sql="update "& sheethead &"_uplist set cid="& toid &" where fid in("& join(id,",") &")":SoonBiz.Execute(sql):SoonBiz.loadcachenum (cid):SoonBiz.loadcachenum (toid):SoonBiz.adsuccess("转移频道成功!"):End Sub:Sub remove():Dim idlist:idlist=SoonBiz.rids:SoonBiz.execute ("delete from "& sheethead &"_article where cid="& SoonBiz.rid("cid") &" and id in ("& idlist &")"):SoonBiz.Execute ("delete from "& sheethead &"_comman where cid="& cid &" and bid in("& idlist &")"):Delimage "ar",idlist:SoonBiz.ok:End Sub:Sub removeall():Dim i,idlist,aidlist:Dim rs,arrs,jinfang:Set rs=SoonBiz.execute("select id from "& sheethead &"_article where isdel=1 and cid="&cid)
If Not rs.eof Then
arrs=rs.getrows(-1)
Else:arrs=""
End If:rs.close:Set rs=Nothing:SoonBiz.execute ("delete from "& sheethead &"_article where isdel=1 and cid="& SoonBiz.rid("cid")):Delimage "ar",arrs:SoonBiz.ok:End Sub:Sub bloglist():Dim shujun:Dim astr:shujun="<tr onmouseover=""this.style.backgroundColor='#e2e8f4';"" onmouseout=""this.style.backgroundColor='';"" > <td align=center>{$id}</td> <td>{$nickname}</td> <td><a href=""../myblog.asp?b={$uid}"" target=_blank class=""ahover"">{$title} <span style=""width:200px;""> 密码:{$blogpass}<br /> 图片路径:{$preimg}<br /> 关键词:{$tags}<br /> 介绍:{$readme}<br /> </span> </a></td> <td align=center><script type=""text/javascript"">isright({$ispass});</script></td> <td align=center><script type=""text/javascript"">isright({$isgood});</script></td> <td align=center>{$stime_short}</td> <td align=center><input type=""checkbox"" value=""{$id}"" name=""id"" /></td></tr>":astr=SoonBiz.PlusSQL("select * from ["& sheethead &"_blog] where isdel=0","?act=bloglist"):SoonBiz.Title="博客管理":SoonBiz.adhead:SoonBiz.nstate("博客管理"):Bloglistfilter:Response.Write "<form method=""post"" action="""" name=""myform"" id=""myform"">":Response.write "<table class=tableborder1 cellspacing=""1"">":Response.Write "<tr>":Response.Write " <th width=40>ID</th>":Response.Write " <th width=80>用户</th>":Response.Write " <th width=*>博客名称</th>":Response.Write " <th width=40>运行</th>":Response.Write " <th width=40>推荐</th>":Response.Write " <th width=50>时间</th>":Response.Write " <th width=30>选择</th>":Response.Write "</tr>":Response.Write SoonBiz.replacemdb("",astr(0),shujun,"",0):Response.Write "</table>":Response.Write SoonBiz.pagelist(""):Response.Write "<div class=""operate"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=delblog&cid="&cid&"','确定要删除选定的博客!')"" value=""删除"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=blogisgood&cid="&cid&"','')"" value=""推荐"">/<input type=""button"" onClick=""Csubmit('myform','?act=blogungood&cid="&cid&"','')"" value=""取消"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=blogispass&cid="&cid&"','')"" value=""运行"">/<input type=""button"" onClick=""Csubmit('myform','?act=blogunpass&cid="&cid&"','')"" value=""关闭"">":Response.Write "</div>":Response.Write "</form>":Response.Write "<script type=""text/javascript"">"&astr(2)&"</script>":End Sub:Sub Bloglistfilter():Response.Write "<div class=""listfilter"">":Response.Write "<form method=get action="""">":Response.Write " <input type=""hidden"" name=""act"" value=""bloglist"" />":Response.Write " <input type=""hidden"" name=""cid"" value="""& cid &""" />":Response.Write " <input type=""text"" name=""keyword"" class=""inputsearch"" id=""keyword"">":Response.Write " <select name=""myfield"" id=""myfield"">":Response.Write " <option value=""title"">按博客名称搜索</option>":Response.Write " <option value=""nickname"">按作者昵称搜索</option>":Response.Write " <option value=""uid"">按用户ID搜索</option>":Response.Write " </select>":Response.Write " <select id=""isgood"" name=""isgood"">":Response.Write " <option value=""-1"">全部</option>":Response.Write " <option value=""1"">推荐</option>":Response.Write " <option value=""0"">未推荐</option>":Response.Write " </select>":Response.Write " <select id=""ispass"" name=""ispass"">":Response.Write " <option value=""-1"">全部</option>":Response.Write " <option value=""1"">运行</option>":Response.Write " <option value=""0"">关闭</option>":Response.Write " </select>":Response.Write " <input type='submit' name=""submit"" value='搜索' class='submit'>":Response.Write " </form>":Response.Write "</div>":End Sub:Sub userclass():Dim sql,tr:sql="select * from ["& sheethead &"_userclass] order by uid desc,id asc":SoonBiz.adhead:SoonBiz.nstate("用户分类管理"):Response.Write "<table cellspacing=1 class=tableborder1>":Response.Write "<tr>":Response.Write "<th width=40>ID</th>":Response.Write "<th width=60>用户ID</th>":Response.Write "<th>分类名称</th>":Response.Write "<th>排序</th>":Response.Write "<th width=200>操作</th>":Response.Write "</tr>":tr="<tr align=center> <td>{$id}</td> <td>{$uid}</td> <td align=left id=""title{$id}"">{$title}</td> <td id=""cls{$id}"">{$cls}</td> <td><a href=""?act=deluserclass&cid="& cid &"&id={$id}"" onClick=""return confirm('确定要删除么?\n\n删除后不可恢复')"">删除</a></td> </tr>":Response.Write SoonBiz.ReplaceMdb("userclass",sql,tr,"",0):Response.Write "</table>":Response.Write SoonBiz.pagelist(""):End Sub:Function GetTransList():Dim rs,tempstr:Set rs=SoonBiz.Execute("select id from "& sheethead &"_trans where typeid=1 order by cls asc,id asc")
If Not rs.eof Then'had:from:'there.hasbecausesuchboth:histhan:there:alsomuch
tempstr=Rs.GetString(, , "", ",", ""):GetTransList=split(left(tempstr,len(tempstr)-1),",")
Else:GetTransList=""
End If:Rs.Close:Set Rs=Nothing:End Function:Sub recls():Dim idlist,clslist:Dim i:idlist=Split(Replace(Trim(Request.Form("id"))," ",""),","):clslist=Split(Replace(Trim(Request.Form("cls"))," ",""),","):Redim sql(ubound(idlist)):For i=0 To Ubound(idlist)
If Not IsNumeric (clslist(i)) Then
ShowErr("排序数请输入数字")
End If:sql(i)="update "& sheethead &"_article set cls="& clslist(i) &" where id="&idlist(i):Next:For i=0 To ubound(idlist):SoonBiz.execute(sql(i)):Next:SoonBiz.loadcachenum (cid):SoonBiz.adsuccess("排序成功!"):End Sub
%>