<%

' ASPMaker 7 configuration file
' - contains all web site configuration settings

Const EW_RESPONSE_BUFFER = True ' Response.Buffer setting
Const EW_PROJECT_NAME = "yousiteadmin" ' Project Name

' Menu
Const EW_ITEM_TEMPLATE_CLASSNAME = "ewTemplate"
Const EW_ITEM_TABLE_CLASSNAME = "ewItemTable"

' Debug flag
Const EW_DEBUG_ENABLED = False ' Changed to True to debug

' Remove XSS
Const EW_REMOVE_XSS = True ' Remove XSS

' Session names
Dim EW_SESSION_STATUS
EW_SESSION_STATUS = EW_PROJECT_NAME & "_Status" ' Login Status
Dim EW_SESSION_USER_NAME
EW_SESSION_USER_NAME = EW_SESSION_STATUS & "_UserName" ' User Name
Dim EW_SESSION_USER_ID
EW_SESSION_USER_ID = EW_SESSION_STATUS & "_UserID" ' User ID
Dim EW_SESSION_USER_LEVEL_ID
EW_SESSION_USER_LEVEL_ID = EW_SESSION_STATUS & "_UserLevel" ' User Level ID
Dim EW_SESSION_USER_LEVEL
EW_SESSION_USER_LEVEL = EW_SESSION_STATUS & "_UserLevelValue" ' User Level
Dim EW_SESSION_PARENT_USER_ID
EW_SESSION_PARENT_USER_ID = EW_SESSION_STATUS & "_ParentUserID" ' Parent User ID
Dim EW_SESSION_SYS_ADMIN
EW_SESSION_SYS_ADMIN = EW_PROJECT_NAME & "_SysAdmin" ' System Admin
Dim EW_SESSION_AR_USER_LEVEL
EW_SESSION_AR_USER_LEVEL = EW_PROJECT_NAME & "_arUserLevel" ' User Level Array
Dim EW_SESSION_AR_USER_LEVEL_PRIV
EW_SESSION_AR_USER_LEVEL_PRIV = EW_PROJECT_NAME & "_arUserLevelPriv" ' User Level Privilege Array
Dim EW_SESSION_SECURITY
EW_SESSION_SECURITY = EW_PROJECT_NAME & "_Security" ' Security Array
Dim EW_SESSION_MESSAGE
EW_SESSION_MESSAGE = EW_PROJECT_NAME & "_Message" ' System Message
Dim EW_SESSION_INLINE_MODE
EW_SESSION_INLINE_MODE = EW_PROJECT_NAME & "_InlineMode" ' Inline Mode

' Database settings
Dim EW_DB_CONNECTION_STRING ' DB Connection String
EW_DB_CONNECTION_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mydb.mdb") & ";"
Const EW_IS_MSACCESS = True ' Access
Const EW_IS_MSSQL = False ' MS SQL
Const EW_IS_MYSQL = False ' MySQL
Const EW_IS_ORACLE = False ' Oracle
Const EW_CURSORLOCATION = 2 ' Cursor location
Const EW_DATATYPE_NUMBER = 1
Const EW_DATATYPE_DATE = 2
Const EW_DATATYPE_TIME = 7
Const EW_DATATYPE_STRING = 3
Const EW_DATATYPE_BOOLEAN = 4
Const EW_DATATYPE_GUID = 5
Const EW_DATATYPE_OTHER = 6
Const EW_COMPOSITE_KEY_SEPARATOR = "," ' Composite key separator
Const EW_EMAIL_KEYWORD_SEPARATOR = "|" ' Email keyword separator
Const EW_HIGHLIGHT_COMPARE = 1 ' Highlight compare mode
Const EW_ROWTYPE_VIEW = 1 ' Row type view
Const EW_ROWTYPE_ADD = 2 ' Row type add
Const EW_ROWTYPE_EDIT = 3 ' Row type edit
Const EW_ROWTYPE_SEARCH = 4 ' Row type search
Const EW_ROWTYPE_MASTER = 5 ' Row type master record

