// Get include files
require "../../include/db_connect.inc";
require "../../include/functions.inc";
if (isset($_GET["EventID"])) $EventID = $_GET["EventID"];
// Get Data
$query = "SELECT t1.EventID, DATE_FORMAT(t1.EventDate,'%W %D %b %Y %l:%i%p'), t2.EventTitle, t3.EventCategoriesTitle, DATE_FORMAT(t1.EventDate,'%M %Y'), t1.BookingLink, t2.EventImage, t2.EventText, t4.EventSeatingTitle, t5.MainPrice, t5.ConcessionsPrice, t5.ConcessionsTitle, t5.SpecialsIDArray, t5.SpecialsPriceArray, t2.EventSupTitle, t4.EventSeatingText, t4.EventSeatingImage, t2.FurtherInfoLink FROM Events AS t1, EventDescriptions AS t2, EventCategories AS t3, EventSeating AS t4, EventPricing AS t5 WHERE t2.EventdescriptionID = t1.EventdescriptionID AND t3.EventCategoriesID = t1.EventCategoriesID AND t4.EventSeatingID = t1.EventSeatingID AND t5.EventPricingID = t1.EventPricingID AND t1.EventID = '$EventID'";
$mysql_result = mysql_query($query, $mysql_link);
$rows = mysql_num_rows($mysql_result);
$temp_month = "";
$next_event = "";
while($row = mysql_fetch_row($mysql_result)) {
$EventID = $row[0];
$EventDate = $row[1];
$EventTitle = stripslashes($row[2]);
$EventCategoriesTitle = stripslashes($row[3]);
$EventMonth = $row[4];
$BookingLink = $row[5];
if (trim($row[6]) == "") {
$EventImage = "";
} else {
$EventImage = "
";
}
$EventText = nl2br(stripslashes($row[7]));
$EventSeatingTitle = stripslashes($row[8]);
$MainPrice = $row[9];
$ConcessionsPrice = $row[10];
$ConcessionsTitle = stripslashes($row[11]);
$SpecialsIDArray = $row[12];
$SpecialsPriceArray = $row[13];
$EventSupTitle = trim(stripslashes($row[14]));
$EventSeatingText = $row[15];
$EventSeatingImage = $row[16];
$FurtherInfoLink = $row[17];
if (trim($FurtherInfoLink) != "") {
$FurtherInfo = "
\n";
}
if ($EventSupTitle != "") {
$EventSupTitle = "$EventSupTitle
";
}
if ($ConcessionsPrice == "0.00") {
$Concessions = "";
} else {
if (trim($ConcessionsTitle) == "") {
$Concessions .= " | Concessions: £";
} else {
$Concessions .= " | ".trim($ConcessionsTitle).": £";
}
$Concessions .= $ConcessionsPrice;
}
}
if ($SpecialsIDArray != "") {
$query = "SELECT * FROM Specials ORDER BY SpecialsTitle";
$mysql_result = mysql_query($query, $mysql_link);
$rows = mysql_num_rows($mysql_result);
while($row = mysql_fetch_row($mysql_result)) {
$SpecialsID = $row[0];
$SpecialsTitle[$SpecialsID] = $row[1];
$SpecialsImage[$SpecialsID] = $row[3];
}
$cells = 1;
if (strstr($SpecialsIDArray,":")) {
$SpecialsIDs = explode(":", $SpecialsIDArray);
$SpecialsPrices = explode(":", $SpecialsPriceArray);
$cellwidth = floor(100 / count($SpecialsIDs));
for ($i = 0; $i < count($SpecialsIDs); $i++) {
$ID = $SpecialsIDs[$i];
$spec_price = $SpecialsPrices[$i];
$spec_title = $SpecialsTitle[$ID];
$spec_image = $SpecialsImage[$ID];
$cells++;
$table_row .= "\n";
$table_row .= "$spec_title: £$spec_price | \n";
$spec_icons .= "
\n";
}
} else {
$spec_title = $SpecialsTitle[$SpecialsIDArray];
$spec_image = $SpecialsImage[$SpecialsIDArray];
$table_row = "\n";
$table_row .= "$spec_title: £$SpecialsPriceArray | \n";
$spec_icons = "
\n";
}
$specials = "\n";
$specials .= "\n";
$specials .= $table_row;
$specials .= "
\n";
$specials .= "
\n";
} else {
$spec_icons = " \n";
}
if (($spec_icons == " \n") and ($EventSeatingTitle == "") and ($EventPH == "")) {
// Do Nothing
} else {
$specials .= "\n";
$specials .= "| $spec_icons\n";
$specials .= " | \n";
if ($EventSeatingTitle != "") {
$specials .= "Seating: $EventSeatingTitle | \n";
$specials .= " | \n";
} else {
$specials .= " | \n";
$specials .= " | \n";
}
if ($EventPH != "") {
$specials .= " | \n";
}
$specials .= "
\n";
}
?>
Theatr Hafren, Mid Wales Entertainment Venue for Comedy, Drama, Local Theatre, Musicals, Choirs and Children's Entertainment.
 |
echo($EventImage) ?>
echo($EventSupTitle) ?>
echo($EventTitle) ?>
echo($EventDate) ?>
echo($EventText) ?> |
|
|
Hafren ©2011. All Rights Reserved.
Box Office Enquiries: 01686 614555
Email:
|
|