[insert_php]
$parms = “yes”;
$name = “‘” . $_GET[‘person’] . “‘”;
if ($name == “””) {$parms = “no”;}
if ($parms == “yes”) {
$parm1 = str_replace(“‘”,””,$name) ;
$parmurl = str_replace(“~”,”-“,$parm1);
$parm1 = str_replace(“~”,” “,$parm1);
$name1 = $parm1;
$parm1 = “‘%” . $parm1 . “%'” ;
$parm2 = “now”;
$type = “‘” . $_GET[‘type’] . “‘”;
if ($type == “‘all'”) {$parm2 = “all”;}
$perfparm = “Back“;
if ($parm1 <> “”) {
echo “” . $name1 . ““;
$url = “http://www.lictc.org/wp-content/uploads/” . $parmurl . “-headshot.jpg”;
$file_exists = (@fopen($url, “r”)) ? true : false;
if ($file_exists == 1) {
echo ” Headshot“;
}
/*
if ($file_exists == 1) {
echo ” Headshot“;
}
*/
$url = “http://www.lictc.org/wp-content/uploads/” . $parmurl . “-resume.pdf”;
$file_exists = (@fopen($url, “r”)) ? true : false;
if ($file_exists == 1) {
echo ” Resume“;
}
/*
if ($file_exists == 1) {
echo ” Resume“;
}
*/
echo “
“;
}
/* CAST */
$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”);
if ($parm2 == “all”) {
$sql = “SELECT Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Name like $parm1 and Cast.Type <> ‘Production’ order by Opens DESC”;
}
else {
$sql = “SELECT Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Name like $parm1 and Closes >= ‘$today’ and Cast.Type <> ‘Production’ order by Opens DESC”;
}
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
// print header
echo “
Cast
“;
echo “
Opened | Role | Show | Company |
” . $dates . “” . “ | ” . $row[“Role”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $comp . “ |
” . $openm3y . “” . “ | ” . $row[“Role”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $comp . “ |
“;
$mysqli->close();
//PRODUCTION TEAM
echo “
“;
$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”);
if ($parm2 == “all”) {
$sql = “SELECT Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Name like $parm1 and Cast.Type = ‘Production’ order by Opens DESC”;
}
else {
$sql = “SELECT Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Name like $parm1 and Closes >= ‘$today’ and Cast.Type = ‘Production’ order by Opens DESC”;
}
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
// print header
echo “
Production Team
“;
echo “
Opened | Role | Show | Company |
” . $dates . “” . “ | ” . $row[“Role”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $comp . “ |
” . $openm3y . “” . “ | ” . $row[“Role”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $comp . “ |
“;
$mysqli->close();
}
[/insert_php]