Commit c7ec90dc authored by Kirk Webb's avatar Kirk Webb

More PhantomNet branding work.

And a couple of fixes.
parent f113bce5
......@@ -73,6 +73,7 @@ $EXPOSEARCHIVE = 0;
$EXPOSETEMPLATES= 0;
$USERSELECTUIDS = 1;
$REMOTEWIKIDOCS = @REMOTEWIKIDOCS@;
$FLAVOR = "Emulab";
$GMAP_API_KEY = "@GMAP_API_KEY@";
$NONAMEDSETUP = @DISABLE_NAMED_SETUP@;
$OPS_VM = @OPSVM_ENABLE@;
......@@ -670,7 +671,7 @@ function SetDomainDefs()
{
global $WWWHOST, $OURDOMAIN, $WWW, $THISHOMEBASE, $TBAUTHDOMAIN, $TBBASE;
global $TBDOCBASE, $TBWWW, $WIKINODE, $TBMAINSITE;
global $ALTERNATE_DOMAINS, $DOMVIEW;
global $ALTERNATE_DOMAINS, $FLAVOR, $DOMVIEW;
foreach ($ALTERNATE_DOMAINS as $altdom) {
list($dpat, $ovr) = $altdom;
......@@ -687,6 +688,7 @@ function SetDomainDefs()
# Defs that may be overriden in the domain's configuration array
if (isset($ovr['THISHOMEBASE'])) {
$THISHOMEBASE = $ovr['THISHOMEBASE'];
$FLAVOR = $THISHOMEBASE;
}
if (isset($ovr['WIKINODE'])) {
$WIKINODE = $ovr['WIKINODE'];
......
......@@ -342,8 +342,8 @@ function GETNEWSINFO() {
return array($newsBase, $newsDate, $newNews);
}
function WRITETOPMIDBAR($newsBase, $newNews, $product="Emulab") {
global $TBBASE;
function WRITEMIDTOPBAR($newsBase, $newNews) {
global $TBBASE, $FLAVOR;
global $login_user, $login_status;
if ($login_user) {
......@@ -358,7 +358,7 @@ function WRITETOPMIDBAR($newsBase, $newNews, $product="Emulab") {
if ($login_status & (CHECKLOGIN_LOGGEDIN|CHECKLOGIN_MAYBEVALID)) {
echo "<a class=midtopcell ".
"href='$TBBASE/" . CreateURL("showuser", $login_user) . "'>".
"My $product</a>\n";
"My $FLAVOR</a>\n";
echo " <font color=grey>|</font> ";
......@@ -440,7 +440,7 @@ function PUTSEARCHBOX($newsBase) {
</div>\n";
}
function WRITELOGINBOX($firstinitstate=0) {
function WRITELOGINBOX($loginbox_content) {
global $TBBASE, $TBDOCBASE, $BASEPATH;
global $login_status;
......@@ -479,19 +479,9 @@ function WRITELOGINBOX($firstinitstate=0) {
echo "<strong>$login_message</strong>";
}
if (!$firstinitstate) {
echo "<a href=\"$TBBASE/reqaccount.php3\">";
echo "<img alt=\"Request Account\" border=0 ";
echo "src=\"$BASEPATH/requestaccount.gif\" width=\"144\" height=\"32\"></a>";
echo "<strong>or</strong>";
}
echo "<a href=\"$TBBASE/login.php3\">";
echo "<img alt=\"logon\" border=0 ";
echo "src=\"$BASEPATH/logon.gif\" width=\"144\" height=\"32\"></a>\n";
echo $loginbox_content;
echo "</div>";
#
# Login message. Set via 'web/message' site variable
#
......@@ -518,7 +508,7 @@ function WRITELOGINBOX($firstinitstate=0) {
}
}
function WRITEEXPERIMENTMENU($firstinitstate, $product="Emulab") {
function WRITEEXPERIMENTMENU($firstinitstate) {
global $TBBASE, $TBDOCBASE;
global $WIKISUPPORT, $CHECKLOGIN_WIKINAME, $EXPOSETEMPLATES;
global $login_status, $login_user;
......@@ -559,7 +549,7 @@ function WRITEEXPERIMENTMENU($firstinitstate, $product="Emulab") {
CreateURL("moduserinfo", $login_user));
}
else {
NavMenuButton("My $product",
NavMenuButton("My $FLAVOR",
"$TBBASE/" . CreateURL("showuser", $login_user));
#
......@@ -673,7 +663,7 @@ function WRITEADMINMENU() {
#
# WRITESIDEBARPNET(): Write the "sidebar" menu for PhantomNet.
#
function WRITESIDEBARPNET() {
function WRITEPNETSIDEBAR() {
global $login_status, $login_user;
global $TBBASE, $TBDOCBASE, $BASEPATH;
global $TBMAINSITE, $THISHOMEBASE;
......@@ -681,7 +671,7 @@ function WRITESIDEBARPNET() {
list($newsBase, $newsDate, $newNews) = GETNEWSINFO();
WRITETOPMIDBAR($newsBase, $newNews, "PhantomNet");
WRITEMIDTOPBAR($newsBase, $newNews);
NavMenuStart();
NavMenuSection("information", "Information");
......@@ -700,11 +690,20 @@ function WRITESIDEBARPNET() {
# space.
if (! $login_user) {
NavMenuSectionEnd();
PUTSEARCHBOX();
PUTSEARCHBOX($newsBase);
}
WRITELOGINBOX();
WRITEEXPERIMENTMENU(0,"PhantomNet");
$lbox_content =
"<a href=\"$TBBASE/reqpnetaccount.php\">".
"<img alt=\"Request Account\" border=0 ".
"src=\"$BASEPATH/requestaccount.gif\" width=\"144\" height=\"32\"></a>".
"<strong>or</strong>".
"<a href=\"$TBBASE/login.php3\">".
"<img alt=\"logon\" border=0 ".
"src=\"$BASEPATH/logon.gif\" width=\"144\" height=\"32\"></a>\n";
WRITELOGINBOX($lbox_content);
WRITEEXPERIMENTMENU(0);
WRITEADMINMENU();
# Terminate Interaction menu and render.
......@@ -735,7 +734,7 @@ function WRITESIDEBAR() {
list($newsBase, $newsDate, $newNews) = GETNEWSINFO();
WRITETOPMIDBAR($newsBase, $newNews);
WRITEMIDTOPBAR($newsBase, $newNews);
NavMenuStart();
NavMenuSection("information", "Information");
......@@ -788,10 +787,24 @@ function WRITESIDEBAR() {
# space.
if (! $login_user) {
NavMenuSectionEnd();
PUTSEARCHBOX();
PUTSEARCHBOX($newsBase);
}
WRITELOGINBOX($firstinitstate);
$lbox_content = "";
if (!$firstinitstate) {
$lbox_content .=
"<a href=\"$TBBASE/reqaccount.php3\">".
"<img alt=\"Request Account\" border=0 ".
"src=\"$BASEPATH/requestaccount.gif\" width=\"144\" height=\"32\"></a>".
"<strong>or</strong>";
}
$lbox_content .=
"<a href=\"$TBBASE/login.php3\">".
"<img alt=\"logon\" border=0 ".
"src=\"$BASEPATH/logon.gif\" width=\"144\" height=\"32\"></a>\n";
WRITELOGINBOX($lbox_content);
WRITEEXPERIMENTMENU($firstinitstate);
# And now the Collaboration menu.
......
<?php
#
# Copyright (c) 2000-2003 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/>.
#
# }}}
#
include("defs.php3");
#
# Standard Testbed Header
#
PAGEHEADER("Request a New PhantomNet Account");
echo "<center><font size=+1>
If you already have a PhantomNet account,
<a href=login.php3>
<font color=red>please log on first!</font></a>
<br><br>
<a href=joinproject.php3>Join an Existing Project</a>.
<br>
or
<br>
<a href=newproject.php3>Start a New Project</a>.
<br>
<font size=-1>
If you are a <font color=red>student (undergrad or graduate)</font>,
please do not try to start a project!<br> Your advisor must do it.
</font>
</font></center><br>\n";
#
# Standard Testbed Footer
#
PAGEFOOTER();
?>
......@@ -77,10 +77,10 @@ if ($yourpcs) {
# Standard Testbed Header, now that we know what we want to say.
#
if (! $this_user->SameUser($target_user)) {
PAGEHEADER("${target_uid}'s Emulab", null, null, $notice);
PAGEHEADER("${target_uid}'s $FLAVOR", null, null, $notice);
}
else {
PAGEHEADER("My Emulab", null, null, $notice);
PAGEHEADER("My $FLAVOR", null, null, $notice);
}
$html_groups = null;
......
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