Fusion / lenses

PHP Framework

This URL has Read+Write access

lenses / config.php
100644 77 lines (64 sloc) 1.654 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* @package Lenses
* @copyright (c) Chris F. Ravenscroft
* @license See 'license.txt'
*/
class Config
{
static public
// Email address for the application's developer - use for notification
$developer = 'bogus@voilaweb.com',
 
// Web application root path
$path = '/lenses/',
 
// Database layer, engine, etc. as used by adodb
$dblayer = 'native',
$dbengine = 'mysql',
$dbhost = 'localhost',
$dbname = 'demo',
$dbuser = 'demo',
$dbpassword = 'demo',
$dbprefix = '',
 
// Salt used for sha1 encryption
$salt = 'demo',
 
// This site's cookie name
$cookie = 'demo',
 
// When validating an email address, do we go so far as to
// actually ask the MTU?
$fullemailcheck = false,
 
// Which method are we using for logging, if any?
$logger = 'Tmp',
 
// Debug active records?
$debugger = false,
 
// Email error notifications to developer?
$notifyonerror = true,
 
$webcli = false,
$webcliips = array(),
 
// Special context remapping
$altroutes = array(
// ...or how a context can be remapped
// note that providing an empty alias means 'default context'
'admin' => '',
'main' => '',
'user' => '',
'test' => '',
'song' => '',
);
 
static public $settings;
static function initialize()
{
global $db;
if(empty($db)) return false;
                $db->setFetchMode(ADODB_FETCH_ASSOC);
 
$qry = 'SELECT * FROM settings';
self::$settings = array();
$rs = &$db->execute($qry);
while(!$rs->EOF)
{
self::$settings[$rs->fields['name']] = $rs->fields['value'];
$rs->moveNext();
}
return true;
}
}
?>