2002-08-12 20:16:55 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
2016-11-11 20:36:27 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2008-08-05 22:43:14 +00:00
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2002-08-14 00:27:18 +00:00
|
|
|
|
2011-05-27 19:38:18 +00:00
|
|
|
// This is a template for your web site's front page.
|
|
|
|
// You are encouraged to customize this file,
|
2016-11-11 20:36:27 +00:00
|
|
|
// and to create a graphical identity for your web site.
|
|
|
|
// by customizing the header/footer functions in html/project/project.inc
|
|
|
|
// and picking a Bootstrap theme
|
2011-05-27 19:38:18 +00:00
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
require_once("../inc/db.inc");
|
2004-06-11 18:50:15 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/news.inc");
|
|
|
|
require_once("../inc/cache.inc");
|
|
|
|
require_once("../inc/uotd.inc");
|
|
|
|
require_once("../inc/sanitize_html.inc");
|
2006-01-09 08:37:44 +00:00
|
|
|
require_once("../inc/text_transform.inc");
|
2004-06-11 18:50:15 +00:00
|
|
|
require_once("../project/project.inc");
|
2016-11-11 20:36:27 +00:00
|
|
|
require_once("../inc/bootstrap.inc");
|
2002-08-12 20:16:55 +00:00
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
$config = get_config();
|
|
|
|
$master_url = parse_config($config, "<master_url>");
|
|
|
|
$no_computing = parse_config($config, "<no_computing>");
|
|
|
|
$no_web_account_creation = parse_bool($config, "no_web_account_creation");
|
|
|
|
|
|
|
|
$stopped = web_stopped();
|
|
|
|
$user = get_logged_in_user(false);
|
2011-02-09 22:11:34 +00:00
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
// The panel at the top of the page
|
|
|
|
//
|
|
|
|
function panel_contents() {
|
|
|
|
global $no_computing;
|
2011-05-27 19:38:18 +00:00
|
|
|
if ($no_computing) {
|
|
|
|
echo "
|
|
|
|
XXX is a research project that uses volunteers
|
|
|
|
to do research in XXX.
|
|
|
|
";
|
|
|
|
} else {
|
|
|
|
echo "
|
|
|
|
XXX is a research project that uses Internet-connected
|
|
|
|
computers to do research in XXX.
|
|
|
|
You can participate by downloading and running a free program
|
|
|
|
on your computer.
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "
|
2003-12-10 00:54:17 +00:00
|
|
|
<p>
|
2016-11-11 20:36:27 +00:00
|
|
|
XXX is based at
|
2007-05-26 21:15:58 +00:00
|
|
|
[describe your institution, with link to web page]
|
2007-03-22 02:07:08 +00:00
|
|
|
<ul>
|
2007-05-26 21:15:58 +00:00
|
|
|
<li> [Link to page describing your research in detail]
|
|
|
|
<li> [Link to page listing project personnel, and an email address]
|
2007-03-22 02:07:08 +00:00
|
|
|
</ul>
|
|
|
|
<ul>
|
2011-05-27 19:38:18 +00:00
|
|
|
";
|
2016-11-11 20:36:27 +00:00
|
|
|
}
|
2002-12-11 00:12:42 +00:00
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
function top() {
|
|
|
|
global $stopped, $master_url, $user;
|
|
|
|
if ($stopped) {
|
2014-04-18 06:31:51 +00:00
|
|
|
echo "
|
2016-11-11 20:36:27 +00:00
|
|
|
<p class=\"lead text-center\">".PROJECT." is temporarily shut down for maintenance.</p>
|
2014-04-18 06:31:51 +00:00
|
|
|
";
|
|
|
|
}
|
2016-11-11 20:36:27 +00:00
|
|
|
panel(null, 'panel_contents');
|
2004-06-11 18:50:15 +00:00
|
|
|
}
|
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
function left(){
|
|
|
|
global $no_computing, $no_web_account_creation, $master_url;
|
|
|
|
panel(
|
|
|
|
'Join ',
|
|
|
|
function() {
|
|
|
|
global $no_computing, $no_web_account_creation, $master_url;
|
2016-11-12 03:11:57 +00:00
|
|
|
echo "<ul>";
|
2016-11-11 20:36:27 +00:00
|
|
|
if ($no_computing) {
|
|
|
|
echo "
|
|
|
|
<li> <a href=\"create_account_form.php\">Create an account</a>
|
|
|
|
";
|
|
|
|
} else {
|
|
|
|
echo "
|
|
|
|
<li><a href=\"info.php\">".tra("Read our rules and policies")."</a>
|
|
|
|
<li> This project uses BOINC.
|
|
|
|
If you're already running BOINC, select Add Project.
|
|
|
|
If not, <a target=\"_new\" href=\"http://boinc.berkeley.edu/download.php\">download BOINC</a>.
|
|
|
|
<li> When prompted, enter <br><b>".$master_url."</b>
|
|
|
|
";
|
|
|
|
if (!$no_web_account_creation) {
|
|
|
|
echo "
|
|
|
|
<li> If you're running a command-line version of BOINC,
|
|
|
|
<a href=\"create_account_form.php\">create an account</a> first.
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "
|
|
|
|
<li> If you have any problems,
|
|
|
|
<a target=\"_new\" href=\"http://boinc.berkeley.edu/wiki/BOINC_Help\">get help here</a>.
|
|
|
|
";
|
|
|
|
}
|
2016-11-12 03:11:57 +00:00
|
|
|
echo "</ul>\n";
|
2016-11-11 20:36:27 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
global $stopped;
|
|
|
|
if (!$stopped) {
|
|
|
|
$profile = get_current_uotd();
|
|
|
|
if ($profile) {
|
2016-11-12 04:10:12 +00:00
|
|
|
panel('User of the Day',
|
|
|
|
function() use ($profile) {
|
|
|
|
show_uotd($profile);
|
|
|
|
}
|
|
|
|
);
|
2016-11-11 20:36:27 +00:00
|
|
|
}
|
2004-03-20 01:35:37 +00:00
|
|
|
}
|
2016-11-12 04:10:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function right() {
|
|
|
|
panel('News',
|
|
|
|
function() {
|
|
|
|
include("motd.php");
|
|
|
|
show_news(0, 5);
|
|
|
|
}
|
|
|
|
);
|
2003-12-10 00:54:17 +00:00
|
|
|
}
|
2004-06-11 18:50:15 +00:00
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
page_head(null, null, null, "", file_get_contents("schedulers.txt"));
|
|
|
|
|
|
|
|
grid('top', 'left', 'right');
|
2003-02-12 23:06:49 +00:00
|
|
|
|
2016-11-11 20:36:27 +00:00
|
|
|
page_tail(false, "", false);
|
2003-02-12 23:06:49 +00:00
|
|
|
|
|
|
|
?>
|