'############################################################################################
'### This section contains important and powerful FM settings. You can edit them to fit your needs.
'### Lines with an apostophe ( ' ) in front of them are commented out and therefore inactive. Uncomment them if necessary.
'### See the FAQ for common questions: http://iisworks.com/fileman
'############################################################################################

'###### System settings ###### 
Application("DBConnection")="DBQ=" & server.mappath("database/fileman.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}" '### Database connection string. For alternatives (for example a DSN): refer to general IIS docs and the FAQ's on the Fileman page.
'Application("DBConnection")="DSN=FM"
'Application("IsAccessDatabase")=True '### True if the Database is MS Access? Empty=auto-detect. (Needed for different DateDif handling in AutoMaintenance) 
Application("Debugging")=True '### If true: All error messages will be shown and script processing is stopped when an error occurs (Normally debugging should be disabled)
Application("ScriptTimeout")=180 '### Maximum time the script/page is allowed to run before it is terminated by IIS (seconds). Increase if your pages time out with certain long actions, for example displaying large listings.
Application("LongScriptTimeout")=1800 '### Same as ScriptTimeout, but only used for pages that need extra time (upload, download).
Application("SessionTimeout")=30 '### The timeout value for user Sessions (minutes). After this time, the user will be logged out automatically.
Application("UploadPage")="ul_asp.asp" '### Page to use for uploads (support for 3rd party upload components). Default: ul_asp.asp, options are any of the ul_*.asp pages, but not the ones with "bar" in the name (these are progress bars).
Application("ZipPage")="fathzip.asp" '### ZIP page/component to use. Valid values: easyzip.asp, dynazip.asp or fathzip.asp
Application("ZipEnabled")=True '### ZIP functions enabled? This setting overrides the Group setting. Only enable it if the right zip component is installed.
Application("DefaultLanguageFile")="English.dat" '### Default language file to use for FileMan. This defines the initial language of FM before a user logs in and his own language page is loaded
'Application("SelectLanguageOnLoginPage")=True '### Show the language selectbox on the login page. Language change is affected immediately after selection.
Application("UnEditableExtensions")="com,exe,dll,ocx,386,sys,vxd,drv,bin,jpg,gif,bmp,zip,arj,rar,mdb,xls,mp3,mpg,avi,mov,pdf,chm,enc" 
Application("DeleteRootFolder")=False '### CAUTION! Remove users rootfolder when deleting accounts (from admin page or automatic database maintenance).
Application("MaxDescriptionSize")=1024 '### Maximum allowed length of file description (only possible on NTFS partitions!)
Application("MaxConcurrentUsers")=1000 '### The maximum number of FM users that can be logged in at the same time (empty=unlimited).
Application("BgColorHeader")="666688"
Application("BgColorFolders")="DDDDEE"
Application("BgColorFiles")="EEEEF8"
Application("ExcludeFromSearchbots")=True '### Generate a robots.txt file in the fileman folder to prevent the site from showing up in search engines on the web
Application("ExtraErrorMsg")= "" '### Optional customizable additional error message string that is displayed in case of an error, for example how to contact the helpdesk. 
Application("HomeURL")="http://www.iisworks.com/fileman" '### The link under the Home button. Use %user% as username variable.
Application("WysiwigExtensions")="htm,html" '### Use wysiwyg html editor by default for following file extensions
Application("MaxHistoryItems")=30 '### Remember this number of last folders in user selectable listbox 
Application("MaxLengthOfHistoryItems")=30 '### Names of items in history listbox will be shortened if longer than this value 

'###### NT Integration ###### 
' Anonymous access for the fileman virtual directory needs to be revoked in IIS to use this feature. 
' To restrict access to FM you can apply proper NTFS permissions to login.asp (or the entire FM folder). Login as Domain\Username
' Make sure that FM accounts exist for each NT User, or set AutoCreateNTUsers=True to create them automatically.
'########################
'Application("UseNTAuthentication")=True '### Use integrated NT authentication (if Anonymous is disabled). This logs in NT validated users automatically. 
Application("AutoCreateNTUsers")=True '### Auto-create non existing authenticated users in Fileman if NT authentication is enabled (with default values for database fields).
Application("UseNTDomainInVarName")=False '### If false, the domain part of DOMAIN\USER (if present) will be removed from the %user% var (in Rootfolder definitions etc.)
Application("Domain")="" '### Default domain name, used in the NTFS permissions page. Empty=try to auto-detect using WMI

'###### Security and log settings ###### 
Application("FMRecyclerName")="FMRecycler_" '### If defined, this subfolder of RootFolder will be used to move deleted files to if configured for user with a rootfolder defined (username will be appended to this name). Example: "FMRecycler_". 
Application("AllowedIP")="" '### Comma delimited list of allowed IP numbers/ranges. Example: "192.*,10.0.0.*" 
Application("DeniedIP")="" '### Comma delimited list of denied IP numbers/ranges (this setting overrides AllowedIP). Example: "192.*,10.0.0.*" 
Application("DisableAccountsAfter")=5 '### Disable accounts after n unsuccesful logons attempts during one session (empty=unlimited, closing the browser will start a new session)
Application("LogFile")="fileman.log" '### Name of the logfile that Fileman will use. If no full path is entered the FM folder will be used. Not necessary if LogToDatabase=true.
'Application("StoreEncryptedPass")=True '### IMPORTANT: If changed, all existing passwords in the database will have to be reset (temporarily set an empty password for the admin to login the first time)! If enabled, pass will be stored in the database with basic XOR encryption instead of plain text. Only used to prevent casual viewing of the database, it is no strong encryption!
Application("UseStrongEncryption")=True '### Use AES Crypto component for strong file encryption (instead of simple XOR encryption).
'Application("LogToDatabase")=True '### If true, FM will log to the FMLog table in the database instead of a txt file. Note that this is slower, especially when using the Access database.
Application("LogLevel")=1 '### 0=Off, 1=Basic logging, 2=Debug level logging, 3=Debug + full matching/checking process

'###### User Subscriptions settings to web based file storage. ###### 
'Application("AllowSubscriptions")=True '### Users can subscribe themselves with their email address (only if EmailEnabled=true, check out the Email section). Useful to provide a web-based storage service like FreeDrive. This option will create a FM account with the defaults defined in the database. 
'Application("AutoMaintenance")=True '### Perform automatic maintenance on the database if AllowSubscriptions=True. Removes accounts (only non-admins): 1. Never used for n days and 2. Not logged in for m days). Make sure the time on the server is OK!
Application("DeleteAutoMaintAccounts")=False '### Determines how auto-maintenance of old accounts (not logged in for n days) is performed: if True, the accounts are deleted, otherwise they are disabled. Note that unused accounts always get deleted, regardless of this setting!
Application("DeleteUnusedAfterDays")=3 '### If automatic maintenance is enabled this value defines after how many days accounts will be removed that have never been used
Application("DeleteInactiveAfterDays")=90 '### If automatic maintenance is enabled this value defines after how many days accounts will be removed that have been inactive
Application("AllowedMailDomains")="" '### If defined: only email addresses in these domains are allowed to subscribe (Comma delimited list, for example:"dom1.org,dom2.com")
Application("DeniedMailDomains")="" '### If defined: only email addresses in these domains are rejected

'###### Email settings ###### 
Application("EmailEnabled")=True '### Enable email related functions (send pass and files). Set to true only if an email components is installed and the parameters below are defined correctly
Application("MailComponent")="cdonts" '### Defines which email component to use. Valid values are: "jmail", "aspmail", "cdo" or "cdonts" (Note: cdonts only works with the local server, SMTPMailServer is ignored! CDO has problems on some servers.).
Application("SMTPMailServer")= "Localhost" '### SMTP Mailserver to be used to send account information to users.
Application("SendingEmailAddress")="info@domain.com" '### Email From-address used to send email.
Application("ServiceURL")="http://www.domain.com/fileman" '### Home URL of the service. This address is mentioned in the email sent to users with their password.

'############################################################################################