-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·69 lines (57 loc) · 2.51 KB
/
index.php
File metadata and controls
executable file
·69 lines (57 loc) · 2.51 KB
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
65
66
67
68
69
<?php
// ____ _ _ _ ____ ___ _ _ _
// / ___| ___ _ __ _ _ _ __ (_) __ _ | |__ | |_ |___ \ / _ \ / || || |
// | | / _ \ | '_ \ | | | || '__|| | / _` || '_ \ | __| __) || | | || || || |_
// | |___| (_) || |_) || |_| || | | || (_| || | | || |_ / __/ | |_| || ||__ _|
// \____|\___/ | .__/ \__, ||_| |_| \__, ||_| |_| \__| |_____| \___/ |_| |_|
// _ _ |_| _ |___/ |___/ _ _ _ _
// / \ | | ___ | | __ ___ __ _ _ __ __| | __ _ _ __ | | ___ _ __ ___ (_)(_) ___
// / _ \ | | / _ \| |/ // __| / _` || '_ \ / _` | / _` || '__| | | / _ \| '_ \ / _ \ | || | / __|
// / ___ \ | || __/| < \__ \| (_| || | | || (_| || (_| || | | |___| __/| |_) || (_) || || || (__
// /_/ \_\|_| \___||_|\_\|___/ \__,_||_| |_| \__,_| \__,_||_| |_____|\___|| .__/ \___/_/ ||_| \___|
// _____ _ _ _ __ _ _ |_| |__/
// | ___|___ | |(_)__ __ | |/ /| | ___ (_) _ __
// | |_ / _ \| || |\ \/ / | ' / | | / _ \| || '_ \
// | _|| __/| || | > < | . \ | || __/| || | | |
// |_| \___||_||_|/_/\_\ |_|\_\|_| \___||_||_| |_|
//
//error reporting
error_reporting(E_ALL);
ini_set('display_errors', '1');
// common.php requiren - da kommen die funktionen rein die immer gebraucht werden;
require_once("sys/common.php");
require_once("sys/objects.php");
//session, ui und db starten
$session = new Session();
$ui = new UI();
$db = new DB();
//schaun ob user eingeloggt ist
$loggedIn = $session->loggedIn();
//head ausgeben
$ui->head("WebTop", $loggedIn);
if($loggedIn){
//wenn eingeloggt webtop anzeigen
require_once("sys/webtop.php");
}else{
if(isset($_COOKIE["webtop-lepojic_klein-loggedin"])) {
if($_COOKIE["webtop-lepojic_klein-loggedin"] != null && $_COOKIE["webtop-lepojic_klein-loggedin"] != "" && $_COOKIE["webtop-lepojic_klein-loggedin"] != NULL && $_COOKIE["webtop-lepojic_klein-loggedin"] != "null"){
$cuser = $_COOKIE["webtop-lepojic_klein-loggedin"];
$ckey = $_COOKIE["webtop-lepojic_klein-loggedin-key"];
$login = $db->userCheck($cuser, $ckey);
if(isset($login["full_name"])){
$session->set("loggedIn","true");
$session->set("user",$cuser);
echo('<meta http-equiv="refresh" content="0">');
}else{
$ui->login();
}
}else{
$ui->login();
}
}else{
$ui->login();
}
}
//foot ausgeben
$ui->foot();
?>