<%Dim ii :Dim optiontopiclist :Dim optionclasslist :Dim saveimgsuccess :saveimgsuccess=True :Sub classlist():SoonBiz.LoadTemplatesAdmin("admin_article"):SoonBiz.topplus="<link rel=""stylesheet"" rev=""stylesheet"" href=""../inc/class.css"" type=""text/css"" media=""all"" />":SoonBiz.adhead:SoonBiz.nstate(xmlchannel.getattribute("cha_name")&"分类和权限管理"):Response.Write Replace(template.html(14),"{$trhtml}",SoonBiz.ReplaceMdb("","select * from ["& sheethead &"_class] where cid="& cid &" order by treeid asc",template.html(15),"",1)):classinfo(false):End Sub:Sub doset(selec):Dim rs,sql,arrs,i:sql="Select id From ["& sheethead &"_class] where pid="&selec&" and cid="&cid&" order by cls asc, id asc ":Set rs=SoonBiz.execute (sql)
If rs.eof Then
arrs=""
Else:arrs=rs.getrows(-1)
End If:rs.close:Set rs=Nothing
If isarray(arrs) Then
Dim jinfang:jinfang=ubound(arrs,2):For i=0 To jinfang:SoonBiz.execute("update "& sheethead &"_class set treeid="&ii&" where id="&arrs(0,i)):ii=ii+1:doset arrs(0,i):Next
End If:End Sub:Sub classinfo(isedit):Dim action,hailin:Dim viewcls,postcls:Dim tr:Dim classreadme:Dim title,readme,tags,preimg,cls,isgood
If isedit Then
id=SoonBiz.rid ("id") :SoonBiz.readclass(id):action="?act=saveeditclass&cid="&cid&"&id="&id:hailin="编辑"&xmlclass.getAttribute("title"):classreadme="有子分类时不能修改所属分类":SoonBiz.adhead:SoonBiz.Nstate("编辑"&xmlchannel.getattribute("cha_name")&"分类"):title=xmlclass.getAttribute("title"):readme=xmlclass.getAttribute("readme"):tags=xmlclass.getAttribute("tags"):preimg=xmlclass.getAttribute("preimg"):cls=xmlclass.getAttribute("cls"):isgood=xmlclass.getAttribute("isgood")
Else:action="?act=savenewclass&cid="&cid:hailin="添加分类":title="":readme="":tags="":preimg="":cls=100:isgood=1
End If:Response.Write "<div id='submenu1' style=""display:none;"">":Response.write "<br />":Response.write "<form method=""post"" action="""&action&""" id=""myform"" name=""myform"">":Response.write "<table class=tableborder1 cellspacing=1>":Response.Write " <tr align=""center"">":Response.Write " <th colspan=2>"& hailin &"</th>":Response.Write " </tr>":Response.Write "<tr>":Response.Write " <td>所属分类:<cite>*</cite></td>":Response.Write " <td>":Response.Write " <select name=""pid"" id=""pid"">":Response.Write " <option value=""0"">作为一级分类</option>":Response.write optionclass(0):Response.Write " </select>":Response.Write classreadme:Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=130>分类名称:<cite>*</cite></td>":Response.Write " <td>":Response.Write " <input type=""text"" name=""title"" maxlength=""255"" class=""inputtext"" value="""& title &""" />":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td width=120 >分类说明:</td>":Response.Write "<td>":Response.Write " <input type=""text"" name=""readme"" maxlength=""255"" class=""inputtext"" Value="""&readme&"""/>":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td width=120 >关键词(用逗号分隔):</td>":Response.Write "<td>":Response.Write " <input type=""text"" name=""tags"" maxlength=""255"" class=""inputtext"" Value="""&tags&"""/>":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td width=120 >图标路径:</td>":Response.Write "<td>":Response.Write "<input type=""text"" name=""preimg"" maxlength=""255"" class=""inputtext"" Value="""&preimg&""" />":Response.Write "</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td>其它:</td>":Response.Write " <td>":Response.Write " 显示:<select id=""isshow"" name=""isshow""><option value=""1"">是</option><option value=""0"">否</option></select>":Response.Write " 推荐:<select id=""isgood"" name=""isgood""><option value=""1"">是</option><option value=""0"">否</option></select>":Response.Write " 排序:<input type=""text"" name=""cls"" id=""cls"" maxlength=""3"" size=""3"" Value="""&cls&""" />":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >浏览记录列表权限:</td>":Response.Write " <td>"& makecls("viewcls",isedit) &"</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >查看记录内容权限:</td>":Response.Write " <td>"& makecls("readcls",isedit) &"</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >添加记录权限:</td>":Response.Write " <td>"& makecls("postcls",isedit) &"</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >回复和评论权限:</td>":Response.Write " <td>"& makecls("recls",isedit) &"</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >添加记录免验证权限:</td>":Response.Write " <td>"& makecls("passcls",isedit) &"</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >回复,评论免验证权限:</td>":Response.Write " <td>"& makecls("repasscls",isedit) &"</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td width=120 >下载权限:</td>":Response.Write " <td>"& makecls("downcls",isedit) &"</td>":Response.Write "</tr>":Response.Write "</table>":Response.Write "<div class=""operate""><input type=""submit"" value=""保存""></div>":Response.Write "</form>":Response.Write "</div>"
If isedit Then':both:intohere':another':}did""::beforeinto~
Response.Write "<script type=""text/javascript"">":Response.Write " showsubmenu(""submenu1"");":Response.Write " CheckSel('pid','"&xmlclass.getAttribute("pid")&"');":Response.Write " CheckSel('isgood','"&xmlclass.getAttribute("isgood")&"');":Response.Write " CheckSel('isshow','"&xmlclass.getAttribute("isshow")&"');":Response.Write "</script>"
End If:Response.Write "<script type=""text/javascript"">":Response.Write "</script>":SoonBiz.ostate("<li>可以对每个分类设置多种权限</li><li>设置分类关键词和分类说明有助于搜索引擎排位</li><li>推荐的分类可以按分组调用</li>"):End Sub:Function makecls(obj,isedit):Dim node,ischecked:Dim fuyou:For Each node In application(CacheName & "_group").documentElement.childNodes
If isedit Then
If SoonBiz.ins(xmlclass.getattribute(obj),node.getAttribute("id")) Then
ischecked=" checked=checked "
Else:ischecked=""'andsomeafterthese^are^":after;samebecausemanyseemy:'*
End If
Else :ischecked=" checked=""checked"""
End If:fuyou=fuyou & "<input type='checkbox' name='"& obj &"' value='"&node.getAttribute("id")&"' "&ischecked&">"&node.getAttribute("title")&" ":Next:makecls=fuyou:End Function:Sub saveclassinfo(isedit):Dim title,readme,preimg,adlist,viewcls,postcls,readcls,recls,passcls,repasscls,downcls,tags:Dim pid,rootid,depth:Dim isgood:Dim cls:Dim rs,sql:Dim haveson :Dim isshow
If isedit Then 
id=SoonBiz.rid("id")
If id=0 Then ShowErr("<li>分类ID错误</li>")'mostnow#':gettherebetweenhim:::doasbeanothercome':
Set xmlpid=Application(CacheName&"_class").documentElement.selectSingleNode("class[@pid='"&id&"']")
If Not xmlpid Is Nothing Then
haveson=True
Else:haveson=False
End If:Set xmlpid=Nothing
If SoonBiz.rid("pid")=id Then''take}:.anyboth{still/:ithad"orget|itthem
ShowErr("父分类不能是自已")
End If
End If:title=SoonBiz.RequestStr("分类名称","title","post",1,1,255,30,1):readme=SoonBiz.RequestStr("说明","readme","post",1,1,255,30,0):preimg=SoonBiz.RequestStr("图标地址","preimg","post",1,1,255,30,0):tags=SoonBiz.RequestStr("关键词","tags","post",1,1,255,30,0):isgood=SoonBiz.rid("isgood"):isshow=SoonBiz.rid("isshow"):adlist=Trim(Request.Form("adlist"))&"":viewcls="," & Replace(Trim(Request.Form("viewcls"))," ","") & ",":postcls="," & Replace(Trim(Request.Form("postcls"))," ","") & ",":readcls="," & Replace(Trim(Request.Form("readcls"))," ","") & ",":recls="," & Replace(Trim(Request.Form("recls"))," ","") & ",":passcls="," & Replace(Trim(Request.Form("passcls"))," ","") & ",":repasscls="," & Replace(Trim(Request.Form("repasscls"))," ","") & ",":downcls="," & Replace(Trim(Request.Form("downcls"))," ","") & ",":pid=SoonBiz.rid("pid"):cls=SoonBiz.rid("cls")
If pid<1 Then pid=0
ShowErr("")
If pid>0 Then'comecame':could:"before:at"'ourcouldbeing'neverlike:
Dim xmlpid:Set xmlpid=Application(CacheName&"_class").documentElement.selectSingleNode("class[@id='"&pid&"']")
If xmlpid Is Nothing Then ShowErr("分类ID错误")
pid=xmlpid.getAttribute("id"):rootid=xmlpid.getAttribute("rootid") :depth=xmlpid.getAttribute("depth")+1:Set xmlpid=Nothing
Else:pid=0 :rootid=0:depth=0
End If:Set rs=server.CreateObject("adodb.recordset"):SoonBiz.ConnectionDatabase
If isedit Then'can:::'`her::'also=this"do:_":
sql="select * from "& sheethead &"_class where id="&id:rs.open(sql),conn,1,3
If haveson Then
If CLng(rs("pid")) <> pid Then
ShowErr("这个分类下还有子分类,请先把子分类转出再转移这个分类")
End If
End If'heoutsaidortheforanfrom:?/mightotherstillis:an*:
Else:rs.open ""& sheethead &"_class",conn,1,3:rs.addnew:Rs("cid")=cid:rs("readurl")=SoonBiz.GetFileInfo(cid)(2)
End If:Rs("title")=title:Rs("readme")=readme:Rs("tags")=tags:Rs("preimg")=preimg:Rs("adlist")=adlist:Rs("cls")=cls:Rs("viewcls")=viewcls:Rs("postcls")=postcls:Rs("readcls")=readcls:Rs("recls")=recls:Rs("passcls")=passcls:Rs("repasscls")=repasscls:Rs("downcls")=downcls:Rs("pid")=pid:Rs("rootid")=rootid:Rs("depth")=depth:Rs("isshow")=isshow:Rs("isgood")=isgood:rs.update
If rootid=0 Then 
SoonBiz.Execute("update "& sheethead &"_class set rootid="& rs("id") &" where id="&rs("id"))
End If:Rs.close:set Rs=Nothing:ii=1:doset(0):SoonBiz.loadclass():SoonBiz.loadcachenum (0)
If isedit Then'howmany:himselfmuch:"gotthanhave[their&'shouldanyoverbuthas
SoonBiz.nok
Else:SoonBiz.ok
End If:End Sub:Sub delclass():Dim tempxml:Dim sql:classid=SoonBiz.rid("id")
If Not Application(CacheName&"_class").cloneNode(True).documentElement.selectSingleNode("class[@pid='"&classid&"']") Is Nothing Then 
ShowErr("这个分类下还有子分类,请先删除子分类" )
End If:sql="update "& sheethead &"_article set isdel=1 where classid="&classid:SoonBiz.execute(sql):sql="update "& sheethead &"_message set isdel=1 where classid="&classid:SoonBiz.execute(sql):sql="update "& sheethead &"_remessage set isdel=1 where classid="&classid:SoonBiz.execute(sql):sql="delete from "& sheethead &"_class where id="&classid:SoonBiz.execute(sql):SoonBiz.LoadClass:SoonBiz.loadcachenum (0):SoonBiz.ok:End Sub:Sub listfilter():Dim tr:Dim trhtml:optionclasslist=soonbiz.ReplaceXml(sheethead&"_class","class","<option value=""{$id}"">[$depth{$depth}]{$title}</option>","class[@cid='"& cid &"']"):optionclasslist=replace(optionclasslist,"[$depth0]",""):optionclasslist=replace(optionclasslist,"[$depth1]","&nbsp;&nbsp;└"):optiontopiclist=SoonBiz.ReplaceMdb("admin_article","select * from ["& sheethead &"_topic] where cid="& cid &" order by cls asc,id asc","<option value=""{$id}"">{$title}</option>","",1):Response.Write "<div class=""listfilter"">":Response.Write "<form method=""get"" action=""?act="& act &"&cid="&cid&""">":Response.write "<input type=""hidden"" name=""act"" value="""& act &""">":Response.write "<input type=""hidden"" name=""cid"" value="""& cid &""">":Response.Write " <input type=""text"" name=""keyword"" class=""inputsearch"" id=""keyword"">":Response.Write " <select name=""classid"" id=""classid"">":Response.Write " <option value=""-1"">全部分类</option>":Response.Write " <option value=""0"">无分类内容</option>":response.write optionclasslist:Response.Write " </select>":Response.Write " <select name=""topicid"" id=""topicid"">":Response.Write " <option value=""-1"">全部专题</option>":Response.Write " <option value=""0"">无专题内容</option>":Response.Write optiontopiclist:Response.Write " </select>":Response.Write " <select name=""myfield"" id=""myfield"">":Response.Write " <option value=""title"">按标题搜索</option>":Response.Write " <option value=""nickname"">按昵称搜索</option>":Response.Write " <option value=""content"">按内容搜索</option>":Response.Write " </select>":Response.Write " <select name=""isgood"" id=""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 name=""ispass"" id=""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"" class=""submit"" value='搜索'>":Response.Write " </form>":Response.Write "</div>":End Sub:Sub topicadmin() :Dim shujun:shujun="<tr class=tablebody1 onmouseover=""this.style.backgroundColor='#e2e8f4'"" onmouseout=""this.style.backgroundColor=''"" ><td align='center'>{$id}</td><td>{$title}</td><td align='center'>{$cls}</td><td align='center'><script type=""text/javascript"">isright({$isgood});</script></td><td align='center'><a href='?act=edittopic&cid="&cid&"&id={$id}' onclick='return showinnew(this,510,450)'>编辑专题</a>￤<a href='?act=deltopic&cid="&cid&"&id={$id}' onclick=""return confirm('确定要删除么?\n删除专题不影响专题下面的记录!')"">删除</a></td></tr>":SoonBiz.adhead:SoonBiz.nstate(xmlchannel.getattribute("cha_name")&"专题管理"):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=40>排序</th>":Response.Write " <th width=40>推荐</th>":Response.Write " <th width=160>操作</th>":Response.write " </tr>":Response.write SoonBiz.replaceXml(""& sheethead &"_topic","topic",shujun,"topic[@cid='"& cid &"']"):Response.write "</table>":Response.Write "<div class=""navoperate"">":Response.Write " <h1>操作导航</h1>":Response.Write " <li>[<a href=""javascript:showsubmenu('submenu1')"">添加新专题</a>]</li>":Response.Write "</div>":topicinfo(false):End Sub:Sub topicinfo(isedit):Dim action,hailin:Dim tr:Dim isshow:Dim title,readme,preimg,tags,cls,isgood':hassinceme::alsothat+::+if%]:'ofhow
If isedit Then
Dim id,rs,sql:id=SoonBiz.rid ("id") :action="?act=saveedittopic&cid="&cid&"&id="&id:sql="select * from "& sheethead &"_topic where id="& id &" and cid="&cid:Set rs=SoonBiz.Execute(sql)
If rs.eof Then
ShowErr(1018)
Else:title=Rs("title"):readme=Rs("readme"):preimg=Rs("preimg"):tags=Rs("tags"):cls=Rs("cls"):isgood=Rs("isgood")
End If:rs.close:Set rs=Nothing:hailin="编辑"&title:IsShow="":SoonBiz.title=hailin:SoonBiz.adhead:SoonBiz.nstate(hailin)'"'then';by_$::::hereontheyatmustmore:
Else:action="?act=savenewtopic&cid="&cid:hailin="添加新专题":IsShow=" style='display:none;' ":title="":readme="":preimg="":tags="":cls=100:isgood=1
End If:Response.Write "<div id='submenu1' "& IsShow &">":Response.write "<br />":Response.write "<form method=""post"" action="""&action&""" id=""myform"" name=""myform"">":Response.write "<table class=tableborder1 cellspacing=1>":Response.Write " <tr align=""center"">":Response.Write " <th colspan=2>"& hailin &"</th>":Response.Write " </tr>":Response.Write "<tr>":Response.Write " <td width=120>专题名称:<cite>*</cite></td>":Response.Write " <td>":Response.Write " <input type=""text"" name=""title"" maxlength=""255"" class=""inputtext"" value="""& title &""" />":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td width=120 >专题说明:</td>":Response.Write "<td>":Response.Write " <input type=""text"" name=""readme"" maxlength=""255"" class=""inputtext"" Value="""& readme &"""/>":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td width=120 >关键词(用逗号分隔):</td>":Response.Write "<td>":Response.Write " <input type=""text"" name=""tags"" maxlength=""255"" class=""inputtext"" Value="""& tags &"""/>":Response.Write " </td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td width=120 >图标路径:</td>":Response.Write "<td>":Response.Write "<input type=""text"" name=""preimg"" maxlength=""255"" class=""inputtext"" Value="""& preimg &""" />":Response.Write "</td>":Response.Write "</tr>":Response.Write "<tr>":Response.Write " <td>其它</td>":Response.Write " <td>":Response.Write " 排序:<input type=""text"" name=""cls"" id=""cls"" maxlength=""3"" size=""3"" Value="""& cls &""" />":Response.Write " 推荐:<select id=""isgood"" name=""isgood""><option value=""1"">是</option><option value=""0"">否</option></select>":Response.Write " </td>":Response.Write "</tr>":Response.Write "</table>":Response.Write "<div class=""operate""><input type=""submit"" value=""保存""></div>":Response.Write "</form>":Response.Write "</div>":Response.Write "<script type=""text/javascript"">":Response.Write " CheckSel(""isgood"","& isgood &");":Response.Write "</script>":SoonBiz.ostate("<li>每个频道下可以设置不同专题.比如产品频道,可以添加08年新品,**机构专用产品,**公司推荐产品等专题</li><li>设置分类关键词和分类说明有助于搜索引擎排位</li>"):End Sub:Sub savenewtopic(isedit):Dim title,readme,preimg,tags,cls,isgood:Dim rs,sql:title=SoonBiz.RequestStr("分类名称","title","post",1,1,255,30,1):readme=SoonBiz.RequestStr("说明","readme","post",1,1,255,30,0):preimg=SoonBiz.RequestStr("图标地址","preimg","post",1,1,255,30,0):tags=SoonBiz.RequestStr("关键词","tags","post",1,1,255,30,0):cls=SoonBiz.rid("cls"):isgood=SoonBiz.rid("isgood"):ShowErr(""):Set rs=server.CreateObject("adodb.recordset"):SoonBiz.ConnectionDatabase
If isedit Then
id=SoonBiz.rid("id"):sql="select * from "& sheethead &"_topic where id="&id:rs.open(sql),conn,1,3
Else:rs.open ""& sheethead &"_topic",conn,1,3:rs.addnew:Rs("cid")=cid
End If:Rs("title")=title:Rs("readme")=readme:Rs("tags")=tags:Rs("preimg")=preimg:Rs("cls")=cls:Rs("isgood")=isgood:rs.update:Rs.close:set Rs=Nothing:SoonBiz.loadtopic:SoonBiz.loadcachenum (0)':::asonher(::\::('~:inin"
If isedit Then
Response.Write "<script type=""text/javascript"">window.opener.location.reload();window.close();</script>"
Else:SoonBiz.ok
End If:End Sub:Function Getxmlinput(obj,thistype,thistitle,isedit,defaultvalue,thissize)
If Len(thissize)=0 Then
thissize=" class=""inputtext"""']got:between:for@?@::::because:"beenabouthis
Else:thissize=" size="""& thissize &""""
End If:Select Case thistype:Case "text"
If isedit Then
Getxmlinput="<input name="""& thistitle &""" id="""& thistitle &""" value="""& obj.getattribute(thistitle) &""" "& thissize &" />"
Else:Getxmlinput="<input name="""& thistitle &""" id="""& thistitle &""" value="""& defaultvalue &""" "& thissize &" />"
End If:End Select:End Function:Function SaveRemoteFile(LocalFileName,RemoteFileUrl) :Dim myparameter(0):err.clear:on error resume next:SaveRemoteFile=True:dim Ads,Retrieval,GetRemoteData:Set Retrieval=Server.CreateObject("Microsoft.XMLHTTP"):Retrieval.Open "Get", RemoteFileUrl, False, "", "":Retrieval.Send:myparameter(0)=Retrieval.getResponseHeader("Content-Length")':'\allhave::cameeach")liketakehimself':::"
If Retrieval.Readystate<>4 then
SaveRemoteFile=False:Exit Function
End If:GetRemoteData=Retrieval.ResponseBody
If err Then 
myparameter(0)="" :SaveRemoteFile=myparameter:exit Function
End If:Set Retrieval=Nothing:Set Ads=Server.CreateObject(streamname)'::"by::`:":both:intohere':another':
If Err Then
ShowErr("<li>非常遗憾,您的主机不支持"& streamname &",不能使用本程序</li>"):Err.Clear:Response.End
End If:Ads.Type=1:Ads.Open:Ads.Write GetRemoteData:Ads.SaveToFile server.MapPath(LocalFileName),2:Ads.Cancel():Ads.Close():Set Ads=Nothing:SaveRemoteFile=myparameter:end Function:Function DelImage(headstr,ByVal astr) :Dim jinfang,idlist:Dim i
If IsArray(astr) Then
jinfang=UBound(astr,2):Redim aidlist(jinfang):For i=0 To jinfang:aidlist(i)="'" & headstr &astr(0,i) & "'":Next:idlist=Join(aidlist,","):SoonBiz.execute("update "& sheethead &"_uplist set isdel=1 where fid in("& idlist &")"):Delimage=True
ElseIf Len(astr)>0 Then'}did""::beforeinto~andsomeafterthese^are^":after
astr=Split(astr,","):jinfang=UBound(astr):Redim aidlist(jinfang):For i=0 To jinfang:aidlist(i)="'" & headstr & astr(i)& "'":Next:idlist=Join(aidlist,","):SoonBiz.execute("update "& sheethead &"_uplist set isdel=1 where fid in("& idlist &")"):Delimage=True
Else:Delimage=False
End If:End Function:Public Function saveimg(fids,strs) :Dim imgurls :Dim re :Dim mm :Dim match:Dim matchs:Dim savedir:Dim imgname:Dim RanNum:Dim strFileType :Dim ArrSaveFileName:Dim sql:Dim myparameter
If strs="" Then
saveimg="":exit Function
End If';samebecausemanyseemy:'*mostnow#':gettherebetweenhim:
If instr(strs,"http://")=0 Then
saveimg=strs:saveimgsuccess=True:exit Function
End If:Dim Tempstr,TempStr2,TempStr3,Matches,Tempi,TempArray,TempArray2:Tempstr="":Set re=New RegExp:re.IgnoreCase=True:re.Global=True:re.Pattern="((http):(?:\/\/){1}(?:(?:\w)+[.])+(net|com|cn|org|cc|tv|[0-9]{1,4})(\S*\/)((?:\S)+[.]{1}(gif|jpg|jpeg|png|bmp|swf)))":Set matchs=re.Execute(strs):For Each match In matchs:Tempstr=Tempstr & "@@@" & match.value:Next:Set Matches=Nothing:Set Re=Nothing
If TempStr="" or IsNull(TempStr)=True Then
saveimg=strs:Exit function
End If:TempArray=Split(TempStr,"@@@"):TempStr="":For Tempi=0 To Ubound(TempArray) '::doasbeanothercome':'take}:.anyboth{still/
If Instr(Lcase(TempStr),Lcase(TempArray(Tempi)))<1 Then
TempStr=TempStr & "@@@" & TempArray(Tempi)
End If:Next:TempStr=Right(TempStr,Len(TempStr)-3) :TempStr=Split(TempStr,"@@@"):savedir=webdir &"userup/"& right(year(Now()),2) & month(Now()) & "/":SoonBiz.makedir(savedir):saveimgsuccess=True:For Tempi=0 To Ubound(TempStr)
If Len(TempStr(Tempi))>0 Then
RanNum=Int(900*Rnd)+100:ArrSaveFileName=Split(TempStr(Tempi),"."):strFileType=ArrSaveFileName(UBound(ArrSaveFileName)):imgname=Day(now) & Hour(now) & minute(now) & second(now) & ranNum & "." & strFileType:myparameter=SaveRemoteFile(savedir&imgname,TempStr(Tempi))
If len(myparameter(0)&"")>0 Then ':ithad"orget|itthemcomecame':could:"before:at
saveimgsuccess=True:strs=Replace(strs,TempStr(Tempi),savedir&imgname):sql="insert into "& sheethead &"_uplist (fid,uid,nickname,cid,ufilename,utype,stime,filesize) values ('"&fids&"',"& SoonBiz.user_id &",'"& SoonBiz.user_nickname &"',"& cid &",'"&savedir&imgname&"',0,"&soonbizcom&","& clng(myparameter(0)/1024) &")":SoonBiz.execute(sql)
Else:saveimgsuccess=False
End If
End If:Next:saveimg=strs:End Function:Sub editclasscontent():SoonBiz.LoadTemplatesAdmin("admin_article"):id=SoonBiz.Rid("id"):SoonBiz.readclass(id):SoonBiz.iseditor=True:SoonBiz.adhead:SoonBiz.nstate("编辑"&xmlclass.getattribute("title")&"的分类内容"):HtmlStr=Template.Html(16):HtmlStr=Replace(HtmlStr,"{$editcontent}","<textarea id=""contentvalue"" name=""contentvalue"" class=""tempvalue"">{$content}</textarea><script type=""text/javascript"">wedonetedit('content');</script>"):HtmlStr=Replace(HtmlStr,"{$id}",id):HtmlStr=Replace(HtmlStr,"{$content}",xmlclass.getattribute("content")):HtmlStr=Replace(HtmlStr,"{$cid}",cid):HtmlStr=Replace(HtmlStr,"{$title}",xmlclass.getattribute("title")):Response.Write HtmlStr:End Sub:Sub sclasscontent():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("c"&id,content)
sql="update "& sheethead &"_class set content='"& SoonBiz.Checkstr(content) &"' where id="&id:SoonBiz.execute(sql):SoonBiz.loadcachenum(cid):SucMsg=SucMsg & "<li>保存记录成功.</li>"'"'ourcouldbeing'neverlike:can:::'`her::'
If saveimgsuccess=False Then
SucMsg=SucMsg & "<li>由于网络原因,或对方限制采集,保存远程图片失败.</li>"
End If:SoonBiz.LoadClass:SoonBiz.loadcachenum (cid):SoonBiz.adsuccess(SucMsg):End Sub:Function optionclass(num):Dim str
If num=0 Then
str=SoonBiz.replaceXml(sheethead&"_class","class","<option value='{$id}'>{$depth{$depth}}{$title}</option>","class[@cid='"& cid &"' and @depth<2]")
Else:str=SoonBiz.replaceXml(sheethead&"_class","class","<option value='{$id}'>{$depth{$depth}}{$title}</option>","class[@cid='"& cid &"']")'also=this"do:_":heoutsaidortheforanfrom:?
End If:str=Replace(str,"{$depth0}",""):str=Replace(str,"{$depth1}","|--└")
str=Replace(str,"{$depth2}","|----└")
optionclass=str:End Function
%>