-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.php
More file actions
45 lines (29 loc) · 774 Bytes
/
config.php
File metadata and controls
45 lines (29 loc) · 774 Bytes
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
<?php
//ACTIVE LOG
$logactive=true;
//URL of Log
$today = date("d_m_Y");
$logfile = $today."_log.txt";
$logurl="../logs_event/".$logfile;
$GLOBALS['logurl']=$logurl;
$GLOBALS['logactive']=$logactive;
//Users
$GLOBALS['users']=$users;
$users[0]['nickname']="root";
$users[0]['password']=""; //INSERT MD5 PASS HERE
function checkUser($nickname,$password){
$ret = false;
$arrlength=count($GLOBALS['users']);
for($x=0;$x<$arrlength;$x++) {
if($GLOBALS['users'][$x]['nickname']==$nickname && $GLOBALS['users'][$x]['password']==md5($password))
$ret=true;
}
if($ret){
session_start();
$_SESSION['auth']=true;
$_SESSION['nickname']=$nickname;
return true;
}
else return false;
}
?>