2002-08-12 20:16:55 +00:00
|
|
|
<?php
|
2002-08-14 00:27:18 +00:00
|
|
|
|
2004-06-11 18:50:15 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
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");
|
2005-11-30 22:52:23 +00:00
|
|
|
require_once("../inc/translation.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");
|
|
|
|
require_once("../project/project_news.inc");
|
2003-11-07 20:28:23 +00:00
|
|
|
|
2002-08-12 20:16:55 +00:00
|
|
|
|
2004-06-11 18:50:15 +00:00
|
|
|
function show_nav() {
|
2006-05-09 18:25:15 +00:00
|
|
|
$config = get_config();
|
|
|
|
$master_url = parse_config($config, "<master_url>");
|
2007-01-03 16:18:43 +00:00
|
|
|
echo "<div id=\"mainnav\">
|
|
|
|
<h2>Join ".PROJECT."</h2>
|
2003-12-10 00:54:17 +00:00
|
|
|
<p>
|
2006-05-09 18:25:15 +00:00
|
|
|
<ol>
|
2007-01-03 16:18:43 +00:00
|
|
|
<li><a href=\"info.php\">".tr(RULES_TITLE)."</a>
|
|
|
|
<li><a target=\"_new\" href=\"http://boinc.berkeley.edu/download.php\">Download BOINC</a>
|
|
|
|
<li> When prompted, enter <b>".$master_url."</b>
|
2006-05-09 18:25:15 +00:00
|
|
|
</ol>
|
2002-12-11 00:12:42 +00:00
|
|
|
|
2007-01-03 16:18:43 +00:00
|
|
|
<h2>Returning participants</h2>
|
2003-12-10 00:54:17 +00:00
|
|
|
<ul>
|
2007-01-03 16:18:43 +00:00
|
|
|
<li><a href=\"home.php\">Your account</a> - view stats, modify preferences
|
|
|
|
<li><a href=\"team.php\">Teams</a> - create or join a team
|
|
|
|
<li><a href=\"apps.php\">".tr(APPS_TITLE)."</a>
|
|
|
|
<li><a href=\"cert1.php\">Certificate</a>
|
2003-12-10 00:54:17 +00:00
|
|
|
</ul>
|
2007-01-03 16:18:43 +00:00
|
|
|
<h2>Community</h2>
|
2003-12-10 00:54:17 +00:00
|
|
|
<ul>
|
2007-01-03 16:18:43 +00:00
|
|
|
<li><a href=\"".URL_BASE."profile_menu.php\">Participant profiles</a>
|
|
|
|
<li><a href=\"forum_index.php\">Message boards</a>
|
|
|
|
<li><a href=\"forum_help_desk.php\">Questions and answers</a>
|
2003-12-10 00:54:17 +00:00
|
|
|
</ul>
|
2007-01-03 16:18:43 +00:00
|
|
|
<h2>Project totals and leader boards</h2>
|
2004-06-11 18:50:15 +00:00
|
|
|
<ul>
|
2007-01-03 16:18:43 +00:00
|
|
|
<li><a href=\"top_users.php\">Top participants</a>
|
|
|
|
<li><a href=\"top_hosts.php\">Top computers</a>
|
|
|
|
<li><a href=\"top_teams.php\">Top teams</a>
|
|
|
|
<li><a href=\"stats.php\">Other statistics</a>
|
2004-06-11 18:50:15 +00:00
|
|
|
</ul>
|
2007-01-03 16:18:43 +00:00
|
|
|
</div>
|
2004-03-20 01:35:37 +00:00
|
|
|
";
|
2004-06-11 18:50:15 +00:00
|
|
|
}
|
|
|
|
|
2004-11-18 20:01:12 +00:00
|
|
|
$caching = false;
|
|
|
|
|
|
|
|
if ($caching) {
|
|
|
|
start_cache(INDEX_PAGE_TTL);
|
|
|
|
}
|
2004-06-11 18:50:15 +00:00
|
|
|
|
2006-12-07 23:39:23 +00:00
|
|
|
$stopped = web_stopped();
|
2004-10-20 05:45:43 +00:00
|
|
|
$rssname = PROJECT . " RSS 2.0" ;
|
|
|
|
$rsslink = URL_BASE . "rss_main.php";
|
2004-06-11 18:50:15 +00:00
|
|
|
|
2007-01-03 16:18:43 +00:00
|
|
|
if (defined("CHARSET")) {
|
|
|
|
header("Content-type: text/html; charset=".tr(CHARSET));
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">";
|
|
|
|
echo "<html>
|
2005-02-26 06:23:32 +00:00
|
|
|
<head>
|
2007-01-03 16:18:43 +00:00
|
|
|
<title>".PROJECT."</title>
|
|
|
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"white.css\">
|
|
|
|
<link rel=\"alternate\" type=\"text/xml\" title=\"".$rssname."\" href=\"".$rsslink."\">
|
2005-02-26 06:23:32 +00:00
|
|
|
</head><body>
|
2007-01-03 16:18:43 +00:00
|
|
|
<h1>".PROJECT."</h1>
|
|
|
|
<table cellpadding=\"8\" cellspacing=\"4\">
|
|
|
|
<tr><td rowspan=\"2\" valign=\"top\" width=\"40%\">
|
|
|
|
";
|
2004-06-11 18:50:15 +00:00
|
|
|
|
|
|
|
if ($stopped) {
|
|
|
|
echo "
|
|
|
|
<b>".PROJECT." is temporarily shut down for maintenance.
|
2007-01-03 16:18:43 +00:00
|
|
|
Please try again later</b>.
|
2004-06-11 18:50:15 +00:00
|
|
|
";
|
|
|
|
} else {
|
|
|
|
db_init();
|
|
|
|
show_nav();
|
|
|
|
}
|
|
|
|
|
2007-01-03 16:18:43 +00:00
|
|
|
echo "
|
2004-06-11 18:50:15 +00:00
|
|
|
<p>
|
2007-01-03 16:18:43 +00:00
|
|
|
Powered by <a href=\"http://boinc.berkeley.edu/\"><img align=\"middle\" border=\"0\" src=\"http://boinc.berkeley.edu/boinc_logo_trans.gif\" alt=\"BOINC Logo\"></a>
|
2004-06-11 18:50:15 +00:00
|
|
|
</td>
|
|
|
|
";
|
|
|
|
|
|
|
|
if (!$stopped) {
|
|
|
|
$profile = get_current_uotd();
|
|
|
|
if ($profile) {
|
2004-03-20 01:35:37 +00:00
|
|
|
echo "
|
2007-01-03 16:18:43 +00:00
|
|
|
<td id=\"uotd\">
|
|
|
|
<h2>User of the day</h2>
|
2004-03-20 01:35:37 +00:00
|
|
|
";
|
2004-06-11 18:50:15 +00:00
|
|
|
$user = lookup_user_id($profile->userid);
|
|
|
|
echo uotd_thumbnail($profile, $user);
|
|
|
|
echo user_links($user)."<br>";
|
2006-01-09 08:37:44 +00:00
|
|
|
echo sub_sentence(output_transform(strip_tags($profile->response1)), ' ', 150, true);
|
2004-06-11 18:50:15 +00:00
|
|
|
echo "</td></tr>\n";
|
2004-03-20 01:35:37 +00:00
|
|
|
}
|
2003-12-10 00:54:17 +00:00
|
|
|
}
|
2004-06-11 18:50:15 +00:00
|
|
|
|
2003-12-10 00:54:17 +00:00
|
|
|
echo "
|
2007-01-03 16:18:43 +00:00
|
|
|
<tr><td id=\"news\">
|
|
|
|
<h2>News</h2>
|
2004-06-11 18:50:15 +00:00
|
|
|
<p>
|
2003-11-28 23:11:22 +00:00
|
|
|
";
|
2004-05-31 17:37:22 +00:00
|
|
|
show_news($project_news, 5);
|
2007-01-03 16:18:43 +00:00
|
|
|
if (count($project_news) > 5) {
|
|
|
|
echo "<a href=\"old_news.php\">...more</a>";
|
2004-05-31 17:37:22 +00:00
|
|
|
}
|
2003-11-28 23:11:22 +00:00
|
|
|
echo "
|
2007-01-03 16:18:43 +00:00
|
|
|
<p class=\"smalltext\">
|
|
|
|
News is available as an
|
|
|
|
<a href=\"rss_main.php\">RSS feed</a> <img src=\"xml.gif\" alt=\"XML\">.</p>
|
2004-06-11 18:50:15 +00:00
|
|
|
</td>
|
|
|
|
</tr></table>
|
2006-04-28 18:31:32 +00:00
|
|
|
<!--
|
2003-02-12 23:06:49 +00:00
|
|
|
";
|
|
|
|
|
2002-12-16 21:41:41 +00:00
|
|
|
include 'schedulers.txt';
|
2002-11-26 21:49:53 +00:00
|
|
|
|
2006-04-28 18:31:32 +00:00
|
|
|
echo "
|
|
|
|
-->
|
|
|
|
";
|
2002-11-26 21:49:53 +00:00
|
|
|
|
2004-11-18 20:01:12 +00:00
|
|
|
if ($caching) {
|
|
|
|
page_tail_main(true);
|
|
|
|
end_cache(INDEX_PAGE_TTL);
|
|
|
|
} else {
|
|
|
|
page_tail_main();
|
|
|
|
}
|
2003-02-12 23:06:49 +00:00
|
|
|
|
|
|
|
?>
|