[insert_php]
$parms = “yes”;
if($_GET[“parm1”] == “”) $parms = “no”;
$parm1 = “‘” . $_GET[‘parm1’] . “‘”;
echo “
“;
echo “
“;
$showfix = str_replace(” “,”~”,$row[“ShowName”]);$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
mysqli_set_charset($mysqli, ‘utf8mb4’);
if ($parms <> “no”) {
$sql = “SELECT AuditionInfo.Production, AuditionCategory, AuditionInstructions, RehearsalDates, AuditionQuestions, Submissions, AuditionDates, CallBackDates, ProductionNotes, Performances.ShowName, Performances.Company, Performances.Note1, Performances.ShowNote, Performances.Times, Performances.Director, Performances.MusicalDirector, Performances.Choreographer, Performances.Producer from `AuditionInfo`
INNER JOIN Performances
ON AuditionInfo.Production = Performances.Production
where AuditionInfo.Production = $parm1 “;
} else {
$sql = “SELECT AuditionInfo.Production, AuditionCategory, AuditionInstructions, RehearsalDates, AuditionQuestions, Submissions, AuditionDates, CallBackDates, ProductionNotes, Performances.ShowName, Performances.Company, Performances.Note1, Performances.ShowNote, Performances.Times, Performances.Director, Performances.MusicalDirector, Performances.Choreographer, Performances.Producer from `AuditionInfo`
INNER JOIN Performances
ON AuditionInfo.Production = Performances.Production “;
}
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$showfix = str_replace(” “,”~”,$row[“ShowName”]);
$showfix = str_replace(“&”,”^”,$showfix);
$showfix2 = str_replace(“&”,”and”,$row[“ShowName”]);
$rolesparm = “Cast List “;
$showparm = “” ;
echo “
” . “Show” . “
” . $row[“ShowName”] . “
” ;
echo “
” . “Company” . “
” . $row[“Company”] . “
” ;
if ($row[“Director”] <> “”) {
echo “
” . “Director” . “
” . $row[“Director”] . “
” ;
}
if ($row[“MusicalDirector”] <> “”) {
echo “
” . “Musical Director” . “
” . $row[“MusicalDirector”] . “
” ;
}
if ($row[“Choreographer”] <> “”) {
echo “
” . “Choreographer” . “
” . $row[“Choreographer”] . “
” ;
}
if ($row[“Producer”] <> “”) {
echo “
” . “Producer” . “
” . $row[“Producer”] . “
” ;
}
if ($row[“ProductionNotes”] <> “”) {
echo “
” . “Notes” . “
” . $row[“ProductionNotes”] . “
” ;
}
if ($row[“AuditionInstructions”] <> “” ) {
echo “
” . “Instructions” . “
” .
$row[“AuditionInstructions”] . “
” ;
}
if ($row[“RehearsalDates”] <> “”) {
echo “
” . “Rehearsal Dates” . “
” . $row[“RehearsalDates”] . “
” ;}
if ($row[“Times”] <> “”) {
echo “
” . “Performance Dates” . “
” . $row[“Times”] . “
” ;}
$auditionQ = $row[“AuditionQuestions”];
if (strpos($auditionQ, “@”) !== false ) {
echo “
” . “Questions” . “
” . “Send Mail “. “
” ;
}
elseif (strpos($auditionQ, “www.”) !== false) {
echo “
” . “Questions” . “
” . “Check Online ” . “
” ;
}
else {
if ($auditionQ <> “”) {
echo “
” . “Questions” . “
” . $row[“AuditionQuestions”] . “
” ;
}
}
if ($row[“Type”] == “Appointment”) {
echo “
” . “Submissions” . “
” . $row[“Submissions”] . “
” ;}
if ($row[“ShowNote”] <> “” ) {
echo “
” . “Show Info” . “
” . $row[“ShowNote”] . “
” ;}
}
} else {
echo “0 results”;
}
echo “
“;
$mysqli->close();
// Audition Times ************************************************************************
echo “
“;
echo “
“;
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
mysqli_set_charset($mysqli, ‘utf8mb4’);
$sql = “SELECT AuditionType, AuditionDate, AuditionTime, AuditionEndTime, AuditionLocation, AuditionAddress,
AuditionTown
from `AuditionDates`
where Production = $parm1
order by AuditionDate, AuditionTime “;
$result = $mysqli->query($sql);
$oldloc = “aaaa”;
$oldphase = “aaaa”;
if ($result->num_rows > 0) {
echo ”
Location/Date/Times
“;
echo “
” .
“Call Type” . “
” .
“Location” . “
” .
“Date” . “
” .
“Time” . “
“;
while($row = $result->fetch_assoc()) {
// output data of each row
$dd = substr($row[“AuditionDate”],8,2);
$datestring = $row[“AuditionDate”];
$dateObj = DateTime::createFromFormat(‘Y-m-d’, $datestring);
$monthName = $dateObj->format(‘F’);
$dayName = $dateObj->format(‘D’);
$datef = substr($monthName,0,3) . ” ” . $dd;
$showdatef = $datef;
if ($showdatef == $olddate) {
$showdatef = “”;
}
if ($dd == “00”) {
$datef = “TBD”;
}
$olddate = $datef;
$time = $row[“AuditionTime”];
$d = new DateTime($time);
$timef = $d->format( ‘g:i A’ );
if ($timef == “12:00 AM”) {
$timef = “TBD”;
}
$endtime = $row[“AuditionEndTime”];
$d = new DateTime($endtime);
$timeendf = $d->format( ‘g:i A’ );
if ($timeendf <> “12:00 AM”) {
$timef = $timef . ” – ” . $timeendf ;
}
$newloc = $row[“AuditionLocation”] . $row[“AuditionAddress”] . $row[“AuditionTown”];
$newtype = $row[“AuditionType”];
if ($newtype == “oldtype”) {
echo “
” . “
“;
} else {
echo “
” . $row[“AuditionType”]. “
“;
}
if ($newloc == “oldloc”) {
echo “
” . “
” .
“
” . $datef . “
” .
“
” . $timef . “
“;
} else {
echo “
” . $row[“AuditionLocation”] ;
if ($row[“AuditionAddress”] <> “”) {echo “ ” . $row[“AuditionAddress”] ;}
if ($row[“AuditionTown”] <> “”) {echo “ ” . $row[“AuditionTown”] ;}
echo “
” ;
echo “
” . $datef . “
” .
“
” . $timef . “
“;
}
$oldloc = $newloc;
$oldtype = $newtype;
}
} else {
}
echo “
“;
$mysqli->close();
// Audition Roles *********************************************************************
//Roles *******************************************************************
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
mysqli_set_charset($mysqli, ‘utf8mb4’);
$sql = “SELECT Role, RoleType, Gender, AgeMin, AgeMax, Ethnicity, Description, Requirement, SongstoKnow
from `AuditionRoles`
where Production = $parm1 order by (CASE
when RoleType = ‘Lead’ then 1
when RoleType = ‘Major’ then 2
when RoleType = ‘Supporting’ then 3
when RoleType = ‘Featured’ then 4
when RoleType = ‘Featured’ then 5
when RoleType = ‘Chorus/Ensemble’ then 6
when RoleType = ‘Ensemble’ then 7 End), ID, Role”;
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
echo ”
Roles
“;
echo “
“;
echo “
“;
echo “
” .
“Role” . “
” .
“M/F” . “
” .
“Age” . “
” .
“Description” . “
“;
while($row = $result->fetch_assoc()) {
// output data of each row
$agemin = $row[“AgeMin”];
$agemax = $row[“AgeMax”];
if($row[“AgeMin”] == “1”) {$agemin = “”;}
if($row[“AgeMax”] == “99”) {$agemax = “”;}
$ages = $agemin . “-” . $agemax;
if ($agemin == “”) {$ages= $agemax ;}
if ($agemax == “”) {$ages= $agemin . “+”;}
if ($agemin == “” and $agemax ==””) {$ages = “”;}
$desc = $row[“Description”] ;
if ($row[“Ethnicity”] <> “”) {$desc = “(” . $row[“Ethnicity”] . “) ” . $desc ;}
if ($row[“Requirement”] <> “”) {$desc = $desc . “” . $row[“Requirement”] . “ “;}
if ($row[“SongstoKnow”] <> “”) {$desc = $desc . “Songs to Know – ” . $row[“SongstoKnow”];}
$role = $row[“Role”] ;
if ($row[“RoleType”] <> “”) {
$role = $role . ” (” . $row[“RoleType”] . “)” ;
}
echo “
” . $role . “
” .
“
” . $row[“Gender”]. “
” .
“
” . $ages . “
” .
“
” . $desc . “
” ;
}
} else {
}
echo “
“;
$mysqli->close();
[/insert_php]
Back