[insert_php]
$parms = “yes”;
if($_GET[“prod”] == “”) $parms = “no”;
$prod = “‘” . $_GET[‘prod’] . “‘”;
$person = $_GET[‘person’] ;
$compparm = $_GET[‘company’] ;
$compdisplay = str_replace(“~”,” “,$compparm);
$company = “‘” . $_GET[‘company’] . “‘”;
$company = str_replace(“~”,” “,$company);
if ($person <> “”) {
$pers = str_replace(“~”,” “,$person);
$pers = str_replace(“‘”,”‘”,$pers);
echo “ Performance Schedule for ” . “” . $pers . ““;
};
if ($compparm <> “”) {
//echo “
“;
echo “” . $compdisplay. “
“;
//**************
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
$sql = “SELECT Company, Address, Town, Zip, Phone, Website, Email from `Companies`
where Company = $company “;
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
if ($row[“Address”] <> “”) {echo $row[“Address”] . “, ” . $row[“Town”];}
if ($row[“Website”] <> “”) {echo “
” . “” . $row[“Website”] .
“” ;}
if ($row[“Email”] <> “”) {echo “
” . “” . $row[“Email”] .
“” ;}
if ($row[“Phone”] <> “”) {echo “
” . $row[“Phone”];}
}
}
$mysqli->close();
}
$showparm = ““];
date_default_timezone_set(“America/New_York”);
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
$today = date(“Y-m-d”);
$date = strtotime(“+5 day”);
$wkend = date(“Y-m-d”, $date);
if ($compparm != “”) {
echo “
” . “Click on date range to see show dates, times and location. Click on show name for performance details.
” . “
“;
$sql = “SELECT Production, Company, ShowName, Type, Venue, Town, Opens, Closes from `Performances`
where Closes >= ‘$today’ and Opens <= '$wkend' and Status = 'active' and Company = $company order by ShowName, Company";
}
else {
echo "” .”Click show name for performance details. Click on company name to see shows performed by that company. Click on date range to see show dates, times and location.
” ;
$sql = “SELECT Production, Company, ShowName, Type, Venue, Town, Opens, Closes from `Performances`
where Closes >= ‘$today’ and Opens <= '$wkend' and Status = 'active'
order by ShowName, Company";
}
$result = $mysqli->query($sql);
$olddate = “old”;
echo “
“;
if ($result->num_rows > 0) {
echo “
Now Playing
“;
if ($compparm == “”) {
echo “
Show | Company | Dates |
Dates | Type | Show | ” . $persparm . $dates . “ |
” . $showparm . $row[“ShowName”] . ““. “ | ” . $companyparm . $row[“Company”] . ““. “ | ” . $persparm . $dates . “ |
” . $persparm . $dates . “ | ” . $row[“Type”] . “ | ” . $showparm . $row[“ShowName”] . ““. “ |
“;
$mysqli->close();
//COMING SOON *******************************************************************
//Coming Soon
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
$today = date(“Y-m-d”);
$oldmonth = “Start”;
if ($compparm != “”) {
$sql = “SELECT Production, Company, ShowName, Type, Venue, Town, Opens, Closes from `Performances`
where Closes >= ‘$today’ and Opens > ‘$wkend’ and Status = ‘active’ and Company = $company order by Opens”;
} Else {
$sql = “SELECT Production, Company, ShowName, Type, Venue, Town, Opens, Closes from `Performances`
where Closes >= ‘$today’ and Opens > ‘$wkend’ and Status = ‘active’ order by Opens, ShowName”;
}
$result = $mysqli->query($sql);
$olddate = “old”;
if ($result->num_rows > 0) {
//echo “
“;
echo “
Coming Soon
“;
//echo
“;
if ($compparm == “”) {
echo “
Show | Company | Dates |
Dates | Type | Show |
” . $openmonth . “ | ||
” . $showparm . $row[“ShowName”] . ““. “ | ” . $companyparm . $row[“Company”] . ““. “ | ” . $persparm . $dates . “ |
” . $persparm . $dates . “ | ” . $row[“Type”] . “ | ” . $showparm . $row[“ShowName”] . ““. “ |
“;
$mysqli->close();
//Previous Shows ************************************************************
if ($compparm <> “”) {
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
$today = date(“Y-m-d”);
$oldmonth = “Start”;
if ($compparm != “”) {
$sql = “SELECT Production, Company, ShowName, Type, Venue, Town, Opens, Closes from `Performances`
where Closes < '$today' and Status = 'active' and Company = $company order by Opens DESC";
} Else {
$sql = "SELECT Production, Company, ShowName, Type, Venue, Town, Opens, Closes from `Performances`
where Closes < '$today' and Status = 'active' order by Opens DESC, ShowName";
}
$result = $mysqli->query($sql);
$olddate = “old”;
if ($result->num_rows > 0) {
//echo “
“;
echo “
Past Shows
“;
//echo
“;
if ($compparm == “”) {
echo “
Show | Company | Dates |
Opened | Type | Show |
” . $openmonth . “ | ||
” . $showparm . $row[“ShowName”] . ““. “ | ” . $companyparm . $row[“Company”] . ““. “ | ” . $persparm . $dates . “ |
” . $openm3y . “ | ” . $row[“Type”] . “ | ” . $showparm . $row[“ShowName”] . ““. “ |
“;
$mysqli->close();
}
if ($compparm != “”) {
echo ““;
}
[/insert_php]