Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
fbe6687e
Commit
fbe6687e
authored
Apr 18, 2001
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revamp the web pages. NO MORE FRAMES! YIPPIE!
parent
e8bbfa95
Changes
65
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
65 changed files
with
1487 additions
and
1589 deletions
+1487
-1589
www/GNUmakefile.in
www/GNUmakefile.in
+2
-0
www/addusr.php3
www/addusr.php3
+1
-6
www/approveproject_form.php3
www/approveproject_form.php3
+0
-2
www/approveproject_list.php3
www/approveproject_list.php3
+0
-2
www/approveuser.php3
www/approveuser.php3
+0
-4
www/auth.html
www/auth.html
+4
-25
www/batchexp.php3
www/batchexp.php3
+1
-1
www/batchexp_form.php3
www/batchexp_form.php3
+0
-6
www/beginexp_form.php3
www/beginexp_form.php3
+1
-6
www/beginexp_process.php3
www/beginexp_process.php3
+1
-1
www/defs.php3.in
www/defs.php3.in
+25
-41
www/deleteproject.php3
www/deleteproject.php3
+1
-1
www/doc.php3
www/doc.php3
+48
-0
www/doc/doc.html
www/doc/doc.html
+0
-49
www/doc/tmcd.html
www/doc/tmcd.html
+1
-28
www/docwrapper.php3
www/docwrapper.php3
+32
-0
www/endbatch.php3
www/endbatch.php3
+12
-2
www/endexp.php3
www/endexp.php3
+12
-3
www/faq.html
www/faq.html
+29
-53
www/hardware.html
www/hardware.html
+1
-23
www/index.php3
www/index.php3
+64
-243
www/java.html
www/java.html
+50
-0
www/menu.php3
www/menu.php3
+403
-0
www/modusr_form.php3
www/modusr_form.php3
+0
-1
www/newproject.php3
www/newproject.php3
+1
-1
www/newproject_form.php3
www/newproject_form.php3
+1
-1
www/nodecontrol.php3
www/nodecontrol.php3
+10
-17
www/nodecontrol_form.php3
www/nodecontrol_form.php3
+0
-4
www/nodecontrol_list.php3
www/nodecontrol_list.php3
+1
-5
www/nodemon.php3
www/nodemon.php3
+0
-4
www/nodemon_all.php3
www/nodemon_all.php3
+0
-4
www/nscheck.php3
www/nscheck.php3
+1
-2
www/nscheck_form.php3
www/nscheck_form.php3
+0
-1
www/people.php3
www/people.php3
+41
-0
www/policies.html
www/policies.html
+1
-24
www/pubs.html
www/pubs.html
+26
-45
www/pubs.php3
www/pubs.php3
+19
-0
www/reserved.php3
www/reserved.php3
+0
-4
www/security.html
www/security.html
+1
-22
www/showbatch.php3
www/showbatch.php3
+0
-5
www/showexp.php3
www/showexp.php3
+0
-3
www/showexp_list.php3
www/showexp_list.php3
+3
-7
www/showproject.php3
www/showproject.php3
+0
-3
www/showproject_form.php3
www/showproject_form.php3
+1
-1
www/showproject_list.php3
www/showproject_list.php3
+1
-5
www/showuser.php3
www/showuser.php3
+0
-3
www/showuser_list.php3
www/showuser_list.php3
+1
-5
www/software.html
www/software.html
+1
-24
www/sponsors.html
www/sponsors.html
+1
-23
www/start.php3
www/start.php3
+3
-13
www/tbauth.php3
www/tbauth.php3
+1
-1
www/tbstyle.css
www/tbstyle.css
+21
-0
www/tutorial/advanced.html
www/tutorial/advanced.html
+0
-245
www/tutorial/basic.html
www/tutorial/basic.html
+0
-369
www/tutorial/batchmode.html
www/tutorial/batchmode.html
+0
-37
www/tutorial/example.ns
www/tutorial/example.ns
+0
-26
www/tutorial/image.html
www/tutorial/image.html
+0
-37
www/tutorial/loop.ns
www/tutorial/loop.ns
+19
-0
www/tutorial/nscommands.html
www/tutorial/nscommands.html
+0
-23
www/tutorial/tutorial.html
www/tutorial/tutorial.html
+607
-35
www/tutorial/tutorial.php3
www/tutorial/tutorial.php3
+18
-0
www/updown.php3
www/updown.php3
+19
-0
www/verifyusr.php3
www/verifyusr.php3
+1
-3
www/verifyusr_form.php3
www/verifyusr_form.php3
+0
-1
www/welcome.html
www/welcome.html
+0
-89
No files found.
www/GNUmakefile.in
View file @
fbe6687e
...
@@ -37,6 +37,8 @@ DOCFILES += $(wildcard $(SRCDIR)/doc/*.gif)
...
@@ -37,6 +37,8 @@ DOCFILES += $(wildcard $(SRCDIR)/doc/*.gif)
TUTFILES = $(wildcard $(SRCDIR)/tutorial/*.html)
TUTFILES = $(wildcard $(SRCDIR)/tutorial/*.html)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.jpg)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.jpg)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.gif)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.gif)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.php3)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.ns)
TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl
TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl
#
#
...
...
www/addusr.php3
View file @
fbe6687e
<?php
<?php
include
(
"defs.php3"
);
include
(
"defs.php3"
);
PAGEHEADER
(
"
New User
"
);
PAGEHEADER
(
"
Apply for Project Membership
"
);
#
#
# Get current user.
# Get current user.
...
@@ -44,11 +44,6 @@ else {
...
@@ -44,11 +44,6 @@ else {
?>
?>
<table
align=
"center"
border=
"1"
>
<table
align=
"center"
border=
"1"
>
<tr>
<td
colspan=
"2"
>
<h1
align=
"center"
>
Apply for Project Membership
</h1></td>
</tr>
<tr>
<tr>
<td
align=
"center"
colspan=
"2"
>
<td
align=
"center"
colspan=
"2"
>
Fields marked with * are required.
</td>
Fields marked with * are required.
</td>
...
...
www/approveproject_form.php3
View file @
fbe6687e
...
@@ -28,8 +28,6 @@ if (!isset($pid) ||
...
@@ -28,8 +28,6 @@ if (!isset($pid) ||
USERERROR
(
"You must provide a project ID."
,
1
);
USERERROR
(
"You must provide a project ID."
,
1
);
}
}
echo
"<center><h1>Approve a Project</h1></center>
\n
"
;
#
#
# Check to make sure thats this is a valid PID.
# Check to make sure thats this is a valid PID.
#
#
...
...
www/approveproject_list.php3
View file @
fbe6687e
...
@@ -12,8 +12,6 @@ PAGEHEADER("New Project Approval List");
...
@@ -12,8 +12,6 @@ PAGEHEADER("New Project Approval List");
$uid
=
GETLOGIN
();
$uid
=
GETLOGIN
();
LOGGEDINORDIE
(
$uid
);
LOGGEDINORDIE
(
$uid
);
echo
"<center><h1>Approve New Projects List</h1></center>
\n
"
;
#
#
# Of course verify that this uid has admin privs!
# Of course verify that this uid has admin privs!
#
#
...
...
www/approveuser.php3
View file @
fbe6687e
...
@@ -12,10 +12,6 @@ PAGEHEADER("New Users Approved");
...
@@ -12,10 +12,6 @@ PAGEHEADER("New Users Approved");
$uid
=
GETLOGIN
();
$uid
=
GETLOGIN
();
LOGGEDINORDIE
(
$uid
);
LOGGEDINORDIE
(
$uid
);
echo
"<center><h1>
Project Membership Results
</h1></center>"
;
#
#
# Walk the list of post variables, looking for the special post format.
# Walk the list of post variables, looking for the special post format.
# See approveuser_form.php3:
# See approveuser_form.php3:
...
...
www/auth.html
View file @
fbe6687e
<html>
<html>
<head>
<head>
<title>
Utah Network Testbed -
Policy
</title>
<title>
Utah Network Testbed -
Policies
</title>
<link
rel=
'stylesheet'
href=
'tbstyle
-doc
.css'
type=
'text/css'
>
<link
rel=
'stylesheet'
href=
'tbstyle.css'
type=
'text/css'
>
</head>
</head>
<body>
<body>
<basefont
size=
4
>
<basefont
size=
4
>
...
@@ -57,7 +57,8 @@ reserve and configure nodes, etc.
...
@@ -57,7 +57,8 @@ reserve and configure nodes, etc.
<p>
<p>
More detailed information on this
More detailed information on this
process can be found in the
<a
href=
"faq.html"
>
FAQ
</a>
.
process can be found in the
<a
href=
"docwrapper.php3?docname=faq.html"
>
Emulab FAQ
</a>
.
<h3>
Another way of saying the same thing
</h3>
<h3>
Another way of saying the same thing
</h3>
...
@@ -117,25 +118,3 @@ You will also receive an account on the users' master host
...
@@ -117,25 +118,3 @@ You will also receive an account on the users' master host
"users.emulab.net", and from there will be able to access the test
"users.emulab.net", and from there will be able to access the test
nodes' serial line consoles via 'tip' as well as access console log
nodes' serial line consoles via 'tip' as well as access console log
files.
files.
<hr
size=
2
noshade
>
<center>
<!-- Force full window! -->
<base
target=
_top
>
[
<a
href=
"https://www.emulab.net/"
>
Emulab.Net Home
</a>
]
<br>
[
<a
href=
"http://www.cs.utah.edu/flux/testbed/"
>
Utah Network Testbed
</a>
]
[
<a
href=
"http://www.cs.utah.edu/flux/"
>
Flux Research Group
</a>
]
[
<a
href=
"http://www.cs.utah.edu/"
>
School of Computing
</a>
]
[
<a
href=
"http://www.utah.edu/"
>
University of Utah
</a>
]
</center>
<p
align=
right
>
<font
size=
"-1"
>
<a
href=
"mailto:testbed-ops@flux.cs.utah.edu"
>
Testbed Operations (testbed-ops@flux.cs.utah.edu)
</a>
<br>
Last modified on Apr 4, 2001
</font>
</p>
</body>
</html>
www/batchexp.php3
View file @
fbe6687e
...
@@ -4,7 +4,7 @@ include("defs.php3");
...
@@ -4,7 +4,7 @@ include("defs.php3");
#
#
# Standard Testbed Header
# Standard Testbed Header
#
#
PAGEHEADER
(
"Creat
e
a Batch Mode Experiment"
);
PAGEHEADER
(
"Creat
ing
a Batch Mode Experiment"
);
$mydebug
=
0
;
$mydebug
=
0
;
...
...
www/batchexp_form.php3
View file @
fbe6687e
...
@@ -30,12 +30,6 @@ if (mysql_num_rows($query_result) == 0) {
...
@@ -30,12 +30,6 @@ if (mysql_num_rows($query_result) == 0) {
?>
?>
<table
align=
"center"
border=
"1"
>
<table
align=
"center"
border=
"1"
>
<tr>
<td
align=
"center"
colspan=
"2"
>
<h1>
Create a new Batch Mode Experiment on the Testbed
</h1>
</td>
</tr>
<tr>
<tr>
<td
align=
"center"
colspan=
"3"
>
<td
align=
"center"
colspan=
"3"
>
<em>
(Fields marked with * are required)
</em>
<em>
(Fields marked with * are required)
</em>
...
...
www/beginexp_form.php3
View file @
fbe6687e
...
@@ -4,7 +4,7 @@ include("defs.php3");
...
@@ -4,7 +4,7 @@ include("defs.php3");
#
#
# Standard Testbed Header
# Standard Testbed Header
#
#
PAGEHEADER
(
"Begin a
n Experiment Form
"
);
PAGEHEADER
(
"Begin a
new Testbed Experiment
"
);
#
#
# Only known and logged in users can begin experiments.
# Only known and logged in users can begin experiments.
...
@@ -30,11 +30,6 @@ if (mysql_num_rows($query_result) == 0) {
...
@@ -30,11 +30,6 @@ if (mysql_num_rows($query_result) == 0) {
?>
?>
<table
align=
"center"
border=
"1"
>
<table
align=
"center"
border=
"1"
>
<tr>
<td
align=
"center"
colspan=
"2"
>
<h1>
Begin a new Experiment on the Testbed
</h1>
</td>
</tr>
<tr>
<tr>
<td
align=
"center"
colspan=
"3"
>
<td
align=
"center"
colspan=
"3"
>
...
...
www/beginexp_process.php3
View file @
fbe6687e
...
@@ -4,7 +4,7 @@ include("defs.php3");
...
@@ -4,7 +4,7 @@ include("defs.php3");
#
#
# Standard Testbed Header
# Standard Testbed Header
#
#
PAGEHEADER
(
"Begin
an
Experiment"
);
PAGEHEADER
(
"Begin
ning a Testbed
Experiment"
);
$mydebug
=
0
;
$mydebug
=
0
;
...
...
www/defs.php3.in
View file @
fbe6687e
<?php
<?php
#
#
# Standard definitions!
# Standard definitions!
#
#
$TBDIR
=
"@prefix@/"
;
$TBDIR
=
"@prefix@/"
;
$WWWDEFS
=
"@WWWDEFS@"
;
$WWWDEFS
=
"@WWWDEFS@"
;
...
@@ -32,6 +32,19 @@ $TBAUTHTIMEOUT = 21600;
...
@@ -32,6 +32,19 @@ $TBAUTHTIMEOUT = 21600;
$HTTPTAG
=
"http://"
;
$HTTPTAG
=
"http://"
;
#
# Menu Formatting Stuff
#
# Color for the title on each page.
$TITLECOLOR
=
"#E04050"
;
$BANNERCOLOR
=
"#ABABE0"
;
$THISHOMEBASE
=
"Emulab.Net"
;
$THISPROJECT
=
"The Utah Network Testbed"
;
#
# Links back to Flux web Pages
#
#
#
# Database constants and the like.
# Database constants and the like.
#
#
...
@@ -66,6 +79,9 @@ function TBERROR ($message, $death) {
...
@@ -66,6 +79,9 @@ function TBERROR ($message, $death) {
sleep
(
2
);
sleep
(
2
);
if
(
$death
)
{
if
(
$death
)
{
ENDPAGE
();
echo
"</body>
</html>"
;
die
(
"<br><br><h3>"
.
die
(
"<br><br><h3>"
.
"
$message
<p>"
.
"
$message
<p>"
.
"Could not continue. Please contact "
.
"Could not continue. Please contact "
.
...
@@ -91,6 +107,7 @@ function USERERROR($message, $death) {
...
@@ -91,6 +107,7 @@ function USERERROR($message, $death) {
if you feel this message is an error."
;
if you feel this message is an error."
;
if
(
$death
)
{
if
(
$death
)
{
ENDPAGE
();
echo
"</body>
echo
"</body>
</html>"
;
</html>"
;
die
(
""
);
die
(
""
);
...
@@ -125,52 +142,14 @@ function ISADMIN($uid) {
...
@@ -125,52 +142,14 @@ function ISADMIN($uid) {
return
$admin
;
return
$admin
;
}
}
#
# Spit out a vanilla page header.
#
function PAGEHEADER($title) {
echo "<html>
<head>
<title>$title</title>
<link rel=\"stylesheet\" href=\"tbstyle.css\" type=\"text/css\">
</head>
<body>
<basefont size=4>
\n";
}
#
# Spit out a vanilla page footer.
#
function PAGEFOOTER() {
global $TBBASE;
echo "<br><hr>
<!-- Force full window! -->
<base target=_top>
<center>[<a href=\"$TBBASE\">Emulab.Net Home</a>]</center>
<center>
[<a href=\"http://www.cs.utah.edu/flux/testbed/\">
Utah Network Testbed</a>]
[<a href=\"http://www.cs.utah.edu/flux/\">Flux Research Group</a>]
[<a href=\"http://www.cs.utah.edu/\">School of Computing</a>]
[<a href=\"http://www.utah.edu/\">University of Utah</a>]
</center>
<p align=right>
<font size=-2>
Problems? Contact
<a href=\"mailto:testbed-ops@flux.cs.utah.edu\">
Testbed Operations (testbed-ops@flux.cs.utah.edu)</a>
</body>
</html>\n";
}
#
#
# Run a program as a user.
# Run a program as a user.
#
#
function
SUEXEC
(
$uid
,
$gid
,
$cmdandargs
,
$die
)
{
function
SUEXEC
(
$uid
,
$gid
,
$cmdandargs
,
$die
)
{
global
$TBSUEXEC_PATH
;
global
$TBSUEXEC_PATH
;
ignore_user_abort
(
1
);
$output
=
array
();
$output
=
array
();
$retval
=
0
;
$retval
=
0
;
$result
=
exec
(
"
$TBSUEXEC_PATH
$uid
$gid
$cmdandargs
"
,
$result
=
exec
(
"
$TBSUEXEC_PATH
$uid
$gid
$cmdandargs
"
,
...
@@ -219,4 +198,9 @@ function VERIFYURL($url) {
...
@@ -219,4 +198,9 @@ function VERIFYURL($url) {
# Beware empty spaces (cookies)!
# Beware empty spaces (cookies)!
#
#
require
(
"tbauth.php3"
);
require
(
"tbauth.php3"
);
#
# Okay, this is what checks the login and spits out the menu.
#
require
(
"menu.php3"
);
?>
?>
www/deleteproject.php3
View file @
fbe6687e
...
@@ -4,7 +4,7 @@ include("defs.php3");
...
@@ -4,7 +4,7 @@ include("defs.php3");
#
#
# Standard Testbed Header
# Standard Testbed Header
#
#
PAGEHEADER
(
"Terminat
e
Project and Remove all Trace"
);
PAGEHEADER
(
"Terminat
ing
Project and Remove all Trace"
);
#
#
# Only known and logged in users can end experiments.
# Only known and logged in users can end experiments.
...
...
www/doc.php3
0 → 100644
View file @
fbe6687e
<?php
require
(
"defs.php3"
);
#
# Standard Testbed Header
#
PAGEHEADER
(
"Documentation"
);
?>
<ul>
<li>
<a
href=
"docwrapper.php3?docname=tutorial/tutorial.html"
>
Emulab `Getting Started' Tutorial
</a>
.
<p>
<li>
<a
href=
"docwrapper.php3?docname=faq.html"
>
Emulab Frequently Asked Questions (FAQ)
</a>
.
<p>
<li>
<a
href=
"docwrapper.php3?docname=doc/tmcd.html"
>
Testbed Master Control Daemon (TMCD) Reference Manual
</a>
<p>
<li><b><a
href =
"docwrapper.php3?docname=auth.html"
>
Authorization Scheme, Policy, and "How To Get Started"
</a></b>
<p>
<li><b><a
href =
"docwrapper.php3?docname=hardware.html"
>
Hardware Overview
</a></b>
<p>
<li><b><a
href =
"docwrapper.php3?docname=software.html"
>
Software Overview
</a></b>
<p>
<li><b><a
href =
"docwrapper.php3?docname=security.html"
>
Security Issues
</a></b>
<p>
<li><b><a
href =
"docwrapper.php3?docname=policies.html"
>
Administrative Policies and Disclaimer
</a></b>
<p>
<li><b><a
href =
"docwrapper.php3?docname=sponsors.html"
>
Emulab Sponsors
</a></b>
</ul>
<?php
#
# Standard Testbed Footer
#
PAGEFOOTER
();
?>
www/doc/doc.html
deleted
100644 → 0
View file @
e8bbfa95
<html>
<head>
<title>
Emulab - Documentation
</title>
<link
rel=
'stylesheet'
href=
'../tbstyle-doc.css'
type=
'text/css'
>
</head>
<body>
<basefont
size=
4
>
<center>
<h1>
Documentation
</h1>
</center>
<ul>
<li>
<a
href=
"../tutorial/tutorial.html"
>
Emulab `Getting Started' Tutorial
</a>
.
<p>
<li>
<a
href=
"../faq.html"
>
Emulab Frequently Asked Questions (FAQ)
</a>
.
<p>
<li>
<a
href=
"tmcd.html"
>
Testbed Master Control Daemon (TMCD)
Reference Manual
</a>
<p>
</ul>
<hr
size=
2
noshade
>
<center>
<!-- Force full window! -->
<base
target=
_top
>
[
<a
href=
"https://www.emulab.net/"
>
Emulab.Net Home
</a>
]
<br>
[
<a
href=
"http://www.cs.utah.edu/flux/testbed/"
>
Utah Network Testbed
</a>
]
[
<a
href=
"http://www.cs.utah.edu/flux/"
>
Flux Research Group
</a>
]
[
<a
href=
"http://www.cs.utah.edu/"
>
School of Computing
</a>
]
[
<a
href=
"http://www.utah.edu/"
>
University of Utah
</a>
]
</center>
<p
align=
right
>
<font
size=
"-1"
>
<a
href=
\"mailto:testbed-ops@flux.cs.utah.edu\"
>
Testbed Operations (testbed-ops@flux.cs.utah.edu)
</a>
<br>
Last modified on Apr 2, 2001
</font>
</p>
</body>
</html>
www/doc/tmcd.html
View file @
fbe6687e
<html>
<!-- This file is sucked in by the doc wrapper. -->
<head>
<title>
Emulab - TMCD
</title>
<link
rel=
'stylesheet'
href=
'../tbstyle-doc.css'
type=
'text/css'
>
</head>
<body>
<basefont
size=
4
>
<center>
<center>
<h1>
Testbed Master Control Daemon/Client Reference
</h1>
<h1>
Testbed Master Control Daemon/Client Reference
</h1>
...
@@ -384,24 +378,3 @@ if a new experiment with the same name is started.
...
@@ -384,24 +378,3 @@ if a new experiment with the same name is started.
</ul>
</ul>
</ul>
</ul>
<hr
size=
2
noshade
>
<center>
<!-- Force full window! -->
<base
target=
_top
>
[
<a
href=
"https://www.emulab.net/"
>
Emulab.Net Home
</a>
]
<br>
[
<a
href=
"http://www.cs.utah.edu/flux/testbed/"
>
Utah Network Testbed
</a>
]
[
<a
href=
"http://www.cs.utah.edu/flux/"
>
Flux Research Group
</a>
]
[
<a
href=
"http://www.cs.utah.edu/"
>
School of Computing
</a>
]
[
<a
href=
"http://www.utah.edu/"
>
University of Utah
</a>
]
</center>
<p
align=
right
>
<font
size=
"-1"
>
<a
href=
"mailto:testbed-ops@flux.cs.utah.edu"
>
Testbed Operations (testbed-ops@flux.cs.utah.edu)
</a>
<br>
Last modified on Mar 14, 2001
</font>
</p>
</body>
</html>
www/docwrapper.php3
0 → 100644
View file @
fbe6687e
<?php
require
(
"defs.php3"
);
#
# Standard Testbed Header
#
PAGEHEADER
(
"Emulab Documentation"
);
#
# Need to sanity check the path! For now, just make sure the path
# does not start with a dot or a slash.
#
$first
=
substr
(
$docname
,
0
,
1
);
if
(
strcmp
(
$first
,
"."
)
==
0
||
strcmp
(
$first
,
"/"
)
==
0
)
{
USERERROR
(
"Invalid document name:
$docname
!"
);
}
#
# Nothing that looks like a ../ is allowed anywhere in the name
#
if
(
strstr
(
$docname
,
"../"
))
{
USERERROR
(
"Invalid document name:
$docname
!"
);
}
readfile
(
"
$docname
"
);
#
# Standard Testbed Footer
#
PAGEFOOTER
();
?>
www/endbatch.php3
View file @
fbe6687e
...
@@ -4,7 +4,7 @@ include("defs.php3");
...
@@ -4,7 +4,7 @@ include("defs.php3");
#
#
# Standard Testbed Header
# Standard Testbed Header
#
#
PAGEHEADER
(
"Cancel Batch Mode Experiment"
);
PAGEHEADER
(
"Cancel
a
Batch Mode Experiment"
);
#
#
# Only known and logged in users can end experiments.
# Only known and logged in users can end experiments.
...
@@ -48,13 +48,23 @@ $row = mysql_fetch_array($query_result);
...
@@ -48,13 +48,23 @@ $row = mysql_fetch_array($query_result);
if
(
!
$isadmin
)
{
if
(
!
$isadmin
)
{
$query_result
=
$query_result
=
mysql_db_query
(
$TBDBNAME
,
mysql_db_query
(
$TBDBNAME
,
"SELECT pid FROM proj_memb "
.
"SELECT pid
,trust
FROM proj_memb "
.
"WHERE uid=
\"
$uid
\"
and pid=
\"
$exp_pid
\"
"
);
"WHERE uid=
\"
$uid
\"
and pid=
\"
$exp_pid
\"
"
);
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
USERERROR
(
"You are not a member of Project
$exp_pid
for "
.
USERERROR
(
"You are not a member of Project
$exp_pid
for "
.
"Experiment:
$exp_eid
."
,
1
);
"Experiment:
$exp_eid
."
,
1
);
}
}
if
((
$row
=
mysql_fetch_row
(
$query_result
))
==
0
)
{
TBERROR
(
"Database Error: Getting trust for uid
$uid
."
,
1
);
}
$trust
=
$row
[
1
];
if
(
strcmp
(
$trust
,
"group_root"
)
&&
strcmp
(
$trust
,
"local_root"
))
{
USERERROR
(
"You are not group or local root in Project
$exp_pid
, "
.
"so you cannot end batch experiments"
,
1
);
}
}
}
#
#
...
...
www/endexp.php3
View file @
fbe6687e
...
@@ -4,7 +4,7 @@ include("defs.php3");
...
@@ -4,7 +4,7 @@ include("defs.php3");
#
#
# Standard Testbed Header
# Standard Testbed Header
#
#
PAGEHEADER
(
"Terminate Experiment"
);
PAGEHEADER
(
"Terminate
a Testbed
Experiment"
);
#
#
# Only known and logged in users can end experiments.
# Only known and logged in users can end experiments.
...
@@ -84,18 +84,27 @@ if ($batchmode) {
...
@@ -84,18 +84,27 @@ if ($batchmode) {
#
#
# Verify that this uid is a member of the project for the experiment
# Verify that this uid is a member of the project for the experiment
# being displayed, or is an admin type.
# being displayed, or is an admin type.
Must be group or local root.
#
#
if
(
!
$isadmin
)
{
if
(
!
$isadmin
)
{
$query_result
=
$query_result
=
mysql_db_query
(
$TBDBNAME
,
mysql_db_query
(
$TBDBNAME
,
"SELECT pid FROM proj_memb "
.
"SELECT pid
,trust
FROM proj_memb "
.
"WHERE uid=
\"
$uid
\"
and pid=
\"
$exp_pid
\"
"
);
"WHERE uid=
\"
$uid
\"
and pid=
\"
$exp_pid
\"
"
);
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
USERERROR
(
"You are not a member of Project
$exp_pid
for "
.
USERERROR
(
"You are not a member of Project
$exp_pid
for "
.
"Experiment:
$exp_eid
."
,
1
);
"Experiment:
$exp_eid
."
,
1
);
}
}
if
((
$row
=
mysql_fetch_row
(
$query_result
))
==
0
)
{
TBERROR
(
"Database Error: Getting trust for uid
$uid
."
,
1
);
}
$trust
=
$row
[
1
];