2004-01-06 22:09:19 +00:00
|
|
|
<?php
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/db.inc");
|
2004-01-06 22:09:19 +00:00
|
|
|
|
|
|
|
// show results with pending credit for this user
|
|
|
|
|
2006-02-12 06:19:00 +00:00
|
|
|
$config = get_config();
|
|
|
|
if (!parse_bool($config, "show_results")) {
|
2004-07-02 19:17:53 +00:00
|
|
|
echo "This feature is turned off temporarily";
|
|
|
|
page_tail();
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2004-01-06 22:09:19 +00:00
|
|
|
db_init();
|
|
|
|
$user = get_logged_in_user();
|
2004-05-11 22:49:23 +00:00
|
|
|
page_head("Pending credit");
|
2004-01-06 22:09:19 +00:00
|
|
|
$res = mysql_query("select * from result where userid=$user->id and validate_state=0");
|
|
|
|
$sum = 0;
|
|
|
|
start_table();
|
|
|
|
echo "<tr><th>Result ID</th><th>Claimed credit</th></tr>\n";
|
|
|
|
while ($result = mysql_fetch_object($res)) {
|
|
|
|
if ($result->claimed_credit > 0) {
|
2004-01-22 01:35:09 +00:00
|
|
|
echo "<tr><td><a href=result.php?resultid=$result->id>$result->id</a></td><td>",format_credit($result->claimed_credit), "</td></tr>\n";
|
2004-01-06 22:09:19 +00:00
|
|
|
$sum += $result->claimed_credit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end_table();
|
|
|
|
|
|
|
|
echo "Pending credit: ",format_credit($sum);
|
|
|
|
page_tail();
|
|
|
|
?>
|