' Table specific names
Const EW_TABLE_REC_PER_PAGE = "RecPerPage" ' Records per page
Const EW_TABLE_START_REC = "start" ' Start record
Const EW_TABLE_PAGE_NO = "pageno" ' Page number
Const EW_TABLE_BASIC_SEARCH = "psearch" ' Basic search keyword
Const EW_TABLE_BASIC_SEARCH_TYPE = "psearchtype" ' Basic search type
Const EW_TABLE_ADVANCED_SEARCH = "advsrch" ' Advanced search
Const EW_TABLE_SEARCH_WHERE = "searchwhere" ' Search where clause
Const EW_TABLE_WHERE = "where" ' Table where
Const EW_TABLE_ORDER_BY = "orderby" ' Table order by
Const EW_TABLE_SORT = "sort" ' Table sort
Const EW_TABLE_KEY = "key" ' Table key
Const EW_TABLE_SHOW_MASTER = "showmaster" ' Table show master
Const EW_TABLE_MASTER_TABLE = "MasterTable" ' Master table
Const EW_TABLE_MASTER_FILTER = "MasterFilter" ' Master filter
Const EW_TABLE_DETAIL_FILTER = "DetailFilter" ' Detail filter
Const EW_TABLE_RETURN_URL = "return" ' Return url

' Security specific
Const EW_AUDIT_TRAIL_PATH = "" ' Audit trail path
Const EW_ADMIN_USER_NAME = "user" ' Administrator user name
Const EW_ADMIN_PASSWORD = "user!@#" ' Administrator password
Const EW_MD5_PASSWORD = False ' MD5 password
Const EW_CASE_SENSITIVE_PASSWORD = False ' Case Sensitive password

' Dynamic user level table
Dim EW_USER_LEVEL_TABLE_NAME(7)
Dim EW_USER_LEVEL_TABLE_CAPTION(7)
EW_USER_LEVEL_TABLE_NAME(0) = "bhlm"
EW_USER_LEVEL_TABLE_CAPTION(0) = "信息栏目"
EW_USER_LEVEL_TABLE_NAME(1) = "xwlm"
EW_USER_LEVEL_TABLE_CAPTION(1) = "信息二级栏目"
EW_USER_LEVEL_TABLE_NAME(2) = "xwfb"
EW_USER_LEVEL_TABLE_CAPTION(2) = "信息管理"
EW_USER_LEVEL_TABLE_NAME(3) = "login"
EW_USER_LEVEL_TABLE_CAPTION(3) = "管理员"
EW_USER_LEVEL_TABLE_NAME(4) = "webset"
EW_USER_LEVEL_TABLE_CAPTION(4) = "站点信息"
EW_USER_LEVEL_TABLE_NAME(5) = "zxzx"
EW_USER_LEVEL_TABLE_CAPTION(5) = "在线咨询"
EW_USER_LEVEL_TABLE_NAME(6) = "webseo"
EW_USER_LEVEL_TABLE_CAPTION(6) = "网站优化"
EW_USER_LEVEL_TABLE_NAME(7) = "sjlm"
EW_USER_LEVEL_TABLE_CAPTION(7) = "Sjlm"

' Dynamic user level settings
' User level definition table/field names

Const EW_USER_LEVEL_TABLE = "[UserLevels]"
Const EW_USER_LEVEL_ID_FIELD = "[UserLevelID]"
Const EW_USER_LEVEL_NAME_FIELD = "[UserLevelName]"

' User Level privileges table/field names
Const EW_USER_LEVEL_PRIV_TABLE = "[UserLevelPermissions]"
Const EW_USER_LEVEL_PRIV_TABLE_NAME_FIELD = "[UserLevelTableName]"
Const EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD = "[UserLevelID]"
Const EW_USER_LEVEL_PRIV_PRIV_FIELD = "[UserLevelPermission]"

' User level constants
Const EW_USER_LEVEL_COMPAT = True ' Use old user level values

'Const EW_USER_LEVEL_COMPAT = False ' Use new user level values (separate values for View/Search)
Const EW_ALLOW_ADD = 1 ' Add
Const EW_ALLOW_DELETE = 2 ' Delete
Const EW_ALLOW_EDIT = 4 ' Edit
Const EW_ALLOW_LIST = 8 ' List
Dim EW_ALLOW_VIEW, EW_ALLOW_SEARCH ' View / Search
If EW_USER_LEVEL_COMPAT Then
	EW_ALLOW_VIEW = 8 ' View
	EW_ALLOW_SEARCH = 8 ' Search
