-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.php
64 lines (47 loc) · 1.65 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
/**
Config File
Mysql connect etc.
Created at 24-12-2014 at 11:17
*/
/// Error Reporting
// http://nl2.php.net/manual/en/errorfunc.configuration.php
//ini_set("display_errors","0"); /// don't show mysql errors
//ini_set('error_reporting',E_ALL);
/** Mysql_ Server Data**/
$mysql_server = "localhost"; /// mysql server running on localhost
$mysql_user = "root"; /// the mysql username
$mysql_pass = "raspberry"; /// mysql password
$mysql_db = "controller"; /// Which database
/* Dont change anything here */
$m_connect = mysql_connect($mysql_server,$mysql_user,$mysql_pass) or die("Could not connect to the database.");
mysql_select_db($mysql_db,$m_connect) or die("Could not find the database.");
$tijd = time();
$ip = $_SERVER['REMOTE_ADDR'];
foreach ($_GET as $key => $get) {
$getx = strtolower($get);
if (strstr($getx, 'delete')) {
$get = str_replace('DELETE', '', $get);
$get = str_replace('delete', '', $get);
$get = str_replace('DROP', '', $get);
$get = str_replace('drop', '', $get);
$get = str_replace('UPDATE', '', $get);
$get = str_replace('update', '', $get);
}
$get = str_replace(';', '', $get);
$_GET[$key] = $get;
}
foreach ($_POST as $key => $get) {
$getx = strtolower($get);
if (strstr($getx, 'delete')) {
$get = str_replace('DELETE', '', $get);
$get = str_replace('delete', '', $get);
$get = str_replace('DROP', '', $get);
$get = str_replace('drop', '', $get);
$get = str_replace('UPDATE', '', $get);
$get = str_replace('update', '', $get);
}
$get = str_replace(';', '', $get);
$_POST[$key] = $get;
}
?>