".xml_error(-136)."\n"; exit(); } $sum = 0; $res = mysql_query("SELECT * FROM result WHERE userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0"); echo "\n"; while ($result = mysql_fetch_object($res)) { echo "\n"; echo " ".$result->id."\n"; echo " ".$result->workunitid."\n"; echo " ".$result->hostid."\n"; echo " ".$result->claimed_credit."\n"; echo " ".$result->received_time."\n"; echo "\n"; $sum += $result->claimed_credit; } echo "".$sum."\n"; echo "\n"; } else { $user = get_logged_in_user(); $sum = 0; $res = mysql_query("select * from result where userid=$user->id and (validate_state=0 OR validate_state=4) AND claimed_credit > 0"); page_head("Pending credit"); start_table(); echo "Result IDWorkunit IDHost IDClaimed credit\n"; while ($result = mysql_fetch_object($res)) { echo "\n"; echo "id\">$result->id\n"; echo "workunitid\">$result->workunitid\n"; echo "hostid\">$result->hostid\n"; echo "".format_credit($result->claimed_credit)."\n"; echo "\n"; $sum += $result->claimed_credit; } end_table(); echo "Pending credit: ".format_credit($sum); page_tail(); } ?>