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();
|
|
|
|
$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() {
|
|
|
|
}
|
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-22 09:20:07 +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(
|
2016-11-22 09:20:07 +00:00
|
|
|
tra("What is %1?", PROJECT),
|
2016-11-11 20:36:27 +00:00
|
|
|
function() {
|
|
|
|
global $no_computing, $no_web_account_creation, $master_url;
|
|
|
|
if ($no_computing) {
|
|
|
|
echo "
|
2016-11-22 09:20:07 +00:00
|
|
|
XXX is a research project that uses volunteers
|
|
|
|
to do research in XXX.
|
2016-11-11 20:36:27 +00:00
|
|
|
";
|
|
|
|
} else {
|
|
|
|
echo "
|
2016-11-22 09:20:07 +00:00
|
|
|
<p>
|
|
|
|
XXX is a research project, based at <a href=#>YYY</a>,
|
|
|
|
that uses Internet-connected
|
|
|
|
computers to do research in XXX.
|
|
|
|
You can contribute to our research
|
|
|
|
by running a free program on your computer.
|
|
|
|
</p>
|
2016-11-11 20:36:27 +00:00
|
|
|
";
|
2016-11-22 09:20:07 +00:00
|
|
|
}
|
|
|
|
echo "
|
|
|
|
<ul>
|
|
|
|
<li> <a href=#>Our research</a>
|
|
|
|
<li> <a href=#>Our team</a>
|
|
|
|
</ul>
|
|
|
|
";
|
|
|
|
echo "</ul>";
|
|
|
|
if ($no_computing) {
|
2016-11-11 20:36:27 +00:00
|
|
|
echo "
|
2016-11-22 09:20:07 +00:00
|
|
|
<a href=\"create_account_form.php\">Create an account</a>
|
2016-11-11 20:36:27 +00:00
|
|
|
";
|
2016-11-22 09:20:07 +00:00
|
|
|
} else {
|
|
|
|
echo '<center><a href="join.php" class="btn btn-success"><font size=+2>'.tra('Join %1', PROJECT).'</font></a></center>
|
|
|
|
';
|
|
|
|
|
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-22 09:20:07 +00:00
|
|
|
page_head(null, null, true);
|
2016-11-11 20:36:27 +00:00
|
|
|
|
|
|
|
grid('top', 'left', 'right');
|
2003-02-12 23:06:49 +00:00
|
|
|
|
2016-11-22 09:20:07 +00:00
|
|
|
page_tail(false, "", true);
|
2003-02-12 23:06:49 +00:00
|
|
|
|
|
|
|
?>
|