//This file pulls the class dates from the database and creates a dropdown list that can be used on non-PHP pages. //NOTE: the output of this file is javascript. //Identify the output of this file as javascript Header("content-type: application/x-javascript"); $con = mysql_connect("relativi.dot5hostingmysql.com","relativi","j55t#rdis"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("fhtc_reg", $con); $result1 = mysql_query(" SELECT * FROM nfs_class_dates WHERE start_date >= '" . date("Y-m-d") . "' AND start_date < '2999-00-00' ORDER BY start_date LIMIT 12"); echo "document.write(\"
Date | Class | Additional Information | \")\n"; while($row = mysql_fetch_array($result1)) { $row['start_date'] = date("M j", strtotime($row['start_date'])) . ", " . date("Y", strtotime($row['start_date'])); // . " - " . date("j", strtotime($row['end_date'])) if ($row['full'] == 'N') { echo "document.write(\"
---|---|---|
" . $row['start_date'] . " | " . $row['class_name'] . " | " . $row['comments'] . " |
" . $row['start_date'] . " | " . $row['class_name'] . " (Full--Standby Only) | " . $row['comments'] . " |