Else
	EW_ALLOW_VIEW = 32 ' View
	EW_ALLOW_SEARCH = 64 ' Search
End If
Const EW_ALLOW_REPORT = 8 ' Report
Const EW_ALLOW_ADMIN = 16 ' Admin

' Hierarchical User ID
Const EW_USER_ID_IS_HIERARCHICAL = True ' Change to False to show 1 level

' Use subquery for master/detail user id checking
Const EW_USE_SUBQUERY_FOR_MASTER_USER_ID = False

' Date separator / format
Const EW_DATE_SEPARATOR = "-"
Const EW_DEFAULT_DATE_FORMAT = 5

' Email related constants
Const EW_SMTP_SERVER = "localhost" ' Smtp server
Const EW_SMTP_SERVER_PORT = 25 ' Smtp server port
Const EW_SMTP_SERVER_USERNAME = "" ' Smtp server user name
Const EW_SMTP_SERVER_PASSWORD = "" ' Smtp server password
Const EW_SENDER_EMAIL = "" ' Sender email
Const EW_RECIPIENT_EMAIL = "" ' Receiver email

' File upload constants
Const EW_UPLOAD_DEST_PATH = "myup/" ' Upload destination path
Const EW_UPLOAD_ALLOWED_FILE_EXT = "gif,jpg,jpeg,bmp,png,doc,xls,pdf,zip" ' Allowed file extensions
Const EW_UPLOAD_CHARSET = "" ' Upload charset
Const EW_MAX_FILE_SIZE = 2000000 ' Max file size
Const EW_THUMBNAIL_FILE_PREFIX = "tn_" ' Thumbnail file prefix
Const EW_THUMBNAIL_FILE_SUFFIX = "" ' Thumbnail file suffix
Const EW_THUMBNAIL_DEFAULT_WIDTH = 0 ' Thumbnail default width
Const EW_THUMBNAIL_DEFAULT_HEIGHT = 0 ' Thumbnail default height
Const EW_THUMBNAIL_DEFAULT_INTERPOLATION = 1 ' Thumbnail default interpolation

' Export all records
Const EW_EXPORT_ALL = True ' export all records

' Const EW_EXPORT_ALL = False ' export 1 page only
' Export original value

Const EW_EXPORT_ORIGINAL_VALUE = False ' do not export original value

' Const EW_EXPORT_ORIGINAL_VALUE = True ' export original value
' Use token in Url

Const EW_USE_TOKEN_IN_URL = False ' do not use token in url

' Const EW_USE_TOKEN_IN_URL = True ' use token in url
' Search multi value option
' 1 - no multi value
' 2 - AND all multi values
' 3 - OR all multi values

Const EW_SEARCH_MULTI_VALUE_OPTION = 3

' Validate option
Const EW_CLIENT_VALIDATE = True
Const EW_SERVER_VALIDATE = False

' ----------------------------------------------
'  ASPMaker 7 global variables (begin)
'
' Global variables
' Common

Dim Page ' Common page object
Dim EW_PAGE_ID ' Page ID
Dim EW_TABLE_NAME ' Table name
Dim Conn, Rs, RsDtl, i
Dim Security
Dim ObjForm
Dim PagerItem
Dim EventArgs

' Used by ValidateForm/ValidateSearch
Dim gsFormError, gsSearchError

' Used by *master.asp
Dim gsMasterReturnUrl

' Used by header.asp, export checking
Dim gsExport, gsExportFile

' Used by system generated functions
Dim sSqlWrk, sWhereWrk, RsWrk, ari, arwrk, armultiwrk, rowswrk, rowcntwrk, selwrk, jswrk, emptywrk

' Lookup
Dim EW_RECORD_DELIMITER, EW_FIELD_DELIMITER
EW_RECORD_DELIMITER = vbCr
EW_FIELD_DELIMITER = "|"

'
'  ASPMaker 7 global variables (end)
' ----------------------------------------------

%>
<%

' Menu
Const EW_MENUBAR_VERTICAL_CLASSNAME = "ewMenuBarVertical"
Const EW_MENUBAR_SUBMENU_CLASSNAME = ""
Const EW_MENUBAR_RIGHTHOVER_IMAGE = ""
%>
