2002-11-12 17:01:16 +00:00
|
|
|
<?php
|
2005-02-08 03:33:35 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2002-11-12 17:01:16 +00:00
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db_ops.inc");
|
|
|
|
require_once("../inc/util_ops.inc");
|
2006-11-16 19:03:07 +00:00
|
|
|
require_once("../inc/uotd.inc");
|
2002-11-12 17:01:16 +00:00
|
|
|
|
2004-07-08 19:20:19 +00:00
|
|
|
$config = get_config();
|
|
|
|
$cgi_url = parse_config($config, "<cgi_url>");
|
|
|
|
$stripchart_cgi_url = parse_config($config, "<stripchart_cgi_url>");
|
2002-11-12 17:01:16 +00:00
|
|
|
|
2003-11-11 20:49:07 +00:00
|
|
|
db_init();
|
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
$title = "Project Management";
|
|
|
|
admin_page_head($title);
|
|
|
|
|
2006-10-31 19:10:24 +00:00
|
|
|
// Notification area
|
|
|
|
echo "<ul>\n";
|
|
|
|
|
2007-05-26 16:01:22 +00:00
|
|
|
if (file_exists("../../local.revision")) {
|
|
|
|
$local_rev = file_get_contents("../../local.revision");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check if latest revision is cached and cache has not yet expired
|
|
|
|
if (!file_exists("../cache/remote.revision") || (filemtime("../cache/remote.revision")+(24*60*60) < time())) {
|
|
|
|
// Get latest revision
|
|
|
|
$handle = fopen("http://boinc.berkeley.edu/svn/", "r");
|
|
|
|
$remote = fread($handle, 255);
|
|
|
|
fclose($handle);
|
|
|
|
preg_match("/Revision (\d+)/", $remote, $remote_rev);
|
|
|
|
$remote_rev = $remote_rev[1];
|
|
|
|
|
|
|
|
$handle = fopen("../cache/remote.revision", "w");
|
|
|
|
fwrite($handle, $remote_rev);
|
|
|
|
fclose($handle);
|
|
|
|
} else {
|
|
|
|
// Read cached revision
|
|
|
|
$remote_rev = file_get_contents("../cache/remote.revision");
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<li>";
|
|
|
|
if ($local_rev) {
|
2007-06-15 23:54:25 +00:00
|
|
|
echo "Currently used SVN revision: ".$local_rev."; ";
|
2007-05-26 16:01:22 +00:00
|
|
|
}
|
|
|
|
echo "Latest SVN revision: ".$remote_rev."</li>\n";
|
|
|
|
|
2006-10-31 19:10:24 +00:00
|
|
|
if (!file_exists(".htaccess")) {
|
2007-05-26 16:01:22 +00:00
|
|
|
echo "<li><span style=\"color: #ff0000\">The Project Management directory is not
|
2006-10-31 19:10:24 +00:00
|
|
|
protected from public access by a .htaccess file.</span></li>\n";
|
|
|
|
}
|
|
|
|
|
2007-05-26 16:01:22 +00:00
|
|
|
if (!defined("SYS_ADMIN_EMAIL")) {
|
|
|
|
echo "<li><span style=\"color: #ff0000\">The defined constant SYS_ADMIN_EMAIL
|
|
|
|
has not been set. Please edit <tt>project/project.inc</tt> and set this
|
|
|
|
to an address which can be used to contact the project administrators.
|
|
|
|
</span></li>\n";
|
|
|
|
}
|
|
|
|
|
2006-10-31 19:10:24 +00:00
|
|
|
if (parse_bool($config, "disable_account_creation")) {
|
2007-05-26 16:01:22 +00:00
|
|
|
echo "<li><span style=\"color: #ff9900\">Account creation is disabled.</span></li>\n";
|
2006-10-31 19:10:24 +00:00
|
|
|
}
|
|
|
|
|
2007-05-26 16:01:22 +00:00
|
|
|
if (defined("INVITE_CODES")) {
|
|
|
|
echo "<li><span style=\"color: #ff9900\">Account creation is restricted by the use of
|
|
|
|
invitation codes.</span></li>\n";
|
2006-10-31 19:10:24 +00:00
|
|
|
}
|
|
|
|
|
2006-11-16 19:03:07 +00:00
|
|
|
$uotd_candidates = count_uotd_candidates();
|
2006-11-17 19:52:09 +00:00
|
|
|
if ($uotd_candidates >= 0) {
|
2006-11-16 19:03:07 +00:00
|
|
|
if ($uotd_candidates >= UOTD_THRESHOLD*2) {
|
|
|
|
$color = "#00aa00";
|
|
|
|
} elseif ($uotd_candidates < UOTD_THRESHOLD) {
|
|
|
|
$color = "#ff0000";
|
|
|
|
} else {
|
|
|
|
$color = "#ff9900";
|
|
|
|
}
|
2007-05-26 16:01:22 +00:00
|
|
|
echo "<li><span style=\"color: ".$color."\">There are ".$uotd_candidates." remaining
|
|
|
|
candidates for User of the Day.</span></li>\n";
|
2006-11-16 19:03:07 +00:00
|
|
|
}
|
|
|
|
|
2006-10-31 19:10:24 +00:00
|
|
|
echo "</ul>\n";
|
|
|
|
|
2003-07-01 18:28:33 +00:00
|
|
|
echo "
|
2006-11-04 19:57:56 +00:00
|
|
|
<p>
|
2007-05-26 16:01:22 +00:00
|
|
|
<table border=\"0\"><tr valign=\"top\">
|
2006-11-04 19:57:56 +00:00
|
|
|
<td><b>Browse database:</b>
|
2003-07-01 18:28:33 +00:00
|
|
|
<ul>
|
2006-11-04 19:57:56 +00:00
|
|
|
<li><a href=\"db_action.php?table=platform\">Platforms</a></li>
|
|
|
|
<li><a href=\"db_action.php?table=app\">Applications</a></li>
|
2007-05-26 16:01:22 +00:00
|
|
|
<li><a href=\"db_form.php?table=app_version\">Application versions</a></li>
|
|
|
|
<li><a href=\"db_form.php?table=user\">Users</a></li>
|
|
|
|
<li><a href=\"db_form.php?table=team\">Teams</a></li>
|
|
|
|
<li><a href=\"db_form.php?table=host&detail=low\">Hosts</a></li>
|
|
|
|
<li><a href=\"db_form.php?table=workunit\">Workunits</a></li>
|
|
|
|
<li><a href=\"db_form.php?table=result&detail=low\">Results</a></li>
|
2006-11-04 19:57:56 +00:00
|
|
|
</ul>
|
2007-05-26 16:01:22 +00:00
|
|
|
|
2006-11-04 19:57:56 +00:00
|
|
|
</td>
|
|
|
|
<td><b>Regular Operations:</b>
|
|
|
|
<ul>
|
2007-05-26 16:01:22 +00:00
|
|
|
<li><a href=\"profile_screen_form.php\">Screen user profiles </a></li>
|
|
|
|
<li><a href=\"manage_special_users.php\">Manage special users</a></li>
|
2006-11-04 19:57:56 +00:00
|
|
|
</ul>
|
2007-05-26 16:01:22 +00:00
|
|
|
|
2006-11-04 19:57:56 +00:00
|
|
|
</td>
|
|
|
|
<td><b>Special Operations:</b>
|
|
|
|
<ul>
|
2007-05-26 16:01:22 +00:00
|
|
|
<li><a href=\"manage_apps.php\">Manage applications</a></li>
|
|
|
|
<li><a href=\"manage_app_versions.php\">Manage application versions</a></li>
|
|
|
|
<li><a href=\"mass_email.php\">Send mass email to a selected set of users</a></li>
|
|
|
|
<li><a href=\"problem_host.php\">Email user with misconfigured host</a></li>
|
|
|
|
<li><a href=\"job_times.php\">FLOP count statistics</a>
|
|
|
|
<li><a href=\"cancel_wu_form.php\">Cancel workunits</a></li>
|
|
|
|
<li><form action=\"manage_user.php\">
|
|
|
|
<input type=\"submit\" value=\"Manage user\">
|
|
|
|
ID: <input name=\"userid\">
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<form method=\"get\" action=\"clear_host.php\">
|
|
|
|
Clear Host:
|
|
|
|
<input type=\"text\" size=\"5\" name=\"hostid\">
|
|
|
|
<input type=\"submit\" value=\"Clear RPC\">
|
|
|
|
</form>
|
|
|
|
</li>
|
2003-07-01 18:28:33 +00:00
|
|
|
</ul>
|
2006-11-04 19:57:56 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2005-02-08 03:33:35 +00:00
|
|
|
</table>
|
2003-11-11 20:49:07 +00:00
|
|
|
";
|
2004-05-06 21:29:15 +00:00
|
|
|
|
2006-11-04 19:57:56 +00:00
|
|
|
// Application Result Summaries:
|
2005-02-08 03:33:35 +00:00
|
|
|
|
2006-11-04 19:57:56 +00:00
|
|
|
$show_deprecated = get_str("show_deprecated", true);
|
2007-05-26 16:01:22 +00:00
|
|
|
$show_only = array("all"); // Add all appids you want to display, or "all"
|
2006-11-04 19:57:56 +00:00
|
|
|
$result = mysql_query("select id, name, deprecated from app");
|
2003-11-11 20:49:07 +00:00
|
|
|
while ($app = mysql_fetch_object($result)) {
|
2007-05-26 16:01:22 +00:00
|
|
|
if (in_array($app->id, $show_only)
|
2006-11-04 19:57:56 +00:00
|
|
|
|| ( in_array("all", $show_only)
|
|
|
|
&& (!$app->deprecated || $show_deprecated)
|
|
|
|
)
|
|
|
|
) {
|
2007-05-26 16:01:22 +00:00
|
|
|
|
2006-11-04 19:57:56 +00:00
|
|
|
echo "
|
2007-05-26 16:01:22 +00:00
|
|
|
<b>Result summary for <tt>$app->name</tt>:</b>
|
|
|
|
<ul>
|
2006-11-04 19:57:56 +00:00
|
|
|
<li> Past 24 hours:
|
2007-05-26 16:01:22 +00:00
|
|
|
<a href=\"result_summary.php?appid=$app->id&nsecs=86400\">summary</a> |
|
|
|
|
<a href=\"pass_percentage_by_platform.php?appid=$app->id&nsecs=86400\">pass percentage by platform</a> |
|
|
|
|
<a href=\"failure_result_summary_by_host.php?appid=$app->id&nsecs=86400\">failure by host</a> |
|
|
|
|
<a href=\"failure_result_summary_by_platform.php?appid=$app->id&nsecs=86400\"> failure by platform</a>
|
2006-11-04 19:57:56 +00:00
|
|
|
<li>Past 7 days:
|
2007-05-26 16:01:22 +00:00
|
|
|
<a href=\"result_summary.php?appid=$app->id&nsecs=604800\">summary</a> |
|
|
|
|
<a href=\"pass_percentage_by_platform.php?appid=$app->id&nsecs=604800\">pass percentage by platform</a> |
|
|
|
|
<a href=\"failure_result_summary_by_host.php?appid=$app->id&nsecs=604800\">failure by host</a> |
|
|
|
|
<a href=\"failure_result_summary_by_platform.php?appid=$app->id&nsecs=604800\">failure by platform</a>
|
|
|
|
</ul>
|
|
|
|
";
|
2005-02-08 03:33:35 +00:00
|
|
|
}
|
2006-11-04 19:57:56 +00:00
|
|
|
}
|
2003-11-11 20:49:07 +00:00
|
|
|
mysql_free_result($result);
|
2004-05-06 21:29:15 +00:00
|
|
|
|
2006-11-04 19:57:56 +00:00
|
|
|
if ($show_deprecated) {
|
2007-05-26 16:01:22 +00:00
|
|
|
echo "<a href=\"index.php?show_deprecated=0\">Hide deprecated applications</a>";
|
2006-11-04 19:57:56 +00:00
|
|
|
} else {
|
2007-05-26 16:01:22 +00:00
|
|
|
echo "<a href=\"index.php?show_deprecated=1\">Show deprecated applications</a>";
|
2006-11-04 19:57:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Periodic tasks
|
|
|
|
|
|
|
|
echo "<h3>Periodic or special tasks</h3>
|
2007-05-26 16:01:22 +00:00
|
|
|
<ul>
|
2006-11-04 19:57:56 +00:00
|
|
|
<li> The following scripts should be run as periodic tasks,
|
2007-05-26 16:01:22 +00:00
|
|
|
not via this web page
|
|
|
|
(see <a href=\"http://boinc.berkeley.edu/trac/wiki/ProjectTasks\">http://boinc.berkeley.edu/trac/wiki/ProjectTasks</a>):
|
|
|
|
<pre> update_forum_activities.php, update_profile_pages.php, update_uotd.php</pre>
|
2006-11-04 19:57:56 +00:00
|
|
|
<li> The following scripts can be run manually on the command line
|
2007-05-26 16:01:22 +00:00
|
|
|
as needed (i.e. <tt>php scriptname.php</tt>):
|
2006-11-04 19:57:56 +00:00
|
|
|
<pre>forum_repair.php, team_repair.php, repair_validator_problem.php</pre>
|
2007-05-26 16:01:22 +00:00
|
|
|
</ul>
|
2006-11-04 19:57:56 +00:00
|
|
|
";
|
|
|
|
|
|
|
|
// Stripcharts, logs, etc
|
2002-11-12 17:01:16 +00:00
|
|
|
|
2007-05-26 16:01:22 +00:00
|
|
|
echo "<div>
|
|
|
|
<a href=\"$stripchart_cgi_url/stripchart.cgi\">Stripcharts</a>
|
|
|
|
| <a href=\"show_log.php\">Show/Grep all logs</a>
|
|
|
|
| <a href=\"show_log.php?f=mysql*.log&l=-20\">Tail MySQL logs</a>
|
|
|
|
</div>
|
|
|
|
";
|
|
|
|
|
|
|
|
admin_page_tail();
|
2003-07-18 20:58:42 +00:00
|
|
|
|
2002-11-12 17:01:16 +00:00
|
|
|
?>
|