<% dim objRS, foruminfo, catinfo, catSQL, objCon Application(dbName&"pgd_activeUser") = 0 Application(dbName&"pgd_userList") = "" Application(dbName&"pgd_userLastClean") = now() Set objRS=server.createobject("adodb.recordset") with objRS .open "SELECT * FROM pgd_category", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew .fields("catid")=0 .fields("catname")="individual" .fields("sort")=0 .update end if .close .open "SELECT * FROM pgd_Colorscheme", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew ' ASPPlayground e0e0d0 d0d0d0 f1f1f1 505050 e5e4e9 .fields("schemename")="ASPPlayground" .fields("tabletitle")="cc6601" .fields("tableborder")="d0d0d0" .fields("tableinside")="f1f1f1" .fields("titlefontcolor")="ffffff" .fields("tablealt")="e5e4e9" .fields("insideBG") = "" .fields("altBG") = "" .update end if .close .open "SELECT * FROM pgd_Config", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew .fields("forumdir")=lcase(HostType & Left(Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("PATH_INFO"),InstrRev(Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("PATH_INFO"),"/"))) .fields("lang")="utf-8" .fields("mpg")=20 .fields("maildll")="CDONTS" .fields("mailsrv")="" .fields("upload")="PGDUpload" .fields("searchmode")="normal query" .fields("colorscheme")="ASPPlayground" .fields("Sitehome")=lcase(HostType & Request.ServerVariables("SERVER_NAME") & "/") .fields("BannedIP")="" .fields("WordFilter")="" .fields("adminEmail")="admin@aspplayground.net" .fields("ForumTitle")="ASP Playground Support Forum" .fields("viewPref")=0 .fields("onlineTracking")=0 .fields("singleLogin")=0 .fields("enableSubscribe")=0 .fields("maxFloodControl")=0 .fields("maxShortMsg")=0 .fields("sessiontimeout")=20 .fields("timeoffset")=0 .fields("localesetting")="%m/%d/%ly %12t" .fields("regtype")=0 .fields("namefilter")="" .fields("allowsigupload")=0 .fields("leftFrame")=150 .fields("tpg")=20 .fields("boarddown")=0 .fields("enablePMUpload")=0 .fields("PMUpload")="200|jpg/txt/gif" .fields("avatarUpload")="10|jpg/gif" .fields("profileUpload")="20|jpg/gif" .fields("allowProfPhoto")=3 .fields("userLevelNameMod")="Moderator" .fields("userLevelNameAdmin")="Administrator" .fields("starPicSuffix")="star.gif" .fields("modStar")="5starM.gif" .fields("adminStar")="5starA.gif" .fields("DefShowRight")=1 .fields("DefShowMod")=1 .fields("alterBy")=0 .fields("enableDBHeader")=0 .fields("enableDBFooter")=0 .fields("NoIMGinSigs")=0 .fields("checkDomain") = 1 .fields("allowHide") = 1 .fields("timeBeforeEditDel") = 0 .fields("tmShowParentAuthor") = 1 .fields("hideUnselectedCategories") = 1 .fields("cookieDomain") = "" .fields("cookiePath") = "" .fields("domainFilter")= "" .fields("todayLastVisitPref") = 0 .fields("allowHideProfile") = 0 .fields("ttTooltip") = 0 .fields("threshold") = "0.25" .fields("mailsrvU") = "" .fields("mailsrvP") = "" .fields("searchEngineModEnabled") = 0 .fields("mailsrvPort") = "" .update end if .close .open "SELECT * FROM pgd_members", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew .fields("Mem")=-1 .fields("Login")="Guest" .fields("Fname")="Forum" .fields("Lname")="Guest" .fields("Email")="guest@aspplayground.net" .fields("Userpass")="guest" .fields("ip")="127.0.0.1" .fields("banned")=0 .fields("regStatus")=0 .update .addnew .fields("Mem")=0 .fields("Login")="Admin" .fields("Fname")="Forum" .fields("Lname")="Admin" .fields("Email")="admin@aspplayground.net" .fields("dateSignUp")= date() .fields("Userpass")="admin" .fields("totalPosts")=0 .fields("ip")="127.0.0.1" .fields("banned")=0 .fields("viewPref")=1 .fields("emailview")=1 .fields("sigpicture")="" .fields("regStatus")=0 .fields("allowSigpicture")=1 .fields("allowShortMsg")=1 .fields("acceptShortMsg")=1 .fields("score") = 0 .update end if .close .open "SELECT * FROM pgd_UserGroup", datastore, , adLockOptimistic, adCmdText if .eof or .bof then set objCon = .activeconnection objCon.execute "Insert into [pgd_UserGroup] (GID,GName,GType) Values (0,'Administrators',1)", , adCmdText + adExecuteNoRecords objCon.execute "Insert into [pgd_UserGroup] (GID,GName,GType) Values (-1,'User Managers',1)", , adCmdText + adExecuteNoRecords objCon.execute "Insert into [pgd_UserGroup] (GID,GName,GType) Values (-2,'Forum Managers',1)", , adCmdText + adExecuteNoRecords set objCon = nothing end if .close .open "SELECT * FROM pgd_regDefinition", datastore, , adLockOptimistic, adCmdText if .eof or .bof then set objCon = .activeconnection Dim iregfield for iregfield = 1 to 32 objCon.execute "insert into pgd_regDefinition values ("&cStr(iregfield)&", 'fld_"&cStr(iregfield)&"','',0,1,0,'','','','',"&cStr(iregfield)&",0,'')", , adCmdText + adExecuteNoRecords next for iregfield = 1 to 5 objCon.execute "insert into pgd_regDefinition values ("&cStr(iregfield+32)&", 'lfld_"&cStr(iregfield)&"','',0,1,0,'','','','',"&cStr(iregfield+32)&",0,'')", , adCmdText + adExecuteNoRecords next set objCon = nothing end if .close .open "SELECT * FROM pgd_Ranking", datastore, , adLockOptimistic, adCmdText if .eof or .bof then set objCon = .activeconnection objCon.execute " Insert INTO pgd_Ranking Values (1,15,1,5,'New Member')" &_ " Insert INTO pgd_Ranking Values (2,30,1,15,'Starting Member')" &_ " Insert INTO pgd_Ranking Values (3,45,1,25,'Junior Member')" &_ " Insert INTO pgd_Ranking Values (4,60,1,35,'Senior Member')" &_ " Insert INTO pgd_Ranking Values (5,90,1,45,'Super Member')" _ , , adCmdText + adExecuteNoRecords set objCon = nothing end if .close .open "SELECT * FROM pgd_Srvmsg", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew .fields("forward_msg")="Enter Your Message Here" .fields("emnotify_msg")="Enter Your Message Here" .fields("agreement_msg")="Enter Your Message Here" .fields("shutdown_msg")="Enter Your Message Here" .fields("regconfirm_msg")="Enter Your Message Here" .fields("regapprove_msg")="Enter Your Message Here" .fields("noreg_msg")="Enter Your Message Here" .fields("lostpass_msg")="Enter Your Message Here" .fields("Private_msg")="Enter Your Message Here" .fields("disapprove_msg")="Enter Your Message Here" .fields("calNotify_msg")="Enter Your Message Here" .fields("passconfirm")="Enter Your Message Here" .update end if .close .open "SELECT * FROM pgd_DBHeaderFooter", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew .fields("DBHeader") = "" .fields("DBFooter") = "" .update end if .close .open "SELECT * FROM pgd_CSS", datastore, , adLockOptimistic, adCmdText if .eof or .bof then .addnew .fields("class") = "body" .fields("property") = "color: #000000; font: 11px Verdana; background-color: #f1f1f1; /*margin: 0px 0px 0px 0px;*/" .fields("browser") = 1 .update .addnew .fields("class") = "a" .fields("property") = "color:#666600; text-decoration:none;" .fields("browser") = 1 .update .addnew .fields("class") = "a:hover" .fields("property") = "color: #669933;text-decoration:underline" .fields("browser") = 1 .update .addnew .fields("class") = "input" .fields("property") = "color : #000000;font: normal 11px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = "select" .fields("property") = "color : #000000;font: normal 11px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = "textarea" .fields("property") = "color : #000000;font: normal 11px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".quote" .fields("property") = "border:1px Solid #505050; background-color:#ffffff; width:85%; margin:2px; padding:5px; color:#505050; font: 11px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = "pre" .fields("property") = "font: 11px ""Courier New"",monospace;" .fields("browser") = 1 .update .addnew .fields("class") = "td" .fields("property") = "font: 11px verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".c2" .fields("property") = "font: bold 11px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".head" .fields("property") = "font: bold 14px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".titlehead" .fields("property") = "font: bold 15px Verdana; line-height:180%;" .fields("browser") = 1 .update .addnew .fields("class") = ".info" .fields("property") = "font: 11px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".msg" .fields("property") = "font: 13px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".subhead" .fields("property") = "font: bold 13px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".ultrasmall" .fields("property") = "font: 10px Verdana;" .fields("browser") = 1 .update .addnew .fields("class") = ".high" .fields("property") = " background-color : Yellow;font : bold 11px Arial, Helvetica, sans-serif;color : Black;border : 1px solid Black;" .fields("browser") = 1 .update .addnew .fields("class") = "th" .fields("property") = "background-image: url(image/ticell.gif)" .fields("browser") = 1 .update .addnew .fields("class") = "td.cat" .fields("property") = "background-image: url(image/catcell.gif)" .fields("browser") = 1 .update end if .close .open "SELECT classid, class, property, browser FROM pgd_Css ORDER BY class", datastore, , , adCmdText Dim strCSS:strCSS = "" Dim strCSS_4:strCSS_4 = "" Dim strCSS_5:strCSS_5 = "" Dim arrCSS, iCSS if not (.eof or .bof) then arrCSS = .getrows for iCSS = 0 to ubound(arrCSS,2) Select Case arrCSS(3,iCSS) Case 4 strCSS_4 = strCSS_4 & arrCSS(1,iCSS)&" {"&arrCSS(2,iCSS)&"}"&VBCRLF Case 5 strCSS_5 = strCSS_5 & arrCSS(1,iCSS)&" {"&arrCSS(2,iCSS)&"}"&VBCRLF Case ELSE strCSS = strCSS & arrCSS(1,iCSS)&" {"&arrCSS(2,iCSS)&"}"&VBCRLF End Select next Application.lock Application(dbName&"CSS") = strCSS Application(dbName&"CSS_4") = strCSS_4 Application(dbName&"CSS_5") = strCSS_5 Application.unlock end if .close .open dbOwnerPrefix&"spFetchConfig", datastore, , , adCmdStoredProc Dim forumConfig forumConfig=.getrows .close Application.lock Application(dbName&"forumdir") = forumConfig(0,0)' Application(dbName&"Language") = forumConfig(1,0)' Application(dbName&"mpg") = forumConfig(2,0)' Application(dbName&"maildll") = forumConfig(3,0)' Application(dbName&"mailsrv") = forumConfig(4,0)' Application(dbName&"upload") = forumConfig(5,0)' Application(dbName&"searchmode") = forumConfig(6,0) Application(dbName&"colorScheme") = forumConfig(7,0)' Application(dbName&"sitehome") = forumConfig(8,0)' Application(dbName&"bannedIP") = forumConfig(9,0)' Application(dbName&"wordFilter") = forumConfig(10,0)' Application(dbName&"adminEmail") = forumConfig(11,0)' Application(dbName&"ForumTitle") = forumConfig(12,0)' Application(dbName&"viewPref") = forumConfig(14,0)' Application(dbName&"onlineTracking") = forumConfig(15,0)' Application(dbName&"singleLogin") = forumConfig(16,0) 'if Allow multiple same name Login Application(dbName&"enableSubscribe") = forumConfig(17,0)' Application(dbName&"maxFloodControl") = forumConfig(18,0)' Application(dbName&"maxShortMsg") = forumConfig(19,0) Application(dbName&"sessiontimeout") = forumConfig(20,0)' Application(dbName&"timeoffset") = forumConfig(21,0)' Application(dbName&"localesetting") = forumConfig(22,0)' Application(dbName&"regtype") = forumConfig(23,0)' Application(dbName&"namefilter") = forumConfig(24,0) Application(dbName&"allowsigupload") = forumConfig(25,0) Application(dbName&"leftFrame") = forumConfig(26,0) Application(dbName&"tpg") = forumConfig(27,0) Application(dbName&"boarddown") = forumConfig(28,0) Application(dbName&"allowPoll") = forumConfig(29,0) Application(dbName&"pollTrack") = forumConfig(30,0) Application(dbName&"allowAvatar") = forumConfig(31,0) Application(dbName&"bodyoption") = forumConfig(32,0) Application(dbName&"enablePMUpload") = forumConfig(33,0) Application(dbName&"allowProfPhoto") = forumConfig(35,0) Application(dbName&"alterBy") = forumConfig(36,0) Application(dbName&"DefShowMod") = forumConfig(37,0) Application(dbName&"DefShowRight") = forumConfig(38,0) Application(dbName&"enableDBHeader") = forumConfig(44,0) Application(dbName&"enableDBFooter") = forumConfig(45,0) Application(dbName&"NoIMGinSigs") = forumConfig(46,0) Application(dbName&"checkDomain") = forumConfig(47,0) Application(dbName&"allowHide") = forumConfig(48,0) Application(dbName&"timeBeforeEditDel") = forumConfig(49,0) Application(dbName&"tmShowParentAuthor") = forumConfig(50,0) Application(dbName&"hideUnselectedCategories") = forumConfig(51,0) Application(dbName&"cookieDomain") = forumConfig(52,0) Application(dbName&"cookiePath") = forumConfig(53,0) Application(dbName&"domainFilter") = forumConfig(54,0) Application(dbName&"todayLastVisitPref") = forumConfig(57,0) Application(dbName&"allowHideProfile") = forumConfig(58,0) Application(dbName&"ttTooltip") = forumConfig(59,0) Application(dbName&"threshold") = forumConfig(60,0) Application(dbName&"mailsrvU") = forumConfig(61,0) Application(dbName&"mailsrvP") = forumConfig(62,0) Application(dbName&"searchEngineModEnabled") = forumConfig(63,0) Application(dbName&"mailsrvPort")=forumConfig(64,0) Application(dbName&"modifieddir") = mid(Application(dbName&"forumdir"),instr(10,Application(dbName&"forumdir"),"/")) Application.unlock updateAdmin() erase forumConfig .open "SELECT DBHeader, DBFooter FROM pgd_DBHeaderFooter", datastore, , , adCmdText if Application(dbName&"enableDBHeader") = 1 then Application.lock Application(dbName&"DBHeader") = .fields(0) Application.unlock end if if Application(dbName&"enableDBFooter") = 1 then Application.lock Application(dbName&"DBFooter") = .fields(1) Application.unlock end if .close .open dbOwnerPrefix&"spFetchCat", datastore, , , adCmdStoredProc catinfo=.getrows Application.lock Application(dbName&"Category")=catinfo Application.unlock erase catinfo .close .open dbOwnerPrefix&"spFetchForum", datastore, , , adCmdStoredProc if not .EOF then foruminfo=.getrows Application.lock Application(dbName&"foruminfo")=foruminfo Application.unlock erase foruminfo else Application(dbName&"foruminfo")="" end if .close call updatePM() Dim AppRanking,userLevelNameMod,userLevelNameAdmin,starPicSuffix,modStar,adminStar,iRank,arrRank .open "SELECT LID, PostL, andor, ScoreL, Title, RID FROM pgd_Ranking Order by LID", datastore, , , adCmdText if not (.eof and .bof) then arrRank = .getrows .close .open "SELECT userLevelNameMod, userLevelNameAdmin, starPicSuffix, modStar, adminStar FROM pgd_Config", datastore, , , adCmdText userLevelNameMod = .fields(0).value userLevelNameAdmin = .fields(1).value starPicSuffix = .fields(2).value modStar = .fields(3).value adminStar = .fields(4).value .close AppRanking = _ vbcrlf&_ "var userLevelNameMod = """&JSEncode(""&userLevelNameMod)&""""&vbcrlf&_ "var userLevelNameAdmin = """&JSEncode(""&userLevelNameAdmin)&""""&vbcrlf&_ "var starPicSuffix = """&HTMLEncode(""&starPicSuffix)&""""&vbcrlf&_ "var modStar = """&HTMLEncode(""&modStar)&""""&vbcrlf&_ "var adminStar = """&HTMLEncode(""&adminStar)&""""&vbcrlf&_ "var strTitle = new Array()"&vbcrlf for iRank = 0 to ubound(arrRank,2) AppRanking = AppRanking&"strTitle ["&iRank+1&"] = """&HTMLEncode(""&arrRank(1,iRank))&chr(1)&andorsign(arrRank(2,iRank))&chr(1)&HTMLEncode(""&arrRank(3,iRank))&chr(1)&JSEncode(""&arrRank(4,iRank))&chr(1)&HTMLEncode(""&arrRank(0,iRank))&""""&vbcrlf next Application.lock Application(dbName&"AppRanking")=AppRanking Application.unlock .open dbOwnerPrefix&"spFetchClScheme ('"&Application(dbName&"colorScheme")&"')", datastore, , , adCmdStoredProc Dim colorConfig colorConfig = .getrows .close Application.lock Application(dbName&"colorConfig") = colorConfig Application.unlock erase colorConfig .open dbOwnerPrefix&"spGetTotalMem", datastore, , , adCmdStoredProc Application.lock Application(dbName&"totalMem") = .fields("totalMem") Application.unlock .close .open "delete pgd_session", datastore, , adLockOptimistic, adCmdText .open dbOwnerPrefix&"spRecountTotalReply", datastore, , adLockOptimistic, adCmdStoredProc End with Set objRS = nothing Application(dbName&"recompile")="" response.redirect ("default.asp") %>