<% ' 'NOTES '200804 - Changed PR value from x4 to x3 if (isNull(request.cookies("cookieUserID"))) or (request.cookies("cookieUserID")="") then response.redirect "index.asp" end if 'Events..step 1 'response.end 'print_r(request.querystring) if request.querystring("blnCheckDuplicate") = 1 then ClientPublicationID = request.querystring("CPID") strSubject = unquote(request.querystring("strSubject")) strDatePub = request.querystring("strDatePub") strStaff = request.querystring ("strStaff") strItem = request.querystring("strItem") strHeadline = request.querystring("strHeadline") strPage = request.querystring("strPage") strProactiveReactive = request.querystring("strProactiveReactive") if len(request.querystring("dblValue2")) > 0 then dblValue2 = replace(request.querystring("dblValue2"),",","") else dblValue2 = 0 end if if request.querystring("chkFD") = "1" then blnFD = 1 else blnFD = 0 end if 'if len(request.querystring("dblValue5")) > 0 then ' dblValue5 = replace(request.querystring("dblValue5"),",","") 'else ' dblValue5 = 0 'end if if request.querystring("chkPicture") = "1" then dblPicture = 1 else dblPicture = 0 end if 'VALIDATION FOR DUPLICATES sql = "SELECT * FROM tblClientPublication WHERE ClientPublicationID = " & ClientPublicationID &";" 'response.write sql set rst = cn.execute(sql) refClientID = rst("refClientID") refPublicationID = rst("refPublicationID") strClientPublication = rst("strClientPublication") refSubPubID = rst("refSubPubID") if unquote(request.querystring("strSubject")) = "N/A" then strSubject = "" end if sqll = "SELECT * FROM tblClientPublication WHERE refClientID = " & refClientID & " AND refSubPubID = " & refSubPubID & " AND ClientPublicationID != " & ClientPublicationID &";" 'response.write sqll 'response.End set rst = cn.execute(sqll) while not rst.eof strTempPubDate = rst("strPubDate") strTempPubDate = mid(strTempPubDate, 7, 2) & "-" & mid(strTempPubDate, 5, 2) & "-" & mid(strTempPubDate, 1, 4) 'strTempClientPublication = rst("strClientPublication") strTempClientPublication = rst("strHeadline") if strSubject = "" then strSubject = "N/A" end if if strTempPubDate = strDatePub then duplicate = 1 strDuplicateItems = strDuplicateItems & "Date: " & strDatePub & "
Subject: " & strTempClientPublication & "

