Better error reporting from problem_host.php reporting page, if

host does not exist.  Thanks to Christian Beer.

svn path=/trunk/boinc/; revision=5895
This commit is contained in:
Bruce Allen 2005-04-19 19:56:23 +00:00
parent dbeedc0623
commit 615d8aea5c
2 changed files with 18 additions and 8 deletions

View File

@ -27387,3 +27387,11 @@ David 19 April 2005
lib/
gui_rpc_client.C
Bruce 19 April 2005
- Better error reporting from problem_host.php reporting page, if
host does not exist. Thanks to Christian Beer.
html/
ops/
problem_host.php

View File

@ -31,15 +31,17 @@ if (!$hostid) {
";
} else {
$res = mysql_query("select * from host where id='$hostid'");
if (0) {
echo "No host with that ID";
exit;
}
$host = mysql_fetch_object($res);
$res = mysql_query("select * from user where id='$host->userid'");
$user = mysql_fetch_object($res);
send_problem_email($user, $host);
echo "Email to ".$user->email_addr." has been send.";
if (!$host) {
echo "<h2>No host with that ID</h2>
<center>Please <a href=\"problem_host.php\">try again</a></center>";
} else {
$res = mysql_query("select * from user where id='$host->userid'");
$user = mysql_fetch_object($res);
send_problem_email($user, $host);
echo "Email to ".$user->email_addr." has been send.<br>
<a href=\"problem_host.php\">Do another?</a>";
}
}
admin_page_tail();