while($row = mysql_fetch_array($results)){
$arrEditors = mysql_fetch_array(mysql_query("SELECT user_username FROM gforum_User WHERE user_id = ".$row[editor_user_id_fk]." LIMIT 1"));
$editor_user_username = $arrEditors[user_username];
$boolEditorIsOwner = false;
if ($row[editor_user_id_fk] == $row[submitted_by]) { $boolEditorIsOwner = true; }
?>
echo date("F j, Y", $row[foo]); ?>
Edited on: echo date("F j, Y", $row[edit_timestamp]); ?> by echo "
".$editor_user_username.""; if ($boolEditorIsOwner) { echo " (original race submitter)"; } else { echo ""; } ?>
$arrUnits = array(1 => "mile", 2 => "meter", 3 => "yard", 4 => "kilometer" );
$arrType = array(1 => "swim", 2 => "bike", 3 => "run", 4 => "paddle", 5 => "ski" );
?>
Course:
echo $row[swim]." ".$arrUnits[$row[oneunit]]." ".$arrType[$row[onetype]].", ".$row[bike]." ".$arrUnits[$row[twounit]]." ".$arrType[$row[twotype]];
if ($row[run] != 0) {
echo ", ".$row[run]." ".$arrUnits[$row[threeunit]]." ".$arrType[$row[threetype]];
}
?>
//Determine bike surface
if ($row[bike_surface] == 1)
{ $bike_surface = "Offroad"; }
else
{ $bike_surface = "Road"; }
?>
Bike Surface: echo $bike_surface; ?>
//Determine draft rules
if ($row[draft_legal] == 1)
{ $draft_legal = "Draft-legal"; }
else
{ $draft_legal = "Non-drafting"; }
?>
Drafting rules: echo $draft_legal; ?>
//Determine kid race
if ($row[kids_race] == 1)
{ $kids_race = "This *IS* a kids' race"; }
else
{ $kids_race = "This is *NOT* a kids' race"; }
?>
Is this a kids' race? echo $kids_race; ?>
//Determine reg fees
if ($row[registration] == 1)
{ $registration = "Registration fees ARE included"; }
else
{ $registration = "Registration fees not specified"; }
?>
Registration fees included: echo $registration; ?>
Description:
if(strlen($row[courseinfo]) > 400){
$phrase = "…"; }else{
$phrase = ""; }
echo substr(htmlspecialchars(stripslashes($row[courseinfo])), 0, 160);
echo $phrase;
?>
Additional Info:
if(strlen($row[moreinfo]) > 400){
$phrase = "…"; }else{
$phrase = ""; }
echo substr(htmlspecialchars(stripslashes($row[moreinfo])), 0, 160);
echo $phrase;
?>
} ?>