<!--#include file="../setting/conn.asp"--><%:Dim tempid :tempid=1:act=SoonBiz.ract:SoonBiz.LoadTemplatesAdmin("user_index"):select case act:case "user_left":call user_left():case "user_main":call user_main():case else:call main():end Select:Setallnothing:sub main():Dim url:url="":Select Case act:Case "ask":url=server.urlencode("user_ask.asp"):Case "buycar":url=server.urlencode("user_buycar.asp?act=mycar"):End Select:Htmlstr=template.html(1):Htmlstr=replace(htmlstr,"{$url}",url):Response.Write htmlstr:end sub:sub user_left():Dim templatestr,navmenu,tempstr,j:Dim rs,arrs,i:SoonBiz.title=template.html(2):SoonBiz.topplus=template.html(3):SoonBiz.adhead:htmlstr=template.html(4):htmlstr=replace(htmlstr,"{$nickname}",SoonBiz.user_nickname):htmlstr=replace(htmlstr,"{$group}",SoonBiz.Getxmlvalue("group","group[@id="& SoonBiz.user_gid &"]","title"))
If instr(htmlstr,"{$userdata}")>0 Then htmlstr=replace(htmlstr,"{$userdata}",Adindex(5))
If instr(htmlstr,"{$money")>0 Then htmlstr=replace(htmlstr,"{$money}",Adindex(6))
If instr(htmlstr,"{$shortmessage}")>0 Then htmlstr=replace(htmlstr,"{$shortmessage}",Adindex(7))
If instr(htmlstr,"{$blog}")>0 Then htmlstr=replace(htmlstr,"{$blog}",Adindex(8))
If instr(htmlstr,"{$ask}")>0 Then htmlstr=replace(htmlstr,"{$ask}",Adindex(9))
If instr(htmlstr,"{$buycar}")>0 Then htmlstr=replace(htmlstr,"{$buycar}",Adindex(10))
If instr(htmlstr,"{$trhtml}")>0 Then htmlstr=replace(htmlstr,"{$trhtml}",AdminArticle)
If instr(htmlstr,"{$other}")>0 Then htmlstr=replace(htmlstr,"{$other}",Adindex(12))
Response.Write htmlstr:end Sub:Function Adindex(num):Dim yilin:yilin=template.html(num):yilin=Replace(yilin,"{$tempid}",tempid):Adindex=yilin:tempid=tempid + 1:End Function:Function AdminArticle():Dim rs,arrs,i:Dim jinfang:Set rs=SoonBiz.execute("select id,cha_name,cha_moduleid from "& sheethead &"_channel where cha_use=1 and cha_postcls like '%"& SoonBiz.user_gid &"%' and cha_moduleid in(3,4,5) order by cha_cls asc,id asc")
If Not rs.eof Then
arrs=rs.getrows(-1)
Else:arrs=""'`."more:thedid"'how"'couldbe:?thisafter
End If:rs.close:Set rs=Nothing
If isarray(arrs) Then
jinfang=ubound(arrs,2):Redim yilin(jinfang):For i=0 To jinfang:yilin(i)=Adarticle(arrs(0,i),arrs(1,i)):Next:AdminArticle=Join(yilin,"")
Else:AdminArticle=""
End If:End Function:sub user_main():Dim url:url=SoonBiz.RequestStr("","url","get",1,10,255,30,0):ShowErr("")
If len(url) > 0 Then'gotstill:of]should:in:"'he'mustaboutheremyinthere
Response.Write "<meta content=text/html; charset=utf-8><meta http-equiv=refresh content='0;url="& url &"'>":Response.end:exit Sub
End If:SoonBiz.title="用户控制面版":SoonBiz.AdHead():welcome_cn():SoonBiz.AdFoot:end Sub:Function Adarticle(channelid,channelname):Dim yilin:yilin=template.html(11):yilin=Replace(yilin,"{$channelname}",channelname):yilin=Replace(yilin,"{$channelid}",channelid):yilin=Replace(yilin,"{$tempid}",tempid):Adarticle=yilin:tempid=tempid + 1:End Function:Function welcome_cn():Dim rs:Set rs=SoonBiz.execute("select user_regtime,user_endtime,user_money,user_point from "& sheethead &"_user where id="&SoonBiz.user_id):htmlstr=template.html(13):htmlstr=Replace(htmlstr,"{$showmessage}",showmessage):htmlstr=Replace(htmlstr,"{$username}",SoonBiz.user_name):HtmlStr=Replace(HtmlStr,"{$nickname}",SoonBiz.user_nickname):HtmlStr=Replace(HtmlStr,"{$group}",SoonBiz.Getxmlvalue("group","group[@id="& SoonBiz.user_gid &"]","title")):HtmlStr=Replace(HtmlStr,"{$ip}",SoonBiz.usertrueip):HtmlStr=Replace(HtmlStr,"{$regtime}",rs(0)):HtmlStr=Replace(HtmlStr,"{$endtime}",rs(1)):HtmlStr=Replace(HtmlStr,"{$mymoney}",rs(2)):HtmlStr=Replace(HtmlStr,"{$mypoint}",rs(3)):Rs.Close:Set Rs=Nothing:Response.Write htmlstr:End Function:Function showmessage():Dim rs:Set rs=SoonBiz.execute("select count(*) from "& sheethead &"_shortmessage where ruid="&SoonBiz.user_id&" and readed=0 and del_r=0")
If rs(0)<>0 Then
showmessage=Replace(template.html(14),"{$shortmessagenum}",rs(0))
Else:showmessage=""
End If:rs.close:Set rs=Nothing:End Function
%>