- // Add row
- $add = '';
- $OUT .= "<tr>
- <td class=\"switch_sw".$SW." bottom2".$add."\"> ".($idx+1).".</td>
- <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
- if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>";
- $OUT .= $DATA['userid'][$idx];
- if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>";
- $OUT .= "</td>
- <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
- if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>";
- $OUT .= $DATA['ref'][$idx];
- if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>";
- $OUT .= "</td>
- <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
- if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>";
- $OUT .= $DATA['infos'][$idx];
- if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>";
- $OUT .= "</td>
-</tr>\n";
- $SW = 3 - $SW;
+ // Prepare marking of default (maybe current user's) id
+ $start = ''; $end = '';
+ if (($DATA['userid'][$idx] == $default) && ($default > 0)) {
+ $start = '<strong>';
+ $end = '</strong>';
+ } // END - if
+
+ // Prepare content
+ $content = array(
+ 'idx' => ($idx + 1),
+ 'userid' => $DATA['userid'][$idx],
+ 'ref' => $DATA['ref'][$idx],
+ 'infos' => $DATA['infos'][$idx],
+ 'start' => $start,
+ 'end' => $end
+ );
+
+ // Load row template
+ $OUT .= loadTemplate('guest_rallye_row', true, $content);