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

Revision 562, 13.2 KB (checked in by fproulx, 8 years ago)

2005-04-22 Fran��ois Proulx <francois.proulx@…>

  • Fixed bug in FlickrPhotostream?.php
  • Params did not match new methods requirements ( getUserByEmail )
  • Changed stylesheet class name for Flickr to match new changes
  • Fixed bugs in File
  • Wrote part of EmbeddedContent? ( partially working )
  • TODO: add support for parameters and attributes in EmbeddedContent?
  • 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.35  2005/04/23 16:05:45  fproulx
10 *     2005-04-22 François Proulx <francois.proulx@gmail.com>
11 *      * Fixed bug in FlickrPhotostream.php
12 *      * Params did not match new methods requirements ( getUserByEmail )
13 *      * Changed stylesheet class name for Flickr to match new changes
14 *      * Fixed bugs in File
15 *      * Wrote part of EmbeddedContent ( partially working )
16 *      * TODO: add support for parameters and attributes in EmbeddedContent
17 *
18 *     Revision 1.34  2005/04/21 14:58:29  fproulx
19 *     2005-04-21 Fran�ois Proulx <francois.proulx@gmail.com>
20 *      * Added explicit admin UI exceptions support for Flickr
21 *      * Completed File and Picture objects
22 *
23 *     Revision 1.33  2005/04/19 21:17:01  fproulx
24 *     2005-04-18 Fran�ois Proulx <francois.proulx@gmail.com>
25 *      * Added Flickr content support
26 *      * Part of File object is done
27 *
28 *     Revision 1.32  2005/04/19 21:02:40  benoitg
29 *     2005-04-19 Benoit Gr�goire  <bock@step.polymtl.ca>
30 *      * Working (beta...) content manager and portal.
31 *      * Add content preview mode
32 *
33 *     Revision 1.31  2005/04/14 15:12:35  benoitg
34 *     2005-04-14 Benoit Gr�goire  <bock@step.polymtl.ca>
35 *      * First part of the future content delivery infrastructure.  Many files added.
36 *
37 *     Revision 1.30  2005/04/01 21:38:23  fproulx
38 *     2005-04-01 Francois Proulx  <francois.proulx@gmail.com>
39 *      * EVERYTHING IS NOW UTF-8 YOU MUST EDIT YOUR FILES WITH AN UTF-8 COMPLIANT EDITOR
40 *      * The database will be converted to UTF-8 (version 5)
41 *      * Added select boxes ( or hidden ) html form elements to choose the network for signup, lost password, username
42 *
43 *     Revision 1.29  2005/04/01 20:58:28  benoitg
44 *     2005-04-01 Benoit Gr�goire  <bock@step.polymtl.ca>
45 *      * Add constraints to account_origin to detect errors on inserts.
46 *      * Remove IDRC test server
47 *
48 *     Revision 1.28  2005/04/01 02:17:40  benoitg
49 *     2005-02-14 Philippe April <philippe@ilesansfil.org>
50 *      * User.php: Add reference to $db global variable.
51 *
52 *     Revision 1.27  2005/04/01 02:05:32  benoitg
53 *     2005-03-31 Benoit Grégoire  <bock@step.polymtl.ca>
54 *      * Remove spaces after php blocks in various files.
55 *      * Temporarely fix single authentication source not present bug in login smarty template.  All other places where we select the network will be fixed tommorow.
56 *      * Fix initial schema errors.
57 *
58 *     Revision 1.26  2005/03/31 18:35:23  benoitg
59 *     2005-03-31 Benoit Grégoire  <bock@step.polymtl.ca>
60 *      * More RADIUS install documentation.
61 *      * Fix schema_validate.php
62 *
63 *     Revision 1.25  2005/03/31 17:54:45  fproulx
64 *     Missing files
65 *
66 *     Revision 1.24  2005/03/30 20:04:42  fproulx
67 *     2005-03-30 Fran?ois Proulx  <francois.proulx@gmail.com>
68 *      * Finished RADIUS authentication and accounting
69 *      * Accounting Unique session ID is now based on the same token we use
70 *      * Fixed all issues with lost_username, lost_password etc...
71 *      * User class has new static function getUsersByEmail and getUsersByUsername
72 *      * Added translations for new features
73 *      * Translated the validation, lost password, username e-mails
74 *      * Tested quite a bit, this version is considered stable
75 *      * A few examples on how set different RADIUS or local authenticators can be found in the config.php
76 *
77 *     Revision 1.23  2005/03/29 22:13:27  fproulx
78 *     2005-03-28 Fran?ois Proulx  <francois.proulx@gmail.com>
79 *      * schema_validate.php : Modified schema : dropped e-mail + account unique index, dropped email not empty constraint
80 *      * Schema is now at version 3
81 *      * Coded RADIUS authentication
82 *      * Modified templates to show a select box when more than one server is configured
83 *      * Coded RADIUS accounting and backward compatibility accounting
84 *      * Modified many statistics SQL queries to match new Users table
85 *      * modified statistics templates to match user_id and account_origin
86 *      * TODO : Fix lost_username and lost_password ( issue since we dropped the unique constraint on emails... )
87 *      * TODO : Heavy testing possibly with remote RADIUS servers
88 *
89 *     Revision 1.22  2005/03/28 19:49:52  benoitg
90 *     2005-03-28 Benoit Gr?goire  <bock@step.polymtl.ca>
91 *      * common.php:  Add get_guid() function
92 *      * 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.
93 *      * New class Authenticator (and subclasses):  Begin virtualizing the login process.
94 *
95 *     Revision 1.21  2005/03/17 03:57:39  masham
96 *      * use __FILE__ to resolve location of local.config
97 *
98 *     Revision 1.20  2005/03/17 00:36:21  masham
99 *      * config.php will use "local.config.php" instead, if present.  avoid cvs over-writing.
100 *      * if CUSTOM_SIGNUP_URL is defined, signup.php will re-direct.  For integration with existing auth systems.
101 *
102 *     Revision 1.19  2005/01/26 03:46:30  benoitg
103 *     2005-01-25 Benoit Gr?goire  <bock@step.polymtl.ca>
104 *      * classes/Node.php:  New file, untested code example
105 *      * wifidog/admin/admin_common.php: Remove double-defined BASEPATH
106 *
107 *     Revision 1.18  2005/01/19 00:05:37  aprilp
108 *     Removed references to user_management pages that don't exist anymore
109 *
110 *     Revision 1.17  2005/01/18 14:36:50  aprilp
111 *     Changed default language to fr_FR instead of fr, it wasn't working on some platforms
112 *
113 *     Revision 1.16  2005/01/16 21:21:55  aprilp
114 *     *** empty log message ***
115 *
116 *     Revision 1.15  2005/01/12 15:52:36  aprilp
117 *     *** empty log message ***
118 *
119 *     Revision 1.14  2005/01/12 00:57:42  benoitg
120 *     2004-01-10 Benoit Gr?goire  <bock@step.polymtl.ca>
121 *      * wifidog/config.php:  Add list of hotspot to network rss feed list (not yet functionnal)
122 *      * wifidog/hotspot_status.php:  Allow RSS export of the list of deployed HotSpots.
123 *      * 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.
124 *      * wifidog/classes/RssPressReview.inc:  Missing file from previous commit.
125 *      * wifidog/portal/index.php: Preliminary work to enable smart press review of multiple RSS feeds.
126 *
127 *     Revision 1.13  2004/12/03 19:42:32  benoitg
128 *     2004-12-03 Benoit Gr?goire  <bock@step.polymtl.ca>
129 *      * 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.
130 *      * wifidog/config.php, wifidog/local_content/default/login.html, wifidog/include/user_management_menu.php:  Add hotspot status page to login page.
131 *      * wifidog/hotspot_status.php: Cosmetic
132 *      * wifidog/admin/hotspot_log.php: Stats now need admin privileges
133 *      * wifidog/index.php: Cosmetic.
134 *
135 *     Revision 1.12  2004/11/20 03:28:25  benoitg
136 *     2004-11-19 Benoit Gr?goire  <bock@step.polymtl.ca>
137 *      * TODO: Add email domains to blacklist
138 *      * wifidog/config.php, wifidog/include/user_management_menu.php: Add tech support email address
139 *      * wifidog/hotspot_status.php: List of HotSpots that are open with summary of information.  Designed to be included as part of another page.
140 *      * wifidog/local_content/common/wifidog_logo_banner.gif: Add wifidog logo
141 *      * wifidog/local_content/default/hotspot_logo_banner.jpg: Shrink the logo and write unknown hotspot, however this is still really ugly
142 *      * wifidog/local_content/default/login.html, portal.html, stylesheet.css: Cosmetic fixes
143 *              * wifidog/local_content/default/login.html.fr, portal.html.fr: Delete the files, this isn't the approach we will use for translation.
144 *      * sql/wifidog-postgres-initial-data.sql, wifidog-postgres-schema.sql: Update with new node information structures.
145 *
146 *     Revision 1.11  2004/09/28 20:46:40  yanik_crepeau
147 *     Added experimental (and commented) code for next developpments
148 *     regarding the language/localization issues.
149 *
150 *     Revision 1.10  2004/09/28 20:44:08  yanik_crepeau
151 *     Added commented hearder with Id and Log cvs keywords.
152 *
153 *
154 */
155
156if(file_exists(dirname(__FILE__)."/local.config.php")) {
157        // use a local copy of the configuration if found instead of the distro's.
158        require dirname(__FILE__)."/local.config.php";
159} else {
160
161/* Used by AbstractDb */
162define('CONF_DATABASE_HOST',   'localhost');
163define('CONF_DATABASE_NAME',   'wifidog');
164define('CONF_DATABASE_USER',   'wifidog');
165define('CONF_DATABASE_PASSWORD',   'wifidogtest');
166
167/*************************** Common setup option.  Adjust to suit your environment *******************************/
168
169/* 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 */
170define('SYSTEM_PATH', '/');
171/**< Set this to true if your server has SSL available, otherwise, passwords will be transmitted in clear text over the air */
172define('SSL_AVAILABLE', false);
173/** @deprecated version - 2005-04-19 */
174define('HOTSPOT_NETWORK_NAME', 'Île sans fil');
175define('HOTSPOT_NETWORK_URL', 'http://www.ilesansfil.org/');
176define('TECH_SUPPORT_EMAIL', 'tech@ilesansfil.org');
177define('UNKNOWN_HOSTPOT_NAME', 'Unknown HotSpot');
178
179define('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... */
180define('VALIDATION_EMAIL_FROM_ADDRESS', 'validation@ilesansfil.org');
181/* RSS support.  If set to true, MAGPIERSS must be installed in MAGPIE_REL_PATH */
182define('RSS_SUPPORT', true);
183/* Flickr Photostream content support. If set to true, Phlickr must be installed in PHLICKR_REL_PATH */
184define('PHLICKR_SUPPORT', true);
185/* 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. */
186define('CONF_USE_CRON_FOR_DB_CLEANUP', false);
187
188
189/* Use a custom signup system instead of the built in signup page. */
190//define("CUSTOM_SIGNUP_URL","https://www.bcwireless.net/hotspot/signup.php");
191
192/** The next two items are constants, do not edit */
193define('DBMS_MYSQL','AbstractDbMySql.php');
194define('DBMS_POSTGRES','AbstractDbPostgres.php');
195
196/** Defines which Database management software you want to use */
197define('CONF_DBMS',DBMS_POSTGRES);
198
199/***** You should normally not have to edit anything below this ******/
200define('WIFIDOG_NAME', 'WiFiDog Authentication server');
201define('WIFIDOG_VERSION', 'CVS');
202
203define('MAGPIE_REL_PATH',  'lib/magpie/');
204define('SMARTY_REL_PATH',  'lib/smarty/');
205define('PHLICKR_REL_PATH',  'lib/');
206//define('NETWORK_RSS_URL', 'http://wifinetnews.com/index.rdf');
207define('NETWORK_RSS_URL', 'http://patricktanguay.com/isf/atom.xml, http://auth.ilesansfil.org/hotspot_status.php?format=RSS');
208define('UNKNOWN_HOTSPOT_RSS_URL', '');
209
210define('LOCAL_CONTENT_REL_PATH', 'local_content/');//Path to the directory containing the different node specific directories.  Relative to BASE_URL_PATH
211
212// Authentication sources section
213/* The array index for the source must match the account_origin in the user table */
214
215// Local User authenticators
216require_once BASEPATH.'classes/AuthenticatorLocalUser.php';
217
218/**********************************************
219 * BIG FAT WARNING
220 * DO NOT remove this authenticator under any circumstance
221 * you SHOULD NOT change its name either
222 * The system relies heavily on its main authenticator to do
223 * multiple tasks with users...
224 * ********************************************
225 */
226define('LOCAL_USER_ACCOUNT_ORIGIN', 'LOCAL_USER');
227$AUTH_SOURCE_ARRAY[LOCAL_USER_ACCOUNT_ORIGIN]=array(
228                             'name'=>HOTSPOT_NETWORK_NAME,
229                             'authenticator'=>new AuthenticatorLocalUser(LOCAL_USER_ACCOUNT_ORIGIN));
230                             
231// RADIUS authenticators ( see AuthenticatorRadius constuctor doc for details )
232/*
233require_once BASEPATH.'classes/AuthenticatorRadius.php';
234
235define('IDRC_ACCOUNT_ORIGIN', 'IDRC_RADIUS_USER');
236$AUTH_SOURCE_ARRAY[IDRC_ACCOUNT_ORIGIN]=array(
237                             'name'=>"IDRC RADIUS Server",
238                             'authenticator'=>new AuthenticatorRadius(IDRC_ACCOUNT_ORIGIN, "192.168.0.11", 1812, 1813, "secret_key", "CHAP_MD5"));
239*/
240
241/*These are the file names of the different templates that can be put in the CONTENT_PATH/(node_id)/ folders */
242define('STYLESHEET_NAME', 'stylesheet.css');
243define('LOGIN_PAGE_NAME', 'login.html');
244define('PORTAL_PAGE_NAME', 'portal.html');/**< @deprecated version - 19-Apr-2005*/
245define('PAGE_HEADER_NAME', 'header.html');
246define('PAGE_FOOTER_NAME', 'footer.html');
247define('HOTSPOT_STATUS_PAGE', 'hotspot_status.php');
248define('HOTSPOT_LOGO_NAME', 'hotspot_logo.jpg');
249define('HOTSPOT_LOGO_BANNER_NAME', 'hotspot_logo_banner.jpg');
250
251/* Path for files in LOCAL_CONTENT_REL_PATH/common/ */
252define('NETWORK_LOGO_NAME', 'network_logo.png');
253define('NETWORK_LOGO_BANNER_NAME', 'network_logo_banner.png');
254define('WIFIDOG_LOGO_NAME', 'wifidog_logo_banner.png');
255define('WIFIDOG_LOGO_BANNER_NAME', 'wifidog_logo_banner.png');
256
257define('DEFAULT_NODE_ID', 'default');
258define('DEFAULT_LANG', 'fr_FR');
259
260
261}
262?>
Note: See TracBrowser for help on using the browser.