2005-01-18 19:56:18 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-01-18 19:56:18 +00:00
|
|
|
|
2008-07-24 17:22:06 +00:00
|
|
|
require_once("../inc/util.inc");
|
2007-11-12 22:28:17 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2005-01-18 19:56:18 +00:00
|
|
|
|
2011-02-09 22:11:34 +00:00
|
|
|
check_get_args(array("userid", "vote"));
|
|
|
|
|
2008-09-07 07:40:56 +00:00
|
|
|
$userid = get_int('userid');
|
|
|
|
$vote = get_str('vote');
|
2005-01-18 19:56:18 +00:00
|
|
|
|
2008-12-13 19:13:43 +00:00
|
|
|
$logged_in_user = get_logged_in_user();
|
2005-01-18 19:56:18 +00:00
|
|
|
if ($vote != "recommend" && $vote != "reject") {
|
2008-12-13 19:13:43 +00:00
|
|
|
error_page(tra("Invalid vote type:")." ".htmlentities($vote));
|
2005-01-18 19:56:18 +00:00
|
|
|
}
|
|
|
|
|
2007-11-12 22:28:17 +00:00
|
|
|
BoincProfile::update_aux("$vote=$vote+1 WHERE userid = $userid");
|
2005-01-18 19:56:18 +00:00
|
|
|
|
2008-12-13 19:13:43 +00:00
|
|
|
page_head(tra("Vote Recorded"));
|
2005-01-18 19:56:18 +00:00
|
|
|
|
|
|
|
start_table_noborder();
|
|
|
|
|
2008-12-13 19:13:43 +00:00
|
|
|
row1(tra("Thank you"));
|
2005-01-18 19:56:18 +00:00
|
|
|
|
|
|
|
if ($vote == "recommend") {
|
2008-12-13 19:13:43 +00:00
|
|
|
rowify(tra("Your recommendation has been recorded."));
|
2005-01-18 19:56:18 +00:00
|
|
|
} else {
|
2008-12-13 19:13:43 +00:00
|
|
|
rowify(tra("Your vote to reject this profile has been recorded."));
|
2005-01-18 19:56:18 +00:00
|
|
|
}
|
|
|
|
end_table();
|
2008-12-13 19:13:43 +00:00
|
|
|
echo "<br><a href=\"view_profile.php?userid=", $userid ,"\">" . tra("Return to profile.") . "</a>";
|
2005-01-18 19:56:18 +00:00
|
|
|
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|