2004-06-09 19:09:16 +00:00
|
|
|
<?php
|
2003-08-19 06:45:36 +00:00
|
|
|
|
2006-04-14 22:25:55 +00:00
|
|
|
function search_form() {
|
|
|
|
echo "<form method=get action=http://google.com/search>
|
|
|
|
<input type=hidden name=domains value=http://boinc.berkeley.edu>
|
|
|
|
<input type=hidden name=sitesearch value=http://boinc.berkeley.edu>
|
|
|
|
<nobr>
|
|
|
|
<input class=small name=q size=30>
|
|
|
|
<input type=image name=submit src=images/search.gif alt=Search>
|
|
|
|
</nobr>
|
|
|
|
</form>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2005-03-23 06:26:19 +00:00
|
|
|
$light_blue="#d8e8ff";
|
|
|
|
$med_blue="#c0d0f0";
|
|
|
|
|
2006-02-16 21:35:34 +00:00
|
|
|
function last_mod($datefile) {
|
|
|
|
return gmdate("g:i A \U\T\C, F d Y", filemtime($datefile));
|
2003-08-19 06:45:36 +00:00
|
|
|
}
|
|
|
|
|
2006-04-14 22:25:55 +00:00
|
|
|
function page_head($title) {
|
2007-02-05 03:37:17 +00:00
|
|
|
global $book;
|
|
|
|
global $chap_num;
|
|
|
|
if ($book) {
|
|
|
|
echo "<br><h2>$chap_num. $title</h2>\n";
|
|
|
|
return;
|
|
|
|
}
|
2006-07-28 03:30:09 +00:00
|
|
|
if (defined("CHARSET")) {
|
|
|
|
header("Content-type: text/html; charset=".tr(CHARSET));
|
|
|
|
}
|
|
|
|
|
2006-10-18 21:53:22 +00:00
|
|
|
echo "
|
|
|
|
<html>
|
2003-09-23 23:19:41 +00:00
|
|
|
<head>
|
2005-05-31 21:59:29 +00:00
|
|
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"white.css\"/>
|
|
|
|
<link rel=\"shortcut icon\" href=\"iconsmall.ico\"/>
|
2003-08-19 06:45:36 +00:00
|
|
|
<title>$title</title>
|
2003-09-23 23:19:41 +00:00
|
|
|
</head>
|
2004-12-26 00:19:02 +00:00
|
|
|
<body bgcolor='ffffff'>
|
|
|
|
<table width='100%'>
|
2003-08-19 06:45:36 +00:00
|
|
|
<tr>
|
|
|
|
<td><center><h1>$title</h1></center>
|
2005-10-23 07:19:03 +00:00
|
|
|
<td align=right><a href=index.php><img src=logo/logo_small.png></a>
|
2006-04-14 22:25:55 +00:00
|
|
|
<br>
|
|
|
|
";
|
|
|
|
search_form();
|
|
|
|
echo "
|
2003-08-19 06:45:36 +00:00
|
|
|
</td>
|
|
|
|
</tr></table>
|
2005-03-29 23:13:28 +00:00
|
|
|
<hr size=1>
|
2003-08-19 06:45:36 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2005-05-10 17:04:13 +00:00
|
|
|
function copyright() {
|
2005-05-10 17:16:40 +00:00
|
|
|
$y = date("Y ");
|
2005-05-10 17:04:13 +00:00
|
|
|
echo "
|
2005-05-10 17:16:40 +00:00
|
|
|
Copyright © $y University of California.
|
|
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
|
|
under the terms of the GNU Free Documentation License,
|
2006-04-14 22:25:55 +00:00
|
|
|
Version 1.2 or any later version published by the Free Software Foundation.
|
2005-05-10 17:04:13 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2007-02-16 05:04:08 +00:00
|
|
|
function page_tail($translatable=false, $is_main=false) {
|
2007-02-05 03:37:17 +00:00
|
|
|
global $book;
|
|
|
|
if ($book) {
|
|
|
|
return;
|
|
|
|
}
|
2006-04-14 22:25:55 +00:00
|
|
|
$datefile = $_SERVER["SCRIPT_FILENAME"];
|
|
|
|
$d = last_mod($datefile);
|
2003-08-19 06:45:36 +00:00
|
|
|
echo "
|
2005-03-29 23:13:28 +00:00
|
|
|
<hr size=1>
|
2007-02-16 05:04:08 +00:00
|
|
|
";
|
|
|
|
if (!$is_main) {
|
|
|
|
echo "
|
|
|
|
<center>
|
|
|
|
<a href=\"/\">Return to BOINC main page</a>
|
|
|
|
</center><p>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "
|
|
|
|
<font color=888888 size='2'>
|
2006-08-08 20:32:37 +00:00
|
|
|
";
|
|
|
|
if ($translatable) {
|
|
|
|
echo "
|
|
|
|
This page is <a href=translation.php>translatable</a>.<br>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "
|
2007-02-16 05:04:08 +00:00
|
|
|
Last modified $d.<br>
|
2005-05-10 17:04:13 +00:00
|
|
|
";
|
|
|
|
copyright();
|
|
|
|
echo "
|
2006-04-14 22:25:55 +00:00
|
|
|
</font>
|
2004-12-26 00:14:51 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
2003-08-19 06:45:36 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2004-09-05 18:46:19 +00:00
|
|
|
function html_text($x) {
|
2006-07-17 16:38:53 +00:00
|
|
|
return "<div bgcolor=$light_blue><pre>".htmlspecialchars($x)."</pre></div>
|
2004-09-05 18:46:19 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
function list_start($attrs = 'width=100%') {
|
2006-12-04 17:10:39 +00:00
|
|
|
echo "<p><table $attrs border=0 cellpadding=6>\n";
|
2003-08-19 06:45:36 +00:00
|
|
|
}
|
|
|
|
|
2004-02-09 05:11:05 +00:00
|
|
|
function list_heading($x, $y, $z=null) {
|
|
|
|
echo "
|
|
|
|
<tr>
|
2004-02-12 01:13:47 +00:00
|
|
|
<th valign=top><b>$x</b></th>
|
|
|
|
<th valign=top>$y</th>
|
2004-02-09 05:11:05 +00:00
|
|
|
";
|
|
|
|
if ($z) {
|
2004-02-12 01:13:47 +00:00
|
|
|
echo " <th valign=top>$z</th>\n";
|
2004-02-09 05:11:05 +00:00
|
|
|
}
|
2005-03-05 23:12:31 +00:00
|
|
|
echo " </tr>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
function list_heading_array($x) {
|
|
|
|
echo "<tr>";
|
|
|
|
foreach ($x as $h) {
|
|
|
|
echo "<th>$h</th>";
|
|
|
|
}
|
|
|
|
echo "</tr>\n";
|
2004-02-09 05:11:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function list_item($x, $y, $z=null) {
|
2005-03-23 06:26:19 +00:00
|
|
|
global $light_blue;
|
2006-12-04 17:10:39 +00:00
|
|
|
if (!$x) $x = "<br>";
|
2003-08-19 06:45:36 +00:00
|
|
|
echo "
|
|
|
|
<tr>
|
2005-03-23 06:26:19 +00:00
|
|
|
<td bgcolor=$light_blue valign=top><b>$x</b></td>
|
2003-08-19 06:45:36 +00:00
|
|
|
<td valign=top>$y</td>
|
2004-02-09 05:11:05 +00:00
|
|
|
";
|
|
|
|
if ($z) {
|
|
|
|
echo " <td valign=top>$z</a>\n";
|
|
|
|
}
|
|
|
|
echo " </tr>\n";
|
2003-08-19 06:45:36 +00:00
|
|
|
}
|
|
|
|
|
2005-03-05 23:12:31 +00:00
|
|
|
function list_item_array($x) {
|
|
|
|
echo "<tr>";
|
|
|
|
foreach ($x as $h) {
|
2005-04-11 19:29:36 +00:00
|
|
|
echo "<td valign=top>$h<br></td>";
|
2005-03-05 23:12:31 +00:00
|
|
|
}
|
|
|
|
echo "</tr>\n";
|
|
|
|
}
|
|
|
|
|
2004-09-05 18:46:19 +00:00
|
|
|
function list_item_func($x, $y) {
|
|
|
|
list_item(html_text($x), $y);
|
|
|
|
}
|
|
|
|
|
2004-10-01 22:00:39 +00:00
|
|
|
function list_bar($x) {
|
2005-03-23 06:26:19 +00:00
|
|
|
global $med_blue;
|
2004-10-01 22:00:39 +00:00
|
|
|
echo "
|
2005-03-23 06:26:19 +00:00
|
|
|
<tr><td colspan=8 bgcolor=$med_blue><center><b>$x</b></center></td></tr>
|
2004-10-01 22:00:39 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2003-08-19 06:45:36 +00:00
|
|
|
function list_end() {
|
|
|
|
echo "</table><p>\n";
|
|
|
|
}
|
|
|
|
|
2005-10-23 07:19:03 +00:00
|
|
|
function error_page($x) {
|
|
|
|
page_head("Error");
|
|
|
|
echo $x;
|
|
|
|
page_tail();
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2006-06-03 16:16:13 +00:00
|
|
|
function block_start() {
|
|
|
|
global $light_blue;
|
|
|
|
echo "
|
2006-07-17 16:38:53 +00:00
|
|
|
<table width=100% cellpadding=4>
|
|
|
|
<tr>
|
|
|
|
<td bgcolor=$light_blue width=100%><pre>";
|
2006-06-03 16:16:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function block_end() {
|
2006-07-17 16:38:53 +00:00
|
|
|
echo "</pre></td></tr></table>
|
|
|
|
";
|
2006-06-03 16:16:13 +00:00
|
|
|
}
|
|
|
|
|
2006-07-22 18:24:01 +00:00
|
|
|
function get_str($name) {
|
|
|
|
if (isset($_GET[$name])) {
|
|
|
|
$x = $_GET[$name];
|
|
|
|
$x = trim($x);
|
|
|
|
return mysql_real_escape_string($x);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2006-11-08 00:35:25 +00:00
|
|
|
function show_link($url) {
|
|
|
|
echo "<br><a href=$url>$url</a>";
|
|
|
|
}
|
|
|
|
|
2003-08-19 06:45:36 +00:00
|
|
|
?>
|