Commit 77f2d92a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Checkpoint initial GNU Radio pages.

parent c6cefe2f
......@@ -100,7 +100,7 @@ HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.html)
HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.jpg)
HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.gif)
USRPFILES = $(wildcard $(SRCDIR)/usrp/*.php)
USRPFILES = $(wildcard $(SRCDIR)/usrp/*.php3)
USRPFILES += $(wildcard $(SRCDIR)/usrp/*.html)
# need to make it *.gz; with simply "*",
......
......@@ -79,6 +79,7 @@ function WRITESIDEBARDIVIDER() {
# link looks different. Not sure its really necessary.
#
function WRITESIDEBARBUTTON($text, $base, $link ) {
if ($base)
$link = "$base/$link";
SIDEBARCELL("<a href=\"$link\">$text</a>");
}
......@@ -598,6 +599,26 @@ function WRITESIDEBAR() {
echo "</table>\n";
}
#
# Simple version of above, that just writes the given menu.
#
function WRITESIMPLESIDEBAR($menudefs) {
$menutitle = $menudefs['title'];
echo "<table class=menu width=210 cellpadding=0 cellspacing=0>
<tr><td class=menuheader>\n";
echo "<b>$menutitle</b>";
echo " </td>";
echo "</tr>\n";
each($menudefs);
while (list($key, $val) = each($menudefs)) {
WRITESIDEBARBUTTON("$key", null, "$val");
}
echo "</table>\n";
}
#
# spits out beginning part of page
#
......@@ -773,6 +794,9 @@ function PAGEHEADER($title, $view = NULL) {
if (!isset($view['hide_sidebar'])) {
WRITESIDEBAR();
}
elseif (isset($view['menu'])) {
WRITESIMPLESIDEBAR($view['menu']);
}
FINISHSIDEBAR();
echo "<h2 class=\"nomargin\">\n";
......@@ -792,14 +816,17 @@ function PAGEHEADER($title, $view = NULL) {
$minor = "";
$build = "";
TBGetVersionInfo($major, $minor, $build);
if ($view['hide_versioninfo'] == 1)
$versioninfo = "";
else
$versioninfo = "Vers: $major.$minor Build: $build";
$now = date("D M d g:ia T");
echo "$title</h2></td>\n";
echo "<td class=contentheader align=right>\n";
echo "<table border='0' cellpadding='0' cellspacing='0'>";
echo " <tr>";
echo " <td class=contentheader>".
"<font size=-2>Vers: $major.$minor Build: $build</font></td>";
echo " <td class=contentheader><font size=-2>$versioninfo</font></td>";
echo " <td class=contentheader>&nbsp&nbsp</td>";
echo " <td class=contentheader align=right>";
if ($login_uid) {
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# All rights reserved.
#
require("usrpdefs.php3");
# Page arguments.
$printable = $_GET['printable'];
$docname = $_GET['docname'];
$title = $_GET['title'];
if (!isset($title) || $title == "")
$title = "Emulab Documentation";
# Pedantic page argument checking. Good practice!
if (!isset($docname) ||
(isset($printable) && !($printable == "1" || $printable == "0"))) {
PAGEARGERROR();
}
if (!isset($printable))
$printable = 0;
#
# Standard Testbed Header
#
if (!$printable) {
PAGEHEADER($title, $USRP_MENUDEFS);
}
#
# Need to sanity check the path! Allow only [word].{html,txt} files
#
if (!preg_match("/^[-\w]+\.(html|txt)$/", $docname)) {
USERERROR("Illegal document name: $docname!", 1);
}
#
# Check extension. If a .txt file, need some extra wrapper stuff to make
# it look readable.
#
$textfile = 0;
if (preg_match("/^.*\.txt$/", $docname)) {
$textfile = 1;
}
if ($printable) {
#
# Need to spit out some header stuff.
#
echo "<html>
<head>
<link rel='stylesheet' href='../tbstyle-plain.css' type='text/css'>
</head>
<body>\n";
}
else {
echo "<b><a href=$REQUEST_URI&printable=1>
Printable version of this document</a></b><br>\n";
}
if ($textfile) {
echo "<XMP>\n";
}
readfile("$docname");
if ($textfile) {
echo "</XMP>\n";
}
#
# Standard Testbed Footer
#
if ($printable) {
echo "</body>
</html>\n";
}
else {
PAGEFOOTER();
}
?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2005 University of Utah and the Flux Group.
All rights reserved.
-->
<center>
<h2>Frequently Asked Questions</h2>
</center>
<h2>Contents</h2>
<ul>
<li> <a href="#WhatIsThis">What is a GNU Radio?</a>
</ul>
<hr>
<ul>
<li><a NAME="WhatIsThis"></a>
<font size='+1'><b>What is a GNU Radio?</b></font>
<p>Tell me more, tell me more
</ul>
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
#
require("usrpdefs.php3");
PAGEHEADER("GNU Radio Project", $USRP_MENUDEFS);
echo "Hi, I am a GNU radio<br>\n";
echo "Tell me more, tell me more<br>\n";
#
# Standard Testbed Footer
#
PAGEFOOTER();
?>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2005 University of Utah and the Flux Group.
All rights reserved.
-->
<center>
<h2>Recent News</h2>
</center>
<ul>
<li>Tell me more, tell me more
</ul>
<!--
EMULAB-COPYRIGHT
Copyright (c) 2005 University of Utah and the Flux Group.
All rights reserved.
-->
<center>
<h2>USRP Users</h2>
</center>
<ul>
<li>Tell me more, tell me more
</ul>
<?php
#
# Definitions for GNU radio pages.
#
chdir("..");
require("defs.php3");
chdir("usrp");
$USRP_MENU = array();
$USRP_MENU['title'] = "USRP Menu";
$USRP_MENU['Home'] = "index.php3";
$USRP_MENU['FAQ'] = "docwrapper.php3?docname=faq.html&title=".
"'Frequently Asked Questions'";
$USRP_MENU['Recent News'] = "docwrapper.php3?docname=news.html&title=".
"'Recent News'";
$USRP_MENU['USRP Users'] = "docwrapper.php3?docname=users.html&title=".
"'USRP Users'";
$USRP_MENU['Public Wiki'] = "https://${USERNODE}/twiki/bin/view/GnuRadio";
$USRP_MENUDEFS = array('hide_sidebar' => 1,
'hide_banner' => 1,
'hide_versioninfo' => 1,
'menu' => $USRP_MENU,
);
?>
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