Commit ba6d7982 authored by Kirk Webb's avatar Kirk Webb

checkpoint.

parent d1982456
......@@ -176,6 +176,28 @@ $RSS_HEADER_PGENINEWS =
"<link rel=\"alternate\" type=\"application/rss+xml\" " .
"title=\"ProtoGeni News\" href=\"$TBDOCBASE/news-rss.php3?protogeni=1\"/>";
$RSS_HEADER_PNNEWS =
"<link rel=\"alternate\" type=\"application/rss+xml\" " .
"title=\"PhantomNet News\" href=\"$TBDOCBASE/news-rss.php3?phantomnet=1\"/>";
#
# Below is a rather ugly solution for changing aspects of the UI based on
# the incoming apache virtual server name.
#
if (strpos($_SERVER['SERVER_NAME'],'phantomnet') !== false) {
$WWWHOST = "www.phantomnet.org";
$WWW = $WWWHOST;
$OURDOMAIN = "phantomnet.org";
$THISHOMEBASE = "PhantomNet.Org";
$TBAUTHDOMAIN = ".$OURDOMAIN";
$TBBASE = "https://$WWWHOST";
$TBDOCBASE = "http://$WWWHOST";
$TBWWW = "<$TBBASE/>";
$WIKINODE = "wiki.phantomnet.org";
$WIKIDOCS = "http://${WIKINODE}/wikidocs/wiki";
}
#
# Database constants and the like.
#
......@@ -612,7 +634,7 @@ function YesNo($bool) {
#
# See if someone is logged in, and if they need to be redirected.
#
function CheckRedirect($wwwbase) {
function CheckRedirect() {
global $stayhome;
if (($this_user = CheckLogin($check_status))) {
......@@ -629,11 +651,11 @@ function CheckRedirect($wwwbase) {
if ($check_status == CHECKLOGIN_LOGGEDIN) {
if ($firstinitstate == "createproject") {
# Zap to NewProject Page,
header("Location: $wwwbase/newproject.php3");
header("Location: $TBBASE/newproject.php3");
}
else {
# Zap to My Emulab page.
header("Location: $wwwbase/".
header("Location: $TBBASE/".
CreateURL("showuser", $this_user));
}
exit;
......
......@@ -21,7 +21,7 @@
#
# }}}
#
require("pnetdefs.php3");
require("defs.php3");
$optargs = OptionalPageArguments("stayhome", PAGEARG_BOOLEAN);
......@@ -29,12 +29,17 @@ $optargs = OptionalPageArguments("stayhome", PAGEARG_BOOLEAN);
# The point of this is to redirect logged in users to their My Emulab
# page.
#
CheckRedirect($PNETBASE);
CheckRedirect();
#
# PhantomNet Header
#
PAGEHEADER("PhantomNet - Mobility Testbed Platform",NULL,$RSS_HEADER_PNNEWS);
$pnetview = array('hide_sidebar' => 1, 'hide_banner' => 0,
'show_topbar' => "pnet", 'show_bottombar' => 'pnet',
'hide_copyright' => 0, 'show_pnet' => 1);
PAGEHEADER("PhantomNet - Mobility Testbed Platform", $pnetview,
$RSS_HEADER_PNNEWS);
#
# Show special banner message, if set.
......@@ -54,5 +59,5 @@ readfile("index-phantomnet.html");
#
# Standard Testbed Footer
#
PAGEFOOTER();
PAGEFOOTER($pnetview);
?>
<?php
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
require("defs.php3");
$PNWWWHOST = "@PNWWWHOST@";
$PNETBASE = "https://$PNWWWHOST";
$PNDOCBASE = "http://$PNWWWHOST";
$RSS_HEADER_PNNEWS =
"<link rel=\"alternate\" type=\"application/rss+xml\" " .
"title=\"PhantomNet News\" href=\"$TBDOCBASE/news-rss.php3?phantomnet=1\"/>";
?>
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