<% ' /////////////////////////////////////////////////////// ' // Dimac CMS ' // Copyright 2004-2008 Dimac Development AB, Sweden ' // www.Dimac.net ' // ' // NOTE: ' // You are not allowed to remove this ' // Copyright information without written ' // permission from Dimac Development. ' /////////////////////////////////////////////////////// ' // Start - Change this constants when installing the software SiteUseFrames = TRUE ' // Valid are [ FALSE | TRUE ] '---------------------------------------------------------------------------------------- ' Function GetConnStr '---------------------------------------------------------------------------------------- Function GetConStr(dbPath) Dim p p = dbPath & "Database\5691.mdb" '//p="\..\private\5691.mdb" GetConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(p) ' // MS Access '// GetConStr = "Provider=SQLOLEDB;Data Source=localhost;database=kalle;uid=jag;pwd=losen;" ' // MS-SQL '// GetConStr = "DSN=minDsn; User Id=jag; Password=losen;" ' // MySQL End Function '// End - Change this constants when installing the software '---------------------------------------------------------------------------------------- Dim vDocId, vRevId Dim vFields() Dim vValues() Dim vFieldTypes() Dim vFieldDefaultValues() '---------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------- ' Function CheckSecurity '---------------------------------------------------------------------------------------- Function CheckSecurity(vDocID, vUG , vAction, vPath, vDocOwner) Dim vPhysicalPath IF ((Session("User_Type") <> 5) AND ( Cint(vDocOwner) <> Cint(Session("User_ID")) )) THEN ' // Check for Administrator or Document Owner IF ( Cint(vDocID) = Cint(WebSiteRootID) AND (vAction = "CREATE") ) THEN CheckSecurity = TRUE ELSE Select Case vAction Case "READ" IF Session("User_Read") = 1 Then CheckSecurity = TRUE Else CheckSecurity = FALSE End IF Case "CREATE" IF Session("User_Create") = 1 Then CheckSecurity = TRUE Else CheckSecurity = FALSE End IF Case "EDIT" IF Session("User_Edit") = 1 Then CheckSecurity = TRUE Else CheckSecurity = FALSE End IF Case "DELETE" IF Session("User_Delete") = 1 Then CheckSecurity = TRUE Else CheckSecurity = FALSE End IF End Select END If ' // IF (vDocID = WebSiteRootID) THEN ELSE CheckSecurity = TRUE ' // Admins can always access everything END IF End Function %>