root/trunk/wifidog-auth/wifidog/config.php @ 512

Revision 512, 9.5 KB (checked in by benoitg, 8 years ago)

2005-03-28 Benoit Gr�goire <bock@…>

  • common.php: Add get_guid() function
  • validate_schema.php: New auto-upgrade script to allow autaumatic schema upgrade. Note that you must still update dump_initial_data_postgres.sh and use sync_sql_for_cvs.sh so new users aren't left in the cold.
  • New class Authenticator (and subclasses): Begin virtualizing the login process.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2
3/*
4 * File version: $Id$
5 *
6 * Log history:
7 *
8 *     $Log$
9 *     Revision 1.22  2005/03/28 19:49:52  benoitg
10 *     2005-03-28 Benoit Gr�goire  <bock@step.polymtl.ca>
11 *      * common.php:  Add get_guid() function
12 *      * validate_schema.php: New auto-upgrade script to allow autaumatic schema upgrade.  Note that you must still update dump_initial_data_postgres.sh and use sync_sql_for_cvs.sh so new users aren't left in the cold.
13 *      * New class Authenticator (and subclasses):  Begin virtualizing the login process.
14 *
15 *     Revision 1.21  2005/03/17 03:57:39  masham
16 *      * use __FILE__ to resolve location of local.config
17 *
18 *     Revision 1.20  2005/03/17 00:36:21  masham
19 *      * config.php will use "local.config.php" instead, if present.  avoid cvs over-writing.
20 *      * if CUSTOM_SIGNUP_URL is defined, signup.php will re-direct.  For integration with existing auth systems.
21 *
22 *     Revision 1.19  2005/01/26 03:46:30  benoitg
23 *     2005-01-25 Benoit Gr�goire  <bock@step.polymtl.ca>
24 *      * classes/Node.php:  New file, untested code example
25 *      * wifidog/admin/admin_common.php: Remove double-defined BASEPATH
26 *
27 *     Revision 1.18  2005/01/19 00:05:37  aprilp
28 *     Removed references to user_management pages that don't exist anymore
29 *
30 *     Revision 1.17  2005/01/18 14:36:50  aprilp
31 *     Changed default language to fr_FR instead of fr, it wasn't working on some platforms
32 *
33 *     Revision 1.16  2005/01/16 21:21:55  aprilp
34 *     *** empty log message ***
35 *
36 *     Revision 1.15  2005/01/12 15:52:36  aprilp
37 *     *** empty log message ***
38 *
39 *     Revision 1.14  2005/01/12 00:57:42  benoitg
40 *     2004-01-10 Benoit Gr�goire  <bock@step.polymtl.ca>
41 *      * wifidog/config.php:  Add list of hotspot to network rss feed list (not yet functionnal)
42 *      * wifidog/hotspot_status.php:  Allow RSS export of the list of deployed HotSpots.
43 *      * wifidog/admin/incoming_outgoing_swap.php:  Script to swap incoming and outgoing in your data.  only use this if you had gateways before 1.0.2 and wish to correct your logs before you upgrade.
44 *      * wifidog/classes/RssPressReview.inc:  Missing file from previous commit.
45 *      * wifidog/portal/index.php: Preliminary work to enable smart press review of multiple RSS feeds.
46 *
47 *     Revision 1.13  2004/12/03 19:42:32  benoitg
48 *     2004-12-03 Benoit Gr�goire  <bock@step.polymtl.ca>
49 *      * wifidog/admin/user_stats.php,  wifidog/classes/Statistics.php:  Embryonic aggregate user stats.  Currently allows you to find out the rate at which your users subscribe.
50 *      * wifidog/config.php, wifidog/local_content/default/login.html, wifidog/include/user_management_menu.php:  Add hotspot status page to login page.
51 *      * wifidog/hotspot_status.php: Cosmetic
52 *      * wifidog/admin/hotspot_log.php: Stats now need admin privileges
53 *      * wifidog/index.php: Cosmetic.
54 *
55 *     Revision 1.12  2004/11/20 03:28:25  benoitg
56 *     2004-11-19 Benoit Gr�goire  <bock@step.polymtl.ca>
57 *      * TODO: Add email domains to blacklist
58 *      * wifidog/config.php, wifidog/include/user_management_menu.php: Add tech support email address
59 *      * wifidog/hotspot_status.php: List of HotSpots that are open with summary of information.  Designed to be included as part of another page.
60 *      * wifidog/local_content/common/wifidog_logo_banner.gif: Add wifidog logo
61 *      * wifidog/local_content/default/hotspot_logo_banner.jpg: Shrink the logo and write unknown hotspot, however this is still really ugly
62 *      * wifidog/local_content/default/login.html, portal.html, stylesheet.css: Cosmetic fixes
63 *              * wifidog/local_content/default/login.html.fr, portal.html.fr: Delete the files, this isn't the approach we will use for translation.
64 *      * sql/wifidog-postgres-initial-data.sql, wifidog-postgres-schema.sql: Update with new node information structures.
65 *
66 *     Revision 1.11  2004/09/28 20:46:40  yanik_crepeau
67 *     Added experimental (and commented) code for next developpments
68 *     regarding the language/localization issues.
69 *
70 *     Revision 1.10  2004/09/28 20:44:08  yanik_crepeau
71 *     Added commented hearder with Id and Log cvs keywords.
72 *
73 *
74 */
75
76if(file_exists(dirname(__FILE__)."/local.config.php")) {
77        // use a local copy of the configuration if found instead of the distro's.
78        require dirname(__FILE__)."/local.config.php";
79} else {
80
81/* Used by AbstractDb */
82define('CONF_DATABASE_HOST',   'localhost');
83define('CONF_DATABASE_NAME',   'wifidog');
84define('CONF_DATABASE_USER',   'wifidog');
85define('CONF_DATABASE_PASSWORD',   'wifidogtest');
86
87/*************************** Common setup option.  Adjust to suit your environment *******************************/
88
89/* The SYSTEM_PATH, must be set to the url path needed to reach the wifidog directory.  Normally '/' or '/wifidog/', depending on where configure your document root.  Gateway configuration must match this as well */
90define('SYSTEM_PATH', '/');
91/**< Set this to true if your server has SSL available, otherwise, passwords will be transmitted in clear text over the air */
92define('SSL_AVAILABLE', true); 
93define('HOTSPOT_NETWORK_NAME', '�le sans fil');
94define('HOTSPOT_NETWORK_URL', 'http://www.ilesansfil.org/');
95define('TECH_SUPPORT_EMAIL', 'tech@ilesansfil.org');
96define('UNKNOWN_HOSTPOT_NAME', 'Unknown HotSpot');
97
98define('VALIDATION_EMAIL_FROM_ADDRESS', 'validation@ilesansfil.org');
99define('VALIDATION_EMAIL_SUBJECT', HOTSPOT_NETWORK_NAME.' new user validation');
100define('VALIDATION_GRACE_TIME', 20); /**< Number of minutes after new account creation during which internet access is available to validate your account.  Once elapsed, you have to validate from home... */
101define('LOST_PASSWORD_EMAIL_SUBJECT', HOTSPOT_NETWORK_NAME.' new password request');
102define('LOST_USERNAME_EMAIL_SUBJECT', HOTSPOT_NETWORK_NAME.' lost username request');
103/* RSS support.  If set to true, MAGPIERSS must be installed in MAGPIE_REL_PATH */
104define('RSS_SUPPORT', true); 
105/* Normally, the database cleanup routines will be called everytime a portal page is displayed.  If you set this to true, you must set a cron job on the server which will execute the script cron/cleanup.php. */
106define('CONF_USE_CRON_FOR_DB_CLEANUP', false);
107
108
109/* Use a custom signup system instead of the built in signup page. */
110//define("CUSTOM_SIGNUP_URL","https://www.bcwireless.net/hotspot/signup.php");
111
112/** The next two items are constants, do not edit */
113define('DBMS_MYSQL','AbstractDbMySql.php');
114define('DBMS_POSTGRES','AbstractDbPostgres.php');
115
116/** Defines which Database management software you want to use */
117define('CONF_DBMS',DBMS_POSTGRES);
118
119/***** You should normally not have to edit anything below this ******/
120define('WIFIDOG_NAME', 'WiFiDog Authentication server');
121define('WIFIDOG_VERSION', 'CVS');
122
123define('MAGPIE_REL_PATH',  'lib/magpie/');
124define('SMARTY_REL_PATH',  'lib/smarty/');
125//define('NETWORK_RSS_URL', 'http://wifinetnews.com/index.rdf');
126define('NETWORK_RSS_URL', 'http://patricktanguay.com/isf/atom.xml, http://auth.ilesansfil.org/hotspot_status.php?format=RSS');
127define('UNKNOWN_HOTSPOT_RSS_URL', '');
128
129define('LOCAL_CONTENT_REL_PATH', 'local_content/');//Path to the directory containing the different node specific directories.  Relative to BASE_URL_PATH
130
131/* Authentication sources section */
132 define('LOCAL_USER_ACCOUNT_ORIGIN', 'LOCAL_USER');
133require_once BASEPATH.'classes/AuthenticatorLocalUser.php';
134
135/* The array index for the source must match the account_origin in the user table */
136 $AUTH_SOURCE_ARRAY[LOCAL_USER_ACCOUNT_ORIGIN]=array(
137                                                     'name'=>HOTSPOT_NETWORK_NAME,
138                                                     'authenticator'=>new AuthenticatorLocalUser(LOCAL_USER_ACCOUNT_ORIGIN));
139
140
141
142/*These are the file names of the different templates that can be put in the CONTENT_PATH/(node_id)/ folders */
143define('STYLESHEET_NAME', 'stylesheet.css');
144define('LOGIN_PAGE_NAME', 'login.html');
145define('PORTAL_PAGE_NAME', 'portal.html');
146define('PAGE_HEADER_NAME', 'header.html');
147define('PAGE_FOOTER_NAME', 'footer.html');
148define('HOTSPOT_STATUS_PAGE', 'hotspot_status.php');
149define('HOTSPOT_LOGO_NAME', 'hotspot_logo.jpg');
150define('HOTSPOT_LOGO_BANNER_NAME', 'hotspot_logo_banner.jpg');
151
152/* Path for files in LOCAL_CONTENT_REL_PATH/common/ */
153define('NETWORK_LOGO_NAME', 'network_logo.png');
154define('NETWORK_LOGO_BANNER_NAME', 'network_logo_banner.png');
155define('WIFIDOG_LOGO_NAME', 'wifidog_logo_banner.png');
156define('WIFIDOG_LOGO_BANNER_NAME', 'wifidog_logo_banner.png');
157
158define('DEFAULT_NODE_ID', 'default');
159define('DEFAULT_LANG', 'fr_FR');
160
161/*** FOR TESTING ONLY *** UNCOMMENT THE NEXT LINES
162 *** WHEN READY TO TEST **************************
163 *** This code define two (2) global variables:
164 *** HTTP_HEADER_LANG will return the language of the
165 *** user's browser stripped from its country code. For
166 *** instance, if the HTTP_ACCEPT_LANGUAGE header is
167 *** something like 'en-ca, en-us, en, fr-ca, fr', the
168 *** first two characters is picked and used as language
169 *** selector.
170 *** The other global variable is the FILE_NAME_SUFFIX.
171 *** for english it is empty, for any other language it is
172 *** the two character code used to set the language. When
173 *** choosing the template (let's say login.html), we simply
174 *** have to replace in the code and add
175 *** "login.html".$FILE_NAME_SUFFIX to get the right
176 *** template (assuming that login.html.fr exists for
177 *** French).
178if (if (substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) == "en") {
179    define('HTTP_HEADER_LANG', 'en');
180    define('FILE_NAME_SUFFIX', '');   
181} else {
182    define('HTTP_HEADER_LANG', substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2));
183    define('FILE_NAME_SUFFIX', substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2));
184}
185
186*/ 
187}
188?>
Note: See TracBrowser for help on using the browser.