From: Thomas Mudrunka Date: Fri, 23 Sep 2011 18:24:24 +0000 (+0200) Subject: Added rudimentary support for UID/GID X-Git-Url: http://git.harvie.cz/?a=commitdiff_plain;h=e9f6461f24218e72efea648c5f8c23159ca0f909;p=mirrors%2FSokoMan.git Added rudimentary support for UID/GID --- diff --git a/INSTALL.md b/INSTALL.md index e863133..2e8cd78 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -16,4 +16,4 @@ * Set INSTANCE\_ID (this is how you call your instalation, hostname, organization, etc...) * Set BARCODE\_TYPE (that will be used for printing barcodes) * Set BARCODE\_PREFIX (this will be used for generating unique barcodes if you have more instalations) - * Set $fake\_lms\_users (If you want to use login credentials different from your DB user/password) + * Set $internal\_auth\_users (If you want to use login credentials different from your DB user/password) diff --git a/index.php b/index.php index 7bde575..db9921d 100755 --- a/index.php +++ b/index.php @@ -151,18 +151,21 @@ class HTML { * @author Tomas Mudrunka */ class Sklad_HTML extends HTML { //TODO: Split into few more methods - function header($title='', $uid=0, $user='') { + function header($title='', $user=array()) { $home = URL_HOME; $script = $_SERVER['SCRIPT_NAME']; $search = htmlspecialchars(@trim($_GET['q'])); $message = strip_tags(@trim($_GET['message']),''); $instance = INSTANCE_ID != '' ? '/'.INSTANCE_ID : ''; + $user_id = htmlspecialchars($user['id']); + $user_gid = htmlspecialchars($user['gid']); + $user_name = htmlspecialchars($user['name']); //$title = T($title); //TODO $html = $this->head("SōkoMan$title"); $html .= <<SōkoMan$instance$title -
Loged in as $user [UID $uid]
+
Loged in as $user_name [UID: $user_id; GID: $user_gid]