-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.php
33 lines (26 loc) · 930 Bytes
/
error.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
<?php
/**
* Created by PhpStorm.
* User: Radon
* Date: 14.12.2018
* Time: 22:25
*/
session_start();
if (!empty($_SESSION['log']) && $_SESSION['log'] == 'logged') {
if($_SESSION['level'] == 'regs' ){
header("refresh:3 url=reg.php");
}elseif($_SESSION['level'] == 'buxg' ){
header("refresh:3 url=accountant.php");
}elseif($_SESSION['level'] == 'admin' ){
header("refresh:3 url=home.php");
}else{
header("refresh:3 url=cabinet.php");
}
}else header("refresh:3 url=index.php");
?>
<?php
echo "ERROR MESSAGES! </br>";
if(!empty($_SESSION['errorMSG'])) { echo $_SESSION['errorMSG']."</br>"; $_SESSION['errorMSG'] = ''; };
echo "<a href='index.php'>Home</a><br>";
if(!empty($_SESSION['log'])) {echo "<a href='cabinet.php'>Cabinet</a>";}
?>