<ul class="dropdown-menu"> <li><a href="./index.php?action=registerProfile">Add Profile</a></li> <li><a href="./index.php?action=listProfiles">List Profiles</a></li> <li class="divider"></li> <li class="nav-header">Mobiles</li> <li><a href="./index.php?action=androidActions">Android Actions</a></li> <li><a href="./index.php?action=requestedPhotos">Requested Photos</a></li> <li><a href="./index.php?action=requestedPoke">Requested Poke</a></li> </ul> </li>'; } ?> </ul> <ul class="nav pull-right"> <?php $link = "https://" . redirectAuthLink() . "/login?redirecturl=http://" . redirectLink() . "/SafeFront/index.php"; $imageSRC = "https://developers.google.com/+/images/branding/sign-in-buttons/Red-signin_Long_base_44dp.png"; $height = 150; $widht = 150; if (isset($_SESSION['id'])) { $link = "http://" . homeLink() . "/SafeFront/index.php?action=logout"; $imageSRC = "./img/LogOut.png"; $height = 70; $widht = 70; echo '<li class="active"><a href="">' . $_SESSION['name'] . '</a></li>'; echo '<img style="" width="40" height="40" src="' . $_SESSION['picture'] . '">'; echo '<a href="' . $link . '"> <button class="btn btn-danger" style="vertical-align: top" type="button">Logout</button></a>'; } else { echo '<a href="' . $link . '"><img style="vertical-align: text-top;" width="' . $widht . '" height="' . $height . '"src="' . $imageSRC . '"></a>'; } ?>
function getJSON() { parse_str($_SERVER['QUERY_STRING']); if (is_null($token)) { return 'token not set'; } $fileContent = file_get_contents("https://*****:*****@" . authLink() . "/getData?token=" . $token); if ($fileContent == '') { header("Location: https://" . redirectAuthLink() . "/login?redirecturl=http://" . redirectLink() . "/SafeFront/index.php"); /* Redirect browser */ exit; } $json = json_decode($fileContent, true); if (!isset($_SESSION['id'])) { $_SESSION['id'] = getID($json); $_SESSION['name'] = getName($json); $_SESSION['picture'] = getImage($json); $_SESSION['mail'] = getEmail($json); $_SESSION['token'] = $token; $_SESSION['mobileImagesRequest']; $_SESSION['hasNewImages'] = 0; $_SESSION['gotOne'] = 0; $_SESSION['pokeReady'] = 0; $_SESSION['poke']; //$tokenToUse = getServerAccess(); insertUser($token); } return null; }