<% 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 PublicationID = request.QueryString("PublicationID") strName = fixquote(request.QueryString("strName")) refCategoryID = request.QueryString("refCategoryID") refLanguageID = request.QueryString("refLanguageID") refPhysSuburbID = request.QueryString("refPhysSuburbID") refPhysCityID = request.QueryString("refPhysCityID") strLSM = fixquote(request.QueryString("strLSM")) strAge = fixquote(request.QueryString("strAge")) strURL = fixquote(request.QueryString("strURL")) strPost = fixquote(request.QueryString("strPost")) strLogin = fixquote(request.QueryString("strLogin")) strPhys = fixquote(request.QueryString("strPhys")) strFootprint = fixquote(request.QueryString("strFootprint")) strCopyNewsdesk = fixquote(request.QueryString("strCopyNewsdesk")) strDirections = fixquote(request.QueryString("strDirections")) lngReach = request.QueryString("lngReach") strCirculation = request.QueryString("strCirculation") strSwitchboard = request.QueryString("strSwitchboard") strFax = request.QueryString("strFax") strDescription = fixquote(request.QueryString("strDescription")) if PublicationID > 0 then s = "SELECT * From tblPublication WHERE strName = '" & strName & "' AND PublicationID <> " & PublicationID set rst = cn.execute(s) if not rst.eof then response.Write "" lngID = PublicationID else s = "Update tblPublication Set " & _ "refCategoryID = " & refCategoryID & ", " & _ "refLanguageID = " & refLanguageID & ", " & _ "refPhysSuburbID = " & refPhysSuburbID & ", " & _ "refPhysCityID = " & refPhysCityID & ", " & _ "strName = '" & strName & "', " & _ "strLSM = '" & strLSM & "', " & _ "strAge = '" & strAge & "', " & _ "strURL = '" & strURL & "', " & _ "strPost = '" & strPost & "', " & _ "strLogin = '" & strLogin & "', " & _ "strPhys = '" & strPhys & "', " & _ "strFootprint = '" & strFootprint & "', " & _ "strCopyNewsdesk = '" & strCopyNewsdesk & "', " & _ "strDirections = '" & strDirections & "', " & _ "strCirculation = '" & strCirculation & "', " & _ "strSwitchboard = '" & strSwitchboard & "', " & _ "strFax = '" & strFax & "', " & _ "strDescription = '" & strDescription & "', " & _ "lngReach = " & lngReach & " " & _ "WHERE PublicationID = " & PublicationID set rst1 = cn.execute(s) end if rst.close else s = "SELECT * From tblPublication WHERE strName = '" & strName & "'" set rst = cn.execute(s) if not rst.eof then btnAdd = true response.Write "" else s = "Insert Into tblPublication (" & _ "refCategoryID, " & _ "refLanguageID, " & _ "refPhysSuburbID, " & _ "refPhysCityID, " & _ "strName, " & _ "strLSM, " & _ "strAge, " & _ "strURL, " & _ "strPost, " & _ "strLogin, " & _ "strPhys, " & _ "strFootprint, " & _ "strCopyNewsdesk, " & _ "strDirections, " & _ "strCirculation, " & _ "strSwitchboard, " & _ "strFax, " & _ "strDescription, " & _ "lngReach) " & _ "values ( " & _ refCategoryID & ", " & _ refLanguageID & ", " & _ refPhysSuburbID & ", " & _ refPhysCityID & ", " & _ "'" & strName & "', " & _ "'" & strLSM & "', " & _ "'" & strAge & "', " & _ "'" & strURL & "', " & _ "'" & strPost & "', " & _ "'" & strLogin & "', " & _ "'" & strPhys & "', " & _ "'" & strFootprint & "', " & _ "'" & strCopyNewsdesk & "', " & _ "'" & strDirections & "', " & _ "'" & strCirculation & "', " & _ "'" & strSwitchboard & "', " & _ "'" & strFax & "', " & _ "'" & strDescription & "', " & _ 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 refPublicationID = " & arrID(i) set rst = cn.execute(s) if not rst.eof then intNotDeleted = intNotDeleted + 1 else s = "Delete From tblPublication WHERE PublicationID = " & 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"--> Publication Admin
<% x = swapIt(x) CBW = request.querystring("CBW") response.write "" response.write "" response.write "" lngID = request.QueryString("lngID") if (request.QueryString("btnAdd") = "Add") or (lngID > 0) or (CBW<>"") then if lngID > 0 then s = "SELECT * From tblPublication WHERE PublicationID = " & lngID set rst = cn.execute(s) if not rst.eof then refCategoryID = rst("refCategoryID") refLanguageID = rst("refLanguageID") refPhysSuburbID = rst("refPhysSuburbID") refPhysCityID = rst("refPhysCityID") strName = rst("strName") strLSM = rst("strLSM") strAge = rst("strAge") strURL = rst("strURL") strPost = rst("strPost") strLogin = rst("strLogin") strPhys = rst("strPhys") strFootprint = rst("strFootprint") strCopyNewsdesk = rst("strCopyNewsdesk") strDirections = rst("strDirections") strCirculation = rst("strCirculation") strSwitchboard = rst("strSwitchboard") strFax = rst("strFax") strDescription = rst("strDescription") lngReach = rst("lngReach") newedit = "Edit Publication" else lngID = 0 newedit = "New Publication" end if rst.close else lngID = 0 newedit = "New Publication" 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 "" 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 "" 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 "" 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 "
Publication Admin
 
" & newedit & ":
Category:
Language:
Switchboard:
Fax:
Website:
Website Login:
Postal Address:
Courier Address:
Suburb:
City:
AMPS Reach:
Circulation:
LSM:
Age:
Description:
Directions:
Footprint:
Newsdesk email:" 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) LEFT JOIN tblShow ON tblContact.refShowID = tblShow.ShowID " & _ "WHERE (((refPublicationID)=" & 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) LEFT JOIN tblShow ON tblContact.refShowID = tblShow.ShowID " & _ "WHERE (((refPublicationID)=" & 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 rst.close response.write "" response.write "
ContactShow
" & rst("theContact") & "" & rst("theShow") & "
 
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 tblPublication 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 tblPublication 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 "" %>