Cast & Production Team Backup

[insert_php]
$parms = “yes”;
if($_GET[“parm1”] == “”) $parms = “no”;
$parm1 = “‘” . $_GET[‘parm1’] . “‘”;
$perf = $_GET[‘parm1’] ;
$show = $_GET[‘show’] ;

if ($show <> “”) {
$showfix = str_replace(“~”,” “,$show);
$showfix = str_replace(“^”,”&”,$showfix);
$showfix = str_replace(“@”,”‘”,$showfix);
$showfix = str_replace(“\\”,””,$showfix);
echo “” . “” . $showfix . ““;
}

$perfparm = “Back“;

$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);

if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}

$sql = “SELECT Production, Type, Role, Name from `Cast`
where Production = $parm1 and Type <> ‘Production’ and Role <> ” order by Type, ID”;
$result = $mysqli->query($sql);
$norole = 1;
if ($result->num_rows > 0) {
$norole = 0;
}

$mysqli->close();

$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);

if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}

$sql = “SELECT Production, Type, Role, Name from `Cast`
where Production = $parm1 and Type <> ‘Production’ order by Type, ID”;

$result = $mysqli->query($sql);

if ($result->num_rows > 0) {
// output data of each row
echo “

Cast

“;
echo “

“;
echo “

“;

if ($norole == 0) {
echo “

“;
}
else {
echo “

“;
}

while($row = $result->fetch_assoc()) {
$type = $row[“Type”];

$name0 = $row[“Name”];
$name = str_replace(” “,”~”,$name0);
$name = str_replace(“&”,”^”,$name);
$name = str_replace(“&”,”^”,$name);
$persparm = “” ;

if ($norole == 0) {
echo “

“;
}
else {
echo “

“;
}

}
} else {

}
echo “

Role Name
Name
” . $row[“Role”] . “” . “ ” . $persparm . $row[“Name”] . “
” . $persparm . $row[“Name”] . “

“;
$mysqli->close();

//PRODUCTION TEAM ****************************************************************

$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}

$sql = “SELECT Production, Type, Role, Name from `Cast`
where Production = $parm1 and Type = ‘Production’ order by Type, ID”;

$result = $mysqli->query($sql);

if ($result->num_rows > 0) {
// output data of each row

echo “

Production Team

“;
echo “

“;
echo “

“;
//echo “

“;

while($row = $result->fetch_assoc()) {
$type = $row[“Type”];
$name0 = $row[“Name”];
$name = str_replace(” “,”~”,$name0);
$name = str_replace(“&”,”^”,$name);
$name = str_replace(“&”,”^”,$name);
$persparm = “” ;

echo “

“;
}

} else {

}

echo “

Role Name
” . $row[“Role”] . “” . “ ” . $persparm . $row[“Name”] . “

“;
$mysqli->close();

[/insert_php]