/courses/course-details.php
PHP | 158 lines | 151 code | 4 blank | 3 comment | 10 complexity | f9cbe8adfa72e41a5c7b89c6ee5e8cee MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php session_start(); ?>
- <?php //setup and error-check database connection
- $location = "localhost";
- $username = "wf-c32a-0dfcce";
- $password = "bma";
- $database = "wf-c32a-0dfcce";
- $conn = mysql_connect("$location","$username","$password");
- if (!$conn) die ("Could not connect MySQL");
- mysql_select_db($database,$conn) or die ("Could not open database");
- $courseidnum = $_GET["id"];
- $query = "SELECT *
- FROM catalog
- WHERE (catalog_id=$courseidnum);";
- //echo $query;
- if ($result = mysql_query($query)) {
- $row = mysql_fetch_array($result);
- ?>
- <html>
- <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="<?php echo "$row[keywords]"; ?>">
-
- <title><?php echo "$row[title]"; ?></title>
- <link rel="stylesheet" href="/print.css" type="text/css" media="print" />
-
- <link rel="stylesheet" href="/bma.css" type="text/css">
- <link rel="stylesheet" href="/print.css" type="text/css" media="print" />
- </head>
-
- <body>
- <a href="index.php?catid=6#5">Training Courses - Symmons Madge Associates Ltd</a>
- <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="index.php" target="_top">Courses</a> <FONT color=#909090>:</FONT> <a
- href="../diary/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"><a href="../home.html" target="_top">Home</a> > <a href="../training/index.html" target="_top">Training</a> > <a href="index.php">Courses</a> > <?php echo "$row[title]"; ?></p>
- <h1 class="bmapagetitle"> <strong><font face="arial" size="4"> </font></strong>
- </h1>
- <div class="bmabody" id="main">
- <h1 class="coursetitle"><a name="top"></a><?php echo "$row[title]"; ?> <span class="bmapagetitle"><strong><font face="arial" size="4"> </font></strong></span><span class="bmapagetitle"><strong><font face="arial" size="4"> <strong><font face="arial" size="4"><strong><font face="arial" size="4"><font face="arial" size="1"></font></font></strong></font></strong></font></strong></span></h1>
- <h2 class="coursesubtitle"><?php echo "$row[subtitle]"; ?></h2>
- <?php echo "$row[description]"; ?> <?php echo "$row[objectives]"; ?>
- <?php echo "$row[outline]"; ?>
- <?php echo "$row[modeofdelivery]"; ?>
- <?php echo "$row[benefitsperceived]"; ?>
- <?php echo "$row[intended_for]"; ?>
- <?php echo "$row[precourserequirements]"; ?>
- <?php echo "$row[duration]"; ?>
- <h3>Locations:</h3>
- <?php
- $query2 = "SELECT course_title_id, UNIX_TIMESTAMP(schedule.course_date) AS course_date, course_town
- FROM schedule
- WHERE (course_title_id=$courseidnum) and (course_date >= NOW()) ORDER BY course_date;";
- // echo $query2;
- if ($result2 = mysql_query($query2)) {
- $numrows2 = mysql_num_rows($result2);
- // echo "<p>The course is scheduled $numrows2 times:</p>";
- if ($numrows2 < 1) {
- echo "<p>This course is currently only being provided on an In-house basis but will
- be offered as an open course immediately sufficient numbers have registered
- their interest.</p>
- <p>To register your interest go to <a href=/contact.html>Contact Us</a> and
- fill in the email form or telephone 01446 775959<br>
- </p>";
- } else {
- ?>
- <table BORDER="0" CELLPADDING="2" CELLSPACING="3">
- <tr bgcolor="#000066">
- <td width="90"><div align="left"><font color="#FFFFFF" SIZE="-1"><strong>Date</strong></font></div></td>
- <td width="90"><div align="left"><font color="#FFFFFF" SIZE="-1"><strong>Venue</strong></font></div></td>
- </tr>
- <?php
- While ($row2 = mysql_fetch_array($result2)) { ?>
- <tr bgcolor="#CCCCCC">
- <td> <font SIZE="-1">
- <?php
- $dt = $row2[course_date];
- $dt = date('jS F Y', $dt);
- echo $dt;
- ?>
- </font> </td>
- <td><font SIZE="-1"><?php echo "$row2[course_town]"; ?></font></td>
- <td bgcolor="#ffffff"><font SIZE="-1"><?php echo "<a href=\"../booking_form.php?id=",$row2['course_title_id'],"&venue=",rawurlencode($row2[course_town]),"&date=",rawurlencode($dt),"&title=",rawurlencode($row[title]),"\">Book</a>"; ?></font></td>
- </tr>
- <?php
- }
- ?>
- </table>
- <p>
- <?php
- }
- ?>
- <?php
- } else {
- echo "Sorry, there was a Database error - cannot display course schedule.<br> Please contact us for information.";
- }
- } else {
- echo "<p>Sorry, there was a Database error - cannot display course details.</p><p>Please contact us</a> for information.</p>";
- }
- ?>
- <?php echo "$row[fee]"; ?>
- </p>
- <p><!-- #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 -->
- </p>
- </div>
- </div>
- <div class="printhide">
- <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 -->
- </div>
- <!-- #BeginLibraryItem "/Library/Google Analytics PHP Include.lbi" -->
- <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/analyticstracking.php"); ?><!-- #EndLibraryItem --></body>
- </html>
- <?php
- mysql_free_result($result);
- ?>