% Dim nof_rootDir, nof_sitePath, nof_scriptDir, nof_debug, nof_componentName, _ nof_componentId, nof_scriptInterfaceFile, nof_langFile, nof_locale nof_rootDir = Request.Form("nof_rootDir") nof_sitePath = Request.Form("nof_sitePath") nof_scriptDir = Request.Form("nof_scriptDir") nof_debug = Request.Form("nof_debug") nof_componentName = Request.Form("nof_componentName") nof_componentId = Request.Form("nof_componentId") nof_scriptInterfaceFile = Request.Form("nof_scriptInterfaceFile") nof_langFile = Request.Form("nof_langFile") set nof_locale = ssLocaleToDictionary(nof_sitePath & nof_scriptDir, nof_langFile) Call ssLoginMain() Sub ssLoginMain() On Error Resume Next Application("LoginField") = "UserName" Application("PassField") = "Password" Application("MailField") = "Email" Application("AdminField") = "AdminStatus" Application("ValidField") = "ValidationFlag" Dim suiteTags Set suiteTags = Server.CreateObject("scripting.dictionary") suiteTags.Add "dbpath", "dbPath" suiteTags.Add "uploaddir", "dbFileUploadDir" suiteTags.Add "sendemail", "sendEmail" suiteTags.Add "smtpip", "emailServer" suiteTags.Add "smtpport", "emailServerPort" suiteTags.Add "emailto", "emailToAddress" suiteTags.Add "emailfrom", "emailFromAddress" suiteTags.Add "debug", "publishInDebugMode" suiteTags.Add "dbcolumns", "dbColumns" set compGeneralTags = Server.CreateObject("scripting.dictionary") compGeneralTags.Add "currentpage", "currentPage" compGeneralTags.Add "nextpage", "nextPage" compGeneralTags.Add "errormark", "errorMark" compGeneralTags.Add "accessdeniedpage", "accessDeniedPage" Err.Clear() Dim XMLDoc Set XMLDoc = ssOpenXMLFile(nof_sitePath & nof_scriptDir & "\" & nof_scriptInterfaceFile) If Err.number <> 0 then Call ssRaiseFatalError(err, "div", nof_debug) Response.End() end if Dim ComponentNode Set ComponentNode = ssGetNode(XMLDoc,,"Component", Array("name","id"), Array("login", nof_componentId), -1) If ComponentNode Is Nothing Then Err.Raise 400, "ss_login_post.main.20", ssGetLocaleString("Error.400", Null) Call ssRaiseFatalError(err, "div", nof_debug) Response.End() End If dbPath = ssGetProperty(ComponentNode, suiteTags.Item("dbpath")) if dbPath = "" then Err.Raise 526, "ss_signuppost.main.40", ssGetLocaleString(Array("526")) Call ssRaiseFatalError(err, "div", gDebug) Response.End end if dbFields = ssGetDBFields(ComponentNode, suiteTags.Item("dbcolumns")) if dbFields = "" then set signupNode = ssGetByDBpath(XMLDoc, "signup", suiteTags.Item("dbpath"), dbPath) dbFields = ssGetDBFields(signupNode, suiteTags.Item("dbcolumns")) set signupNode = nothing end if Dim absPath, relPath if not inStr(1, dbPath, "\", 1) > 0 then set relPath = nothing set relPath = ssReFind(dbPath, "\.\./") absPath = Server.MapPath(".") if not relPath is nothing then if relPath.count > 0 then for i=1 to relPath.count absPath = Left(absPath, inStrRev(absPath,"\") - 1) dbPath = Replace(dbPath, "../", "", 1, 1) next else if inStr(1, dbPath, "./") > 0 then dbPath = Replace(dbPath, "./", "", 1, 1) end if end if set relPath = nothing end if dbPath = absPath & "\" & Replace(dbPath, "/", "\") end if fields = split(request.form,"&") %>
<% end sub %> <% Function CheckFields(ByVal compNode, ByVal fieldName, ByVal fieldValue) Dim errEvent CheckFields = false set errEvent = getErrorEvent(CompNode, fieldName, "required") propValue = "" if not errEvent is nothing then propValue = ssGetProperty(errEvent, "message") end if if Len(propValue) > 0 then if not fieldValue <> "" then CheckFields = propValue end if end if end function %>