/diary/diary.php
PHP | 150 lines | 129 code | 9 blank | 12 comment | 5 complexity | 59f694156b51a07676a517cc8d9f23fb MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php session_start(); ?>
- <?php require_once('../Connections/bryanmadge.php'); ?>
- <?php
- mysql_select_db($database_bryanmadge, $bryanmadge);
-
- if(isset($_SESSION['company']))
- $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 NOT IN(7,21) ORDER BY course_date";
- else
- $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 NOT IN(21) ORDER BY course_date";
-
- $Diary = mysql_query($query_Diary, $bryanmadge) or die(mysql_error());
- // $row_Diary = mysql_fetch_assoc($Diary);
- $totalRows_Diary = mysql_num_rows($Diary);
- ?>
- <html><!-- InstanceBegin template="/Templates/general.dwt" codeOutsideHTMLIsLocked="false" -->
- <head>
- <LINK REL="SHORTCUT ICON" HREF="../favicon.ico">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Dreamweaver MX">
- <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">
- <!-- #BeginEditable "doctitle" -->
- <title>Course Diary - Symmons Madge Associates Ltd</title>
- <!-- #EndEditable -->
- <link rel="stylesheet" href="../bma.css" type="text/css">
- <link rel="stylesheet" href="../print.css" type="text/css" media="print" />
- <!-- InstanceParam name="OptionalPageTitle" type="boolean" value="true" --><!-- InstanceParam name="OptionalBreadcrumbs" type="boolean" value="true" --><!-- InstanceParam name="Google Analytics Code" type="boolean" value="true" -->
- </head>
-
- <body><div class="printhide"><!-- #BeginLibraryItem "/Library/Masthead.lbi" -->
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="150" rowspan="2"><a href="../home.html" target="_top">
- <!-- <img src="../images/smalogo_sml_party_hat.gif" ALT="Symmons Madge Associates Ltd home" width="124" height="90" border="0">
- -->
- <img src="../images/smalogo_sml.gif" ALT="Symmons Madge Associates Ltd home" width="124" height="64" border="0"> </a></td>
- <td><p class="tagline"><font size="4">Training for a Successful Future</font></p></td>
- </tr>
- <tr>
- <td valign="bottom"><table class="masthead" width="100%" height=25 border="0" cellpadding="0" cellspacing="0">
- <tr>
- <!-- <td width="5%" bgcolor="#FFFFFF"> </td>-->
- <td align="left" valign="top"><img src="/images/corner_TL.gif" width="15" height="25"></td>
- <td> <a
- href="../courses/index.php" target="_top">Courses</a> <FONT color=#909090>:</FONT> <a
- href="diary.php" target="_top">Course Diary</a> <FONT color=#909090>:</FONT> <a
- href="../training/training-club.php" target="_top">Regional Training</a> <FONT color=#909090>:</FONT> <a
- href="../consultancy/index.html" target="_top">Consultancy</a> <FONT color=#909090>:</FONT> <a
- href="../search/index.php" target="_top">Search</a> <FONT color=#909090>:</FONT> <a
- href="../links.html" target="_top">Links</a> <FONT color=#909090>:</FONT> <a
- href="../company/about.html" target="_top">About us</a> <FONT color=#909090>:</FONT> <a
- href="../contact.html" target="_top">Contact</a> </td>
- </tr>
- </table></td>
- </tr>
- </table>
- <!-- #EndLibraryItem --></div>
- <div class="printonly">
- <div align="right"><img src="../images/smalogo_sml.gif" width="124" height="64" class="floatright"></div>
- </div>
- <div id="main">
- <p class="breadcrumbs printhide"><!-- #BeginEditable "breadcrumbs" --><a href="../home.html" target="_top">Home</a> > Course Diary <!-- #EndEditable --></p>
- <h1 class="bmapagetitle"><!-- #BeginEditable "title" -->Course Diary<!-- #EndEditable --></h1>
- <!-- #BeginEditable "body" -->
- <div id="main" class="bmabody">
- <p> For further details and bookings please <a href="../booking_form.php" target="_self">click
- here</a> or phone us on (01446) 775959 or e-mail <a href="mailto:admin@symmonsmadge.co.uk">admin@symmonsmadge.co.uk</a>.</p>
- <!-- <p>There are <?php echo $totalRows_Diary ?> courses in the table</p>
- --> <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="bmabody">
- <?php
- while ($row_Diary = mysql_fetch_assoc($Diary)) {
- // set $month
- $dt = $row_Diary['course_date'];
- $month = (int) date('n', $dt);
- // echo 'start month: ',$month,'<br>'; //debug
- // echo 'start current: ',$current,'<br>'; //debug
- ?>
-
- <?php if ($month <> $current) { // if first of new month ?>
- <tr valign="bottom">
- <td height=50 class="diarymonth" colspan="3">
- <?php
- // print month header
- $dt = $row_Diary['course_date'];
- echo date('F Y', $dt);
- ?>
- </td>
- </tr>
- <?php
- } ?>
-
- <tr>
- <td width="30" valign=top> <p>
- <?php
- // print course date
- $dt = $row_Diary['course_date'];
- $current = (int) date('n', $row_Diary['course_date']);
- // echo date('jS F Y', $dt);
- echo date('jS', $dt);
- ?>
- </p></td>
- <td valign=top> <p>
- <?php echo "<a href=\"/courses/course-details.php?id=",$row_Diary['course_title_id'],"\">",$row_Diary['title'],"</a>";
- ?>
- </p></td>
- <td valign=top> <div align="center">
- <?php echo $row_Diary['course_town']; ?>
- </div></td>
- <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>
- </tr>
- <?php
- // echo "<td>month: $month</td>"; //debug
- // echo "<td>current: ",(int) date('n', $row_Diary['course_date']),"</td>"; //debug
- ?>
-
-
- <?php
- $dt = $row_Diary['course_date']; //debug
- // $month = date('n', $dt); //debug
- // echo 'end month: ',$month,'<br>'; //debug
- // echo 'end current: ',$current,'<br>'; //debug
- } ?>
- </table>
- <p>Our Written Exercise and Study Day courses are offered in the Spring and Autumn each year. </p>
- <p>For further details and bookings please <a href="../booking_form.php" target="_self">click
- here</a> or phone us on (01446) 775959 or e-mail <a href="mailto:admin@symmonsmadge.co.uk">admin@symmonsmadge.co.uk</a>.
- </div>
- <!-- #EndEditable --></div>
- <div class="printhide"><!-- #BeginLibraryItem "/Library/Full Footer.lbi" --><hr width="65%">
- <p align="center"><!-- #BeginLibraryItem "/Library/Footer.lbi" --><!-- #EndLibraryItem --></p>
-
- <!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/Legal footer.lbi" --><div align="center" class="bmabody"><font size="1"><a href="../company/legal.html">Legal
- Notice</a><br>
- Copyright © Symmons Madge Associates Ltd, All Rights Reserved</font></div>
- <!-- #EndLibraryItem --><!-- Start of StatCounter Code -->
- <script type="text/javascript" language="javascript">
- var sc_project=337750;
- var sc_partition=1;
- </script>
-
- <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript>
- <a href="http://www.statcounter.com/" target="_blank"><img src="http://c2.statcounter.com/counter.php?sc_project=337750&java=0" alt="counter stats" border="0"></a>
- </noscript>
- <!-- End of StatCounter Code -->
- <!-- InstanceBeginEditable name="EditRegion1" --><!-- #BeginLibraryItem "/Library/Google Analytics PHP Include.lbi" -->
- <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/analyticstracking.php"); ?><!-- #EndLibraryItem --><!-- InstanceEndEditable --></div>
- </body>
- <!-- InstanceEnd --></html>
- <?php
- mysql_free_result($Diary);
- ?>