<% if (isNull(request.cookies("cookieUserID"))) or (request.cookies("cookieUserID")="") then response.redirect "index.asp" end if %>
<% 'Events.. if len(request.querystring("chkSel")) > 0 then 'its lengthy, bu i don car s = "SELECT refClientID FROM tblClientPublication WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" set rst = cn.execute(s) 'response.write s 'response.write rst("refClientID") 'response.end 'rst.movenext if rst.eof = false then 'if len(rst("refClientID")) > 0 then %> <% else ' s = "SELECT strType FROM tblPublication WHERE PublicationID = " & & ";" ' rst = cn.execute(s) ' s = "SELECT refSubPubID FROM tblClientPublication WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" ' rst2 = cn.execute(s) ' if then s = "DELETE FROM tblPublication_Magazine WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" s = s & "DELETE FROM tblPublication_Newspaper WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" s = s & "DELETE FROM tblPublication_Radio WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" s = s & "DELETE FROM tblPublication_TV WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" s = s & "DELETE FROM tblPublication_Web WHERE refPublicationID IN (" & request.querystring("chkSel") & ");" 'response.write s cn.execute(s) s = "DELETE FROM tblPublication WHERE PublicationID IN (" & request.querystring("chkSel") & ");" 'response.write s cn.execute(s) ' end if end if end if 'Pageload.. Dim strType Dim LB Dim strWhere Dim i Dim s strType = request.querystring("T") LB = request.querystring("LB") response.write "" response.write "" 'x = swapIt(x) x = swapIt(x) response.write "" if len(strType) > 0 then response.write "" 'listHeading response.write "" x = swapIt(x) 'response.write "" if LB <> "All" AND Len(LB) > 0 then strWhere = strWhere & " AND Left(strPublicationName,1) = '" & LB & "'" if Len(strType) > 0 then strWhere = strWhere & " AND strType = '" & strType & "'" if blnArchive then strWhere = strWhere & " AND (tblPublication.blnArchived = " & 1 & " OR tblSubPub.blnArchived = " & 1 & ")" else strWhere = strWhere & " AND (tblPublication.blnArchived = " & 0 & " AND tblSubPub.blnArchived = " & 0 & ")" end if 'CAN CHANGE THE INNER TO LEFT JOINS TO SHOW ORPHANED PUBLICATIONS s = "SELECT tblPublication.PublicationID, tblSubPub.SubPubID, tblPublication.strType, tblPublication.strPublicationName, tblSubPub.strPublication, tblPublication.strFootprint "&_ "FROM tblPublication LEFT JOIN tblPublication_Magazine as tblSubPub ON tblPublication.PublicationID = tblSubPub.refPublicationID WHERE tblPublication.strType = 'Magazine' " & strWhere & " UNION " &_ "SELECT tblPublication.PublicationID, tblSubPub.SubPubID, tblPublication.strType, tblPublication.strPublicationName, tblSubPub.strPublication, tblPublication.strFootprint "&_ "FROM tblPublication LEFT JOIN tblPublication_Newspaper as tblSubPub ON tblPublication.PublicationID = tblSubPub.refPublicationID WHERE tblPublication.strType = 'Newspaper' " & strWhere & " UNION " &_ "SELECT tblPublication.PublicationID, tblSubPub.SubPubID, tblPublication.strType, tblPublication.strPublicationName, tblSubPub.strPublication, tblPublication.strFootprint " &_ "FROM tblPublication LEFT JOIN tblPublication_Radio as tblSubPub ON tblPublication.PublicationID = tblSubPub.refPublicationID WHERE tblPublication.strType = 'Radio' " & strWhere & " UNION " &_ "SELECT tblPublication.PublicationID, tblSubPub.SubPubID, tblPublication.strType, tblPublication.strPublicationName, tblSubPub.strPublication, tblPublication.strFootprint " &_ "FROM tblPublication LEFT JOIN tblPublication_TV as tblSubPub ON tblPublication.PublicationID = tblSubPub.refPublicationID WHERE tblPublication.strType = 'Tv' " & strWhere & " UNION " &_ "SELECT tblPublication.PublicationID, tblSubPub.SubPubID, tblPublication.strType, tblPublication.strPublicationName, tblSubPub.strPublication, tblPublication.strFootprint " &_ "FROM tblPublication LEFT JOIN tblPublication_Web as tblSubPub ON tblPublication.PublicationID = tblSubPub.refPublicationID WHERE tblPublication.strType = 'Web' " & strWhere & " " &_ "ORDER BY strPublicationName, strPublication;" 's = "SELECT *, 'A' AS strPublication, 0 FROM tblPublication WHERE strPublicationName Like 'A%' UNION SELECT *, 'A' AS strPublication, 0 FROM tblPublication WHERE strPublicationName Like 'B%';" i = 1 'x = swapIt(x) set rst = cn.execute(s) while not rst.eof ' response.write "" x = swapIt(x) i = i + 1 rst.movenext wend rst.close cn.close response.write "" %>
List: " for i = 65 to 90 b = chr(i) if LB = chr(i) then b = "" & chr(i) & "" response.Write "" & b & " " next if request.QueryString("blnArchive") = "true" then sArchiveLink = "Archived " blnArchive = 1 else sArchiveLink = "Archived " blnArchive = 0 end if response.Write " All" & _ " | " & sArchiveLink & _ "
Publictaion Category: " & strType & "
PublicationSub PublicationTypeDelete
 
" & i & "" & rst("strPublicationName") & "" & rst("strPublication") & "" & rst("strType") & "