This repository was archived by the owner on Jan 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.php
88 lines (67 loc) · 2.8 KB
/
config.example.php
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
78
79
80
81
82
83
84
85
86
87
88
<?php
/*
* Copyright (c) daeks, distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
//////////////////////////////////////////////////////////////////
// General Settings
//////////////////////////////////////////////////////////////////
define('BASE', (($_SERVER['DOCUMENT_ROOT'] != '') ? $_SERVER['DOCUMENT_ROOT'] : dirname(realpath(__FILE__))));
define('NAME', 'Twitch Web Console');
define('FAVICON', 'favicon.ico');
define('BRAND', 'core/img/brand.jpg');
define('COOKIE_LIFETIME', 60*60*24*7*4*3);
define('TMP', BASE.DIRECTORY_SEPARATOR.'cache');
define('TMP_LIFETIME', 300);
define('INC', BASE.DIRECTORY_SEPARATOR.'core');
define('JS', BASE.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'js');
define('CSS', BASE.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'css');
define('URL_SEPARATOR', '/');
define('CACHE' , false);
define('COMPRESS' , true);
define('START', 'dashboard');
define('MODULE', 'config.json');
define('PLUGIN', 'plugins.json');
//////////////////////////////////////////////////////////////////
// Database Settings
//////////////////////////////////////////////////////////////////
define('DB_HOST', '');
define('DB_NAME', '');
define('DB_SRV', 'mysql:host='.DB_HOST.';dbname='.DB_NAME);
define('DB_USER', '');
define('DB_PWD', '');
//////////////////////////////////////////////////////////////////
// Console Settings
//////////////////////////////////////////////////////////////////
define('CLI_BASE', 'C:\php-cli\twitchbot');
define('CLI_SERVER', 'localhost');
define('CLI_PORT', 6667);
//////////////////////////////////////////////////////////////////
// Twitch & Auth Settings
//////////////////////////////////////////////////////////////////
define('APP', 'https://twitch.tv');
define('API', 'https://api.twitch.tv/kraken');
define('CLIENTID', '');
define('SECRET', '');
define('AUTH', '/auth');
define('AUTH_FORCE', true);
define('REDIRECTURL', 'https://yoururl.com'.URL_SEPARATOR.AUTH.URL_SEPARATOR);
config::includes(INC);
class config {
public static function includes($path) {
foreach (scandir($path) as $include){
if(is_file($path.DIRECTORY_SEPARATOR.$include) && strpos($path.DIRECTORY_SEPARATOR.$include, '.inc.') !== false && strtoupper(pathinfo($include, PATHINFO_EXTENSION)) == 'PHP'){
require_once($path.DIRECTORY_SEPARATOR.$include);
}
}
}
public static function libraries($path) {
foreach (scandir($path) as $include){
if(is_file($path.DIRECTORY_SEPARATOR.$include) && strpos($path.DIRECTORY_SEPARATOR.$include, '.lib.') !== false && strtoupper(pathinfo($include, PATHINFO_EXTENSION)) == 'PHP'){
require_once($path.DIRECTORY_SEPARATOR.$include);
}
}
}
}
?>