<% '20120822 - changed list: if capture date is < 1 Aug 2012 && type = web then nav to web_2 else nav to web_3 - pj if (isNull(request.cookies("cookieUserID"))) or (request.cookies("cookieUserID")="") then response.redirect "index.asp" end if %>
<% 'Events.. 'print_r(request.querystring) if len(request.querystring("chkSel")) > 0 then 'its lengthy, bu i don car 'add ref check s = "DELETE FROM tblClientPublication WHERE ClientPublicationID IN (" & request.querystring("chkSel") & ");" 'response.write s cn.execute(s) 'response.end end if if len(request.querystring("blnDeleteClipping")) > 0 then s = "DELETE FROM tblClientPublication WHERE ClientPublicationID = " & request.querystring("CPID") & ";" 'response.write s cn.execute(s) 'response.end end if if len(request.querystring("blnCancelDelete")) > 0 then s = "SELECT * FROM tblClientPublication WHERE ClientPublicationID = " & request.querystring("CPID") & ";" set rst = cn.execute(s) if rst("strClientPublication")="" or rst("Vaule1")="" and rst("Vaule2")="" and rst("Vaule3")="" and rst("Vaule4")="" and rst("Vaule5")="" and rst("Vaule6")="" and rst("Vaule7")="" and rst("Vaule8")="" then s = "DELETE FROM tblClientPublication WHERE ClientPublicationID = " & request.querystring("CPID") & ";" 'response.write s cn.execute(s) end if end if 'Pageload.. dim ClientID Dim strWhere Dim i Dim s dim strStartDate dim strEndDate dim radDate strStartDate = request.querystring("strStartDate") strStartDate = getFirstDay(strStartDate) strEndDate = dbDate(request.querystring("strEndDate")) radDate = request.querystring("radDate") if len(radDate) = 0 then radDate = 0 if radDate = 1 then sel1 = "checked" else sel0 = "checked" end if ClientID = request.querystring("CID") response.write "" if len(ClientID) > 0 then rst = cn.execute("SELECT strClient FROM tblClient WHERE ClientID = " & ClientID) strClient = rst("strClient") end if 'x = swapIt(x) x = swapIt(x) response.write "" & _ "" 'listHeading response.write "" x = swapIt(x) if radDate = 1 then strWhere = "AND tblClientPublication.strPubDate >= '" & strStartDate & "' AND tblClientPublication.strPubDate <= '" & strEndDate & "'" else strWhere = "AND tblClientPublication.strDate >= '" & strStartDate & "' AND tblClientPublication.strDate <= '" & strEndDate & "'" end if s = "SELECT tblClientPublication.*, tblPublication.strType, tblPublication.strPublicationName" & _ " FROM tblClientPublication INNER JOIN tblPublication ON tblClientPublication.refPublicationID = tblPublication.PublicationID" & _ " WHERE tblClientPublication.refClientID = " & ClientID & " " & strWhere & " ORDER BY tblClientPublication.strDate DESC;" set rst = cn.execute(s) 'response.write s i = 1 maxDisplayLength = 50 idx = 0 'x = swapIt(x) while not rst.eof if rst("strPubDate") > 0 then strPubDate = apdate(rst("strPubDate")) else strPubDate = "" end if set rstSP = cn.execute("SELECT strPublication FROM tblPublication_" & rst("strType") & " WHERE SubPubID=" & rst("refSubPubID") & " ") 'viewrs(rst) 'trunc strSubject? 'format date? if not rstSP.eof then dim strClientPublication strClientPublication = rst("strClientPublication") 'if len(strClientPublication) > maxDisplayLength then ' idx = strClientPublication.indexof(" ", maxDisplayLength) ' strClientPublication = left(strClientPublication,idx) & "..." 'end if '20120822 - changed list: if capture date is < 1 Aug 2012 && type = web then nav to web_2 else nav to web_3 - pj dim href if rst("strDate") > 20120801 AND rst("strType") = "Web" then href = "clientpublication_detail2.asp" else href = "clientpublication_detail3.asp" end if response.write "" response.write "" end if 'apdate(rst("strDate")) x = swapIt(x) i = i + 1 rst.movenext wend rst.close cn.close response.write "" %>
Start Date: " response.write "End Date: " response.Write "Filter by: Date Captured Date Published
Client: " & strClient & _ "  
PublicationHeadlineSubjectDate CapturedDate Published Delete
" & i & "" & rst("strPublicationName") & " " & rstSP("strPublication") & "" & rst("strHeadline") & "" & strClientPublication & "" & apdate(rst("strDate")) & "" & strPubDate & "