PageRenderTime 42ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/hsc/hsc-diary.php

https://bitbucket.org/molusc/sma-website
PHP | 147 lines | 126 code | 9 blank | 12 comment | 4 complexity | b2a8eea5e757f7a052a464b11884cdd4 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php session_start(); ?>
  2. <?php require_once('../Connections/bryanmadge.php'); ?>
  3. <?php
  4. mysql_select_db($database_bryanmadge, $bryanmadge);
  5. $query_Diary = "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 FROM schedule INNER JOIN catalog ON schedule.course_title_id = catalog.catalog_id WHERE (course_date >= NOW()) AND categoryid IN(21) ORDER BY course_date";
  6. $Diary = mysql_query($query_Diary, $bryanmadge) or die(mysql_error());
  7. // $row_Diary = mysql_fetch_assoc($Diary);
  8. $totalRows_Diary = mysql_num_rows($Diary);
  9. ?>
  10. <html><!-- InstanceBegin template="/Templates/general.dwt" codeOutsideHTMLIsLocked="false" -->
  11. <head>
  12. <LINK REL="SHORTCUT ICON" HREF="../favicon.ico">
  13. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  14. <meta name="GENERATOR" content="Dreamweaver MX">
  15. <meta name="keywords" content="CDM Regulations, CESMM, civil engineering, construction management, contract administration, contract procedures, courses, environmental awareness, geotechnical, Health and safety, ICE Conditions of Contract, ICE Professional Review, JCT Form of Contract, Method of Measurement for Highway Works, MMHW, NEC New Engineering and Construction Contract, Project management, report writing, site supervision, Standard Forms of Contract, training, AMPR, CET, CPD, TMPR, Eurocodes">
  16. <!-- #BeginEditable "doctitle" -->
  17. <title>Health &amp; Social Care Course Diary - Symmons Madge Associates Ltd</title>
  18. <!-- #EndEditable -->
  19. <link rel="stylesheet" href="../bma.css" type="text/css">
  20. <link rel="stylesheet" href="../print.css" type="text/css" media="print" />
  21. <!-- InstanceParam name="OptionalPageTitle" type="boolean" value="true" --><!-- InstanceParam name="OptionalBreadcrumbs" type="boolean" value="true" --><!-- InstanceParam name="Google Analytics Code" type="boolean" value="true" -->
  22. </head>
  23. <body><div class="printhide"><!-- #BeginLibraryItem "/Library/Masthead.lbi" -->
  24. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  25. <tr>
  26. <td width="150" rowspan="2"><a href="../home.html" target="_top">
  27. <!-- <img src="../images/smalogo_sml_party_hat.gif" ALT="Symmons Madge Associates Ltd home" width="124" height="90" border="0">
  28. -->
  29. <img src="../images/smalogo_sml.gif" ALT="Symmons Madge Associates Ltd home" width="124" height="64" border="0"> </a></td>
  30. <td><p class="tagline"><font size="4">Training for a Successful Future</font></p></td>
  31. </tr>
  32. <tr>
  33. <td valign="bottom"><table class="masthead" width="100%" height=25 border="0" cellpadding="0" cellspacing="0">
  34. <tr>
  35. <!-- <td width="5%" bgcolor="#FFFFFF">&nbsp;</td>-->
  36. <td align="left" valign="top"><img src="/images/corner_TL.gif" width="15" height="25"></td>
  37. <td>&nbsp;&nbsp;<a
  38. href="../courses/index.php" target="_top">Courses</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  39. href="../diary/diary.php" target="_top">Course&nbsp;Diary</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  40. href="../training/training-club.php" target="_top">Regional Training</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  41. href="../consultancy/index.html" target="_top">Consultancy</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  42. href="../search/index.php" target="_top">Search</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  43. href="../links.html" target="_top">Links</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  44. href="../company/about.html" target="_top">About us</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a
  45. href="../contact.html" target="_top">Contact</a>&nbsp;&nbsp;</td>
  46. </tr>
  47. </table></td>
  48. </tr>
  49. </table>
  50. <!-- #EndLibraryItem --></div>
  51. <div class="printonly">
  52. <div align="right"><img src="../images/smalogo_sml.gif" width="124" height="64" class="floatright"></div>
  53. </div>
  54. <div id="main">
  55. <p class="breadcrumbs printhide"><!-- #BeginEditable "breadcrumbs" --><a href="../home.html" target="_top">Home</a>&nbsp;&gt;&nbsp;Health &amp; Social Care &gt; Course Diary <!-- #EndEditable --></p>
  56. <h1 class="bmapagetitle"><!-- #BeginEditable "title" -->Health &amp; Social Care Course Diary<img src="/images/otherlogos/bsi.gif" align=center width="65" height="65" alt="BSI logo" class="bsilogo"><!-- #EndEditable --></h1>
  57. <!-- #BeginEditable "body" -->
  58. <div id="main" class="bmabody">
  59. <p> For further details and bookings please <a href="../booking_form.php" target="_self">click
  60. here</a> or phone us on (01446) 775959 or e-mail <a href="mailto:natalie.collingham@symmonsmadge.co.uk">natalie.collingham@symmonsmadge.co.uk</a>.</p>
  61. <!-- <p>There are <?php echo $totalRows_Diary ?> courses in the table</p>
  62. --> <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="bmabody">
  63. <?php
  64. while ($row_Diary = mysql_fetch_assoc($Diary)) {
  65. // set $month
  66. $dt = $row_Diary['course_date'];
  67. $month = (int) date('n', $dt);
  68. // echo 'start month: ',$month,'<br>'; //debug
  69. // echo 'start current: ',$current,'<br>'; //debug
  70. ?>
  71. <?php if ($month <> $current) { // if first of new month ?>
  72. <tr valign="bottom">
  73. <td height=50 class="diarymonth" colspan="3">
  74. <?php
  75. // print month header
  76. $dt = $row_Diary['course_date'];
  77. echo date('F Y', $dt);
  78. ?>
  79. </td>
  80. </tr>
  81. <?php
  82. } ?>
  83. <tr>
  84. <td width="30" valign=top> <p>
  85. <?php
  86. // print course date
  87. $dt = $row_Diary['course_date'];
  88. $current = (int) date('n', $row_Diary['course_date']);
  89. // echo date('jS F Y', $dt);
  90. echo date('jS', $dt);
  91. ?>
  92. </p></td>
  93. <td valign=top> <p>
  94. <?php echo "<a href=\"/courses/course-details.php?id=",$row_Diary['course_title_id'],"\">",$row_Diary['title'],"</a>";
  95. ?>
  96. </p></td>
  97. <td valign=top> <div align="center">
  98. <?php echo $row_Diary['course_town']; ?>
  99. </div></td>
  100. <td valign="top" bgcolor="#ffffff"><font SIZE="-1"><?php echo "<a href=\"../booking_form.php?id=",$row_Diary['course_title_id'],"&venue=",rawurlencode($row_Diary['course_town']),"&date=",rawurlencode(date('jS F Y', $dt)),"&title=",rawurlencode($row_Diary['title']),"\">Book</a>"; ?></font></td>
  101. </tr>
  102. <?php
  103. // echo "<td>month: $month</td>"; //debug
  104. // echo "<td>current: ",(int) date('n', $row_Diary['course_date']),"</td>"; //debug
  105. ?>
  106. <?php
  107. $dt = $row_Diary['course_date']; //debug
  108. // $month = date('n', $dt); //debug
  109. // echo 'end month: ',$month,'<br>'; //debug
  110. // echo 'end current: ',$current,'<br>'; //debug
  111. } ?>
  112. </table>
  113. <p>&nbsp;</p>
  114. <p>For further details and bookings please <a href="../booking_form.php" target="_self">click
  115. here</a> or phone us on (01446) 775959 or e-mail <a href="mailto:natalie.collingham@symmonsmadge.co.uk">natalie.collingham@symmonsmadge.co.uk</a>.
  116. </div>
  117. <!-- #EndEditable --></div>
  118. <div class="printhide"><!-- #BeginLibraryItem "/Library/Full Footer.lbi" --><hr width="65%">
  119. <p align="center"><!-- #BeginLibraryItem "/Library/Footer.lbi" --><!-- #EndLibraryItem --></p>
  120. <!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/Legal footer.lbi" --><div align="center" class="bmabody"><font size="1"><a href="../company/legal.html">Legal
  121. Notice</a><br>
  122. Copyright &copy; Symmons Madge Associates Ltd, All Rights Reserved</font></div>
  123. <!-- #EndLibraryItem --><!-- Start of StatCounter Code -->
  124. <script type="text/javascript" language="javascript">
  125. var sc_project=337750;
  126. var sc_partition=1;
  127. </script>
  128. <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript>
  129. <a href="http://www.statcounter.com/" target="_blank"><img src="http://c2.statcounter.com/counter.php?sc_project=337750&amp;java=0" alt="counter stats" border="0"></a>
  130. </noscript>
  131. <!-- End of StatCounter Code -->
  132. <!-- InstanceBeginEditable name="EditRegion1" --><!-- #BeginLibraryItem "/Library/Google Analytics PHP Include.lbi" -->
  133. <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/analyticstracking.php"); ?><!-- #EndLibraryItem --><!-- InstanceEndEditable --></div>
  134. </body>
  135. <!-- InstanceEnd --></html>
  136. <?php
  137. mysql_free_result($Diary);
  138. ?>