mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
The start of client logins has begun, now can link a user with a client to allow client logins, clients can only view client.php there is more work to be done
This commit is contained in:
@@ -3,9 +3,15 @@
|
||||
session_start();
|
||||
|
||||
if(!$_SESSION['logged']){
|
||||
header("Location: login.php");
|
||||
header("Location: logout.php");
|
||||
die;
|
||||
}
|
||||
|
||||
//Check to see if its a client if so sandbox them to just post.php or client.php.
|
||||
if($_SESSION['client_id'] > 0 AND basename($_SERVER['PHP_SELF']) !== 'client.php' AND basename($_SERVER['PHP_SELF']) !== 'post.php'){
|
||||
header("Location: logout.php");
|
||||
die;
|
||||
}
|
||||
|
||||
$session_user_id = $_SESSION['user_id'];
|
||||
|
||||
@@ -13,6 +19,7 @@
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$session_name = $row['name'];
|
||||
$session_avatar = $row['avatar'];
|
||||
$session_client_id = $row['client_id'];
|
||||
|
||||
//Detects if using an apple device and uses apple maps instead of google
|
||||
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
|
||||
@@ -26,7 +33,6 @@
|
||||
}
|
||||
|
||||
//Get unAcked Alert Count for the badge on the top nav
|
||||
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('alert_id') AS num FROM alerts WHERE alert_ack_date = 0"));
|
||||
$num_alerts = $row['num'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user