admin web: fix bugs related to mysqli changes

This commit is contained in:
David Anderson 2014-10-09 09:29:05 -07:00
parent 870ec73327
commit c0e7da4931
2 changed files with 6 additions and 6 deletions

View File

@ -18,14 +18,14 @@
require_once("../inc/util_ops.inc");
db_init();
$hostid = $_GET["hostid"];
$hostid = get_int("hostid");
if (!$hostid) {
error_page("no host ID\n");
$host = BoincHost::lookup_id($hostid);
if (!$host) {
error_page("no such host\n");
}
mysql_query("update host set rpc_time=0 where id='$hostid'");
$host->update("rpc_time=0");
echo "Host RPC time cleared for host ID: $hostid\n";
admin_page_tail();

View File

@ -36,7 +36,7 @@ if ($bitset == "0000000") $bitset = '';
$userid = post_int("userid");
$query = "UPDATE forum_preferences SET special_user='$bitset' WHERE userid='$userid'";
mysql_query($query);
_mysql_query($query);
if (mysql_affected_rows() == 1) {
echo "<center><h2>Success</h2>";