% '************************************************************************************************** ' 程序名称: 七禧舞曲管理系统 ' 程序作者: 花心萝卜 ' 官方网站: http://www.cmsdj.com http://www.7xiwl.com ' 编写日期: 2009年8月27日 ' 版权所有: 本程序由七禧网络开发,未经同意请勿用于商业用途 '************************************************************************************************** Function IsNum(Str) IF Not IsNul(Str) Then:IsNum=IsNumeric(Str):Else:IsNum=False:End IF End Function Function IsNul(Str) IF IsNull(Str) Or Str = "" Then:IsNul = True:Else :IsNul = False:End IF End Function Function ReplaceBadChar(strChar) If strChar="" Then ReplaceBadChar="" Else ReplaceBadChar=replace(replace(replace(replace(replace(replace(replace(strChar,"'",""),"*",""),"?",""),"(",""),")",""),"<",""),".","") End If End Function Function GetMyShop(GetName,l) if l="0" then Set RsMyShop=CmsDjShop.GetRs("SName",0,"ShopID="&GetName) elseif l="1" then Set RsMyShop=CmsDjShop.GetRs("SPic",0,"ShopID="&GetName) elseif l="2" then Set RsMyShop=CmsDjShop.GetRs("SHits",0,"ShopID="&GetName) elseif l="3" then Set RsMyShop=CmsDjShop.GetRs("SMoney",0,"ShopID="&GetName) elseif l="4" then Set RsMyShop=CmsDjShop.GetRs("SDir",0,"ShopID="&GetName) elseif l="5" then Set RsMyShop=CmsDjShop.GetRs("SClass",0,"ShopID="&GetName) end if If Not(RsMyShop.bof And RsMyShop.EOF) Then if l="0" then GetMyShop=RsMyShop("SName") if l="1" then PicUrl=LCase(RsMyShop("SPic")) if left(PicUrl,6)="upload" then GetMyShop=InstallDir&PicUrl else GetMyShop=PicUrl end if end if if l="2" then GetMyShop=RsMyShop("SHits") if l="3" then GetMyShop=RsMyShop("SMoney") if l="4" then PicUrl=LCase(RsMyShop("SDir")) if left(PicUrl,6)="upload" then GetMyShop=InstallDir&PicUrl else GetMyShop=PicUrl end if end if if l="5" then GetMyShop=RsMyShop("SClass") Else GetMyShop="未知" End If RsMyShop.close set RsMyShop=nothing End Function Function valid_ip(guest_ip) valid_ip=true dim ti,tdim,hn,aabb,ccdd hn=guest_ip tdim=split(CD_WebIp,"|") aabb=split(hn,".") for ti=0 to ubound(tdim) ccdd=split(tdim(ti),".") if ccdd(3)="*" then if ccdd(2)="*" and ccdd(3)="*" then if ccdd(1)="*" and ccdd(2)="*" and ccdd(3)="*" then hn=aabb(0)&".*.*.*" if instr(hn,tdim(ti))>0 then valid_ip=false:erase tdim:exit function else hn=aabb(0)&"."&aabb(1)&".*.*" if instr(hn,tdim(ti))>0 then valid_ip=false:erase tdim:exit function end if else hn=aabb(0)&"."&aabb(1)&"."&aabb(2)&".*" if instr(hn,tdim(ti))>0 then valid_ip=false:erase tdim:exit function end if else hn=aabb(0)&"."&aabb(1)&"."&aabb(2)&"."&aabb(3) if instr(hn,tdim(ti))>0 then valid_ip=false:erase tdim:exit function end if next erase tdim End Function Function GetData(GetName,l) Set CmsDjUser = New CmsDj_Com_User if l="0" then Set RsGetData=CmsDjArt.GetRs("Title",0,"ID="&GetName) '日志标题 elseif l="1" then Set RsGetData=CmsDjPic.GetRs("Title",0,"ID="&GetName) '相册标题 elseif l="2" then Set RsGetData=CmsDjMusic.GetRs("CD_Name",0,"CD_ID="&GetName) '歌曲标题 elseif l="3" then Set RsGetData=CmsDjArt.GetRs("Content",0,"ID="&GetName) '日志内容 elseif l="4" then Set RsGetData=CmsDjPic.GetRs("PicUrl",0,"ID="&GetName) '相册文件地址 elseif l="5" then Set RsGetData=CmsDjMusic.GetRs("CD_ClassID",0,"CD_ID="&GetName) '歌曲所属栏目 elseif l="6" then Set RsGetData=CmsDjSupply.GetRs("SupplyA",0,"SupplyID="&GetName) '供求标题 elseif l="7" then Set RsGetData=CmsDjUser.GetRs("UserSign",0,"UserID="&GetName) '会员个性签名 elseif l="8" then Set RsGetData=CmsDjUser.GetRs("NiCheng",0,"UserName='"&GetName&"'") '会员呢称 elseif l="9" then Set RsGetData=CmsDjUser.GetRs("QQ",0,"UserName='"&GetName&"'") '会员QQ elseif l="10" then Set RsGetData=CmsDjUser.GetRs("Whe,Address",0,"UserName='"&GetName&"'") '会员所在地 elseif l="11" then Set RsGetData=CmsDjUser.GetRs("Sex",0,"UserName='"&GetName&"'") '会员QQ end if If Not(RsGetData.bof And RsGetData.EOF) Then if l="0" then GetData=RsGetData("Title") if l="1" then GetData=RsGetData("Title") if l="2" then GetData=RsGetData("CD_Name") if l="3" then GetData=left(RemoveHTML(RsGetData("Content")),50) if l="4" then PicUrl=LCase(RsGetData("PicUrl")) if left(PicUrl,6)="upload" then GetData=InstallDir&PicUrl else GetData=PicUrl end if end if if l="5" then GetData=RsGetData("CD_ClassID") if l="6" then GetData=RsGetData("SupplyA") if l="7" then GetData=RsGetData("UserSign") if l="8" then GetData=RsGetData("NiCheng") if l="9" then GetData=RsGetData("QQ") if l="10" then GetData=RsGetData("Whe")&RsGetData("Address") if l="11" then GetData=RsGetData("Sex") Else GetData="未知" End If RsGetData.close set RsGetData=nothing End Function '===================================================== ' 描述: 读取会员ID ' 作者: 七禧网络 www.7xiwl.com,By:花心萝卜 ' 版权: 本程序由七禧网络开发,未经同意请勿用于商业用途 '===================================================== Function GetUserID(GetName) Set CmsDjUser = New CmsDj_Com_User Set RsUserID=CmsDjUser.GetRs("UserID",0,"UserName='"&GetName&"'") If Not(RsUserID.bof And RsUserID.EOF) Then UserID=RsUserID("UserID") Else UserID=0 End If GetUserID=UserID RsUserID.close set RsUserID=nothing End Function '===================================================== ' 描述: 读取会员名称/呢称/性别 ' 作者: 七禧网络 www.7xiwl.com,By:花心萝卜 ' 版权: 本程序由七禧网络开发,未经同意请勿用于商业用途 '===================================================== Function GetUserName(GetName,l) Set CmsDjUser = New CmsDj_Com_User if l="0" then Set RsUserName=CmsDjUser.GetRs("UserName",0,"UserID="&GetName) elseif l="1" then Set RsUserName=CmsDjUser.GetRs("NiCheng",0,"UserID="&GetName) elseif l="2" then Set RsUserName=CmsDjUser.GetRs("Sex",0,"UserID="&GetName) elseif l="3" then Set RsUserName=CmsDjUser.GetRs("Whe",0,"UserID="&GetName) end if If Not(RsUserName.bof And RsUserName.EOF) Then if l="0" then UserName=RsUserName("UserName") if l="1" then UserName=RsUserName("NiCheng") if l="2" then UserName=RsUserName("Sex") if l="3" then UserName=RsUserName("Whe") Else UserName="未知" End If GetUserName=UserName RsUserName.close set RsUserName=nothing End Function '===================================================== ' 描述: 读取会员头像 ' 作者: 七禧网络 www.7xiwl.com,By:花心萝卜 ' 版权: 本程序由七禧网络开发,未经同意请勿用于商业用途 '===================================================== Function GetUserPic(GetName,l) Set CmsDjUser = New CmsDj_Com_User if l="0" then Set RsUserPic=CmsDjUser.GetRs("UserPhoto",0,"UserID="&GetName) else Set RsUserPic=CmsDjUser.GetRs("UserPhoto",0,"UserName='"&GetName&"'") end if If Not(RsUserPic.bof And RsUserPic.EOF) Then UserPic=RsUserPic("UserPhoto") If UserPic<>"" Then UserPic=InstallDir&RsUserPic("UserPhoto") Else UserPic=InstallDir&"user/image/noavatar_small.gif" End If Else UserPic=InstallDir&"user/image/noavatar_small.gif" End If GetUserPic=UserPic RsUserPic.close set RsUserPic=nothing End Function Function FormatStrHtml(String) on Error resume next String = LCase(String) String = Replace(String, "asp", "html") String = Replace(String, "php", "html") String = Replace(String, "jsp", "html") String = Replace(String, "aspx", "html") String = Replace(String, "js", "html") FormatStrHtml = String End Function Function CmsDj_Com_Rank(rank,l) If (rank >= 0 and rank < 100) Then UserRankA="Lv1" UserRankB=FormatPercent(rank/100,2) UserRankC=100-rank ElseIf (rank >= 100 and rank < 200) Then UserRankA="Lv2" RankA=rank-100 UserRankB=FormatPercent(RankA/100,2) UserRankC=200-rank ElseIf (rank >= 200 and rank < 300) Then UserRankA="Lv3" RankA=rank-200 UserRankB=FormatPercent(RankA/100,2) UserRankC=300-rank ElseIf (rank >= 300 and rank < 400) Then UserRankA="Lv4" RankA=rank-300 UserRankB=FormatPercent(RankA/100,2) UserRankC=400-rank ElseIf (rank >= 400 and rank < 500) Then UserRankA="Lv5" RankA=rank-400 UserRankB=FormatPercent(RankA/100,2) UserRankC=500-rank ElseIf (rank >= 500 and rank < 600) Then UserRankA="Lv6" RankA=rank-500 UserRankB=FormatPercent(RankA/100,2) UserRankC=600-rank ElseIf (rank >= 600 and rank < 700) Then UserRankA="Lv7" RankA=rank-600 UserRankB=FormatPercent(RankA/100,2) UserRankC=700-rank ElseIf (rank >= 700 and rank < 800) Then UserRankA="Lv8" RankA=rank-700 UserRankB=FormatPercent(RankA/100,2) UserRankC=800-rank ElseIf (rank >= 800 and rank < 900) Then UserRankA="Lv9" RankA=rank-800 UserRankB=FormatPercent(RankA/100,2) UserRankC=900-rank ElseIf (rank >= 900 and rank < 1000) Then UserRankA="Lv10" RankA=rank-900 UserRankB=FormatPercent(RankA/100,2) UserRankC=1000-rank ElseIf (rank >= 1000) Then UserRankA="Lv10" RankA=rank-1000 UserRankB="100.00%" UserRankC="0" End If If UserRankB<"0" Then UserRankB=Replace(UserRankB,UserRankB,"0"&UserRankB) End If If l=2 Then CmsDj_Com_Rank=UserRankC ElseIf l=1 Then CmsDj_Com_Rank=UserRankB Else CmsDj_Com_Rank=UserRankA End If End Function Function GetNext(CD_ID,CD_Class,CD_Type) Dim RsNext Set CmsDjMusic = New CmsDj_Com_Dj IF CD_Class="u" Then set RsNext = CmsDjMusic.GetRs("CD_ID,CD_Name,CD_ClassID",1,"CD_ID<"&CD_ID&" and CD_Deleted=0 and CD_Passed=0 order by CD_ID desc") Else set RsNext = CmsDjMusic.GetRs("CD_ID,CD_Name,CD_ClassID",1,"CD_ID>"&CD_ID&" and CD_Deleted=0 and CD_Passed=0 order by CD_ID") End If IF RsNext.eof and RsNext.bof Then IF CD_Type=1 Then GetNext = "#" Else GetNext = "没有了" End If Else IF CD_Type=1 Then GetNext = LinkUrl("cmsdj_dj",RsNext(2),1,RsNext(0)) Else GetNext = RsNext(1) End If End If Set RsNext=Nothing End Function Function IsInteger(para) on error resume next dim str dim l,i if isNUll(para) then isInteger=false exit function end if str=cstr(para) if trim(str)="" then isInteger=false exit function end if l=len(str) for i=1 to l if mid(str,i,1)>"9" or mid(str,i,1)<"0" then isInteger=false exit function end if next isInteger=true if err.number<>0 then err.clear End Function Function ShowErr(Numb,Des) Put "
" Response.End End Function '============================== '把数字转换为文件大小显示方式 '============================== Public Function CmsDj_Com_Size(ByVal Size) If Size < 1024 Then CmsDj_Com_Size = Size&" 字节" ElseIf Size >= 1024 And Size < 1048576 Then CmsDj_Com_Size = FormatNumber(Size/1024,2)&" KB" ElseIf Size >= 1048576 Then CmsDj_Com_Size = FormatNumber((Size/1024)/1024,2)&" MB" End If End Function Function CmsDj_Com_Time(TimeTime) limit=DateDiff("s",TimeTime,Now()) if (limit < 5) then show_t = "刚刚" if (limit >= 5 and limit < 60) then show_t = limit &"秒前" if (limit >= 60 and limit < 3600) then show_t = INT(limit/60) &"分钟前" if (limit >= 3600 and limit < 86400) then show_t = INT(limit/3600) &"小时前" if (limit >= 86400 and limit < 2592000) then show_t = INT(limit/86400) &"天前" if (limit >= 2592000 and limit < 31104000) then show_t = INT(limit/2592000) &"个月前" 'if limit >= 31104000 then show_t = "很久前" if limit >= 31104000 then show_t = TimeTime CmsDj_Com_Time=show_t End Function Function StrLength(str) ON ERROR RESUME NEXT dim WINNT_CHINESE WINNT_CHINESE = (len("七禧")=2) if WINNT_CHINESE then dim l,t,c dim i l=len(str) t=l for i=1 to l c=asc(mid(str,i,1)) if c<0 then c=c+65536 if c>255 then t=t+1 end if next strLength=t else strLength=len(str) end if if err.number<>0 then err.clear End Function Function NullValue(Str) IF IsNul(Str) Then NullValue="未知" Else NullValue=Str End IF End Function Function DBC2SBC(str,flag) Dim i,str1,str2 IF len(str)<=0 Then Put "字符串参数出错" Exit Function End IF For i=1 To len(str) str1 = mid(str,i,1) str2 = asc(str1) IF str2>0 and str2<=125 Then IF not flag Then dbc2sbc=dbc2sbc & chr(str2-23680) Else dbc2sbc=dbc2sbc & chr(str2+23680) End IF Else dbc2sbc=dbc2sbc & str1 End IF Next End Function Function SafeRequest(Key,Modes) Dim ParaValue,strFilter,FilterArr,i Select Case Lcase(Modes) Case "get" ParaValue=LCase(Trim(Request.QueryString(Key))) Case "post" ParaValue=LCase(Trim(Request.Form(Key))) Case "auto" ParaValue=LCase(Trim(Request(Key))) End Select IF IsNum(ParaValue) Then SafeRequest=ParaValue Exit Function Else strFilter="'|and|(|)|exec|insert|select|delete|update|*|chr|mid|master|truncate|declare" FilterArr=Split(strFilter,"|") For i=0 To Ubound(FilterArr) IF Instr(ParaValue,FilterArr(i))>0 Then ParaValue=ReplaceStr(ParaValue,FilterArr(i),DBC2SBC(FilterArr(i),0)) End IF Next SafeRequest=ParaValue End IF SafeRequest = FilterScript(SafeRequest) End Function Function ScriptHtml(Byval ConStr,TagName,FType) Dim Re Set Re=new RegExp Re.IgnoreCase =true Re.Global=True Select Case FType Case 1 Re.Pattern="<" & TagName & "([^>])*>" ConStr=Re.Replace(ConStr,"") Case 2 Re.Pattern="<" & TagName & "([^>])*>.*?" & TagName & "([^>])*>" ConStr=Re.Replace(ConStr,"") Case 3 Re.Pattern="<" & TagName & "([^>])*>" ConStr=Re.Replace(ConStr,"") Re.Pattern="" & TagName & "([^>])*>" ConStr=Re.Replace(ConStr,"") Re.Pattern="<" & TagName & "([^>])*>" ConStr=Re.Replace(ConStr,"") Re.Pattern="</" & TagName & "([^>])*>" ConStr=Re.Replace(ConStr,"") End Select ScriptHtml=ConStr Set Re=Nothing End Function Function FilterScript(ConStr) ConStr=ScriptHtml(ConStr,"Iframe",1) ConStr=ScriptHtml(ConStr,"Object",2) ConStr=ScriptHtml(ConStr,"Script",2) 'ConStr=ScriptHtml(ConStr,"Font",3) 'ConStr=ScriptHtml(ConStr,"A",3) 'ConStr=ScriptHtml(ConStr,"Table",3) 'ConStr=ScriptHtml(ConStr,"Tr",3) 'ConStr=ScriptHtml(ConStr,"Td",3) 'ConStr=ScriptHtml(ConStr,"Div",3) 'ConStr=ScriptHtml(ConStr,"CLASS",3) 'ConStr=ScriptHtml(ConStr,"Span",3) 'ConStr=ScriptHtml(ConStr,"IMG",3) 'ConStr=ScriptHtml(ConStr,"strong",3) 'ConStr=ScriptHtml(ConStr,"p",3) ConStr=ScriptHtml(ConStr,"%",3) FilterScript=ConStr End Function Function ReplaceStr(Str,FindStr,RepStr) IF IsNull(RepStr) Then RepStr="" ReplaceStr = Replace(Str,FindStr,RepStr) End Function Function Params Dim Param,ParamArr,RegEx,Match,Matches Param=Request.ServerVariables("QUERY_STRING") Set RegEx =New RegExp RegEx.Pattern="([\S]+)\.\S+" RegEx.IgnoreCase=True RegEx.Global=True IF RegEx.Test(Param) Then Set Matches=RegEx.Execute(Param) For Each Match In Matches ParamArr=Match.SubMatches(0) Param=ParamArr Next ParamArr=Split(ParamARR,"_") IF IsArray(ParamArr) Then IF Ubound(ParamArr)=0 Then Param=Param&"_1" End IF End IF End IF Params=Param End Function Function GetStrByLen(ByVal strWord, ByVal NumByte, ByVal NumDot) Dim i Dim lenWordByte GetStrByLen = "" IF IsNull(strWord) or strWord = "" Then Exit Function lenWordByte = 0 For i = 1 to Len(strWord) IF Asc(Mid(strWord, i, 1)) < 0 or Asc(Mid(strWord, i, 1)) > 255 Then lenWordByte = lenWordByte + 2 Else lenWordByte = lenWordByte + 1 End IF IF lenWordByte > NumByte Then Exit For GetStrByLen = GetStrByLen & Mid(strWord, i, 1) Next GetStrByLen = GetStrByLen & String(NumDot, ".") End Function Function CheckArray(arr1,arr2) CheckArray = True IF IsArray(arr1) And IsArray(arr2) Then IF Ubound(arr1)<>Ubound(arr2) Then CheckArray = False End IF Else CheckArray = False End IF End Function Function RemoveHTML(strHTML) Dim objRegExp, Match, Matches Set objRegExp = New Regexp objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "<.+?>" Set Matches = objRegExp.Execute(strHTML) For Each Match in Matches strHtml=Replace(strHTML,Match.Value,"") Next 'strHTML = Replace(strHTML,"<","<") 'strHTML = Replace(strHTML,">",">") strHTML = Replace(strHTML,""","""") strHTML = Replace(strHTML," "," ") strHTML = Replace(strHTML,"&","&") strHTML = Replace(strHTML,"‘","“") strHTML = Replace(strHTML,"’","”") RemoveHTML=strHTML Set objRegExp = Nothing End Function Function PermissionDis(HavePermission,Column) Dim HavePermissionArray IF HavePermission<>"" And Isnumeric(Column) Then HavePermissionArray=Split(HavePermission,",") For I=0 To Ubound(HavePermissionArray) IF Trim(HavePermissionArray(I))=Trim(Column) Then Response.Write("checked") Exit For End IF Next End IF End Function Function UrlSelectCom(Byval url,Byval list,Byval ID) Dim ListStr,I,Selected,J ListStr = "" IF Not IsNum(ID) Then ID = 0 IF isArray(List) Then For I = 0 To Ubound(List,2) IF Int(List(0,i)) = int(ID) Then selected = "selected":End IF IF List(4,i)="0" Then ListStr = ListStr & "" For J=0 To Ubound(List,2) IF List(0,i) = List(4,j) Then listStr = listStr & "" End IF Next End IF Selected = "" Next End IF UrlSelectCom = ListStr End Function Function UrlSelectComT(Byval url,Byval list,Byval ID) Dim ListStr,I,Selected,J ListStr = "" IF Not IsNum(ID) Then ID = 0 IF isArray(List) Then For I = 0 To Ubound(List,2) IF Int(List(0,i)) = int(ID) Then selected = "selected":End IF ListStr = ListStr & "" Selected = "" Next End IF UrlSelectComT = ListStr End Function Public Function GetClassName(ct,id) Dim i GetClassName = "暂无分类" IF isArray(ct) Then For i = 0 To ubound(ct,2) IF Int(ct(0,i)) = Int(id) Then GetClassName = ct(1,i):End IF Next End IF End Function Function SpanShow(Table,ClassID,SystemID,ID,Url) IF S_Webmode=1 Then Exit Function SpanShow="
"
'判断是否已生成
IF Fso.CheckFile(LinkUrl(Table,ClassID,SystemID,ID)) Then SpanShow=""
End Function
Function SelectFormGet(Byval MRval,Byval List,Byval ID)
Dim ListStr,i,selected
IF Not IsNum(ID) Then ID=0
ListStr = ""
IF isArray(List) Then
For i = 0 To ubound(List,2)
IF List(0,i) = Cint(ID) Then selected = "selected"
listStr = listStr & ""
selected = ""
Next
End IF
SelectFormGet = ListStr
End Function
Function SelectFormGetB(Byval MRval,Byval List,Byval ID)
Dim ListStr,i,selected,j
IF Not IsNum(ID) Then ID=0
ListStr = ""
IF isArray(List) Then
For i = 0 To ubound(List,2)
IF List(0,i) = Cint(ID) Then selected = "selected"
IF List(4,i)=0 Then
listStr = listStr & ""
For j=0 To Ubound(List,2)
IF List(0,i) = List(4,j) Then
listStr = listStr & ""
End IF
Next
End IF
selected = ""
Next
End IF
SelectFormGetB = ListStr
End Function
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
IF 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
Function NumToAbc(str)
str = str
str = replace(str,"0","ling")
str = replace(str,"1","yi")
str = replace(str,"2","er")
str = replace(str,"3","san")
str = replace(str,"4","si")
str = replace(str,"5","wu")
str = replace(str,"6","liu")
str = replace(str,"7","qi")
str = replace(str,"8","ba")
str = replace(str,"9","jiu")
NumToAbc = str
End Function
Function CheckHtml(Str,SystemID)
IF CD_WebHtml=2 Then
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
StrDir = Server.MapPath(Str)
IF Fs.FileExists(StrDir) Then
CheckHtml="
"
Else
CheckHtml="
"
End IF
Else
CheckHtml="动态"
End IF
End Function
Function LinkURL(Table,ClassID,SystemID,ID)
Dim ZFileName,HName
Table=LCase(Table)
Select Case CD_WebHtml
Case "1"
Select Case LCase(Table)
Case "cmsdj_dj"
LinkURL=InstallDir&"html/index.asp?1,"&ID
Case "cmsdj_special"
LinkURL=InstallDir&"html/index.asp?2,"&ID
Case "cmsdj_news"
LinkURL=InstallDir&"html/index.asp?3,"&ID
End Select
Case "2"
Select Case Table
Case "cmsdj_dj"
CD_PlayPath=replace(CD_Caplayfolder,"[数字编号]",ID)
CD_PlayPath=replace(CD_PlayPath,"[字母编号]",NumToAbc(ID))
LinkURL=CD_PlayPath
Case "cmsdj_special"
CD_SpecialPath=replace(CD_Caspecialfolder,"[数字编号]",ID)
CD_SpecialPath=replace(CD_SpecialPath,"[字母编号]",NumToAbc(ID))
LinkURL=CD_SpecialPath
Case "cmsdj_news"
CD_NewsPath=replace(CD_CaNewsfolder,"[数字编号]",ID)
CD_NewsPath=replace(CD_NewsPath,"[字母编号]",NumToAbc(ID))
LinkURL=CD_NewsPath
End Select
Case "3"
Select Case LCase(Table)
Case "cmsdj_dj"
LinkURL=InstallDir&"html/?1,"&ID&".html"
Case "cmsdj_special"
LinkURL=InstallDir&"html/?2,"&ID&".html"
Case "cmsdj_news"
LinkURL=InstallDir&"html/?3,"&ID&".html"
End Select
End Select
End Function
Function LinkWebURL(UserID,UserName)
WebHtml=0
IF UserID=0 Then
LinkWebURL="http:///"
Else
Select Case WebHtml
Case "0"
LinkWebURL="http://"&Request.ServerVariables("SERVER_NAME")&InstallDir&"Web/?id="&UserID
Case "1"
LinkWebURL="http://"&Replace(CD_WebUrl,"www",UserID)
Case "2"
LinkWebURL="http://"&Replace(CD_WebUrl,"www",UserName)
End Select
End IF
End Function
Function LinkClassURL(Table,ID,SystemID,Page)
Set CmsDjClass = New CmsDj_Com_DjClass
Set Rs = CmsDjClass.GetRs("",0,"CD_ID="&ID)
If Not(rs.bof And rs.EOF) Then
CD_AliasName=Rs("CD_AliasName")
End IF
IF SystemID=1 Then
Select Case CD_WebHtml
Case "1"
LinkClassURL=InstallDir&"html/index.asp?0,"&ID&","&Page&""
Case "2"
CD_ClassPath=replace(CD_Calistfolder,"[英文别名]",CD_AliasName)
CD_ClassPath=replace(CD_ClassPath,"[栏目编号]",ID)
CD_ClassPath=replace(CD_ClassPath,"[分页编号]",Page)
LinkClassURL=CD_ClassPath
Case "3"
LinkClassURL=InstallDir&"html/?0,"&ID&","&Page&".html"
End Select
ElseIF SystemID=0 Then
Select Case CD_WebHtml
Case "1"
LinkClassURL=InstallDir&"html/index.asp?4,"&ID&","&Page&""
Case "2"
CD_NewsPath=replace(CD_Canewscfolder,"[栏目编号]",ID)
CD_NewsPath=replace(CD_NewsPath,"[分页编号]",Page)
LinkClassURL=CD_NewsPath
Case "3"
LinkClassURL=InstallDir&"html/?4,"&ID&","&Page&".html"
End Select
Else
LinkClassURL=CD_AliasName
End IF
End Function
Function LinkFeedURL(FeedA,Rs)
Select Case FeedA
Case "0"
LinkFeedURL=LinkFeedURL&"将 "&GetUserName(rs("FeedB"),0)&" 添加为好友 "& VbCrLf
Case "1"
LinkFeedURL=LinkFeedURL&"发表了新日志 "& VbCrLf
Case "2"
LinkFeedURL=LinkFeedURL&"上传了新图片 "&GetData(rs("FeedB"),1)&" "& VbCrLf
Case "3"
LinkFeedURL=LinkFeedURL&"开通了个人主页 访问TA的空间 "& VbCrLf
Case "4"
LinkFeedURL=LinkFeedURL&"收藏了音乐 "& VbCrLf
Case "5"
LinkFeedURL=LinkFeedURL&"评论了 "&GetUserName(rs("FeedC"),0)&" 的日志 "&GetData(rs("FeedB"),0)&" "& VbCrLf
Case "6"
LinkFeedURL=LinkFeedURL&"评论了 "&GetUserName(rs("FeedC"),0)&" 的相册 "&GetData(rs("FeedB"),1)&" "& VbCrLf
Case "7"
LinkFeedURL=LinkFeedURL&"访问了 "&GetUserName(rs("FeedB"),0)&" 的空间 "& VbCrLf
Case "8"
LinkFeedURL=LinkFeedURL&"下载了音乐 "& VbCrLf
Case "9"
LinkFeedURL=LinkFeedURL&"购买了 "&rs("FeedB")&" 点数 "& VbCrLf
Case "10"
LinkFeedURL=LinkFeedURL&"升级为VIP会员 "& VbCrLf
Case "11"
LinkFeedURL=LinkFeedURL&"发布了新的"&rs("FeedD")&"信息 "& VbCrLf
Case "13"
LinkFeedURL=LinkFeedURL&"上传了新音乐 "& VbCrLf
End Select
LinkFeedURL=LinkFeedURL&""&CmsDj_Com_Time(rs("FeedE"))&""& VbCrLf
LinkFeedURL=LinkFeedURL&"