" else end if rst.movenext wend if duplicate = 1 then 'strDuplicateMsg = "Duplicates: " & strDuplicateItems & "" else strDuplicateItems = "NONE" end if end if if strDuplicateItems = "" then strDuplicateItems = "NONE" end if if len(request.querystring("btnSave")) > 0 then ClientPublicationID = request.querystring("CPID") refClientDivisionID = request.querystring("refClientDivisionID") strSubject = unquote(request.querystring("strSubject")) strDatePub = request.querystring("strDatePub") strStaff = request.querystring ("strStaff") strItem = request.querystring("strItem") strURL = request.querystring("strURL") strSpokesPerson = request.querystring("strSpokesPerson") strPosNegNeut = request.querystring("radPosNegNeut") strURL = unquote(request.querystring("strURL")) strHeadline = unquote(request.querystring("strHeadline")) strPage = request.querystring("strPage") strProactiveReactive = request.querystring("strProactiveReactive") strIndustry = request.querystring("strIndustry") strCompetitorReferenced = request.querystring("strCompetitorReferenced") refPublicationTypeID = request.querystring("refPublicationTypeID") refContentTypeID = request.querystring("refContentTypeID") refBusinessPriorityID = request.querystring("refBusinessPriorityID") refRegionID = request.querystring("refRegionID") refPracticeTypeID = request.querystring("refPracticeTypeID") 'response.Write strPosNegNeut & "<<<" 'response.End if len(request.querystring("dblValue2")) > 0 then dblValue2 = replace(request.querystring("dblValue2"),",","") else dblValue2 = 0 end if if request.querystring("chkFD") = "1" then blnFD = 1 else blnFD = 0 end if if not len(refPublicationTypeID) > 0 then refPublicationTypeID = 0 end if if not len(refContentTypeID) > 0 then refContentTypeID = 0 end if if not len(refBusinessPriorityID) > 0 then refBusinessPriorityID = 0 end if if not len(refRegionID) > 0 then refRegionID = 0 end if if not len(refPracticeTypeID) > 0 then refPracticeTypeID = 0 end if 'if len(request.querystring("dblValue5")) > 0 then ' dblValue5 = replace(request.querystring("dblValue5"),",","") 'else ' dblValue5 = 0 'end if if request.querystring("chkPicture") = "1" then dblPicture = 1 else dblPicture = 0 end if s = "UPDATE tblClientPublication SET strClientPublication = '" & strSubject &_ "', refStaffID = " & strStaff & _ ", refPublicationTypeID = " & refPublicationTypeID & _ ", refContentTypeID = " & refContentTypeID & _ ", refBusinessPriorityID = " & refBusinessPriorityID & _ ", refRegionID = " & refRegionID & _ ", refPracticeTypeID = " & refPracticeTypeID & _ ", refClientDivisionID = " & refClientDivisionID & _ ", strPubDate = '" & dbdate(strDatePub) & _ "', strSelctedField = '" & strItem & _ "', strURL = '" & strURL & _ "', strSpokesPerson = '" & strSpokesPerson & _ "', strPosNegNeut = '" & strPosNegNeut & _ "', strHeadline = '" & strHeadline & _ "', strPage = '" & strPage & _ "', strProactiveReactive = '" & strProactiveReactive & _ "', strIndustry = '" & strIndustry & _ "', strCompetitorReferenced = '" & strCompetitorReferenced & _ "', blnFD = " & blnFD & _ ", Vaule1 = " & naChkB(replace(request.querystring("dblValue1"),",","")) & _ ", Vaule2 = " & naChkB(replace(request.querystring("dblValue2"),",","")) & _ ", Vaule3 = " & naChkB(replace(request.querystring("dblValue3"),",","")) & _ ", Vaule4 = " & naChkB(replace(request.querystring("dblValue4"),",","")) & _ ", Vaule5 = " & naChkB(replace(request.querystring("dblValue5"),",","")) & _ ", Vaule6 = " & naChkB(replace(request.querystring("dblValue6"),",","")) & _ ", Vaule7 = " & naChkB(replace(request.querystring("dblValue7"),",","")) & _ ", Vaule8 = " & naChkB(replace(request.querystring("dblValue8"),",","")) & _ ", blnPicture = '" & dblPicture & _ "' WHERE ClientPublicationID = " & ClientPublicationID & ";" response.Write s 'response.end rst = cn.execute(s) rst = cn.execute("SELECT refClientID FROM tblClientPublication WHERE ClientPublicationID = " & ClientPublicationID) ClientID = rst("refClientID") response.redirect("clientpublicationlist.asp?CID=" & ClientID) response.end end if 'response.write("Arr " & request.querystring("dblValue4")) %> <!--#include file="title.htm"--> - User Detail
<% %> <% 'Pageload.. ClientPublicationID = request.QueryString("CPID") response.Write "" response.Write "" 'response.Write "" 'blnFD = 0 dblValue1 = 0 dblValue2 = 0 dblValue3 = 0 dblValue4 = 0 dblValue5 = 0 dblValue6 = 0 dblValue7 = 0 dblValue8 = 0 if ClientPublicationID > 0 then s = "SELECT tblClientPublication.*, ISNULL(tblClientPublication.refPracticeTypeID, 0) as refPracticeTypeID, tblClient.strClient, tblClient.blnSpecialFields, tblClientDivision.strClientDivision, tblPublication.strPublicationName, tblPublication.strType, tblPublication.strCountry as strPublicationCountry " & _ "FROM ((tblClientPublication LEFT JOIN tblClientDivision ON tblClientPublication.refClientDivisionID = tblClientDivision.ClientDivisionID) LEFT JOIN tblClient ON tblClientPublication.refClientID = tblClient.ClientID) LEFT JOIN tblPublication ON tblClientPublication.refPublicationID = tblPublication.PublicationID " & _ "WHERE (((tblClientPublication.ClientPublicationID)=" & ClientPublicationID & "));" rst = cn.execute(s) 'response.write s if rst("blnSpecialFields") then blnSpecialFields = 1 else blnSpecialFields = 0 end if ClientPublicationID = rst("ClientPublicationID") ClientID = rst ("refClientID") ClientDivisionID = rst ("refClientDivisionID") refSubPubID = rst ("refSubPubID") strClient = rst("strClient") 'strClientDivision = rst("strClientDivision") 'strPublicationName = rst("strPublicationName") strType = rst("strType")'to find subPub name refStaff = rst("refStaffID") SubPubID = rst("refSubPubID") strDate = rst("strDate") strURL = rst("strURL") strSpokesPerson = rst("strSpokesPerson") strSelectedField = rst("strSelctedField") strClientPublication = rst("strClientPublication") strHeadline = rst("strHeadline") strPage = rst("strPage") strProactiveReactive= rst("strProactiveReactive") refPublicationTypeID = rst("refPublicationTypeID") refContentTypeID = rst("refContentTypeID") refBusinessPriorityID = rst("refBusinessPriorityID") refRegionID = rst("refRegionID") refPracticeTypeID = rst("refPracticeTypeID") strCountry = rst("strPublicationCountry") strIndustry = rst("strIndustry") strCompetitorReferenced = rst("strCompetitorReferenced") strPubDate = rst("strPubDate") dblValue1 = rst("Vaule1") dblValue2 = rst("Vaule2") dblValue3 = rst("Vaule3") 'if strType = "Web" then ' dblValue4 = dblValue1 'else dblValue4 = rst("Vaule4") 'end if dblValue5 = rst("Vaule5") dblValue6 = rst("Vaule6") dblValue7 = rst("Vaule7") dblValue8 = rst("Vaule8") if len(dblValue1) > 0 then dblValue1 = formatnumber(dblValue1,0) end if if len(dblValue2) > 0 then dblValue2 = formatnumber(dblValue2,0) end if 'response.write dblValue1 & " || " & dblValue2 & " = " if len(dblValue3) > 0 then dblValue3 = formatnumber(dblValue3,2) end if if len(dblValue4) > 0 then dblValue4 = formatnumber(dblValue4,2) end if if len(dblValue5) > 0 then dblValue5 = formatnumber(dblValue5,2) end if if len(dblValue6) > 0 then if rst("strType") = "Web" then dblValue6 = formatnumber(dblValue6,8) else dblValue6 = formatnumber(dblValue6,2) end if end if if len(dblValue7) > 0 then dblValue7 = formatnumber(dblValue7,2) end if if len(dblValue8) > 0 then dblValue8 = formatnumber(dblValue8,2) end if 'response.write rst("blnPicture") if rst("blnPicture") = "1" then blnPicture = " Checked " else blnPicture = "" end if 'response.write request.querystring("chkFD") & "//" & rst("blnFD") if rst("blnFD") = true then strChecked = " Checked " else strChecked = "" end if strPosChecked = "" strNegChecked = "" strNeutChecked = "" strFairChecked = "" //response.write rst("strPosNegNeut") if rst("strPosNegNeut") = "pos" then strPosChecked = " Checked " 'response.Write "pos" elseif rst("strPosNegNeut") = "neg" then strNegChecked = " Checked " 'response.Write "neg" elseif rst("strPosNegNeut") = "neut" then strNeutChecked = " Checked " 'response.Write "neut" elseif rst("strPosNegNeut") = "fair" then strFairChecked = " Checked " 'response.Write "fair" end if strCirculation = " readonly style='background-color: LightGrey;' " s = "SELECT * FROM tblClientDivision WHERE ClientDivisionID = " & rst("refClientDivisionID") & ";" strClientDivision = rst("strClientDivision") if (isnull(strClientDivision)) OR (strClientDivision = "") then strClientDivision = "none" end if strSpecCalc = " onchange='CalcValues();' " s = "SELECT * FROM tblPublication_" & strType & " WHERE SubPubID = " & SubPubID & ";" set rst2 = cn.execute(s) 'response.write s if not rst2.eof then if dblValue1 = "0" or dblValue1 = "" then dblValue1 = rst2("dblImpression") dblValue1 = formatnumber(dblValue1,0) end if if dblValue2 = "0" or dblValue2 = "" then if strType = "Magazine" then dblValue2 = rst2("dblCirculation") end if if strType = "Newspaper" then dblValue2 = rst2("intCirculation") end if end if 'response.write dblValue1 & " || " & dblValue2 'strPublication = rst2("strPublication") strPublicationName = rst("strPublicationName") & " - " & rst2("strPublication") if len(strClientPublication) > 0 then strSubject = strClientPublication end if strLable3 = "Item Units:" select case strType case "Magazine" strCirculation = " " strSpecCalc = " onchange='SpecCalcValues();' " strLable4 = "Column Length:" strLable5 = "Columns:" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" blnURL = false case "Newspaper" strCirculation = " " strSpecCalc = " onchange='SpecCalcValues();' " strLable4 = "Column Length:" strLable5 = "Columns:" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" blnURL = false case "Radio" stpCirculation = "readonly style='background-color: LightGrey;' " isRadorTvDis = " readonly style='background-color: LightGrey;' " blnPicture = " disabled " strSpecCalc = " onchange='CalcAirtimeValues();' " strLable4 = "Airtime(minutes):" strLable5 = "Total Seconds:" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" blnURL = false case "Tv" stpCirculation = "readonly style='background-color: LightGrey;' " isRadorTvDis = " readonly style='background-color: LightGrey;' " blnPicture = " disabled " strSpecCalc = " onchange='CalcAirtimeValues();' " strLable4 = "Airtime(minutes):" strLable5 = "Total Seconds:" 'cmbItem = cmbItem & "" cmbItem = cmbItem & "" cmbItem = cmbItem & "" blnURL = false case "Web" 'dblValue5 = 1 stpCirculation = "readonly style='background-color: LightGrey;' " blnPicture = " disabled " strSpecCalc = " onchange='SpecWebValues();' " strLable3 = "Unique Visitors:" strLable4 = "Article Length (cm):" strLable5 = "Article Breadth (cm):" cmbItem = cmbItem & "" cmbItem = cmbItem & "" blnURL = true end select end if if len(request.queryString("strDatePub")) > 0 then strPubDate = dbdate(request.queryString("strDatePub")) else if strPubDate > 0 then strPubDate = strPubDate else strPubDate = dbDate(strPubDate) end if end if if len(request.queryString("strStaff")) > 0 then refStaff = request.queryString("strStaff") end if s = "SELECT * FROM tblStaff WHERE blnActive = '1' ORDER BY strStaff;" set rst = cn.execute(s) while not rst.eof cmbS = cmbS & "" rst.movenext wend rst.close s = "SELECT * FROM tblClientDivision WHERE refClientID = " & ClientID & " ORDER BY strClientDivision;" set rstCD = cn.execute(s) while not rstCD.eof cmbClientDivision = cmbClientDivision & "" rstCD.movenext wend rstCD.close end if dblValue1 = naChk(dblValue1) dblValue2 = naChk(dblValue2) dblValue3 = naChk(dblValue3) dblValue4 = naChk(dblValue4) dblValue5 = naChk(dblValue5) dblValue6 = naChk(dblValue6) dblValue7 = naChk(dblValue7) dblValue8 = naChk(dblValue8) 'Event 2... if len(request.querystring("blnItem")) > 0 then strSubject = request.querystring("strSubject") strPage = request.querystring("strPage") strIndustry = request.querystring("strIndustry") strCompetitorReferenced = request.querystring("strCompetitorReferenced") strProactiveReactive = request.querystring("strProactiveReactive") refPublicationTypeID = request.querystring("refPublicationTypeID") refContentTypeID = request.querystring("refContentTypeID") refBusinessPriorityID = request.querystring("refBusinessPriorityID") refRegionID = request.querystring("refRegionID") refPracticeTypeID = request.querystring("refPracticeTypeID") strCirculation = " " dblValue2 = 0 dblValue3 = formatnumber(0) dblValue4 = formatnumber(0) dblValue5 = formatnumber(0) 'pj - 20100317 dblValue6 = formatnumber(0) dblValue7 = formatnumber(0) dblValue8 = formatnumber(0) strCirculation = " readonly style='background-color: LightGrey;' " strSpecCalc = " onchange='CalcValues();' " select case strType case "Magazine" 'dblCirculation s = "SELECT " & request.querystring("strItem") & ", dblImpression, dblCirculation FROM tblPublication_" & strType & " WHERE SubPubID = " & refSubPubID & ";" case "Newspaper" 'intCirculation s = "SELECT " & request.querystring("strItem") & ", dblImpression, intCirculation FROM tblPublication_" & strType & " WHERE SubPubID = " & refSubPubID & ";" case "Radio" s = "SELECT " & request.querystring("strItem") & ", dblImpression FROM tblPublication_" & strType & " WHERE SubPubID = " & refSubPubID & ";" case "Tv" s = "SELECT " & request.querystring("strItem") & ", dblImpression FROM tblPublication_" & strType & " WHERE SubPubID = " & refSubPubID & ";" case "Web" 'request.querystring("strItem") = rate || intUV s = "SELECT * FROM tblPublication_" & strType & " WHERE SubPubID = " & refSubPubID & ";" end select 'response.write(s) set rst = cn.execute(s) strSelectedField = request.querystring("strItem") if len(rst(0)) > 0 then dblValue6 = rst(0) else dblValue6 = formatnumber(0) end if if len(rst("dblImpression")) > 0 then dblValue1 = rst("dblImpression") dblValue1 = formatnumber(dblValue1,0) else dblValue1 = 0 end if select case strType case "Magazine" 'dblCirculation strSpecCalc = " onchange='SpecCalcValues();' " strCirculation = " " if len(rst("dblCirculation")) > 0 then dblValue2 = rst("dblCirculation") else dblValue2 = "" end if case "Newspaper" 'intCirculation strSpecCalc = " onchange='SpecCalcValues();' " strCirculation = " " if len(rst("intCirculation")) > 0 then dblValue2 = rst("intCirculation") else dblValue2 = "" end if case "Web" 'request.querystring("strItem") = rate || intUV dblValue1 = rst("intUV") dblValue1 = formatnumber(dblValue1,0) dblValue3 = dblValue1 if isNull(rst("dblCostCm")) then dblValue6 = 0 else dblValue6 = rst("dblCostCm") end if dblValue6 = formatnumber(dblValue6,8) strSpecCalc = " onchange='SpecWebValues();' " 'response.write(strSpecCalc) case "Tv" strSpecCalc = " onchange='CalcAirtimeValues();' " case "Radio" strSpecCalc = " onchange='CalcAirtimeValues();' " end select if request.querystring("chkFD") = "1" then strChecked = " checked " else strChecked = "" end if strPosChecked = "" strNegChecked = "" strNeutChecked = "" strFairChecked = "" if request.querystring("radPosNegNeut") = "pos" then strPosChecked = " checked " elseif request.querystring("radPosNegNeut") = "neg" then strNegChecked = " checked " elseif request.querystring("radPosNegNeut") = "neut" then strNeutChecked = " checked " elseif request.querystring("radPosNegNeut") = "fair" then strFairChecked = " checked " end if dblValue1 = naChk(dblValue1) dblValue2 = naChk(dblValue2) dblValue3 = naChk(dblValue3) dblValue4 = naChk(dblValue4) dblValue5 = naChk(dblValue5) dblValue6 = naChk(dblValue6) dblValue7 = naChk(dblValue7) dblValue8 = naChk(dblValue8) end if %>
<% if blnSpecialFields then s = "SELECT * FROM tblPublicationType ORDER BY strPublicationType;" set rst = cn.execute(s) cmbPublicationTypeSpecial = "" while not rst.eof cmbPublicationTypeSpecial = cmbPublicationTypeSpecial & "" rst.movenext wend rst.close s = "SELECT * FROM tblContentType ORDER BY strContentType;" set rst = cn.execute(s) cmbContentType = "" while not rst.eof cmbContentType = cmbContentType & "" rst.movenext wend rst.close s = "SELECT * FROM tblBusinessPriority ORDER BY strBusinessPriority;" set rst = cn.execute(s) cmbBusinessPriority = "" while not rst.eof cmbBusinessPriority = cmbBusinessPriority & "" rst.movenext wend rst.close s = "SELECT * FROM tblRegion ORDER BY strRegion;" set rst = cn.execute(s) cmbRegion = "" while not rst.eof cmbRegion = cmbRegion & "" rst.movenext wend rst.close s = "SELECT * FROM tblPracticeType ORDER BY strPracticeType;" set rst = cn.execute(s) cmbPracticeType = "" while not rst.eof cmbPracticeType = cmbPracticeType & "" rst.movenext wend rst.close %> <% end if %>
<%if blnURL then%> <%else%> <%end if%>
Client Publication Details
Client: <% response.write strClient %> Publication Type: <% response.write strType %>
Client Division: Publication: <% response.write strPublicationName %>
  FTI Generated: >
Date Captured: <% response.write apdate(strDate) %> Feedback:      Pos >      Neutral >      Neg, but Fair >      Neg >
Date Published: Staff:
Subject / Press Release: Proactive / Reactive:
Page:

Country: Publication Type:
Industry / Speciality Practice: Content Type:
Competitor Referenced: Business Priority:
Practice Type: Region:

 
Duplicates: <%response.write(strDuplicateItems) %>
Item Type: Headline:
<% response.write strLable4 %> >
<% response.write strLable5 %> value="<% response.write dblValue5 %>" <% response.write strSpecCalc %>>
<% response.write strLable3 %> >
Rate: > Spokesperson:
Cost: Readership:
PR value: Circulation: ID="Text2">
URL:     Pictures: