forked from AquaFlameCMS/AquaFlameCMS_Trinity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigs.php
More file actions
226 lines (207 loc) · 7.11 KB
/
configs.php
File metadata and controls
226 lines (207 loc) · 7.11 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?php
/**
* Copyright (C) 2014 AquaflameCMS <http://aquaflame.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**/
ob_start();
include("include/pre-header.php");
if (!isset($_SESSION))
session_start();
/*
|--------------------------------------------------------------------------
| Default Locale Languages
|--------------------------------------------------------------------------
| Default Locale Web
|
*/
if (isset($_GET['Local']))
$lang = $_GET['Local'];
else if (isset($_SESSION['Local']))
$lang = $_SESSION['Local'];
if (empty($lang))
$lang = 'en-us';
$language = $lang;
$langs = Array(
"en-us" => null,
"ro-ro" => null,
"en-gb" => null,
"it-it" => null,
"de-de" => null,
"es-es" => null,
"bu-bg" => null,
"es-mx" => null,
"gr-gr" => null,
"ru-ru" => null,
"zh-cn" => null,
"zh-tw" => null,
"fr-fr" => null
);
if (array_key_exists($lang, $langs))
require_once("lang/" . $lang . ".php");
else
require_once("/lang/en-us.php");
$_SESSION['Local'] = $language;
/*
|--------------------------------------------------------------------------
| MySQL Configuration.
|--------------------------------------------------------------------------
| Connect to MySQL Host
| For example:
| $serveraddress = "MySQL Host Address";
| $serveruser = "User";
| $serverpass = "Password";
| $serverport = "Port";
*/
$serveraddress = "127.0.0.1";
$serveruser = "root";
$serverpass = "password";
$serverport = "3306";
@define('DBHOST', '127.0.0.1');
@define('DBUSER', 'root');
@define('DBPASS', 'password');
@define('DB', 'website');
/*
|--------------------------------------------------------------------------
| Connect to Database Configuration.
|--------------------------------------------------------------------------
| auth database configuration.
| World database configuration.
| Characters database configuration.
| Web Site database configuration.
| @access public
|
*/
$server_adb = "auth";
$server_wdb = "world";
$server_cdb = "chars";
$server_db = "website";
/*
|--------------------------------------------------------------------------
| Expansion for Default
|--------------------------------------------------------------------------
|
| Your Expansion for Default "Register"
| 0 - Classic, 1 - Burning Crusade, 2 - Wrath, 3 - Cataclysm
|
*/
$expansion_wow = "3";
/*
|--------------------------------------------------------------------------
| Realmlist & Realm Name
|--------------------------------------------------------------------------
|
*/
$website['realm'] = "Set Realmlist Your_Realmlist";
$name_realm1['realm'] = "Realm_Name";
$mysql_cod = 'cp1251';
/*
|--------------------------------------------------------------------------
| Community Links
|--------------------------------------------------------------------------
|
| Community Links. Leave it blank if you don't use any.
| Your address of community link
|
*/
$comun_link['Facebook'] = "http://www.facebook.com/";
$comun_link['Twitter'] = "http://twitter.com/";
$comun_link['Youtube'] = "http://www.youtube.com/";
$comun_link['Reddit'] = "http://www.reddit.com/";
/*
|--------------------------------------------------------------------------
| Server name & Information
|--------------------------------------------------------------------------
|
| Your Server Name Title.
| For example: "AquaFlameCMS 1.0"
|
| Server & Website Description
| For example: "AquaFlameCMS 1.0 the best of the best server private!"
|
| Your keywords
| Type your keywords for the web
| For example: "AquaFlameCMS 1.0 , The Best CMS, Private Server, World Of WarCraft, WoW"
|
| Address
| URL to your Server. Typically this will be your base URL,
| WITH a trailing slash: http://localhost/
| If this is not set then CMS will guess the protocol, domain and
| path to your installation.
|
| Root Directory
| Without slash at the end of path. If your site is in root directory, leave this empty.
| For example: site is available at http://example.org/AquaFlameCMS_Trinity/
| That means that you should set this variable as '/AquaFlameCMS_Trinity/'.
*/
$website['title'] = "AquaFlameCMS 1.0";
$website['description'] = "AquaFlameCMS 1.0 the best of the best!";
$website['keywords'] = "AquaFlameCMS 1.0, The Best CMS";
$website['address'] = "http://localhost/";
$website['root'] = "/AquaFlameCMS_Trinity/";
/*
|--------------------------------------------------------------------------
| Pre Page
|--------------------------------------------------------------------------
|
| Enable PrePage
| For Example
| Change true(prepage mode)/false(normal mode) to disable/enable pre page
| true or false
|*/
$pre = false;
if ($pre == true) {
if (!isset($_COOKIE['prepage'])) {
$pre_cookie = 'viewed';
setcookie("prepage", $pre_cookie, time() + 3600 * 60 * 24);
header('Location: ' . $website['address'] . '' . $website['root'] . 'pre.php');
}
}
/*
|--------------------------------------------------------------------------
| Maintenance Page
|--------------------------------------------------------------------------
|
| Disable site? on maintenance page
| For Example
| Change true(maintenance mode)/false(normal mode) to disable/enable website
| true or false
|
*/
$maintenance = false;
if ($maintenance == true) {
if (!isset($bucle_mant)) {
header('Location: '.$website['address'].''.$website['root'].'maintenance.php');
}
} else {
/*
|--------------------------------------------------------------------------
| No edit
|--------------------------------------------------------------------------
| From now on, we recommend not to change the code to maintain default operation script.
| All changes must be made on data found above.
|
*/
$teamsLimit = 50; // Number of team to display on each page
$connection_setup = mysql_connect($serveraddress . ':' . $serverport, $serveruser, $serverpass) or die(mysql_error());
mysql_select_db($server_db, $connection_setup) or die(mysql_error());
if (isset($_SESSION['username'])) {
$username = mysql_real_escape_string($_SESSION['username']);
$account_information = mysql_fetch_assoc(mysql_query("SELECT * FROM $server_adb.account WHERE username = '" . $username . "'"));
$account_extra = mysql_fetch_assoc(mysql_query("SELECT * FROM $server_db.users WHERE id = '" . $account_information['id'] . "'"));
mysql_select_db($server_db, $connection_setup) or die(mysql_error());
}
}
/* End of file configs.php */