/includes/functions.php
PHP | 36 lines | 31 code | 5 blank | 0 comment | 1 complexity | 48cbaf3c8d4f2ba5345566f3b6a207ac MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php
- function getUpcomingCourses($TrainingCentre = 0) {
-
- $html = "";
-
- mysql_select_db($database_bryanmadge, $bryanmadge);
- $query_TrainingClub = "SELECT schedule.course_id, schedule.course_title_id, catalog.title, UNIX_TIMESTAMP(schedule.course_date) AS course_date, schedule.course_town, schedule.course_venue_id, schedule.course_classification
- FROM schedule INNER JOIN catalog ON schedule.course_title_id = catalog.catalog_id
- WHERE schedule.course_classification Like '$clubprefix%' ORDER BY $sortorder";
- $TrainingClub = mysql_query($query_TrainingClub, $bryanmadge) or die(mysql_error());
- $row_TrainingClub = mysql_fetch_assoc($TrainingClub);
- $totalRows_TrainingClub = mysql_num_rows($TrainingClub);
-
- $html = '<table BORDER="0" CELLPADDING="2" CELLSPACING="3">
- <tr>
- <td COLSPAN=2><div align="right" class="bmabody"><font size="-1">Sort by: <a href="training-club-schedule.php?orderby=course_date&club=';
- $html .= $clubprefix;
- ?>">Date</a> or <a href="training-club-schedule.php?orderby=title&club=<? echo $clubprefix ?>">Course Title</a></font></div></td>
- </tr>
- <tr bgcolor="#000066"><td class="bmatableheaderlink"><div align="left"><font color="#FFFFFF" SIZE="-1"><strong><a href="training-club-schedule.php?orderby=course_date&club=<? echo $clubprefix ?>">Date</a></strong></font></div></td>
- <td class="bmatableheaderlink"><div align="left"><font color="#FFFFFF" SIZE="-1"><strong><a href="training-club-schedule.php?orderby=title&club=<? echo $clubprefix ?>">Course Title </a></strong></font></div></td>
-
- </tr>
- <?php do { ?>
- <tr bgcolor="#E5E5E5"><td><div align="right"><font size="-1">
- <?php $dt = $row_TrainingClub['course_date'];
- echo date('jS F Y', $dt);
- ?>
- </font></div></td>
- <td><font size="-1"><?php echo "<a href=\"/courses/course-details.php?id=",$row_TrainingClub['course_title_id'],"\">",$row_TrainingClub['title'],"</a>"; ?></font></td>
-
- </tr>
- <?php } while ($row_TrainingClub = mysql_fetch_assoc($TrainingClub)); ?>
- </table>
- }
- ?>