% city = ""'convertFirstLetter(city) country = ""'convertFirstLetter(country ) 'domainForLinks = "www.123russia.com" domainForLinks = Request.ServerVariables("SERVER_NAME") 'categor = request.querystring("categor") 'key = request.querystring("key") linksSeparate = 90 ' параметр задает число ссылок, выводящихся в категории на одну страницу ourPartnersCategory = 147 ' устанавливает значение категории Our Partners 'city = ""'convertFirstLetter(city) 'country = ""'convertFirstLetter(country ) 'domainForLinks = "www.travel.spb.ru" 'domainForLinks = Request.ServerVariables("SERVER_NAME") 'categor = request.querystring("categor") 'key = request.querystring("key") 'page = request.querystring("page") if not isNumeric(page) or len(page) < 1 then page = 1 end if Set Conn = Server.CreateObject("ADODB.Connection") conn.Open "Provider=sqloledb;server=localhost;Database=links;Trusted_Connection=no;UID=aspRead;pwd=a$3r2Xg75$" %>
Best links for travellers! |
Welcome to our selection of travel related sites! |
|
<%
SQLStmt = "SELECT distinct catalogue, catid"&_
" FROM links"&_
" inner join catalogue on links.catid=catalogue.id"&_
" inner join mcatalogue on catalogue.mcid=mcatalogue.mid"&_
" WHERE (OurServer=1 or patindex('%" & domainForLinks & "%',LOurServer)<>0 ) and cweight>0"&_
" ORDER BY catalogue"
Set linksForTable = Conn.Execute(SQLStmt)
mcat = "" 'обнуление от предыдущего запроса
cat = "" 'обнуление от предыдущего запроса
counterForTable = 0 'определяем число не повторяющихся разделов
if not linksForTable.eof then
while not linksForTable.eof
if catIDvar <> linksForTable("catid") then
counterForTable = counterForTable + 1
catIDvar = linksForTable("catid")
end if
'if mcat<>linksForTable("mcatalogue") then 'рисуется крупная категория
' counterForTable = counterForTable + 1
' mcat=linksForTable("mcatalogue")
'end if
'if cat<>linksForTable("catalogue") and linksForTable("catalogue")<>linksForTable("mcatalogue") then 'категория выделяется красным цветом
' counterForTable = counterForTable + 1
' cat=linksForTable("catalogue")
'end if
linksForTable.movenext
wend
linksForTable.movefirst
end if
mcat = "" 'обнуление от предыдущего запроса
cat = "" 'обнуление от предыдущего запроса
catIDvar = ""
counterForTd = counterForTable \ 3
if counterForTd <> counterForTable / 3 then
counterForTdAdd = 1
else
counterForTdAdd = 0
end if
counterForTd = counterForTd + counterForTdAdd
'response.write counterForTd
'response.write " " 'response.write counterForTable 'response.write " " 'response.write counterForTdAdd counterForTable = 0 numberTd = 1 if not(len(key) > 0) then'*************************************** SQLStmt = "SELECT mcatalogue, catalogue, LserverName, LServerDesc, LserverHTTP" & _ " FROM links " & _ " inner join catalogue on links.catid=catalogue.id"&_ " inner join mcatalogue on catalogue.mcid=mcatalogue.mid"&_ " WHERE (OurServer=1 or patindex('%" & domainForLinks & "%',LOurServer)<>0 ) and cweight>0 and catid= '" & ourPartnersCategory & "' "& _ " ORDER BY mweight, cweight, Lweight DESC;" Set ourPartnersRec = Conn.Execute(SQLStmt) %>
|
<% counterForTable = 0
numberTd = numberTd + 1
counterForTd = counterForTd - counterForTdAdd
end if
'response.write ""&trim(linksForTable("catalogue"))&"" cat=linksForTable("catalogue") end if response.write vbcrlf linksForTable.movenext wend if numberTd = 3 and counterForTable > 0 then%> |
<% end if
%>
<%if len(key) > 0 then'''''''''''''''''''''''''''''%>
|
| Other pages: <% for i = 1 to ((countLinks - 1) \ linksSeparate + 1) if i = cInt(page) then %> <%=i%> | <% else %> <%=i%> | <% end if next %> |