/** * This is the basic function for letting us * do a mapping between the column name in * the header, to the value found in the DataListSource. * * NOTE: this function is can be overridden * so that you can return whatever you want for * any given column. * * @param array - $row_data - the entire data for the row * @param string - $col_name - the name of the column header * for this row to render. * @return mixed - either a HTMLTag object, or raw text. */ function build_column_item($row_data, $col_name) { switch ($col_name) { case "Timestamp": $obj = date("m/d/Y h:i A", strtotime($row_data["timestamp"])); break; default: $obj = DefaultGUIDataList::build_column_item($row_data, $col_name); break; } return $obj; }
/** * This is the basic function for letting us * do a mapping between the column name in * the header, to the value found in the DataListSource. * * NOTE: this function is can be overridden * so that you can return whatever you want for * any given column. * * @param array - $row_data - the entire data for the row * @param string - $col_name - the name of the column header * for this row to render. * @return mixed - either a HTMLTag object, or raw text. */ function build_column_item($row_data, $col_name) { switch ($col_name) { case "Gender": $obj = SDIFCodeTables::getGenderCode($row_data['gender'], true); break; case "Age Group": $a =& $row_data['event_age_code']; $obj = substr($a, 0, 2) . ' - ' . substr($a, 2, 2); break; case "Distance": $obj = $row_data['event_distance'] . ' ' . SDIFCodeTables::getCourseCode($row_data['finals_course_code'], true); break; case "Stroke": $obj = SDIFCodeTables::getStrokeCode($row_data['stroke_code']); break; case "Timestamp": $obj = date("m/d/Y h:i A", strtotime($row_data["timestamp"])); break; default: $obj = DefaultGUIDataList::build_column_item($row_data, $col_name); break; } return $obj; }
/** * This is the basic function for letting us * do a mapping between the column name in * the header, to the value found in the DataListSource. * * NOTE: this function can be overridden so that you can * return whatever you want for any given column. * * @param array - $row_data - the entire data for the row * @param string - $col_name - the name of the column header * for this row to render. * @return mixed - either a HTMLTag object, or raw text. */ function build_column_item($row_data, $col_name) { switch ($col_name) { /* case "Updated" : $obj = strftime("%Y-%m-%d @ %T", (int)$row_data["updated"]) ; break ; */ default: $obj = DefaultGUIDataList::build_column_item($row_data, $col_name); break; } return $obj; }
/** * This is the basic function for letting us * do a mapping between the column name in * the header, to the value found in the DataListSource. * * NOTE: this function is can be overridden * so that you can return whatever you want for * any given column. * * @param array - $row_data - the entire data for the row * @param string - $col_name - the name of the column header * for this row to render. * @return mixed - either a HTMLTag object, or raw text. */ function build_column_item($row_data, $col_name) { include_once 'swimteams.class.php'; $swimteam = new SwimTeam(); switch ($col_name) { case "Timestamp": $obj = date("m/d/Y h:i A", strtotime($row_data["timestamp"])); break; case "Team Name": $swimteam->LoadSwimTeamById($row_data['swimteamid']); $obj = $swimteam->getTeamName(); break; default: $obj = DefaultGUIDataList::build_column_item($row_data, $col_name); break; } return $obj; }