| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
|---|
| 4 | |
|---|
| 5 | // +-------------------------------------------------------------------+ |
|---|
| 6 | // | WiFiDog Authentication Server | |
|---|
| 7 | // | ============================= | |
|---|
| 8 | // | | |
|---|
| 9 | // | The WiFiDog Authentication Server is part of the WiFiDog captive | |
|---|
| 10 | // | portal suite. | |
|---|
| 11 | // +-------------------------------------------------------------------+ |
|---|
| 12 | // | PHP version 5 required. | |
|---|
| 13 | // +-------------------------------------------------------------------+ |
|---|
| 14 | // | Homepage: http://www.wifidog.org/ | |
|---|
| 15 | // | Source Forge: http://sourceforge.net/projects/wifidog/ | |
|---|
| 16 | // +-------------------------------------------------------------------+ |
|---|
| 17 | // | This program is free software; you can redistribute it and/or | |
|---|
| 18 | // | modify it under the terms of the GNU General Public License as | |
|---|
| 19 | // | published by the Free Software Foundation; either version 2 of | |
|---|
| 20 | // | the License, or (at your option) any later version. | |
|---|
| 21 | // | | |
|---|
| 22 | // | This program is distributed in the hope that it will be useful, | |
|---|
| 23 | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|---|
| 24 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|---|
| 25 | // | GNU General Public License for more details. | |
|---|
| 26 | // | | |
|---|
| 27 | // | You should have received a copy of the GNU General Public License | |
|---|
| 28 | // | along with this program; if not, contact: | |
|---|
| 29 | // | | |
|---|
| 30 | // | Free Software Foundation Voice: +1-617-542-5942 | |
|---|
| 31 | // | 59 Temple Place - Suite 330 Fax: +1-617-542-2652 | |
|---|
| 32 | // | Boston, MA 02111-1307, USA gnu@gnu.org | |
|---|
| 33 | // | | |
|---|
| 34 | // +-------------------------------------------------------------------+ |
|---|
| 35 | |
|---|
| 36 | /** |
|---|
| 37 | * Configuration file of WiFiDog Authentication Server |
|---|
| 38 | * |
|---|
| 39 | * The configure the WiFiDOG auth server you can either use this configuration |
|---|
| 40 | * file or make a local copy of it named local.config.php. |
|---|
| 41 | * |
|---|
| 42 | * @package WiFiDogAuthServer |
|---|
| 43 | * @author Benoit Grégoire <bock@step.polymtl.ca> |
|---|
| 44 | * @author Max Horvath <max.horvath@maxspot.de> |
|---|
| 45 | * @copyright 2004-2006 Benoit Grégoire, Technologies Coeus inc. |
|---|
| 46 | * @copyright 2005-2006 Max Horvath, maxspot GmbH |
|---|
| 47 | * @version Subversion $Id$ |
|---|
| 48 | * @link http://www.wifidog.org/ |
|---|
| 49 | */ |
|---|
| 50 | |
|---|
| 51 | /** |
|---|
| 52 | * In case this is the local.config.php you should remove the next lines. |
|---|
| 53 | */ |
|---|
| 54 | |
|---|
| 55 | if (file_exists(dirname(__FILE__) . "/local.config.php")) { |
|---|
| 56 | // Use a local copy of the configuration if found instead of the distro's. |
|---|
| 57 | require dirname(__FILE__) . "/local.config.php"; |
|---|
| 58 | } else { |
|---|
| 59 | |
|---|
| 60 | /** |
|---|
| 61 | * In case this is the local.config.php stop removing the lines. |
|---|
| 62 | */ |
|---|
| 63 | |
|---|
| 64 | /********************************************************************\ |
|---|
| 65 | * DATABASE CONFIGURATION * |
|---|
| 66 | \********************************************************************/ |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Database abstraction classes |
|---|
| 70 | * ============================ |
|---|
| 71 | * |
|---|
| 72 | * The next two items are constants, do not edit! |
|---|
| 73 | */ |
|---|
| 74 | |
|---|
| 75 | // Database abstraction class for MySQL access. |
|---|
| 76 | define('DBMS_MYSQL','AbstractDbMySql.php'); |
|---|
| 77 | |
|---|
| 78 | // Database abstraction class for PostgreSQL access. |
|---|
| 79 | define('DBMS_POSTGRES','AbstractDbPostgres.php'); |
|---|
| 80 | |
|---|
| 81 | /** |
|---|
| 82 | * Which database management software do you want to use? |
|---|
| 83 | * ====================================================== |
|---|
| 84 | * |
|---|
| 85 | * Possible values: |
|---|
| 86 | * - DBMS_POSTGRES (Use PostgreSQL server) |
|---|
| 87 | * - DBMS_MYSQL (Use MySQL server) |
|---|
| 88 | * |
|---|
| 89 | * Please note that MySQL support is currently broken! |
|---|
| 90 | */ |
|---|
| 91 | define('CONF_DBMS', DBMS_POSTGRES); |
|---|
| 92 | |
|---|
| 93 | /** |
|---|
| 94 | * Configuration values needed to access the database. |
|---|
| 95 | * =================================================== |
|---|
| 96 | */ |
|---|
| 97 | |
|---|
| 98 | // Host of the database server. |
|---|
| 99 | define('CONF_DATABASE_HOST', 'localhost'); |
|---|
| 100 | |
|---|
| 101 | // Username for database access. |
|---|
| 102 | define('CONF_DATABASE_USER', 'wifidog'); |
|---|
| 103 | |
|---|
| 104 | // Password for database access. |
|---|
| 105 | define('CONF_DATABASE_PASSWORD', 'wifidogtest'); |
|---|
| 106 | |
|---|
| 107 | // Name of database used by WiFiDOG auth server. |
|---|
| 108 | define('CONF_DATABASE_NAME', 'wifidog'); |
|---|
| 109 | |
|---|
| 110 | /** |
|---|
| 111 | * Database cleanup |
|---|
| 112 | * ================ |
|---|
| 113 | * |
|---|
| 114 | * Normally, the database cleanup routines will be called everytime a portal |
|---|
| 115 | * page is displayed. If you set this to true, you must set a cron job on the |
|---|
| 116 | * server which will execute the script "cron/cleanup.php". |
|---|
| 117 | */ |
|---|
| 118 | define('CONF_USE_CRON_FOR_DB_CLEANUP', false); |
|---|
| 119 | |
|---|
| 120 | /********************************************************************\ |
|---|
| 121 | * WEBSERVER CONFIGURATION * |
|---|
| 122 | \********************************************************************/ |
|---|
| 123 | |
|---|
| 124 | /** |
|---|
| 125 | * Caching |
|---|
| 126 | * ======= |
|---|
| 127 | * |
|---|
| 128 | * If you installed PEAR::Cache_Lite and set this value to true, caching |
|---|
| 129 | * will be enabled. |
|---|
| 130 | * |
|---|
| 131 | * If you haven't installed PEAR::Cache_Lite, caching won't be enabled at all. |
|---|
| 132 | */ |
|---|
| 133 | define('USE_CACHE_LITE', true); |
|---|
| 134 | |
|---|
| 135 | /** |
|---|
| 136 | * Timezone |
|---|
| 137 | * ======== |
|---|
| 138 | * |
|---|
| 139 | * Since PHP 5.1.0 date functions have been rewritten and require to set |
|---|
| 140 | * a valid timezone. |
|---|
| 141 | * |
|---|
| 142 | * You'll find a list of valid identifiers at: |
|---|
| 143 | * http://www.php.net/manual/en/timezones.php |
|---|
| 144 | */ |
|---|
| 145 | define('DATE_TIMEZONE', 'Canada/Eastern'); |
|---|
| 146 | |
|---|
| 147 | /********************************************************************\ |
|---|
| 148 | * WIFIDOG BASIC CONFIGURATION * |
|---|
| 149 | \********************************************************************/ |
|---|
| 150 | |
|---|
| 151 | /** |
|---|
| 152 | * Custom signup system |
|---|
| 153 | * ==================== |
|---|
| 154 | * |
|---|
| 155 | * If you wanto to use a custom signup system instead of the built in signup |
|---|
| 156 | * page uncomment the next line and enter the URL to the system. |
|---|
| 157 | */ |
|---|
| 158 | //define("CUSTOM_SIGNUP_URL","https://www.bcwireless.net/hotspot/signup.php"); |
|---|
| 159 | |
|---|
| 160 | /** |
|---|
| 161 | * Available locales (languages) |
|---|
| 162 | * ============================= |
|---|
| 163 | * |
|---|
| 164 | * Define the list of locales you want to support. |
|---|
| 165 | * English, French and German are supported. |
|---|
| 166 | * |
|---|
| 167 | * See below examples |
|---|
| 168 | */ |
|---|
| 169 | global $AVAIL_LOCALE_ARRAY; |
|---|
| 170 | |
|---|
| 171 | |
|---|
| 172 | /** |
|---|
| 173 | * Array of available languages for the user. Each entry must have: |
|---|
| 174 | * -The language code (the part before the _) be present in wifidog/locales |
|---|
| 175 | * -Have the entire locale available in your system locale |
|---|
| 176 | * OR |
|---|
| 177 | * -Have a system locale available with only the language (ex: an en locale). |
|---|
| 178 | * Note that if you specify en_UK and en_US, and have only en available the |
|---|
| 179 | * system will NOT warn you that both will have identical results. |
|---|
| 180 | * Note that even if your system uses locales like fr_CA.UTF8, you do not need |
|---|
| 181 | * to change this, ifidog will translate for you. |
|---|
| 182 | * @TODO: Setting an array of only one entry should disable the language select |
|---|
| 183 | * box. |
|---|
| 184 | */ |
|---|
| 185 | $AVAIL_LOCALE_ARRAY = array('fr_CA' => 'Français', |
|---|
| 186 | 'en_US' => 'English', |
|---|
| 187 | 'de_DE' => 'Deutsch', |
|---|
| 188 | 'pt_PT' => 'Português'); |
|---|
| 189 | |
|---|
| 190 | /** |
|---|
| 191 | * Default language |
|---|
| 192 | * ================ |
|---|
| 193 | * |
|---|
| 194 | * Define the default language of the WiFiDOG auth server. The language code |
|---|
| 195 | * (the part before the _) must be part of the array above (the country |
|---|
| 196 | * subcode may differ, and should be set to your country subcode) |
|---|
| 197 | */ |
|---|
| 198 | define('DEFAULT_LANG', 'fr_CA'); |
|---|
| 199 | |
|---|
| 200 | /********************************************************************\ |
|---|
| 201 | * WIFIDOG FEATURES CONFIGURATION * |
|---|
| 202 | \********************************************************************/ |
|---|
| 203 | |
|---|
| 204 | /** |
|---|
| 205 | * RSS support |
|---|
| 206 | * =========== |
|---|
| 207 | * |
|---|
| 208 | * If set to true, MAGPIERSS must be installed in MAGPIE_REL_PATH. |
|---|
| 209 | * |
|---|
| 210 | * Normally MAGPIE_REL_PATH is "lib/magpie/". |
|---|
| 211 | */ |
|---|
| 212 | define('RSS_SUPPORT', true); |
|---|
| 213 | |
|---|
| 214 | /** |
|---|
| 215 | * Flickr Photostream content support |
|---|
| 216 | * ================================== |
|---|
| 217 | * |
|---|
| 218 | * If set to true, Phlickr must be installed in PHLICKR_REL_PATH. |
|---|
| 219 | * |
|---|
| 220 | * Normally PHLICKR_REL_PATH is "lib/", Phlickr being installed in directory |
|---|
| 221 | * "Phlickr". |
|---|
| 222 | */ |
|---|
| 223 | define('PHLICKR_SUPPORT', true); |
|---|
| 224 | |
|---|
| 225 | /** |
|---|
| 226 | * Google Maps support |
|---|
| 227 | * =================== |
|---|
| 228 | * |
|---|
| 229 | * Enable Google Maps mapping using "hotspots_map.php". |
|---|
| 230 | */ |
|---|
| 231 | define('GMAPS_HOTSPOTS_MAP_ENABLED', true); |
|---|
| 232 | |
|---|
| 233 | /** |
|---|
| 234 | * XSLT support for Hotspot status page |
|---|
| 235 | * ==================================== |
|---|
| 236 | * |
|---|
| 237 | * If you want to enable XSLT support for the Hotspot status page enable this |
|---|
| 238 | * value. |
|---|
| 239 | * |
|---|
| 240 | * Enabling it will let you you display hostpot status in any format. |
|---|
| 241 | * http://server_ip/hotspot_status.php?format=XML&xslt=http://xslt_server/xslt/wifidog_status.xsl |
|---|
| 242 | */ |
|---|
| 243 | define('XSLT_SUPPORT', true); |
|---|
| 244 | |
|---|
| 245 | /********************************************************************\ |
|---|
| 246 | * ADVANCED CONFIGURATION * |
|---|
| 247 | * * |
|---|
| 248 | * You should normally not have to edit anything below this! * |
|---|
| 249 | \********************************************************************/ |
|---|
| 250 | |
|---|
| 251 | /** |
|---|
| 252 | * Path of WiFiDOG auth server installation |
|---|
| 253 | * ======================================== |
|---|
| 254 | * |
|---|
| 255 | * SYSTEM_PATH must be set to the url path needed to reach the wifidog |
|---|
| 256 | * directory. |
|---|
| 257 | * |
|---|
| 258 | * Normally '/' or '/wifidog/', depending on where configure your |
|---|
| 259 | * document root. |
|---|
| 260 | * |
|---|
| 261 | * Gateway configuration must match this as well. |
|---|
| 262 | * |
|---|
| 263 | * CONFIGURATION FLAG REQUIRED IF PATH DETECTION FAILS, ONLY! |
|---|
| 264 | */ |
|---|
| 265 | // define('SYSTEM_PATH', '/'); |
|---|
| 266 | |
|---|
| 267 | /** |
|---|
| 268 | * WiFiDOG configuration |
|---|
| 269 | * ===================== |
|---|
| 270 | * |
|---|
| 271 | * Name and version of the WiFiDOG auth server. |
|---|
| 272 | */ |
|---|
| 273 | define('WIFIDOG_NAME', 'WiFiDog Authentication server'); |
|---|
| 274 | define('WIFIDOG_VERSION', '(Development)'); |
|---|
| 275 | |
|---|
| 276 | /** |
|---|
| 277 | * WiFiDOG features configuration |
|---|
| 278 | * ============================== |
|---|
| 279 | * |
|---|
| 280 | * Paths to libraries used by the WiFiDOG auth server. |
|---|
| 281 | */ |
|---|
| 282 | |
|---|
| 283 | // Path to Magpie RSS Parser. |
|---|
| 284 | define('MAGPIE_REL_PATH', 'lib/magpie/'); |
|---|
| 285 | |
|---|
| 286 | // Path to Smarty Template engine. |
|---|
| 287 | define('SMARTY_REL_PATH', 'lib/smarty/'); |
|---|
| 288 | |
|---|
| 289 | // Path to Phlickr API. |
|---|
| 290 | define('PHLICKR_REL_PATH', 'lib/'); |
|---|
| 291 | |
|---|
| 292 | /** |
|---|
| 293 | * WiFiDOG internals configuration |
|---|
| 294 | * =============================== |
|---|
| 295 | * |
|---|
| 296 | * Internal configuration values for WiFiDog - don't touch! |
|---|
| 297 | */ |
|---|
| 298 | |
|---|
| 299 | // Filenames and directories |
|---|
| 300 | define('NETWORK_THEME_PACKS_DIR', 'media/network_theme_packs/'); |
|---|
| 301 | define('STYLESHEET_NAME', 'stylesheet.css'); |
|---|
| 302 | define('LOGIN_PAGE_NAME', 'login.html'); |
|---|
| 303 | define('HOTSPOT_STATUS_PAGE', 'hotspot_status.php'); |
|---|
| 304 | |
|---|
| 305 | // Source URL for the hotspot status page |
|---|
| 306 | define('GMAPS_XML_SOURCE_URL', 'hotspot_status.php?format=XML'); |
|---|
| 307 | |
|---|
| 308 | // Name of default node. |
|---|
| 309 | define('DEFAULT_NODE_ID', 'default'); |
|---|
| 310 | |
|---|
| 311 | // Declare warning/error/notice logging to a file. |
|---|
| 312 | // Set this to false to disable logging to a file. |
|---|
| 313 | // By default, logging is enabled, to file tmp/wifidog.log. |
|---|
| 314 | // define('WIFIDOG_LOGFILE', 'tmp/wifidog.log'); |
|---|
| 315 | |
|---|
| 316 | /** |
|---|
| 317 | * Email configuration |
|---|
| 318 | * =============================== |
|---|
| 319 | * |
|---|
| 320 | * Internal configuration values for WiFiDog - don't touch! |
|---|
| 321 | */ |
|---|
| 322 | |
|---|
| 323 | define('EMAIL_MAILER', 'mail'); // "mail", "sendmail", or "smtp" |
|---|
| 324 | |
|---|
| 325 | // Valid only for SMTP |
|---|
| 326 | define('EMAIL_HOST', ''); |
|---|
| 327 | define('EMAIL_AUTH', false); |
|---|
| 328 | |
|---|
| 329 | // Valid if EMAIL_AUTH is true |
|---|
| 330 | define('EMAIL_USERNAME', ''); |
|---|
| 331 | define('EMAIL_PASSWORD', ''); |
|---|
| 332 | |
|---|
| 333 | /** |
|---|
| 334 | * In case this is the local.config.php you should remove the next lines. |
|---|
| 335 | */ |
|---|
| 336 | |
|---|
| 337 | } |
|---|
| 338 | |
|---|
| 339 | /** |
|---|
| 340 | * In case this is the local.config.php stop removing the lines. |
|---|
| 341 | */ |
|---|
| 342 | |
|---|
| 343 | /* |
|---|
| 344 | * Local variables: |
|---|
| 345 | * tab-width: 4 |
|---|
| 346 | * c-basic-offset: 4 |
|---|
| 347 | * c-hanging-comment-ender-p: nil |
|---|
| 348 | * End: |
|---|
| 349 | */ |
|---|
| 350 | |
|---|
| 351 | ?> |
|---|