-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php.sample
36 lines (31 loc) · 997 Bytes
/
config.php.sample
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
<?php
class Config {
private static $db_host = "localhost";
private static $db_name = "nfo";
private static $db_user = "nx";
private static $db_password = "nx";
public static function fix_database($username=null) {
if(is_null($username)) {
$username = self::$db_user;
$password = self::$db_password;
}
return new MySQLi(self::$db_host, $username, $password, self::$db_name);
}
}
$db = Config::fix_database();
$dir = dirname(__FILE__);
setlocale(LC_ALL, 'sv_SE.UTF8');
//specify rights ... just because I'm lazy and tired
// is controlled by the bits in an integer
// NAME : BIT
// admin : 1
// siteadmin : 2
// imageadmin : 3
// newsadmin : 4
// schemeadmin : 5
//
$_rights = array( 'Administratör' => 1,
'Sido-moderator' => 2,
'Bild-moderator' => 3,
'Nyhets-moderator' => 4,
'Schema-moderator' => 5 );