function matchStatusToImage($status) { /* * param: matchstatus integer * returns: image TAG pointing to the correct visual */ global $dbi; $RS = DB_listMatchStatus($dbi); // ATT the array is zero based ...the table IDs are NOT !! return '<img src=\'images/' . $RS[$status - 1][2] . '\' border=\'0\' alt=\'' . $RS[$status - 1][3] . '\'>'; }
/** * returns select box string * param: $name_id=the name/id of the select TAG * $$status_selected = pre-selected ID */ function Select_MatchStatus($name_id, $status_selected = 0, $changeaction = '', $allowNoSelect = 1) { global $dbi; $RS = DB_listMatchStatus($dbi); $OUT = RecordsetToSelectOptionList($RS, array(0, 1), $name_id, $status_selected, $changeaction, $allowNoSelect); return $OUT; }