2004-06-09 19:09:16 +00:00
|
|
|
<?php
|
2003-08-19 06:45:36 +00:00
|
|
|
|
2009-12-18 04:32:30 +00:00
|
|
|
require_once("../inc/util_basic.inc");
|
2010-01-09 16:41:17 +00:00
|
|
|
require_once("../inc/translation.inc");
|
2009-12-18 04:32:30 +00:00
|
|
|
|
2008-03-04 23:50:38 +00:00
|
|
|
if (0) {
|
|
|
|
$x = $_SERVER['PHP_SELF'];
|
|
|
|
$path = "/tmp/php_pids/".getmypid();
|
|
|
|
$f = fopen($path, "w");
|
|
|
|
fwrite($f, $x);
|
|
|
|
fclose($f);
|
|
|
|
}
|
2007-11-07 17:23:29 +00:00
|
|
|
|
2006-04-14 22:25:55 +00:00
|
|
|
function search_form() {
|
2007-07-10 17:49:51 +00:00
|
|
|
echo "
|
2008-08-15 16:26:55 +00:00
|
|
|
<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\">
|
|
|
|
<span class=\"nobar\">
|
2007-07-10 17:49:51 +00:00
|
|
|
<input class=small name=q size=20>
|
2010-01-09 16:41:17 +00:00
|
|
|
<input class=small type=submit value=".tra("Search").">
|
2008-08-15 16:26:55 +00:00
|
|
|
</span>
|
2006-04-14 22:25:55 +00:00
|
|
|
</form>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2007-02-21 16:26:51 +00:00
|
|
|
function html_tag() {
|
|
|
|
global $language_in_use;
|
2008-08-16 20:59:53 +00:00
|
|
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
|
|
|
";
|
|
|
|
|
|
|
|
// if language is arabic, go right to left
|
|
|
|
//
|
2007-02-21 16:26:51 +00:00
|
|
|
if ($language_in_use == 'ar') {
|
|
|
|
echo "<html dir=\"rtl\">";
|
|
|
|
} else {
|
|
|
|
echo "<html>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-12-27 05:26:34 +00:00
|
|
|
function page_head($title, $extra="") {
|
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));
|
|
|
|
}
|
|
|
|
|
2007-02-21 16:26:51 +00:00
|
|
|
html_tag();
|
2006-10-18 21:53:22 +00:00
|
|
|
echo "
|
2003-09-23 23:19:41 +00:00
|
|
|
<head>
|
2008-08-16 20:59:53 +00:00
|
|
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"white.css\">
|
|
|
|
<link rel=\"shortcut icon\" href=\"logo/favicon.gif\">
|
2003-08-19 06:45:36 +00:00
|
|
|
<title>$title</title>
|
2012-12-27 05:26:34 +00:00
|
|
|
$extra
|
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>
|
2008-08-16 20:59:53 +00:00
|
|
|
<td align=right><a href=index.php><img src=\"logo/www_logo.gif\" alt=\"BOINC logo\"></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
|
2010-04-26 02:34:58 +00:00
|
|
|
under the terms of the
|
|
|
|
<a href=http://www.gnu.org/copyleft/fdl.html>GNU Free Documentation License</a>,
|
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>
|
2010-01-11 20:52:55 +00:00
|
|
|
<a href=\"/\">".tra("Return to BOINC main page")."</a>
|
2007-02-16 05:04:08 +00:00
|
|
|
</center><p>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "
|
2009-05-11 19:38:53 +00:00
|
|
|
<span class=note>
|
|
|
|
<font color=#888888>
|
2006-08-08 20:32:37 +00:00
|
|
|
";
|
|
|
|
if ($translatable) {
|
2010-01-11 20:52:55 +00:00
|
|
|
echo
|
|
|
|
sprintf(
|
|
|
|
tra("This page is %stranslatable%s."),
|
|
|
|
"<a href=\"trac/wiki/TranslateIntro\">",
|
|
|
|
"</a>"
|
|
|
|
),
|
|
|
|
"<br>
|
2006-08-08 20:32:37 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
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>
|
2009-05-11 19:38:53 +00:00
|
|
|
</span>
|
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) {
|
2007-07-26 21:50:45 +00:00
|
|
|
return "<pre>".htmlspecialchars($x)."</pre>
|
2004-09-05 18:46:19 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2008-08-15 16:26:55 +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) {
|
2010-03-04 21:23:30 +00:00
|
|
|
echo "<th>$h</th>";
|
2005-03-05 23:12:31 +00:00
|
|
|
}
|
|
|
|
echo "</tr>\n";
|
2004-02-09 05:11:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function list_item($x, $y, $z=null) {
|
2006-12-04 17:10:39 +00:00
|
|
|
if (!$x) $x = "<br>";
|
2003-08-19 06:45:36 +00:00
|
|
|
echo "
|
|
|
|
<tr>
|
2007-07-26 21:50:45 +00:00
|
|
|
<td class=fieldname 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) {
|
2008-12-16 21:33:33 +00:00
|
|
|
echo "<td valign=top>$h</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);
|
|
|
|
}
|
|
|
|
|
2008-01-28 15:48:09 +00:00
|
|
|
function list_bar($x, $note="") {
|
|
|
|
if ($note) {
|
|
|
|
$note = "<br><span class=note>$note</span>";
|
|
|
|
}
|
2004-10-01 22:00:39 +00:00
|
|
|
echo "
|
2008-01-28 15:48:09 +00:00
|
|
|
<tr><td colspan=8 class=heading><center><b>$x</b>$note</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";
|
|
|
|
}
|
|
|
|
|
2009-12-18 04:32:30 +00:00
|
|
|
function boinc_error_page($x) {
|
2005-10-23 07:19:03 +00:00
|
|
|
page_head("Error");
|
|
|
|
echo $x;
|
|
|
|
page_tail();
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2006-06-03 16:16:13 +00:00
|
|
|
function block_start() {
|
|
|
|
echo "
|
2006-07-17 16:38:53 +00:00
|
|
|
<table width=100% cellpadding=4>
|
|
|
|
<tr>
|
2007-07-26 21:50:45 +00:00
|
|
|
<td class=fieldname 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-11-08 00:35:25 +00:00
|
|
|
function show_link($url) {
|
|
|
|
echo "<br><a href=$url>$url</a>";
|
|
|
|
}
|
|
|
|
|
2010-09-27 20:34:47 +00:00
|
|
|
function get_str2($x) {
|
|
|
|
if (array_key_exists($x, $_GET)) {
|
|
|
|
return $_GET[$x];
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2003-08-19 06:45:36 +00:00
|
|
|
?>
|