-
Notifications
You must be signed in to change notification settings - Fork 3
/
mysql.inc.php
60 lines (45 loc) · 1.12 KB
/
mysql.inc.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
<?php
require_once("config.inc.php");
function DB_getLink() {
global $config;
$mysqli = new mysqli($config->mysql_host, $config->mysql_user, $config->mysql_pass, $config->mysql_name);
$mysqli->set_charset($config->charset);
return $mysqli;
}
function DB_getPrefix() {
return "lime_";
}
function DB_getIPTable() {
return DB_getPrefix() . "ips";
}
function DB_getSurveysTable() {
return DB_getPrefix() . "surveys";
}
function DB_getBlacklistTable() {
return DB_getPrefix() . "blacklist";
}
function DB_getBlacklistTokenTable() {
return DB_getPrefix() . "blacklist_tokens";
}
function DB_getSurveysLangTable() {
return DB_getPrefix() . "surveys_languagesettings";
}
function DB_getGroupsTable() {
return DB_getPrefix() . "groups";
}
function DB_getQuestionsTable() {
return DB_getPrefix() . "questions";
}
function DB_getAnswersTable() {
return DB_getPrefix() . "answers";
}
function DB_getResultTable($id) {
return DB_getPrefix() . "survey_" . intval($id);
}
function DB_getTokenTable($id) {
return DB_getPrefix() . "tokens_" . intval($id);
}
function DB_getTable($id) {
return DB_getPrefix() . "_" . intval($id);
}
?>