%@LANGUAGE="VBSCRIPT" CODEPAGE="950"%> <%Option explicit%> <% dim adocon,Myself,reqaction,bsubmit,sqlstr dim UserInfo,flag,msgtxt dim j,fArr,vArr dim fieldDict,actionDest,fieldType fArr=array("a1","a2","a3","a4","a5","a6",_ "a7","a8") '"a9","a10","a11","a12",_"a13","a14","a15","a16") fieldType=array("text","text","text","text","text","text","text","text") ',"text","text","text","text","text","text","text","text") Myself = Request.ServerVariables("PATH_INFO") set UserInfo=new clsUser set fieldDict=server.createobject("Scripting.Dictionary") set adocon=GetMdbConnection(DbLoc, DbPwd) msgtxt="" reqaction=request.form("action") if reqaction<>"" then bsubmit=true else reqaction=request.querystring("action") bsubmit=false end if select case reqaction case "add_reg" if request.form("uid")<>"" then set fieldDict=form2dict(fArr) vArr=fieldDict.items for j=0 to ubound(vArr) if fieldType(j)="chk" then if vArr(j)="" then vArr(j)=0 else vArr(j)="'"&replace(vArr(j),"'","''")&"'" end if ' vArr(j)="'"&replace(vArr(j),"'","''")&"'" next With UserInfo .uid=request.form("uid") .pwd=request.form("pwd") .userTable=usrTable .logTable=loggingTable set .conn=adocon flag=.CreateAccount(fArr,VArr) if flag then .Logon msgtxt="User Information has been updated." else msgtxt="Duplicate User Name!" reqaction="" encodeDict fieldDict,2 end if End With end if case else actionDest="add_reg" end select %>