$dbcnx = @mysql_connect("localhost", "transbel_db", "tra23"); if (!$dbcnx) { echo( "
Unable to connect to the " . "database server at this time.
" ); exit(); } if (! @mysql_select_db("transbel_news") ) { echo( "Unable to locate the " . "database at this time.
" ); exit(); } $resultCourses = mysql_query("select * FROM courses where section = '" . $_GET["s"] . "' order by id desc"); if (!$resultCourses) { echo("Error performing query: " . mysql_error() . "
"); exit(); } $numCourses = mysql_num_rows($resultCourses); if ($numCourses > 0) { if ($_GET["c"] > 0) { $resultFeaturedCourse = mysql_query("select * FROM courses where id = " . $_GET["c"]); } else { $resultFeaturedCourse = mysql_query("select * FROM courses where section = '" . $_GET["s"] . "' order by id desc limit 1 " ); } if (!$resultFeaturedCourse) { echo("Error performing query: " . mysql_error() . "
"); exit(); } $rowFeaturedCourse = mysql_fetch_array($resultFeaturedCourse); } $resultEvents = mysql_query("select * FROM events where section = '" . $_GET["s"] . "' order by id desc"); if (!$resultEvents) { echo("Error performing query: " . mysql_error() . "
"); exit(); } $numEvents = mysql_num_rows($resultEvents); $resultDownloads = mysql_query("select * FROM downloads2 where section = '" . $_GET["s"] . "' order by id desc"); if (!$resultDownloads) { echo("Error performing query: " . mysql_error() . "
"); exit(); } $numDownloads = mysql_num_rows($resultDownloads); $resultGallery = mysql_query("select * FROM gallery where section = '" . $_GET["s"] . "' order by id desc"); if (!$resultGallery) { echo("Error performing query: " . mysql_error() . "
"); exit(); } $numGallery = mysql_num_rows($resultGallery); $resultLinks = mysql_query("select * FROM links where section = '" . $_GET["s"] . "' order by id desc"); if (!$resultLinks) { echo("Error performing query: " . mysql_error() . "
"); exit(); } $numLinks = mysql_num_rows($resultLinks); ?>