<%@ Page Language="C#"%> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %> <%@ Import Namespace="System.Collections" %> <% string sectionCat; string pageTitle=""; string topImgBGColor; string showID = ""; string thisSection = ""; sectionCat = "showdetail"; topImgBGColor = "001f57"; %> <% int numVars = Request.QueryString.Count; if (numVars<1) { Server.Transfer("showsaz.php"); } showID = Request.QueryString["showid"]; if (Request.QueryString["section"]!="") { thisSection = Request.QueryString["section"]; } if (Request.QueryString["section"]==null) { thisSection = "synopsis"; } string sectionHeading=""; switch (thisSection) { case "synopsis": sectionHeading = "Synopsis"; break; case "billingcredits": sectionHeading = "Billing Credits"; break; case "castinfo": sectionHeading = "Casting Info"; break; case "orchestrainfo": sectionHeading = "Orchestral Info"; break; case "authorinfo": sectionHeading = "Author Info"; break; case "authornotes": sectionHeading = "Author Notes"; break; case "songs": sectionHeading = "Songs"; break; case "availablematerial": sectionHeading = "Available Materials"; break; case "press": sectionHeading = "Press and Reviews"; break; } %>
<% SqlCommand queryLogo = new SqlCommand("select FILEPATH from CSA_LOGO WHERE SHOWID='" + showID + "'", readOnly); string logoPath=""; readOnly.Open(); SqlDataReader getLogoPath = queryLogo.ExecuteReader(); while (getLogoPath.Read()) { if (!getLogoPath.IsDBNull(0)) { logoPath = getLogoPath.GetString(0); } } readOnly.Close(); Response.Write("\""+pageTitle+""); %>
<% SqlCommand queryShowInfo = new SqlCommand("select SHOWTITLE, SYNOPSIS, CASTINFO, ORCHESTRAINFO, BILLINGCREDITS, AUTHORNOTES, PRODUCTIONHIST, AVAILABLEMATERIAL, UPCOMINGPROD, AUTHORNOTESTITLE from CSA_SHOWINFO WHERE SHOWID='" + showID + "'", readOnly); readOnly.Open(); SqlDataReader getShowInfo = queryShowInfo.ExecuteReader(); bool noSynopsis = true; bool noCastInfo = true; bool noOrchestraInfo = true; bool noAuthorInfo = true; bool noBillingCredits = true; bool noAuthorNotes = true; bool noProductionHist = true; bool noAvailableMaterials = true; bool noUpcomingProd = true; while (getShowInfo.Read()) { pageTitle = getShowInfo.GetString(0); noSynopsis = getShowInfo.IsDBNull(1); noCastInfo = getShowInfo.IsDBNull(2); noOrchestraInfo = getShowInfo.IsDBNull(3); noBillingCredits = getShowInfo.IsDBNull(4); noAuthorNotes = getShowInfo.IsDBNull(5); noProductionHist = getShowInfo.IsDBNull(6); noAvailableMaterials = getShowInfo.IsDBNull(7); noUpcomingProd = getShowInfo.IsDBNull(8); } readOnly.Close(); if ((thisSection=="synopsis") && (noSynopsis==true)) { sectionHeading = "Coming Soon!"; } %>

<%Response.Write(sectionHeading);%>

