Commit 9178ace9 authored by Leigh Stoller's avatar Leigh Stoller

Minor tweak to let user knows he is there cause of a geni tool.

parent 0ac35a4b
<?php
#
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -52,6 +52,8 @@ if (! isset($key)) {
if (! isset($error)) {
$error = null;
}
# For redirect from the geni tool login.
$isgenitool = 0;
# See if referrer page requested that it be passed along so that it can be
# redisplayed after login. Save the referrer for form below.
......@@ -67,6 +69,11 @@ if (isset($refer) &&
$referrer = null;
}
# If redirecting from the geni tool, show a different message.
if (isset($referrer) && preg_match("/getsslcertjs/", $referrer)) {
$isgenitool = 1;
}
#
# Turn off some of the decorations and menus for the simple view
#
......@@ -123,10 +130,16 @@ if (($this_user = CheckLogin($status))) {
function SPITFORM($uid, $key, $referrer, $error, $adminmode, $simple, $view)
{
global $TBDB_UIDLEN, $TBBASE;
global $isgenitool;
PAGEHEADER("Login",$view);
$premessage = "Please login to our secure server.";
if ($isgenitool) {
$premessage = "A request from a <b>Geni Tool</b> requres you to login<br>";
}
else {
$premessage = "Please login to our secure server.";
}
if ($error) {
echo "<center>";
......@@ -136,12 +149,16 @@ function SPITFORM($uid, $key, $referrer, $error, $adminmode, $simple, $view)
echo "Login attempt failed! Please try again.";
break;
case "notloggedin":
echo "You do not appear to be logged in!";
$premessage = "Please log in again.";
if (! $isgenitool) {
echo "You do not appear to be logged in!";
$premessage = "Please log in again.";
}
break;
case "timedout":
echo "Your login has timed out!";
$premessage = "Please log in again.";
if (! $isgenitool) {
$premessage = "Please log in again.";
}
break;
default:
echo "Unknown Error ($error)!";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment