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; ...@@ -73,6 +73,7 @@ $EXPOSEARCHIVE = 0;
$EXPOSETEMPLATES= 0; $EXPOSETEMPLATES= 0;
$USERSELECTUIDS = 1; $USERSELECTUIDS = 1;
$REMOTEWIKIDOCS = @REMOTEWIKIDOCS@; $REMOTEWIKIDOCS = @REMOTEWIKIDOCS@;
$FLAVOR = "Emulab";
$GMAP_API_KEY = "@GMAP_API_KEY@"; $GMAP_API_KEY = "@GMAP_API_KEY@";
$NONAMEDSETUP = @DISABLE_NAMED_SETUP@; $NONAMEDSETUP = @DISABLE_NAMED_SETUP@;
$OPS_VM = @OPSVM_ENABLE@; $OPS_VM = @OPSVM_ENABLE@;
...@@ -670,7 +671,7 @@ function SetDomainDefs() ...@@ -670,7 +671,7 @@ function SetDomainDefs()
{ {
global $WWWHOST, $OURDOMAIN, $WWW, $THISHOMEBASE, $TBAUTHDOMAIN, $TBBASE; global $WWWHOST, $OURDOMAIN, $WWW, $THISHOMEBASE, $TBAUTHDOMAIN, $TBBASE;
global $TBDOCBASE, $TBWWW, $WIKINODE, $TBMAINSITE; global $TBDOCBASE, $TBWWW, $WIKINODE, $TBMAINSITE;
global $ALTERNATE_DOMAINS, $DOMVIEW; global $ALTERNATE_DOMAINS, $FLAVOR, $DOMVIEW;
foreach ($ALTERNATE_DOMAINS as $altdom) { foreach ($ALTERNATE_DOMAINS as $altdom) {
list($dpat, $ovr) = $altdom; list($dpat, $ovr) = $altdom;
...@@ -687,6 +688,7 @@ function SetDomainDefs() ...@@ -687,6 +688,7 @@ function SetDomainDefs()
# Defs that may be overriden in the domain's configuration array # Defs that may be overriden in the domain's configuration array
if (isset($ovr['THISHOMEBASE'])) { if (isset($ovr['THISHOMEBASE'])) {
$THISHOMEBASE = $ovr['THISHOMEBASE']; $THISHOMEBASE = $ovr['THISHOMEBASE'];
$FLAVOR = $THISHOMEBASE;
} }
if (isset($ovr['WIKINODE'])) { if (isset($ovr['WIKINODE'])) {
$WIKINODE = $ovr['WIKINODE']; $WIKINODE = $ovr['WIKINODE'];
......
...@@ -342,8 +342,8 @@ function GETNEWSINFO() { ...@@ -342,8 +342,8 @@ function GETNEWSINFO() {
return array($newsBase, $newsDate, $newNews); return array($newsBase, $newsDate, $newNews);
} }
function WRITETOPMIDBAR($newsBase, $newNews, $product="Emulab") { function WRITEMIDTOPBAR($newsBase, $newNews) {
global $TBBASE; global $TBBASE, $FLAVOR;
global $login_user, $login_status; global $login_user, $login_status;
if ($login_user) { if ($login_user) {
...@@ -358,7 +358,7 @@ function WRITETOPMIDBAR($newsBase, $newNews, $product="Emulab") { ...@@ -358,7 +358,7 @@ function WRITETOPMIDBAR($newsBase, $newNews, $product="Emulab") {
if ($login_status & (CHECKLOGIN_LOGGEDIN|CHECKLOGIN_MAYBEVALID)) { if ($login_status & (CHECKLOGIN_LOGGEDIN|CHECKLOGIN_MAYBEVALID)) {
echo "<a class=midtopcell ". echo "<a class=midtopcell ".
"href='$TBBASE/" . CreateURL("showuser", $login_user) . "'>". "href='$TBBASE/" . CreateURL("showuser", $login_user) . "'>".
"My $product</a>\n"; "My $FLAVOR</a>\n";
echo " <font color=grey>|</font> "; echo " <font color=grey>|</font> ";
...@@ -440,7 +440,7 @@ function PUTSEARCHBOX($newsBase) { ...@@ -440,7 +440,7 @@ function PUTSEARCHBOX($newsBase) {
</div>\n"; </div>\n";
} }
function WRITELOGINBOX($firstinitstate=0) { function WRITELOGINBOX($loginbox_content) {
global $TBBASE, $TBDOCBASE, $BASEPATH; global $TBBASE, $TBDOCBASE, $BASEPATH;
global $login_status; global $login_status;
...@@ -479,19 +479,9 @@ function WRITELOGINBOX($firstinitstate=0) { ...@@ -479,19 +479,9 @@ function WRITELOGINBOX($firstinitstate=0) {
echo "<strong>$login_message</strong>"; echo "<strong>$login_message</strong>";
} }
if (!$firstinitstate) { echo $loginbox_content;
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 "</div>"; echo "</div>";
# #
# Login message. Set via 'web/message' site variable # Login message. Set via 'web/message' site variable
# #
...@@ -518,7 +508,7 @@ function WRITELOGINBOX($firstinitstate=0) { ...@@ -518,7 +508,7 @@ function WRITELOGINBOX($firstinitstate=0) {
} }
} }
function WRITEEXPERIMENTMENU($firstinitstate, $product="Emulab") { function WRITEEXPERIMENTMENU($firstinitstate) {
global $TBBASE, $TBDOCBASE; global $TBBASE, $TBDOCBASE;
global $WIKISUPPORT, $CHECKLOGIN_WIKINAME, $EXPOSETEMPLATES; global $WIKISUPPORT, $CHECKLOGIN_WIKINAME, $EXPOSETEMPLATES;
global $login_status, $login_user; global $login_status, $login_user;
...@@ -559,7 +549,7 @@ function WRITEEXPERIMENTMENU($firstinitstate, $product="Emulab") { ...@@ -559,7 +549,7 @@ function WRITEEXPERIMENTMENU($firstinitstate, $product="Emulab") {
CreateURL("moduserinfo", $login_user)); CreateURL("moduserinfo", $login_user));
} }
else { else {
NavMenuButton("My $product", NavMenuButton("My $FLAVOR",
"$TBBASE/" . CreateURL("showuser", $login_user)); "$TBBASE/" . CreateURL("showuser", $login_user));
# #
...@@ -673,7 +663,7 @@ function WRITEADMINMENU() { ...@@ -673,7 +663,7 @@ function WRITEADMINMENU() {
# #
# WRITESIDEBARPNET(): Write the "sidebar" menu for PhantomNet. # WRITESIDEBARPNET(): Write the "sidebar" menu for PhantomNet.
# #
function WRITESIDEBARPNET() { function WRITEPNETSIDEBAR() {
global $login_status, $login_user; global $login_status, $login_user;
global $TBBASE, $TBDOCBASE, $BASEPATH; global $TBBASE, $TBDOCBASE, $BASEPATH;
global $TBMAINSITE, $THISHOMEBASE; global $TBMAINSITE, $THISHOMEBASE;
...@@ -681,7 +671,7 @@ function WRITESIDEBARPNET() { ...@@ -681,7 +671,7 @@ function WRITESIDEBARPNET() {
list($newsBase, $newsDate, $newNews) = GETNEWSINFO(); list($newsBase, $newsDate, $newNews) = GETNEWSINFO();
WRITETOPMIDBAR($newsBase, $newNews, "PhantomNet"); WRITEMIDTOPBAR($newsBase, $newNews);
NavMenuStart(); NavMenuStart();
NavMenuSection("information", "Information"); NavMenuSection("information", "Information");
...@@ -700,11 +690,20 @@ function WRITESIDEBARPNET() { ...@@ -700,11 +690,20 @@ function WRITESIDEBARPNET() {
# space. # space.
if (! $login_user) { if (! $login_user) {
NavMenuSectionEnd(); NavMenuSectionEnd();
PUTSEARCHBOX(); PUTSEARCHBOX($newsBase);
} }
WRITELOGINBOX(); $lbox_content =
WRITEEXPERIMENTMENU(0,"PhantomNet"); "<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(); WRITEADMINMENU();
# Terminate Interaction menu and render. # Terminate Interaction menu and render.
...@@ -735,7 +734,7 @@ function WRITESIDEBAR() { ...@@ -735,7 +734,7 @@ function WRITESIDEBAR() {
list($newsBase, $newsDate, $newNews) = GETNEWSINFO(); list($newsBase, $newsDate, $newNews) = GETNEWSINFO();
WRITETOPMIDBAR($newsBase, $newNews); WRITEMIDTOPBAR($newsBase, $newNews);
NavMenuStart(); NavMenuStart();
NavMenuSection("information", "Information"); NavMenuSection("information", "Information");
...@@ -788,10 +787,24 @@ function WRITESIDEBAR() { ...@@ -788,10 +787,24 @@ function WRITESIDEBAR() {
# space. # space.
if (! $login_user) { if (! $login_user) {
NavMenuSectionEnd(); 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); WRITEEXPERIMENTMENU($firstinitstate);
# And now the Collaboration menu. # 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) { ...@@ -77,10 +77,10 @@ if ($yourpcs) {
# Standard Testbed Header, now that we know what we want to say. # Standard Testbed Header, now that we know what we want to say.
# #
if (! $this_user->SameUser($target_user)) { if (! $this_user->SameUser($target_user)) {
PAGEHEADER("${target_uid}'s Emulab", null, null, $notice); PAGEHEADER("${target_uid}'s $FLAVOR", null, null, $notice);
} }
else { else {
PAGEHEADER("My Emulab", null, null, $notice); PAGEHEADER("My $FLAVOR", null, null, $notice);
} }
$html_groups = null; $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