session_start();
require("../common/db.php");
if(!empty($_REQUEST['ID'])){
$query = "SELECT title, byLine, startDate, endDate, mainImage, altImage, ".
"synopsisShort, synopsisLong, buyTicketsLink, aboutPlayLink, ".
"articlesLink, seeVideoLink,photosLink,offersLink, theater, ".
"DATE_FORMAT(startDate,'%M') as startMonth, ".
"DATE_FORMAT(startDate,'%e') as startDay, ".
"DATE_FORMAT(startDate,'%Y') as startYear, ".
"DATE_FORMAT(endDate,'%M') as endMonth, ".
"DATE_FORMAT(endDate,'%e') as endDay, ".
"DATE_FORMAT(endDate,'%Y') as endYear ".
"FROM performance p INNER JOIN theater t ON p.theaterID = t.theaterID ".
"WHERE viewable='1' AND performanceID= '" . $_REQUEST['ID'] . "'";
$dbResults = mysql_query($query);
$query = "SELECT CONCAT(firstName, ' ', lastName) as name, a.actorID, image, archived ".
"FROM actor a INNER JOIN performance_actor pa ON a.actorID = pa.actorID ".
"WHERE viewable='1' AND performanceID = '" . $_REQUEST['ID'] . "' AND actorTypeID='1' ORDER BY lastName";
$dbResidentActorResults = mysql_query($query);
$numResidentActors = mysql_num_rows($dbResidentActorResults);
$query = "SELECT CONCAT(firstName, ' ', lastName) as name, a.actorID, image, archived ".
"FROM actor a INNER JOIN performance_actor pa ON a.actorID = pa.actorID ".
"WHERE viewable='1' AND performanceID = '" . $_REQUEST['ID'] . "' AND actorTypeID='2' ORDER BY lastName";
$dbGuestActorResults = mysql_query($query);
$numGuestActors = mysql_num_rows($dbGuestActorResults);
$query = "SELECT CONCAT(firstName, ' ', lastName) as name, a.actorID, image, archived ".
"FROM actor a INNER JOIN performance_actor pa ON a.actorID = pa.actorID ".
"WHERE viewable='1' AND performanceID = '" . $_REQUEST['ID'] . "' AND actorTypeID='3' ORDER BY lastName";
$dbInternActorResults = mysql_query($query);
$numInternActors = mysql_num_rows($dbInternActorResults);
}
?>
The Rep - Now Playing
|
 |
| |
if(!$performance = mysql_fetch_array($dbResults,MYSQL_ASSOC)){ ?>
| Sorry invalid performance id. |
}else{
?>
|
= $performance['title']?>
|
 |
if($performance['mainImage'] != ""){ ?>
 |
} ?>
 |
if($performance['buyTicketsLink'] !=""){ ?>
} ?>
if($performance['aboutPlayLink'] !=""){ ?>
} ?>
if($performance['articlesLink'] !=""){ ?>
} ?>
if($performance['seeVideoLink'] !=""){ ?>
} ?>
if($performance['photosLink'] != ""){ ?>
} ?>
if($performance['offersLink'] !=""){ ?>
} ?>
|
=$performance['byLine']?>
if($performance['startYear'] == $performance['endYear']){
if($performance['startMonth'] == $performance['endMonth']){
$date = $performance['startMonth'] . " " . $performance['startDay'] ." - " . $performance['endDay'];
if(date("Y") != $performance['endYear']){
$date .= ", " . $performance['endYear'];
}
}else{
$date = $performance['startMonth'] . " " . $performance['startDay'] ." - " . $performance['endMonth'] . " " . $performance['endDay'];
if(date("Y") != $performance['endYear']){
$date .= ", " . $performance['endYear'];
}
}
}else{
$date = $performance['startMonth'] . " " . $performance['startDay'] .", " . $performance['startYear'] ." - " . $performance['endMonth'] . " " . $performance['endDay'] .", " . $performance['endYear'];
}
echo $date;
?>
|
| = $performance['theater']?> |
if($performance['synopsisLong'] !=""){ ?>
 |
| = $performance['synopsisLong']?> |
} ?>
 |
if($numResidentActors > 0 || $numGuestActors > 0 || $numInternActors > 0){ ?>
| Featured actors: |
 |
if($numResidentActors > 0){
$cnt=0;
while($actor = mysql_fetch_array($dbResidentActorResults,MYSQL_ASSOC)){
$cnt++
?>
if($actor['archived'] == "0"){ ?>
} ?>
if($actor['image'] != ""){ ?>
">
}else{ ?>
} ?>
=$actor['name']?>
if($actor['archived'] == "0"){ ?> } ?>
|
if($cnt == 5){ ?>
 |
$cnt=0;
}else{ ?>
 |
}
}
if($numGuestActors > 0 || $numInternActors > 0){ ?>
Including:
while($actor = mysql_fetch_array($dbGuestActorResults,MYSQL_ASSOC)){
$tempActor = "";
if($actor['archived'] == "0"){
$tempActor = '';
}
$tempActor .= $actor['name'];
if($actor['archived'] == "0"){
$tempActor .= '';
}
$featureActorList[] = $tempActor;
}
while($actor = mysql_fetch_array($dbInternActorResults,MYSQL_ASSOC)){
$tempActor = "";
if($actor['archived'] == "0"){
$tempActor = '';
}
$tempActor .= $actor['name'];
if($actor['archived'] == "0"){
$tempActor .= '';
}
$featureActorList[] = $tempActor;
}
echo implode($featureActorList,", ");
}
}else{
$cnt=0;
while($actor = mysql_fetch_array($dbGuestActorResults,MYSQL_ASSOC)){
$cnt++
?>
|
if($actor['archived'] == "0"){ ?>
} ?>
if($actor['image'] != ""){ ?>
">
}else{ ?>
} ?>
=$actor['name']?>
if($actor['archived'] == "0"){ ?> } ?>
|
if($cnt == 5){ ?>
 |
$cnt=0;
} else{ ?>
 |
}
}
if($numInternActors > 0){ ?>
Also featuring:
while($actor = mysql_fetch_array($dbInternActorResults,MYSQL_ASSOC)){
$tempActor = "";
if($actor['archived'] == "0"){
$tempActor = '';
}
$tempActor .= $actor['name'];
if($actor['archived'] == "0"){
$tempActor .= '';
}
$featureActorList[] = $tempActor;
}
echo implode($featureActorList,", ");
}
}?>
| |
}
} ?>
|
|
|
|
|
 |
|
 |
|
|
Privacy Policy