sma-website /courses/course-details.php

Language PHP Lines 158
MD5 Hash f9cbe8adfa72e41a5c7b89c6ee5e8cee Estimated Cost $1,310 (why?)
Repository https://bitbucket.org/molusc/sma-website.git View Raw File
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?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">&nbsp;</td>-->
        <td align="left" valign="top"><img src="/images/corner_TL.gif" width="15" height="25"></td>
        <td>&nbsp;&nbsp;<a 		  
						href="index.php" target="_top">Courses</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
						href="../diary/diary.php" target="_top">Course&nbsp;Diary</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
						href="../training/training-club.php" target="_top">Regional Training</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
						href="../consultancy/index.html" target="_top">Consultancy</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
						href="../search/index.php" target="_top">Search</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
                        href="../links.html" target="_top">Links</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
						href="../company/about.html" target="_top">About us</a> &nbsp;<FONT color=#909090>:</FONT>&nbsp;&nbsp;<a 
						href="../contact.html" target="_top">Contact</a>&nbsp;&nbsp;</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>&nbsp;&gt;&nbsp;<a href="../training/index.html" target="_top">Training</a>&nbsp;&gt;&nbsp;<a href="index.php">Courses</a>&nbsp;&gt;&nbsp; <?php echo "$row[title]"; ?></p>
  <h1 class="bmapagetitle"> <strong><font face="arial" size="4">&nbsp;</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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></strong></span><span class="bmapagetitle"><strong><font face="arial" size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	 <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;
					?>
        &nbsp;&nbsp;</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 &copy; 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&amp;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);
?>
Back to Top