<% SqlCommand queryAuthorExists = new SqlCommand("select AUTHOR1ID FROM CSA_AUTHORS WHERE SHOWID='" + showID + "'", readOnly); readOnly.Open(); SqlDataReader getAuthorExists = queryAuthorExists.ExecuteReader(); bool noAuthorID = true; while (getAuthorExists.Read()) { noAuthorID = getAuthorExists.IsDBNull(0); } readOnly.Close(); int t=0; string authorText = ""; readOnly.Open(); SqlCommand queryTestLength = new SqlCommand("select AUTHOR1ID, AUTHOR1CREDIT, AUTHOR2ID, AUTHOR2CREDIT, AUTHOR3ID, AUTHOR3CREDIT, AUTHOR4ID, AUTHOR4CREDIT, AUTHOR5ID, AUTHOR5CREDIT FROM CSA_AUTHORS WHERE SHOWID='" + showID + "'", readOnly); SqlDataReader getTestLength = queryTestLength.ExecuteReader(); while(getTestLength.Read()) { int r=0; while (r<9) { if (getTestLength.IsDBNull(r)==false) { t++; }; r = r+2; } } readOnly.Close(); if (t>0) { noAuthorInfo = false; } if (thisSection=="authorinfo") { string[,] creditsArray = new string[t,2]; readOnly.Open(); SqlDataReader getAuthIDs = queryTestLength.ExecuteReader(); int g=0; while (getAuthIDs.Read()) { int e=0; int f=1; while (e<9 && f<10) { if (getAuthIDs.IsDBNull(e)==false) { creditsArray[g,0] = getAuthIDs.GetString(e); if (getAuthIDs.IsDBNull(f)==false) { creditsArray[g,1] = getAuthIDs.GetString(f); } g++; } e = e+2; f = f+2; } } readOnly.Close(); for (i = 0; i < t; i++) { readOnly.Open(); SqlCommand queryAuthorBios= new SqlCommand("select AUTHORINFO, AUTHORFULLNAME from CSA_AUTHORINFO WHERE AUTHORID='" + creditsArray[i,0] + "'", readOnly); SqlDataReader getAuthorBios = queryAuthorBios.ExecuteReader(); while (getAuthorBios.Read()) { authorText += "

"; authorText += "" + getAuthorBios.GetString(1).ToUpper() + ""; authorText += " ("; authorText += creditsArray[i,1]; authorText += ") "; authorText += getAuthorBios.GetString(0); authorText += "
 
"; } readOnly.Close(); } } string thistext=""; if (thisSection == "authorinfo") { thistext = authorText; } else { string colName = thisSection.ToUpper(); SqlCommand querytext = new SqlCommand("select " + colName + " from CSA_SHOWINFO WHERE SHOWID='" + showID + "'", readOnly); readOnly.Open(); SqlDataReader readtext = querytext.ExecuteReader(); while (readtext.Read()) { if ((thisSection=="synopsis") && (noSynopsis==true)) { thistext = ""; } else { thistext = readtext.GetString(0); } } readOnly.Close(); } thistext = thistext.Replace("%R%%R%","

"); thistext = thistext.Replace("%B%",""); thistext = thistext.Replace("%/B%",""); thistext = thistext.Replace("%SP%"," "); Response.Write(thistext.Replace("%R%","
")); %>

<% string pageHead = pageTitle.ToUpper(); Response.Write(pageHead);%>

<% if (noSynopsis == false) { if (thisSection=="synopsis") { Response.Write("synopsis
"); } else { Response.Write("synopsis
"); } } %><% if (noBillingCredits == false) { if (thisSection=="billingcredits") { Response.Write("billing credits
"); } else { Response.Write("billing credits
"); } } %> <% if (noAuthorInfo == false) { if (thisSection=="authorinfo") { Response.Write("author info
"); } else { Response.Write("author info
"); } } %> <% SqlCommand queryIfSongs = new SqlCommand("select * from CSA_SONGS WHERE SHOWID='" + showID + "'", readOnly); readOnly.Open(); SqlDataReader getIfSongs = queryIfSongs.ExecuteReader(); int hitNums = 0; while (getIfSongs.Read()) { hitNums++; } if (hitNums > 0) { Response.Write("songs \"listen
"); } readOnly.Close(); %>

<% if (noCastInfo == false) { if (thisSection=="castinfo") { Response.Write("casting info
"); } else { Response.Write("casting info
"); } } %> <% if (noOrchestraInfo == false) { if (thisSection=="orchestrainfo") { Response.Write("orchestral info
"); } else { Response.Write("orchestral info
"); } } %> <% if (noAvailableMaterials == false) { if (thisSection=="availablematerial") { Response.Write("available materials
"); } else { Response.Write("available materials
"); } } %> <% if (noAuthorNotes == false) { if (thisSection=="authornotes") { Response.Write("author notes
"); } else { Response.Write("author notes
"); } } %>

order a perusal pack
apply for an amateur license
apply for a professional license