<% if (isNull(request.cookies("ckyUserID"))) or (request.cookies("ckyUserID")="") then response.redirect "index.asp" end if %> <% rowCount = 0 if getUserType(Request.Cookies("ckyUserID"))<>47 then 'response.redirect "home.asp" blnAdmin = false else blnAdmin = true end if if (request.QueryString("btnSave") = "Save") and (blnAdmin) then ShowID = request.QueryString("ShowID") strName = fixquote(request.QueryString("strName")) strAppearing = fixquote(request.QueryString("strAppearing")) strHost = fixquote(request.QueryString("strHost")) strDetails = fixquote(request.QueryString("strDetails")) lngReach = request.QueryString("lngReach") strDeadline = fixquote(request.QueryString("strDeadline")) if ShowID > 0 then s = "SELECT * From tblShow WHERE strName = '" & strName & "' AND ShowID <> " & ShowID set rst = cn.execute(s) if not rst.eof then response.Write "" lngID = ShowID else s = "Update tblShow Set " & _ "strName = '" & strName & "', " & _ "strAppearing = '" & strAppearing & "', " & _ "strDeadline = '" & strDeadline & "', " & _ "strHost = '" & strHost & "', " & _ "strDetails = '" & strDetails & "', " & _ "lngReach = " & lngReach & _ " WHERE ShowID = " & ShowID set rst1 = cn.execute(s) end if rst.close else s = "SELECT * From tblShow WHERE strName = '" & strName & "'" set rst = cn.execute(s) if not rst.eof then btnAdd = true response.Write "" else s = "Insert Into tblShow (" & _ "strName, " & _ "strAppearing, " & _ "strDeadline, " & _ "strHost, " & _ "strDetails, " & _ "lngReach) " & _ "values ( " & _ "'" & strName & "', " & _ "'" & strAppearing & "', " & _ "'" & strDeadline & "', " & _ "'" & strHost & "', " & _ "'" & strDetails & "', " & _ lngReach & ")" set rst2 = cn.execute(s) end if rst.close end if elseif (request.QueryString("btnDelete") = "Delete") and (blnAdmin) then intNotDeleted=0 arrID = split(Request.QueryString("arrID"),",") for i = 0 to ubound(arrID) s = "Select * From tblContact WHERE refShowID = " & arrID(i) set rst = cn.execute(s) if not rst.eof then intNotDeleted = intNotDeleted + 1 else s = "Delete From tblShow WHERE ShowID = " & arrID(i) set rst2 = cn.execute(s) end if rst.close next if intNotDeleted > 0 then Response.Write "" end if end if %> <!--#include file="title.htm"--> Show Admin
<% x = swapIt(x) CBW = request.querystring("CBW") response.write "" response.write "" lngID = request.QueryString("lngID") if (request.QueryString("btnAdd") = "Add") or (lngID>0) or (CBW<>"") then response.write "" if lngID > 0 then s = "SELECT * From tblShow WHERE ShowID = " & lngID set rst = cn.execute(s) if not rst.eof then strName = rst("strName") strAppearing = rst("strAppearing") strDeadline = rst("strDeadline") strHost = rst("strHost") strDetails = rst("strDetails") lngReach = rst("lngReach") newedit = "Edit Show" else lngID = 0 newedit = "New Show" end if rst.close else lngID = 0 newedit = "New Show" end if x = swapIt(x) response.write "" response.write "" x = swapIt(x) response.write "" response.write "" x = swapIt(x) response.write "" response.write "" x = swapIt(x) response.write "" response.write "" x = swapIt(x) response.write "" response.write "" x = swapIt(x) response.write "" response.write "" else response.write "" end if if CBW <> "" then x = swapIt(x) response.write "" x = swapIt(x) response.write "
Show Admin
 
" & newedit & ":
Details:
Airing/Appearing:
Producer:
Reach:
Host:" if blnAdmin then response.write "  
 
" if CBW="All" then s = "SELECT tblContact.ContactID, tblContact.strName AS theContact, tblShow.strName AS theShow, tblPublication.strName AS thePub " & _ "FROM (tblContact INNER JOIN tblPublication ON tblContact.refPublicationID = tblPublication.PublicationID) INNER JOIN tblShow ON tblContact.refShowID = tblShow.ShowID " & _ "WHERE (((refShowID)=" & lngID & ")) " & _ "ORDER BY tblContact.strName" else s = "SELECT tblContact.ContactID, tblContact.strName AS theContact, tblShow.strName AS theShow, tblPublication.strName AS thePub " & _ "FROM (tblContact INNER JOIN tblPublication ON tblContact.refPublicationID = tblPublication.PublicationID) INNER JOIN tblShow ON tblContact.refShowID = tblShow.ShowID " & _ "WHERE (((refShowID)=" & lngID & ")) AND Left(tblContact.strName, 1)='" & CBW & "' " & _ "ORDER BY tblContact.strName" end if set rst = cn.execute(s) while not rst.eof x = swapIt(x) response.write "" rowCount = rowCount + 1 rst.movenext wend response.write "" rst.close response.write "
ContactPublication
" & rst("theContact") & "" & rst("thePub") & "
 
Related Contacts: " & rowCount & "
" else response.write " " end if else LB = request.querystring("LB") if request.querystring("btnSave") = "Save" then response.write "" end if if LB<> "All" then s = "SELECT * From tblShow WHERE Left(strName, 1)='" & LB & "' Order By strName" set rst = cn.execute(s) if blnAdmin then while not rst.eof x = swapIt(x) response.write "" & rst("strName") & "" rowCount = rowCount + 1 rst.movenext wend else while not rst.eof x = swapIt(x) response.write "" & rst("strName") & " " rowCount = rowCount + 1 rst.movenext wend end if rst.close else s = "SELECT * From tblShow Order By strName" set rst = cn.execute(s) if blnAdmin then while not rst.eof x = swapIt(x) Response.write "" & rst("strName") & "" rowCount = rowCount + 1 rst.movenext wend else while not rst.eof x = swapIt(x) Response.write "" & rst("strName") & " " rowCount = rowCount + 1 rst.movenext wend end if rst.close end if x = 0 x = swapIt(x) x = swapIt(x) response.write " " if blnAdmin then response.write "List Total: " & rowCount & "  " else response.write "List Total: " & rowCount & " " end if end if response.write "" %>