2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Added authentication includes to all files

This commit is contained in:
Adam Zammit
2015-08-14 16:15:20 +10:00
parent cfba7e27f4
commit ec8522e316
95 changed files with 738 additions and 173 deletions

View File

@@ -41,7 +41,7 @@ include_once(dirname(__FILE__).'/../config.inc.php');
include_once(dirname(__FILE__).'/../db.inc.php');
/**
* Return the current client id based on PHP_AUTH_USER
* Return the current client id based on the SESSION loginID
*
* @return bool|int False if none otherwise the client id
*
@@ -50,9 +50,12 @@ function get_client_id()
{
global $db;
if (!isset($_SESSION['loginID']))
return false;
$sql = "SELECT client_id
FROM client
WHERE username = '{$_SERVER['PHP_AUTH_USER']}'";
WHERE username = '{$_SESSION['loginID']}'";
$o = $db->GetRow($sql);
@@ -87,4 +90,4 @@ function get_client_questionnaire($client_id)
}
?>
?>