/
config.php
64 lines (62 loc) · 2.66 KB
/
config.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
<?php
class config
{
function get($id)
{
$arr = array(
/*##################################################################################################
## Connect to database
## dbhost: IP-address or domain name where is started server MySQL.
## dbuser: Username for connect to server MySQL.
## dbpass: Password for connect to server MySQL.
## mangos: Name database of world.
## realmd: Name database of account.
## characters: Name database of characters.
##################################################################################################*/
"dbhost" => "localhost",
"dbuser" => "mangos",
"dbpass" => "mangos",
"mangos" => "mangos",
"realmd" => "realmd",
"characters" => "characters",
/*##################################################################################################
## Site sittings
## title: Name of site (viewing in tag <title></title> on main page).
## mingm: Minimum security level for access in adminpanel.
## pagepath: Folder on a site where there are executing files.
## main: IP-address or domain name of site.
## progressbar: Display progress bar in list-page (boolean).
## anim: Animation progress-bar in list-page (boolean).
## LinkAccount: Link to page on deatil view account or false if it is not necessary.
## LinkPlayer: Link to page on deatil view character or false if it is not necessary.
## searchlimit: Limit of query for search (query, creature, item, etc).
## lang: Translate search result to russian language? (8: russian, 1: english)
##################################################################################################*/
"title" => "Баг-трекер",
"mingm" => 3,
"pagepath" => "pages/",
"main" => "http://localhost",
"progressbar" => true,
"anim" => false,
"LinkAccount" => "http://localhost/admin/account.php?id=",
"LinkPlayer" => "http://localhost/admin/player.php?guid=",
"searchlimit" => 10,
"lang" => 8,
/*##################################################################################################
## Announce of updates
## CheckVersion: Check new version in git page of project (boolean).
## version: Current version of bug-tracker. Do not change!
## checkdiff: Different in days for recheck updates.
##################################################################################################*/
"CheckVersion" => false,
"version" => 21,
"checkdiff" => 2
);
if(in_array($id,array_keys($arr)))
return $arr[$id];
}
}
$cfg = new config;
@mysql_connect($cfg->get("dbhost"),$cfg->get("dbuser"),$cfg->get("dbpass"));
@mysql_query("SET NAMES 'UTF8'");
?>