\n\n"; if ($raw % 2 == 0) { $show_half=0; } else { $show_half=1; } $count=intval($raw/2); for ($i=0; $i<$count; $i++) { $return .= html_image("ic/check.png","15","16",array()); } if ($show_half==1) { $return .= html_image("ic/halfcheck.png","15","16",array()); } return $return; } /** * vote_show_thumbs() - Show vote stars * * @param int The survey ID * @param string The rating type */ function vote_show_thumbs($id,$flag) { /* $flag project - 1 release - 2 forum_message - 3 user - 4 */ $rating=vote_get_rating ($id,$flag); if ($rating==0) { return "(unrated)"; } else { return vote_number_to_stars($rating).'('.$rating.')'; } } /** * vote_get_rating() - Get a vote rating * * @param int The survey ID * @param string The rating type */ function vote_get_rating ($id,$flag) { $result = db_query_params ('SELECT response FROM survey_rating_aggregate WHERE type=$1 AND id=$2', array ($flag, $id)); if (!$result || (db_numrows($result) < 1) || (db_result($result,0,0)==0)) { return '0'; } else { return db_result($result,0,0); } } /** * vote_show_release_radios() - Show release radio buttons * * @param int Survey ID * @param string The rating type */ function vote_show_release_radios ($vote_on_id,$flag) { /* $flag project - 1 release - 2 forum_message - 3 user - 4 */ //html_blankimage($height,$width) $rating=vote_get_rating ($vote_on_id,$flag); if ($rating==0) { $rating='2.5'; } $rating=((16*vote_get_rating ($vote_on_id,$flag))-15); ?>
0) { echo 'Includes untrusted ratings.