|
主题:注意了 V6.5 SP1在使用过程中有BUG或建议就提交到这里来吧 [收藏主题] | 转到: |
![]() ![]() ![]() ![]() |
![]() 网页错误详细信息
用户代理:Mozilla/4.0(compatibleMSIE8.0WindowsNT5.1Trident/4.0CNCDialer)
|
|
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() |
|
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() 科汛V6.5 最新版出现 (3月16日补丁打上了,没打上也一样错误)急!!!!
Microsoft VBScript 运行时错误 (0x800A0009) 下标越界: 'rndReg' /User/reg/index.asp, 第 254 行 这个是代码 请大家帮帮我 官方请帮我 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%option explicit%> <% '**************************************************** ' Software name:Kesion CMS 6.0 ' Email: service@kesion.com . QQ:111394,9537636 ' Web: http://www.kesion.com http://www.kesion.cn ' Copyright (C) Kesion Network All Rights Reserved. '**************************************************** Dim KSCls Set KSCls = New UserReg KSCls.Kesion() Set KSCls = Nothing Class UserReg Private KS, KSRFObj,FileContent,RegAnswerID,rndReg Private Sub Class_Initialize() Set KS=New PublicCls Set KSRFObj = New Refresh End Sub Private Sub Class_Terminate() Call CloseConn() Set KS=Nothing End Sub Public Sub Kesion() IF KS.Setting(21)=0 Then Response.Redirect "../../plus/error.asp?action=error&message=" & Server.URLEncode(" Response.End End IF If KS.S("Action")="Next" Then Call Step2() Else Call Step1() End If End Sub '注册会员第一步 Sub Step1() If KS.Setting(117)="" Then Response.Write "请先到""基本信息设置->模板绑定""进行模板绑定操作!":response.end FileContent = KSRFObj.LoadTemplate(KS.Setting(117)) FCls.RefreshType="UserRegStep1" If Trim(FileContent) = "" Then FileContent = "模板不存在!" FileContent = ReplaceRegLable(FileContent) '替换通用标签 如{$GetWebmaster} FileContent = KSRFObj.KSLabelReplaceAll(FileContent) '替换函数标签 Response.Write FileContent End Sub '注册会员第二步 Sub Step2() Dim SQL,K,N,InputStr,O_Arr,O_Len,F_V,O_Value,O_Text,BRStr,CanReg Dim Verifycode:Verifycode=KS.S("Verifycode") IF Trim(Verifycode)<>Trim(Session("Verifycode")) And KS.Setting(27)=1 then Response.Write("") Exit Sub End IF '检查注册回答问题 If Mid(KS.Setting(161),1,1)="1" Then CanReg=false For N=0 To Ubound(Split(KS.Setting(162),vbcrlf)) If Trim(Request.Form("a" & MD5(n,16)))<>"" Then If trim(Lcase(Request.Form("a" & MD5(n,16))))<>trim(Lcase(Split(KS.Setting(163),vbcrlf)(n))) Then Call KS.AlertHistory("对不起,注册问题的回答不正确!",-1) : Response.End CanReg=false Else RegAnswerID=N CanReg=True End If End If Next If CanReg=false Then Call KS.AlertHistory("对不起,注册答案不能为空!",-1) : Response.End End If If KS.Setting(118)="" Then Response.Write "请先到""基本信息设置->模板绑定""进行模板绑定操作!":response.end FileContent = KSRFObj.LoadTemplate(KS.Setting(118)) FCls.RefreshType="UserRegStep2" If Trim(FileContent) = "" Then FileContent = "模板不存在!" ReplaceReg2() '替换通用标签 如{$GetWebmaster} FileContent = KSRFObj.KSLabelReplaceAll(FileContent) '替换函数标签 Dim GroupID:GroupID=KS.ChkClng(KS.S("GroupID")):If GroupID=0 Then GroupID=3 Dim FieldsList:FieldsList=LFCls.GetSingleFieldValue("Select FormField From KS_UserForm Where ID=" & KS.U_G(GroupID,"formid")) Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET") RS.Open "Select FieldID,FieldType,FieldName,DefaultValue,Width,Height,Options,EditorType from KS_Field Where ChannelID=101 Order By OrderID",conn,1,1 If Not RS.EOf Then SQL=RS.GetRows(-1):RS.Close():Set RS=Nothing For K=0 TO Ubound(SQL,2) If KS.FoundInArr(FieldsList,SQL(0,k),",") Then InputStr="" If lcase(SQL(2,K))="province&city" Then InputStr="" Else Select Case SQL(1,K) Case 2:InputStr="" Case 3 InputStr="" Case 6 O_Arr=Split(SQL(6,K),vbcrlf): O_Len=Ubound(O_Arr) If O_Len>1 And Len(SQL(6,K))>50 Then BrStr=" " Else BrStr="" For N=0 To O_Len F_V=Split(O_Arr(N),"|") If Ubound(F_V)=1 Then O_Value=F_V(0):O_Text=F_V(1) Else O_Value=F_V(0):O_Text=F_V(0) End If If SQL(3,K)=O_Value Then InputStr=InputStr & "" & O_Text & BRStr Else InputStr=InputStr & "" & O_Text & BRStr End If Next Case 7 O_Arr=Split(SQL(6,K),vbcrlf): O_Len=Ubound(O_Arr) For N=0 To O_Len F_V=Split(O_Arr(N),"|") If Ubound(F_V)=1 Then O_Value=F_V(0):O_Text=F_V(1) Else O_Value=F_V(0):O_Text=F_V(0) End If If KS.FoundInArr(SQL(3,K),O_Value,",")=true Then InputStr=InputStr & "" & O_Text Else InputStr=InputStr & "" & O_Text End If Next Case 10 InputStr=InputStr & "" Case Else If KS.Setting(149)="1" and lcase(SQL(2,K))="mobile" Then InputStr="" Else InputStr="" End If End Select End If 'if SQL(1,K)=9 Then InputStr=InputStr & "" If Instr(FileContent,"{@NoDisplay(" & SQL(2,K) & ")}")<>0 Then FileContent=Replace(FileContent,"{@NoDisplay(" & SQL(2,K) & ")}"," style='display:none'") End If FileContent=Replace(FileContent,"[@" & SQL(2,K) & "]",InputStr) End If Next FileContent=Replace(FileContent,"{@NoDisplay}","") FileContent = KSRFObj.ReplaceRA(FileContent, "") Response.Write KSRFObj.ReplaceGeneralLabelContent(FileContent) End Sub Function ReplaceRegLable(FileContent) Dim UserRegMustFill:UserRegMustFill=KS.Setting(33) Dim ShowCheckEmailTF:ShowCheckEmailTF=true Dim ShowVerifyCodeTF:ShowVerifyCodeTF=false IF KS.Setting(28)="1" Then ShowCheckEmailTF=false IF KS.Setting(27)="1" then ShowVerifyCodeTF=true If KS.Setting(33)="0" Then FileContent = Replace(FileContent, "{$ShowUserType}", "") FileContent = Replace(FileContent, "{$DisplayUserType}", " style='display:none'") Else FileContent = Replace(FileContent, "{$ShowUserType}", UserGroupList()) FileContent = Replace(FileContent, "{$DisplayUserType}", "") End If If KS.Setting(32)="1" Then FileContent = Replace(FileContent, "{$ShowAction}", "UserRegResult.asp") Else FileContent = Replace(FileContent, "{$ShowAction}", "index.asp?Action=Next") End If If KS.Setting(148)="1" Then FileContent = Replace(FileContent, "{$DisplayQestion}", "") Else FileContent = Replace(FileContent, "{$DisplayQestion}", " style=""display:none""") End If If KS.Setting(149)="1" Then FileContent = Replace(FileContent, "{$DisplayMobile}", "") Else FileContent = Replace(FileContent, "{$DisplayMobile}", " style=""display:none""") End If If KS.Setting(143)="1" Then FileContent = Replace(FileContent, "{$DisplayAlliance}", "") Else FileContent = Replace(FileContent, "{$DisplayAlliance}", " style=""display:none""") End If If Mid(KS.Setting(161),1,1)="1" Then rndReg=GetRegRnd() FileContent = Replace(FileContent, "{$DisplayRegQuestion}", "") FileContent = Replace(FileContent, "{$RegQuestion}", GetRegQuestion) FileContent = Replace(FileContent, "{$AnswerRnd}", GetRegAnswerRnd) Else FileContent = Replace(FileContent, "{$DisplayRegQuestion}", " style=""display:none""") FileContent = Replace(FileContent, "{$RegQuestion}", "") FileContent = Replace(FileContent, "{$AnswerRnd}", "") End If FileContent = Replace(FileContent, "{$Show_Question}", KS.Setting(148)) FileContent = Replace(FileContent, "{$Show_Mobile}", KS.Setting(149)) If Request("u")<>"" Then FileContent = Replace(FileContent, "{$UserName}", " value=""" & split(Request("u"),"@")(0) & """") Else FileContent = Replace(FileContent, "{$UserName}", "") End If If KS.S("Uid")<>"" Then FileContent = Replace(FileContent, "{$AllianceUser}", " value=""" & KS.S("Uid") & """ readonly") FileContent = Replace(FileContent, "{$Friend}", " value=""" & KS.S("F") & """") Else FileContent = Replace(FileContent, "{$AllianceUser}", "") FileContent = Replace(FileContent, "{$Friend}", "") End If FileContent = Replace(FileContent, "{$GetUserRegLicense}", KS.Setting(23)) FileContent=Replace(FileContent,"{$Show_UserNameLimitChar}",KS.Setting(29)) FileContent=Replace(FileContent,"{$Show_UserNameMaxChar}",KS.Setting(30)) 'FileContent=Replace(FileContent,"{$Show_VerifyCode}"," FileContent = Replace(FileContent, "{$Show_CheckEmail}", IsShow(ShowCheckEmailTF)) FileContent = Replace(FileContent, "{$Show_VerifyCodeTF}", IsShow(ShowVerifyCodeTF)) ReplaceRegLable=KSRFObj.ReplaceGeneralLabelContent(FileContent) End Function Function GetRegRnd() Dim QuestionArr:QuestionArr=Split(KS.Setting(162),vbcrlf) Dim RandNum,N: N=Ubound(QuestionArr) Randomize RandNum=Int(Rnd()*N) GetRegRnd=RandNum End Function Function GetRegQuestion() Dim QuestionArr:QuestionArr=Split(KS.Setting(162),vbcrlf) GetRegQuestion=QuestionArr(rndReg) End Function Function GetRegAnswerRnd() GetRegAnswerRnd=md5(rndReg,16) End Function Sub ReplaceReg2() If Request.ServerVariables("HTTP_REFERER")="" Then Call KS.Alert("请不要非法提交!","../"):Response.End If Instr(Lcase(Request.ServerVariables("SCRIPT_NAME")),"user/reg")=0 Then Call KS.Alert("请不要非法提交!","../") : Response.End Dim GroupID:GroupID=KS.ChkCLng(KS.S("GroupID")):If GroupID=0 Then GroupID=3 Dim Template:Template=LFCls.GetSingleFieldValue("Select Template From KS_UserForm Where ID=" & KS.U_G(GroupID,"formid")) Template=Template & "" & vbcrlf Template=Template & "" & vbcrlf Template=Template & "" & vbcrlf Template=Template & "" & vbcrlf Template=Template & "" & vbcrlf Template=Template & "" & vbcrlf Template=Template & "" & vbcrlf If KS.Setting(149)="1" Then Template=Template & "" & vbcrlf End If '=======================增加加盟号================================= Dim AllianceUser:AllianceUser=KS.S("AllianceUser") If AllianceUser<>"" Then If AllianceUser=KS.S("UserName") Then Call KS.AlertHistory("对不起,推荐人不能是自己!",-1) Exit Sub End If ' If Conn.Execute("Select UserName From KS_User Where UserName='" & AllianceUser & "'").Eof Then ' Response.Write "") Exit Sub ElseIF RePassWord="" Then Response.Write("") Exit Sub ElseIF PassWord<>RePassWord Then Response.Write("") Exit Sub End If Session("PassWord")=PassWord End Sub '会员类型 Function UserGroupList() If KS.Setting(33)="0" Then UserGroupList="":Exit Function Dim RS,Node Call KS.LoadUserGroup() If KS.ChkClng(KS.S("GroupID"))<>0 Then Set Node=Application(KS.SiteSN&"_UserGroup").DocumentElement.SelectSingleNode("row[@id=" & KS.S("GroupID") & "]/@groupname") If Not Node Is Nothing Then UserGroupList="" & Node.Text &"" End If Set Node=Nothing Else For Each Node In Application(KS.SiteSN&"_UserGroup").DocumentElement.SelectNodes("row[@showonreg=1 && @id!=1]") If UserGroupList="" Then UserGroupList="(说明)" Else UserGroupList=UserGroupList & " (说明)" End If Next End If End Function Function IsShow(Show) If Show =true Then IsShow = "" Else IsShow = " Style='display:none'" End If End Function End Class %> |
|
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
<上一主题 | 下一主题 > |