"
end if
rs2.Close
rs.MoveNext
wend
centralchannelhtml = centralchannelhtml & ""
rs.Close
elseif Request("top") = 1 then
sql = "SELECT * FROM CHANNELS WHERE industry = 'freight'"
rs.open sql, db
while not rs.EOF
sql2 = "SELECT distinct COUNT(*) FROM CHANNELS c INNER JOIN (CHANNEL_XREF x INNER JOIN (CHANNELS2 c2 INNER JOIN (REPORT r INNER JOIN CHANNEL2_XREF x2 ON r.primarykey = x2.item_id) ON x2.channel2_id = c2.id) ON r.primarykey = x.item_id) ON x.channel_id = c.id left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey WHERE c.id = " & rs("id")
if Request("ch2") <> "" then sql2 = sql2 & " AND c2.id = " & Request("ch2")
rs2.open sql2, db
'centralchannelhtml = centralchannelhtml & "SQL2::: " & sql2 & ":::end sql2"
'pos = 0
if not rs2(0)=0 then
'if not pos = 0 then
' centralchannelhtml = centralchannelhtml & " "
'end if
'pos = pos + 1
Select Case rs("id")
Case 182
name = "Connectivity"
Case 161
name = "Online Opps."
Case 179
name = "Marketplaces"
Case 159
name = "Govt. Issues"
Case else
name = rs("name")
End Select
centralchannelhtml = centralchannelhtml & "
"
'sql = "SELECT distinct top 100 thedate,subjectline,precis,image,primarykey,exclusive,flag,link,format FROM REPORT left outer join(AUTHORS_xref left outer join AUTHORS ON AUTHORS_xref.author_id = AUTHORS.id) ON REPORT.primarykey = AUTHORS_xref.story_id where report.industry='freight' AND "
sqlsearch = sqlsearch & " order by thedate desc, flag, primarykey DESC"
%>
<%
channelname = "Search Results"
elseif not (ch = "" and ch2 = "" and ch3 = "") then
if ch<>"" and ch2<>"" then
sql = "SELECT DISTINCT TOP 100 thedate,subjectline,precis,image,primarykey,flag,link,format,exclusive, a.name,a.position,a.company FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey WHERE c.id = " & ch & " AND c2.id = " & ch2
' sql = "SELECT TOP 100 thedate,subjectline,precis,image,primarykey,flag,link,format,exclusive FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = " & ch2
elseif ch<>"" then
sql = "SELECT DISTINCT TOP 100 thedate,subjectline,precis,image,primarykey,flag,link,format,exclusive, a.name,a.position,a.company FROM channels c INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON x.channel_id = c.id left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey WHERE c.id = " & ch
elseif ch2<>"" then
sql = "SELECT DISTINCT TOP 100 thedate,subjectline,precis,image,primarykey,flag,link,format,exclusive, a.name,a.position,a.company FROM channels2 c2 INNER JOIN (report r INNER JOIN channel2_xref x2 ON r.primarykey = x2.item_id) ON x2.channel2_id = c2.id left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey WHERE c2.id = " & ch2
elseif ch3<>"" then
sql = "SELECT DISTINCT TOP 100 thedate,subjectline,precis,image,primarykey,flag,link,format,exclusive, a.name,a.position,a.company FROM channels3 c3 INNER JOIN (report r INNER JOIN channel3_xref x3 ON r.primarykey = x3.item_id) ON x3.channel3_id = c3.id left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey WHERE c3.id = " & ch3
end if
sql = sql & " ORDER BY r.flag, r.thedate desc, r.primarykey DESC"
'indexprint = indexprint & sql
if ch<>"" then
sqlchanname = "SELECT TOP 1 channels.name from channels where channels.id = " & ch
rsusers.open sqlchanname,db
if not rsusers.eof then
channelname = rsusers("name")
end if
rsusers.close
end if
if ch2<>"" then
sqlchanname2 = "SELECT TOP 1 channels2.name from channels2 where channels2.id = " & ch2
rsusers.open sqlchanname2,db
if not rsusers.eof then
channel2name = rsusers("name")
end if
rsusers.close
end if
if ch3<>"" then
sqlchanname2 = "SELECT TOP 1 channels3.name from channels3 where channels3.id = " & ch3
rsusers.open sqlchanname2,db
if not rsusers.eof then
channelname = rsusers("name")
end if
rsusers.close
end if
if request("top")=1 then
centralchannelhtml = "
" & centralchannelhtml
end if
elseif format <> "" then
sql = "SELECT top 100 thedate,subjectline,precis,image,primarykey,link,format,exclusive, a.name,a.position,a.company FROM REPORT left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey where format = '" & format & "' ORDER BY flag, thedate DESC, primarykey DESC"
if format = "n" then
channelname = "Latest News"
elseif format="f" or format="l" then
channelname = "Editorial Comment"
elseif format="c" then
channelname = "Conference Coverage"
elseif format="e" then
channelname = "Events"
end if
indexprint = indexprint & channelhtml & channel2html
else
homepage = 1
sql = "SELECT distinct TOP 100 primarykey,subjectline,precis,link,format,thedate,image,flag,exclusive, a.name,a.position,a.company FROM channels2 c2 INNER JOIN (report r INNER JOIN channel2_xref x2 ON r.primarykey = x2.item_id) ON x2.channel2_id = c2.id left join (authors_xref ax inner join Authors a on ax.author_id = a.id) ON ax.story_id = r.primarykey WHERE r.industry = 'freight' and c2.id=91 ORDER BY r.flag, r.thedate desc, r.primarykey DESC"
end if
if sqlsearch <> "" then
sql = sqlsearch
end if
rsUsers.Open sql, db
'Response.Write centralchannelhtml
indexprint = indexprint & "
"
channelprint = channelname & " " & channel2name
if news<>"" then
indexprint = indexprint & "
"
elseif not homepage=1 then
indexprint = indexprint & ""
indexprint = indexprint & "
"
end if
move = thismany-howmany
'for i = 1 to move
if not rsusers.EOF then rsusers.Move+ move
'next
leftright = "left"
lastprimarykey=0
do while not rsUsers.EOF
while rsUsers("primarykey")=lastprimarykey
if not rsusers("name") = "" then indexprint = indexprint & " " & rsusers("name") & "": mtm=1
if not rsusers("position") = "" then indexprint = indexprint & "," & rsusers("position") & ""
if not rsusers("company") = "" then indexprint = indexprint & ", " & rsusers("company") & ""
rsUsers.MoveNext
wend
lastprimarykey=rsUsers("primarykey")
if mtm=1 then
indexprint = indexprint & "
": mtm=0
else
mtm=0
end if
count = count + 1
if count > cint(recordnumber) then
exit do
end if
'INCLUDE - go work out whether we need imageHTML!!
%>
<%
'if leftright = "left" then
'leftright = "right"
'else
leftright = "left"
'end if
imagehtml = "
"
%>
<%
' if we are on the full story/news page then
if news<>"" then
'INCLUDE add print and send to a friend if appropriate
%>
<%
printandsendfriendhtml = printandsendfriendhtml & "
"
%>
<%
if not rsusers("format")="c" then
indexprint = indexprint & printandsendfriendhtml
'subjectline as the title
indexprint = indexprint & "
"
if rsUsers("exclusive") = true then
indexprint = indexprint & "
"
end if
indexprint = indexprint & "" & rsusers("subjectline") & ""
else
indexprint = indexprint & "
e-business for Transport Conference Coverage"
end if
indexprint = indexprint & "
"
'include printandsendfriendhtml!!
if rsusers("format") = "n" or rsusers("format") = "f" or rsusers("format") = "e" then
'print precis & date
indexprint = indexprint & "" & rsusers("precis") & ""
indexprint = indexprint & "
(" & rsusers("thedate") & ")"
if not trim(rsusers("image")) = "" and not isnull(rsusers("image")) then
indexprint = indexprint & imagehtml
end if
indexprint = indexprint & "
" & rsusers("bodytext") & ""
pagetitle = rsusers("subjectline")
pageMetaContent = rsusers("precis")
'INCLUDE - AUTHORS include authorHTML!!
%>
<%
'if not rsusers("author") = "" and not isnull(rsusers("author")) then
'authors = split(rsusers("author"),",")
set rsAuthors = CreateObject("ADODB.Recordset")
'for i = 0 to ubound(authors)
'rsSQL = "SELECT * FROM AUTHORS WHERE id = " & authors(i)
rsSQL = "SELECT distinct top 10 authors.* FROM REPORT INNER JOIN (AUTHORS INNER JOIN AUTHORS_xref ON AUTHORS.id = AUTHORS_xref.author_id) ON AUTHORS_xref.story_id = REPORT.primarykey where REPORT.primarykey=" & rsusers("primarykey")
'response.write rsSQL
rsAuthors.Open rsSQL, db
while not rsAuthors.EOF
authorhtml = authorhtml & rsAuthors("name")
if not rsAuthors("position") = "" and not isnull(rsAuthors("position")) then
authorhtml = authorhtml & " / " & rsAuthors("position") & ""
end if
if not rsAuthors("company") = "" and not isnull(rsAuthors("company")) then
authorhtml = authorhtml & " / " & rsAuthors("company") & "
"
end if
rsAuthors.MoveNext
wend
rsAuthors.Close
'next
'end if
%>
<%
if not trim(authorhtml) = "" and not trim(authorhtml) = " " and not isnull(authorhtml) then
indexprint = indexprint & "
Author: "
indexprint = indexprint & authorhtml
end if
'INCLUDE - RELATED STORIES - relatedHTML!!
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
Set relatedstories = Server.CreateObject("ADODB.Recordset")
sqlrelated = "select related1,related2 from relatedstories where related1 = " & rsusers("primarykey") & " order by related2 desc;"
rs.Open sqlrelated,db
if not rs.eof then
relatedhtml = relatedhtml & "
Related Stories:
"
while not rs.EOF
sqlrelatedstories = "select subjectline,thedate,precis,primarykey,link from report where primarykey = " & rs("related2")
relatedstories.Open sqlrelatedstories,db
if not relatedstories.EOF then
relatedhtml = relatedhtml & "
"
end if
relatedstories.close
rs.movenext
wend
end if
relatedhtml = relatedhtml & "
"
rs.Close
set rs = nothing
%>
<%
Set rschannel = Server.CreateObject("ADODB.Recordset")
if ch="" or isnull(ch) then
sqlchannels = "SELECT top 1 channel_id from channel_xref where item_id = " & news
rschannel.Open sqlchannels,db
if not rschannel.eof then
ch = rschannel("channel_id")
else
ch=179
end if
rschannel.close
end if
'if not ch="" and not isnull(ch) then
'channellinks = channellinks & "
"
channellinks = channellinks & "Other Related Info:
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
News
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 91 order by r.thedate desc;"
rschannel.Open sqlchannels,db
while not rschannel.eof
if not rschannel("format") = "e" and not rschannel("format") = "l" then
channellinks = channellinks & "
"
'set channel2 to 93
sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 93 order by r.thedate desc;"
rschannel.Open sqlchannels,db
while not rschannel.eof
if not rschannel("format") = "e" and not rschannel("format") = "l" then
channellinks = channellinks & "
"
sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 92 order by r.thedate desc;"
rschannel.Open sqlchannels,db
while not rschannel.eof
if not rschannel("format") = "e" and not rschannel("format") = "l" then
channellinks = channellinks & "
"
'
' sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 116 order by r.thedate desc;"
' rschannel.Open sqlchannels,db
' while not rschannel.eof
' channellinks = channellinks & "
"
'end if
%>
<%
indexprint = indexprint & relatedhtml
indexprint = indexprint & channellinks
' THESE ARE THE HEADERS FOR CONFERENCE MATERIALS
elseif rsusers("format") = "c" then
if rsUsers("exclusive") = true then
indexprint = indexprint & "
"
'INCLUDE - AUTHORS include authorHTML!!
%>
<%
'if not rsusers("author") = "" and not isnull(rsusers("author")) then
'authors = split(rsusers("author"),",")
set rsAuthors = CreateObject("ADODB.Recordset")
'for i = 0 to ubound(authors)
'rsSQL = "SELECT * FROM AUTHORS WHERE id = " & authors(i)
rsSQL = "SELECT distinct top 10 authors.* FROM REPORT INNER JOIN (AUTHORS INNER JOIN AUTHORS_xref ON AUTHORS.id = AUTHORS_xref.author_id) ON AUTHORS_xref.story_id = REPORT.primarykey where REPORT.primarykey=" & rsusers("primarykey")
'response.write rsSQL
rsAuthors.Open rsSQL, db
while not rsAuthors.EOF
authorhtml = authorhtml & rsAuthors("name")
if not rsAuthors("position") = "" and not isnull(rsAuthors("position")) then
authorhtml = authorhtml & " / " & rsAuthors("position") & ""
end if
if not rsAuthors("company") = "" and not isnull(rsAuthors("company")) then
authorhtml = authorhtml & " / " & rsAuthors("company") & "
"
end if
rsAuthors.MoveNext
wend
rsAuthors.Close
'next
'end if
%>
<%
indexprint = indexprint & authorhtml
'include linkHTML!!
%>
<%
if rsUsers("link") <> "" then
indexprint = indexprint & ""
indexprint = indexprint & ""
indexprint = indexprint & "
"
end if
%>
<%
indexprint = indexprint & linkhtml
'include relatedHTML!!
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
Set relatedstories = Server.CreateObject("ADODB.Recordset")
sqlrelated = "select related1,related2 from relatedstories where related1 = " & rsusers("primarykey") & " order by related2 desc;"
rs.Open sqlrelated,db
if not rs.eof then
relatedhtml = relatedhtml & "
Related Stories:
"
while not rs.EOF
sqlrelatedstories = "select subjectline,thedate,precis,primarykey,link from report where primarykey = " & rs("related2")
relatedstories.Open sqlrelatedstories,db
if not relatedstories.EOF then
relatedhtml = relatedhtml & "
"
end if
relatedstories.close
rs.movenext
wend
end if
relatedhtml = relatedhtml & "
"
rs.Close
set rs = nothing
%>
<%
Set rschannel = Server.CreateObject("ADODB.Recordset")
if ch="" or isnull(ch) then
sqlchannels = "SELECT top 1 channel_id from channel_xref where item_id = " & news
rschannel.Open sqlchannels,db
if not rschannel.eof then
ch = rschannel("channel_id")
else
ch=179
end if
rschannel.close
end if
'if not ch="" and not isnull(ch) then
'channellinks = channellinks & "
"
channellinks = channellinks & "Other Related Info:
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
News
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
channellinks = channellinks & "
"
sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 91 order by r.thedate desc;"
rschannel.Open sqlchannels,db
while not rschannel.eof
if not rschannel("format") = "e" and not rschannel("format") = "l" then
channellinks = channellinks & "
"
'set channel2 to 93
sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 93 order by r.thedate desc;"
rschannel.Open sqlchannels,db
while not rschannel.eof
if not rschannel("format") = "e" and not rschannel("format") = "l" then
channellinks = channellinks & "
"
sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 92 order by r.thedate desc;"
rschannel.Open sqlchannels,db
while not rschannel.eof
if not rschannel("format") = "e" and not rschannel("format") = "l" then
channellinks = channellinks & "
"
'
' sqlchannels = "SELECT DISTINCT TOP 5 thedate,subjectline,primarykey,link,format FROM channels2 c2 INNER JOIN (channels c INNER JOIN (channel2_xref x2 INNER JOIN (report r INNER JOIN channel_xref x ON r.primarykey = x.item_id) ON r.primarykey = x2.item_id) ON x.channel_id = c.id) ON x2.channel2_id = c2.id WHERE c.id = " & ch & " AND c2.id = 116 order by r.thedate desc;"
' rschannel.Open sqlchannels,db
' while not rschannel.eof
' channellinks = channellinks & "
"
'end if
%>
<%
indexprint = indexprint & relatedhtml
indexprint = indexprint & channellinks
end if
'related stories where here!!
else
if not trim(rsusers("image")) = "" and not isnull(rsusers("image")) then
end if
' NEWS STORIES FOR THE FRONT PAGE & SUBPAGES
indexprint = indexprint & "
"
if not rsusers("format") = "e" and not rsusers("format") = "l" then
if rsUsers("exclusive") = true then
indexprint = indexprint & "
"
indexprint = indexprint & " "
end if
indexprint = indexprint & "" & rsUsers("subjectline") & ""
else
if rsUsers("exclusive") = true then
indexprint = indexprint & " "
elseif rsUsers("thedate") = date() then
indexprint = indexprint & ""
indexprint = indexprint & " "
end if
indexprint = indexprint & "" & rsUsers("subjectline") & ""
end if
if not rsusers("precis") = "" then indexprint = indexprint & " "
indexprint = indexprint & ""
indexprint = indexprint & rsUsers("precis") & " ("
indexprint = indexprint & rsUsers("thedate") & ")"
if not rsusers("name") = "" then indexprint = indexprint & " " & rsusers("name") & " / "
if not rsusers("position") = "" then indexprint = indexprint & rsusers("position")
if not rsusers("company") = "" then indexprint = indexprint & rsusers("company") & ""
'if not rsusers("name") = "" then indexprint = indexprint & "
"
if leftright = "left" then
leftright = "right"
else
leftright = "left"
end if
end if
rsUsers.MoveNext
loop
'no records
if count = "" or count=0 then
indexprint = indexprint & "No records found"
end if
'include move next, move previous
''''''if its not advanced search code'''''''''''
if Request("cboNoResults")="" then
if rsUsers.EOF then endoffile = "y"
rsUsers.Close
indexprint = indexprint & "
"
if pass > 1 then
indexprint = indexprint & "Previous " & recordnumber & ""
end if
if endoffile <> "y" and pass > 1 then
indexprint = indexprint & " | "
end if
if endoffile <> "y" then
indexprint = indexprint & "Next " & recordnumber & ""
end if
else
'for advanced search''''''''''''''''''''''''''
'include move next, move previous
if rsUsers.EOF then endoffile = "y"
rsUsers.Close
indexprint = indexprint & "
"
if endoffile <> "y" then
indexprint = indexprint & "Next " & recordnumber & ""
end if
if endoffile <> "y" and pass > 1 then
indexprint = indexprint & " | "
end if
if pass > 1 then
indexprint = indexprint & "Previous " & recordnumber & ""
end if
end if
if (ch2=91 and (ch="" or isnull(ch)) and (pass=1)) or (homepage=1) then
indexprint = indexprint & "
Get the latest Transportation news for FREE on your
site
Each week and day, our newsletters; Strategy and Technology
for Transportation & Logistics, will bring you news on the
most innovative and cutting edge developments in the Industry.
Packed with valuable insights, case study's, interviews with leading
industry figures, and forecasts of future trends, every edition
will give you a comprehensive view on the burning issues within
the Transport & Logistics Industry.
If you want to unsubscribe or change the format
you subscribe to, click
hereContribute articles to the editor
The eyefortransport Newsletter is also your fully interactive forum,
and we welcome contributions to the newsletter. If you wish to contribute
articles or comment on the briefing, please email Jimmy
Olsson
Past Newsletters
Click on the links below to view a selection of newsletters sent
out over the last 4 years:
The eyefortransport Newsletter is also your fully interactive forum,
and we welcome contributions to the newsletter. If you wish to contribute
articles or comment on the briefing, please email Jimmy
Olsson
Find out more
Want to find out about speaker or sponsorship opportunites?
Click here to find out more
about the upcoming EyeforTransport events.