1<?php 2// This file is part of BOINC. 3// http://boinc.berkeley.edu 4// Copyright (C) 2008 University of California 5// 6// BOINC is free software; you can redistribute it and/or modify it 7// under the terms of the GNU Lesser General Public License 8// as published by the Free Software Foundation, 9// either version 3 of the License, or (at your option) any later version. 10// 11// BOINC is distributed in the hope that it will be useful, 12// but WITHOUT ANY WARRANTY; without even the implied warranty of 13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14// See the GNU Lesser General Public License for more details. 15// 16// You should have received a copy of the GNU Lesser General Public License 17// along with BOINC. If not, see <http://www.gnu.org/licenses/>. 18 19require_once("../inc/boinc_db.inc"); 20require_once("../inc/util.inc"); 21require_once("../inc/host.inc"); 22 23check_get_args(array("hostid")); 24 25$user = get_logged_in_user(); 26 27page_head(tra("Updating computer credit")); 28 29$hostid = get_int("hostid"); 30 31$host = BoincHost::lookup_id($hostid); 32if (!$host || $host->userid != $user->id) { 33 error_page("We have no record of that computer"); 34} 35 36host_update_credit($hostid); 37echo "<br>".tra("Host credit updated"); 38page_tail(); 39 40?> 41