From 423e9aaf33366a210a853e67836c6db5d8390680 Mon Sep 17 00:00:00 2001 From: Mark Campbell-Smith Date: Thu, 24 Jul 2014 23:44:46 +1000 Subject: Update to RunnerUpLive --- index.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index f64a792..b124f36 100755 --- a/index.php +++ b/index.php @@ -2,6 +2,7 @@ /* phpTrackme * * Copyright(C) 2013 Bartek Fabiszewski (www.fabiszewski.net) + * Copyright(C) 2014 Mark Campbell-Smith (campbellsmith.me) * * This is free software; you can redistribute it and/or modify it under * the terms of the GNU Library General Public License as published by @@ -19,24 +20,24 @@ */ require_once("config.php"); require_once("auth.php"); +$user = ""; -if (($auth) and ($auth != $admin_user)) { +if (($auth) and ($auth != $admin_user) and ($require_authentication)) { // get username + error_log("here"); $query = "SELECT username FROM users WHERE ID='$auth' LIMIT 1"; $result = $mysqli->query($query); $row = $result->fetch_assoc(); $user = $row["username"]; - - // users - $user_form = ''.$lang_user.'
'.$user.' ('.$lang_logout.')'; } else { // free access or admin user - // prepare user select form + // prepare user select form if (($auth == $admin_user) and ($admin_user != "")) { $user = $auth; $auth = NULL; } + $user_form = ' '.$lang_user.'
@@ -51,7 +52,10 @@ $user_form .= '
'; - $user_form .= ''.$lang_user.'
'.$user.' ('.$lang_logout.')'; +} + +if ($require_authentication) { + $user_form .= ''.$lang_user.'
'.$user.' ('.$lang_logout.')'; } // prepare track select form @@ -176,15 +180,9 @@ print '
'.$lang_chart.'
-
- '.$api_form.' -
'.$lang_form.'
-
- '.$units_form.' -
'.$lang_download.'
kml
@@ -192,7 +190,7 @@ print '
- +
-- cgit v1.2.3