summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
Diffstat (limited to 'swat')
-rw-r--r--swat/docs/menu.js6
-rw-r--r--swat/esptest/auth.esp12
-rw-r--r--swat/esptest/exception.esp13
-rw-r--r--swat/esptest/formtest.esp12
-rw-r--r--swat/esptest/include.esp12
-rw-r--r--swat/esptest/index.esp32
-rw-r--r--swat/esptest/index.html23
-rw-r--r--swat/esptest/ldb.esp31
-rw-r--r--swat/esptest/loadparm.esp12
-rw-r--r--swat/esptest/menu.js11
-rw-r--r--swat/esptest/session.esp12
-rw-r--r--swat/esptest/showvars.esp13
-rwxr-xr-xswat/images/linkpad.gifbin0 -> 270 bytes
-rw-r--r--swat/index.esp27
-rw-r--r--swat/login.esp29
-rw-r--r--swat/logout.esp8
-rw-r--r--swat/scripting/common.js56
-rw-r--r--swat/scripting/footer.esp1
-rw-r--r--swat/scripting/footer_columns.esp7
-rw-r--r--swat/scripting/footer_plain.esp7
-rw-r--r--swat/scripting/header.esp4
-rw-r--r--swat/scripting/header_columns.esp68
-rw-r--r--swat/scripting/header_plain.esp51
-rw-r--r--swat/scripting/preauth.esp17
-rw-r--r--swat/style/common.css185
-rw-r--r--swat/style/main.css107
26 files changed, 610 insertions, 146 deletions
diff --git a/swat/docs/menu.js b/swat/docs/menu.js
new file mode 100644
index 0000000000..eceacf97e0
--- /dev/null
+++ b/swat/docs/menu.js
@@ -0,0 +1,6 @@
+/* show a menu for the docs directory */
+simple_menu(
+ "Samba Information",
+ "Samba4 development", "http://devel.samba.org/",
+ "Recent Checkins", "http://build.samba.org/?tree=samba4&function=Recent+Checkins",
+ "Recent Builds", "http://build.samba.org/?tree=samba4&function=Recent+Builds");
diff --git a/swat/esptest/auth.esp b/swat/esptest/auth.esp
index ac85ddc026..35953dc7dc 100644
--- a/swat/esptest/auth.esp
+++ b/swat/esptest/auth.esp
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP Authentication Test"); %>
+
<h1>Samba4 unixAuth test</h1>
<form name="AuthTest" method="POST" action="@@request['SCRIPT_NAME']">
@@ -22,7 +19,7 @@ Samba4 ESP test
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
username = form['Username'];
@@ -48,5 +45,4 @@ write ("<br>PRIVILEGE = " + session['PRIVILEGE'] + "\n");
%>
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/exception.esp b/swat/esptest/exception.esp
index d569fbe776..abea890d98 100644
--- a/swat/esptest/exception.esp
+++ b/swat/esptest/exception.esp
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP Exception test"); %>
+
<h1>Samba4 exception test</h1>
<form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']">
@@ -15,7 +12,7 @@ Samba4 ESP test
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
function TestFunction(arg1, arg2) {
@@ -33,5 +30,5 @@ if (request['REQUEST_METHOD'] == "POST") {
%>
and here is some filler text ...
-</BODY>
-</HTML>
+
+<% page_footer(); %>
diff --git a/swat/esptest/formtest.esp b/swat/esptest/formtest.esp
index 7996900eb2..89e542c552 100644
--- a/swat/esptest/formtest.esp
+++ b/swat/esptest/formtest.esp
@@ -1,9 +1,4 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-<h1>Samba4 form test</h1>
+<% page_header("columns", "ESP Form Test"); %>
<form name="FormTest" method="POST" action="@@request['SCRIPT_NAME']">
firstName: <input name="firstName" type="text" value=""><br>
@@ -20,7 +15,7 @@ Samba4 ESP test
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
%>
You chose firstName=@@form['firstName'] lastName=@@form['lastName']
@@ -37,5 +32,4 @@ Samba4 ESP test
}
%>
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/include.esp b/swat/esptest/include.esp
index 9b67a768da..f7fd5e0b91 100644
--- a/swat/esptest/include.esp
+++ b/swat/esptest/include.esp
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP Include Test"); %>
+
including /scripting/test.ejs<p>
<% include("/scripting/test.ejs"); %>
calling a function from test.ejs ...<p>
@@ -14,9 +11,8 @@ calling a function from test.esp ...<p>
<% res = testfn('foo'); %>
result is: @@res
-<form name="Cancel" method="POST" action="index.esp">
+<form name="Cancel" method="POST" action="/">
<input name="submit" type="submit" value="Cancel"><br>
</form>
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/index.esp b/swat/esptest/index.esp
deleted file mode 100644
index 40f6cbc38b..0000000000
--- a/swat/esptest/index.esp
+++ /dev/null
@@ -1,32 +0,0 @@
-<%
- var tests = new Array("formtest", "showvars", "include",
- "session", "loadparm", "exception",
- "ldb", "auth");
-%>
-
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-<img src="/images/logo.png" alt="Samba">
-<h1>Samba4 ESP test</h1>
-
-Please choose one of the following tests:
-<ul>
-<%
- for (test in tests) {
- url = tests[test] + ".esp";
- write("<li> <a href=" + url + ">" + tests[test] + "</a>");
- }
-%>
-</ul>
-
-For more information on ejs see <a
-href="http://www.appwebserver.org/products/ejs/ejs.html">http://www.appwebserver.org/products/ejs/ejs.html</a><p>
-
-For more information on esp see <a
-href="http://www.appwebserver.org/products/esp/esp.html">http://www.appwebserver.org/products/esp/esp.html</a><p>
-
-</BODY>
-</HTML>
diff --git a/swat/esptest/index.html b/swat/esptest/index.html
deleted file mode 100644
index 0c64b4ffcf..0000000000
--- a/swat/esptest/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<%
- var tests = new Array("formtest", "showvars", "include");
-%>
-
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-<img src="/images/logo.png" alt="Samba">
-<h1>Samba4 ESP test</h1>
-
-Please choose one of the following tests:
-<ul>
-<%
- for (test in tests) {
- url = tests[test] + ".html";
- write("<li> <a href=" + url + ">" + tests[test] + "</a>");
- }
-%>
-</ul>
-</BODY>
-</HTML>
diff --git a/swat/esptest/ldb.esp b/swat/esptest/ldb.esp
index 3285574bf2..1bc75bce73 100644
--- a/swat/esptest/ldb.esp
+++ b/swat/esptest/ldb.esp
@@ -1,19 +1,16 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP ldb test"); %>
+
<h1>Samba4 ldb test</h1>
-<form name="LdbTest" method="POST" action="@@request['SCRIPT_NAME']">
- <input name="submit" type="submit" value="Cancel"><br>
+<form name="LdbTest" method="post" action="@@request['SCRIPT_NAME']">
+ <input name="submit" type="submit" value="Cancel" /><br />
</form>
<%
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
}
@@ -27,10 +24,10 @@ function showLdbRes(res) {
var a = r[j];
if (typeof(a) == "object") {
for (k in a) {
- write(j + "[" + k + "]=" + a[k] + "<br>\n");
+ write(j + "[" + k + "]=" + a[k] + "<br />\n");
}
} else {
- write(j + "=" + r[j] + "<br>\n");
+ write(j + "=" + r[j] + "<br />\n");
}
}
write("<p>");
@@ -43,7 +40,7 @@ Trying a attribute constrained search on samdb:<p>
<%
var dbfile = lpGet("sam database");
-var attrs = new Array("name", "dnsDomain", "objectSid");
+var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
res = ldbSearch(dbfile, "(objectClass=domain)", attrs);
showLdbRes(res);
@@ -54,10 +51,16 @@ and now an unconstrained search:<p>
<%
var dbfile = lpGet("sam database");
-res = ldbSearch(dbfile, "(objectClass=domain)");
+res = ldbSearch(dbfile, "(objectClass=user)");
showLdbRes(res);
%>
+and a bad search<br>
+
+<%
+res = ldbSearch("foo");
+%>
+
+all done
-</BODY>
-</HTML>
+<% page_footer() %>
diff --git a/swat/esptest/loadparm.esp b/swat/esptest/loadparm.esp
index b9f2c54ec5..0ed69d939a 100644
--- a/swat/esptest/loadparm.esp
+++ b/swat/esptest/loadparm.esp
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP loadparm test"); %>
+
<h1>Samba4 loadparm test</h1>
<form name="LoadparmTest" method="POST" action="@@request['SCRIPT_NAME']">
@@ -37,7 +34,7 @@ function showValue(name, v) {
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
var v;
@@ -73,5 +70,4 @@ showParameter("server signing");
showParameter("interfaces");
%>
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/menu.js b/swat/esptest/menu.js
new file mode 100644
index 0000000000..3b16824fad
--- /dev/null
+++ b/swat/esptest/menu.js
@@ -0,0 +1,11 @@
+/* show a menu for the esp test pages */
+simple_menu(
+ "ESP Tests",
+ "ldb database", "/esptest/ldb.esp",
+ "html forms", "/esptest/formtest.esp",
+ "esp includes", "/esptest/include.esp",
+ "session variables", "/esptest/session.esp",
+ "loadparm access", "/esptest/loadparm.esp",
+ "exception handling", "/esptest/exception.esp",
+ );
+
diff --git a/swat/esptest/session.esp b/swat/esptest/session.esp
index e1d6a6370d..3d787012c6 100644
--- a/swat/esptest/session.esp
+++ b/swat/esptest/session.esp
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP session test"); %>
+
<h1>Samba4 session test</h1>
<form name="SessionTest" method="POST" action="@@request['SCRIPT_NAME']">
@@ -22,7 +19,7 @@ Samba4 ESP test
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
name = form['Name'];
@@ -61,5 +58,4 @@ showArray("session", session);
write("SessionId=" + request['SESSION_ID'] + "<br>\n");
%>
-</BODY>
-</HTML>
+<% page_footer(); %>
diff --git a/swat/esptest/showvars.esp b/swat/esptest/showvars.esp
index 04bfb7b1f6..262a0962b7 100644
--- a/swat/esptest/showvars.esp
+++ b/swat/esptest/showvars.esp
@@ -1,8 +1,5 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP standard variables test"); %>
+
<h1>Samba4 showvars test</h1>
<%
@@ -26,10 +23,10 @@ Samba4 ESP test
showArray("session", session);
%>
-<form name="Cancel" method="POST" action="index.esp">
+<form name="Cancel" method="POST" action="/">
<input name="submit" type="submit" value="Cancel"><br>
</form>
</ul>
-</BODY>
-</HTML>
+
+<% page_footer(); %>
diff --git a/swat/images/linkpad.gif b/swat/images/linkpad.gif
new file mode 100755
index 0000000000..613b4f55ef
--- /dev/null
+++ b/swat/images/linkpad.gif
Binary files differ
diff --git a/swat/index.esp b/swat/index.esp
index 373bd9f74e..325deeddae 100644
--- a/swat/index.esp
+++ b/swat/index.esp
@@ -1,20 +1,7 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
-redirecting you to the test pages ...
-<%
-if (server['SERVER_PROTOCOL'] == "http" &&
- server['TLS_SUPPORT'] == "True") {
- if (headers['HOST']) {
- redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
- } else {
- redirect("https://" + server['SERVER_NAME'] + ":" + server['SERVER_PORT'] + request['REQUEST_URI']);
- }
-} else {
- redirect("esptest/index.esp");
-}
-%>
-</BODY>
-</HTML>
+<% page_header("columns", "Welcome to SWAT"); %>
+
+<h1>Welcome to SWAT!</h1>
+
+Please select a menu item from the selection on the left
+
+<% page_footer(); %>
diff --git a/swat/login.esp b/swat/login.esp
new file mode 100644
index 0000000000..1dfc1142e6
--- /dev/null
+++ b/swat/login.esp
@@ -0,0 +1,29 @@
+<% page_header("plain", "SWAT Login"); %>
+
+<form name="login" method="POST" action="@@request.SCRIPT_NAME">
+ Username: <input name="Username" type="text" value=""><br>
+ Password: <input name="Password" type="password" value=""><br>
+ <br>
+ <input name="submit" type="submit" value="Login"><br>
+</form>
+
+<%
+ if (request.REQUEST_METHOD == "POST") {
+ /* for now just authenticate everyone */
+ session.AUTHENTICATED = true;
+ session.authinfo = new Object();
+
+ session.authinfo.username = form.Username;
+
+ /* if the user was asking for the login page, then now
+ redirect them to the main page. Otherwise just
+ redirect them to the current page, which will now
+ show its true content */
+ if (request.REQUEST_URI == "/login.esp") {
+ redirect("/");
+ } else {
+ redirect(request.REQUEST_URI);
+ }
+ }
+%>
+<% page_footer(); %>
diff --git a/swat/logout.esp b/swat/logout.esp
new file mode 100644
index 0000000000..b725d63a64
--- /dev/null
+++ b/swat/logout.esp
@@ -0,0 +1,8 @@
+<%
+page_header("plain", "Logging out");
+
+session.AUTHENTICATED = false;
+redirect("/login.esp");
+
+page_footer();
+%>
diff --git a/swat/scripting/common.js b/swat/scripting/common.js
new file mode 100644
index 0000000000..0691512fb2
--- /dev/null
+++ b/swat/scripting/common.js
@@ -0,0 +1,56 @@
+/*
+ js functions and code common to all pages
+*/
+
+/* define some global variables for this request */
+global.page = new Object();
+
+/* fill in some defaults */
+global.page.title = "Samba Web Administration Tool";
+
+/*
+ show the page header. page types include "plain" and "column"
+*/
+function page_header(pagetype, title) {
+ global.page.pagetype = pagetype;
+ global.page.title = title;
+ include("/scripting/header_" + pagetype + ".esp");
+}
+
+/*
+ show the page footer, getting the page type from page.pagetype
+ set in page_header()
+*/
+function page_footer() {
+ include("/scripting/footer_" + global.page.pagetype + ".esp");
+}
+
+/*
+ check if a uri is one of the 'always allowed' pages, even when not logged in
+ This allows the login page to use the same style sheets and images
+*/
+function always_allowed(uri) {
+ var allowed = new Array("/images/favicon.ico",
+ "/images/linkpad.gif",
+ "/images/logo.png",
+ "/style/main.css",
+ "/style/common.css");
+ for (i in allowed) {
+ if (allowed[i] == uri) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/*
+ display a simple menu. First argument is menu title, followed by
+ pairs of menu item name and link
+*/
+function simple_menu() {
+ write("<i>" + arguments[0] + "</i><br /><ul>\n");
+ for (i = 1; i < arguments.length; i = i + 2) {
+ write("<li><a href=\"" + arguments[i+1] + "\">" + arguments[i] + "</a></li>\n");
+ }
+ write("</ul>\n");
+}
diff --git a/swat/scripting/footer.esp b/swat/scripting/footer.esp
new file mode 100644
index 0000000000..5f85cabb08
--- /dev/null
+++ b/swat/scripting/footer.esp
@@ -0,0 +1 @@
+</html>
diff --git a/swat/scripting/footer_columns.esp b/swat/scripting/footer_columns.esp
new file mode 100644
index 0000000000..29b06a4caa
--- /dev/null
+++ b/swat/scripting/footer_columns.esp
@@ -0,0 +1,7 @@
+<%
+ /* footer for columns page type */
+%>
+</div>
+</div>
+</body>
+<% include("/scripting/footer.esp"); %>
diff --git a/swat/scripting/footer_plain.esp b/swat/scripting/footer_plain.esp
new file mode 100644
index 0000000000..ea0a3f7816
--- /dev/null
+++ b/swat/scripting/footer_plain.esp
@@ -0,0 +1,7 @@
+<%
+ /* footer for plain page type */
+%>
+</div>
+</div>
+</body>
+<% include("/scripting/footer.esp"); %>
diff --git a/swat/scripting/header.esp b/swat/scripting/header.esp
new file mode 100644
index 0000000000..1630b2be04
--- /dev/null
+++ b/swat/scripting/header.esp
@@ -0,0 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
diff --git a/swat/scripting/header_columns.esp b/swat/scripting/header_columns.esp
new file mode 100644
index 0000000000..6122124b05
--- /dev/null
+++ b/swat/scripting/header_columns.esp
@@ -0,0 +1,68 @@
+<% include("/scripting/header.esp"); %>
+
+<title>@@global.page.title</title>
+
+<link rel="stylesheet" href="/style/common.css" type="text/css" media="all" />
+<link rel="stylesheet" href="/style/main.css" type="text/css" media="all" />
+<link rel="shortcut icon" href="/images/favicon.ico" />
+
+<!--[if gte IE 5.5]>
+ <style type="text/css">
+ /*<![CDATA[*/
+ .logo_hack {
+filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/logo.png',sizingMethod='scale');
+ }
+ /*]]>*/
+ </style>
+<![endif]-->
+
+<!--[if lte IE 5]>
+ <style type="text/css">
+ /*<![CDATA[*/
+ .logo_hack {
+ background-image:url(/images/logo.gif);
+ background-position:center;
+ background-repeat:no-repeat;
+ top:23.5px;
+ left:-10px;
+ }
+ /*]]>*/
+ </style>
+<![endif]-->
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="Content-Language" content="en-us" />
+
+</head>
+
+
+<body>
+
+<div id="banner">
+ <div class="stripe"></div>
+ <div class="logout">
+ <b>logged in as @@session.authinfo.username</b>
+ <form method="post" action="/logout.esp">
+ <input type="submit" value="Logout" />
+ </form>
+ </div>
+</div>
+
+<div id="logo">
+ <div class="logo_hack"><a href="/"><img src="/images/linkpad.gif" alt="SWAT" /></a></div>
+</div>
+
+<div class="slogan">
+ <h4>Samba Web Administration Tool</h4>
+</div>
+
+<div class="nav">
+ <%
+ include("/docs/menu.js");
+ include("/esptest/menu.js");
+ %>
+</div>
+
+
+<div id="content">
+ <div class="center">
diff --git a/swat/scripting/header_plain.esp b/swat/scripting/header_plain.esp
new file mode 100644
index 0000000000..69bd0cd718
--- /dev/null
+++ b/swat/scripting/header_plain.esp
@@ -0,0 +1,51 @@
+<% include("/scripting/header.esp"); %>
+
+<title>@@global.page.title</title>
+
+<link rel="stylesheet" href="/style/common.css" type="text/css" media="all" />
+<link rel="stylesheet" href="/style/main.css" type="text/css" media="all" />
+<link rel="shortcut icon" href="/images/favicon.ico" />
+
+<!--[if gte IE 5.5]>
+ <style type="text/css">
+ /*<![CDATA[*/
+ .logo_hack {
+filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/logo.png',sizingMethod='scale');
+ }
+ /*]]>*/
+ </style>
+<![endif]-->
+
+<!--[if lte IE 5]>
+ <style type="text/css">
+ /*<![CDATA[*/
+ .logo_hack {
+ background-image:url(/images/logo.gif);
+ background-position:center;
+ background-repeat:no-repeat;
+ top:23.5px;
+ left:-10px;
+ }
+ /*]]>*/
+ </style>
+<![endif]-->
+
+</head>
+
+
+<body>
+
+<div id="banner">
+ <div class="stripe"></div>
+</div>
+
+<div id="logo">
+ <div class="logo_hack"><a href="/"><img src="/images/linkpad.gif" alt="SWAT" /></a></div>
+</div>
+
+<div class="slogan">
+ <h4>Samba Web Administration Tool</h4>
+</div>
+
+<div id="content">
+ <div class="center">
diff --git a/swat/scripting/preauth.esp b/swat/scripting/preauth.esp
new file mode 100644
index 0000000000..489f6b5004
--- /dev/null
+++ b/swat/scripting/preauth.esp
@@ -0,0 +1,17 @@
+<%
+include("/scripting/common.js");
+
+/* this script is called on every web request. If it produces any
+ output at all then that output is returned and the requested page
+ is not given or processed.
+*/
+if (server['SERVER_PROTOCOL'] == "http" &&
+ server['TLS_SUPPORT'] == "True") {
+ write("redirect to https");
+ redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
+} else if (always_allowed(request['REQUEST_URI']) != true &&
+ session['AUTHENTICATED'] == undefined) {
+ /* present the login page */
+ include("/login.esp");
+}
+%>
diff --git a/swat/style/common.css b/swat/style/common.css
new file mode 100644
index 0000000000..58406ccc40
--- /dev/null
+++ b/swat/style/common.css
@@ -0,0 +1,185 @@
+/* common.css */
+
+ /********* Basic elements across the site **********/
+ /***************************************************/
+
+body {
+ margin:0;
+ background-color:#E5E9F5;
+ font-family:Lucidasans, Helvetica, Verdana, sans-serif;
+ font-size:medium;
+ color:#000;
+}
+h1 {
+ font-size:x-large;
+}
+h2 {
+ text-align:left;
+ color:#FFFF64;
+ font-size:large;
+ background-color:#3878CD;
+ margin-top:60px;
+ margin-bottom:15px;
+ padding:2px;
+ padding-left:5px;
+}
+h3 {
+ font-size:medium;
+}
+h5 {
+ font-size:small;
+ text-align:right;
+ display:inline;
+}
+* html h5 {
+ padding-right:4px;
+}
+h6 {
+ font-size:small;
+ text-align:right;
+ text-align:right;
+}
+h6 a {
+ margin-right:3px;
+}
+table.real thead {
+ background-color: #E5E9F5;
+}
+table.real th,
+table.real td {
+ border: 1px solid #3878CD;
+ padding: 2px;
+}
+table.real {
+ border: 2px solid #3878CD;
+ background-color: #F5F8FF;
+}
+a:link:hover {
+ color:#CC0033;
+ background-color:#FFFF64;
+}
+ol li {
+ margin-bottom:12px;
+}
+blockquote {
+ margin:35px;
+ padding:15px;
+ border-left:2px groove #CCC;
+ border-top:2px groove #CCC;
+}
+img {
+ border:0;
+}
+.punch { /*creates a bold typeface */
+ font-weight:bold;
+}
+
+ /********************* header styles *******************************/
+ /******************************************************************/
+#banner {
+ position:absolute;
+ top:0;
+ left:0;
+ height:90px;
+ width:100%;
+ padding-top:4px;
+ background-color:#FFFF64;
+}
+.logout {
+ text-align:right;
+
+}
+.logout form {
+ display:inline;
+}
+.stripe {
+ position:absolute;
+ top:40px;
+ left:0;
+ height:55px;
+ width:100%;
+ background-color:#3878CD;
+ border-top:2px solid #575756;
+ border-bottom:2px solid #575756;
+}
+.slogan {
+ position:absolute;
+ left:187px;
+ z-index:1;
+}
+html>body .slogan { /**** Opera needs its own rule *********/
+ top:100px;
+}
+:root .slogan { /**** Undo the Opera rule for all other browsers ****/
+ top:80px;
+}
+* html .slogan { /** Then, give IE 5/6 its own rule ****** */
+ top:100px;
+}
+
+ /******** PNG logo with transparency across browsers */
+ /******************************************************/
+#logo>.logo_hack {
+ background-image:url(/images/logo.png);
+ background-position:center;
+ background-repeat:no-repeat;
+}
+.logo_hack {
+ position:absolute;
+ top:25px;
+ left:0;
+ width:250px;
+ height:119px;
+ padding:0;
+ margin:0;
+}
+.logo_hack a:hover {
+ background:transparent;
+}
+
+ /******** Main nav menu styles ****************/
+ /**********************************************/
+.nav {
+ position:absolute;
+ top:152px;
+ left:20px;
+ width:180px;
+ background-color:#F5F8FF;
+ border:2px groove #3878CD;
+ padding:0;
+ padding-bottom:5px;
+ margin:0;
+ z-index:1;
+}
+.nav ul {
+ list-style-type:none;
+ text-align:center;
+ padding:0;
+ margin:0;
+}
+.nav a,
+.nav a:link,
+.nav a:visited {
+ display:block;
+ height:20px;
+ font-size:small;
+ color:#2B5C9F;
+}
+.nav a:hover {
+ color:#FFF;
+ background-color:#3878CD;
+}
+.nav a:active {
+ color:#FFFF64;
+ background-color:#3878CD;
+ font-size:14px;
+}
+.nav img {
+ padding:0;
+ margin:0;
+ width:180px;
+ height:30px;
+}
+.colophon {
+ margin-left:20px;
+}
diff --git a/swat/style/main.css b/swat/style/main.css
new file mode 100644
index 0000000000..15f768d186
--- /dev/null
+++ b/swat/style/main.css
@@ -0,0 +1,107 @@
+/* main.css */
+
+ /******* Links for right-hand side of the page ******/
+ /****************************************************/
+#links {
+ float:right;
+ margin:115px 1em 0 0;
+ padding:0;
+ width:173px;
+}
+* html #links { /* Applies to IE5/6 only */
+ margin:115px .5% 0 0;
+}
+#links h4 {
+ margin-top:10px;
+ margin-left:1.5px;
+ font-size:small;
+}
+#links ul {
+ list-style-type:none;
+ padding:0;
+ padding-top:5px;
+ margin-left:20px;
+}
+#links a {
+ font-size:small;
+}
+#links p {
+ margin-top:25px;
+ margin-left:20px;
+}
+.releases {
+ padding:2px;
+ margin-top:35px;
+ border:1px solid #CCC;
+ background-color:#E5E9F5;
+}
+.beyond, .related, .intl {
+ padding:2px;
+ margin-top:25px;
+ border:1px solid #CCC;
+ background-color:#E5E9F5;
+}
+.beyond li {
+ margin-bottom:10px;
+}
+.contacts li{
+ list-style-type:disc;
+}
+ /****** Formats the page layout ********************/
+ /**************************************************/
+#content>.center {
+ min-height:800px;
+ z-index:0;
+}
+.center {
+ margin:0 22% 0 175px;
+ padding-top:130px;
+ padding-left:35px;
+ padding-bottom:50px;
+ padding-right:15px;
+ background-color:#FFF;
+ border-left:1px solid #FFFF64;
+ border-right:1px solid #FFFF64;
+ z-index:-1;
+}
+.center ul {
+ list-style-type:none;
+}
+.headline {
+ margin-left:20px;
+ font-style:italic;
+}
+ /*********T-shirts and mirror footnotes *************/
+ /****************************************************/
+.plugs {
+ font-style:italic;
+ text-align:center;
+ border-top:2px groove #3878CD;
+ border-bottom:2px groove #3878CD;
+ padding:10px;
+ margin-top:100px;
+}
+.plugs p {
+ padding:30px;
+}
+.plugs img {
+ float:left;
+}
+.request {
+ margin-top:50px;
+ font-style:italic;
+ font-size:small;
+}
+#noswp img {
+ border:1px solid #3868CD;
+ width:370px;
+ height:90px;
+}
+#noswp a:hover {
+ background-color:transparent;
+}
+#noswp {
+ width:auto;
+ text-align:center;
+ margin:10px 0 25px 0;
+}