PROMOZIONI

    <% if request.querystring("pageno")<>"" then strpageno1="pageno="& request.querystring("pageno") &"&" else strpageno1="" end if Dim Currpage, pageLen, lastNumber, PageRem, PageTen Dim connection, recordset, sSQL, sConnString, next10, prev10, P Dim RSPrevPage, RSNextPage, start If IsEmpty(Request.Querystring("PageNo")) then CurrPage = 1 Else CurrPage = Cint(Request.Querystring("PageNo")) End If Function getNext10(num) pageLen = len(num) If pageLen = 1 Then next10 = 10 Else If pageLen>1 Then pageRem = 10 pageTen = right(num, 1) next10 = num + pageRem - pageTen End If End If getNext10 = next10 End Function Function getPrev10(num) pageLen = len(num) If pageLen = 1 then prev10 = 1 Else If pageLen>1 then lastNumber = right(num, 1) prev10 = num - lastNumber - 10 End If End If If prev10 = 0 then prev10 = 1 End If getPrev10 = prev10 End Function strtime=formatDatetime(time(),vbShorttime) Set Recordset = Server.CreateObject("ADODB.Recordset") sSQL="SELECT * FROM news order by datenews desc" Recordset.CursorLocation = 3 Recordset.open sSQL, connectuser Recordset.PageSize = 100 if not Recordset.eof then Recordset.AbsolutePage = CurrPage next10 = getNext10(CurrPage) prev10 = getPrev10(CurrPage) Function RemoveHtmlTag(txt) Set objRE = createObject("VBScript.RegExp") objRE.Pattern = "\<[^\>]*\>" objRE.Global = true objRE.IgnoreCase = true RemoveHtmlTag = objRE.Replace(txt,"") End Function Do Until Recordset.AbsolutePage <> CurrPage OR Recordset.Eof 'sText = RemoveHtmlTag(Recordset("txtnews")) sText = Recordset("txtnews") iMaxChar = 500 sResult = sText If Len(sResult) > iMaxChar Then If InStr(iMaxChar, sResult, " ") > 0 Then sResult = Left(sResult, InStr(iMaxChar, sResult, " ")) & "..." End If End If fString=Recordset("titlenews") fString = replace(fString, " ","_") fString = replace(fString, " ","_") fString = replace(fString, "'","_") fString = Replace(fString, "&", "") fString = Replace(fString, ",", "_") fString = Replace(fString, ";", "_") fString = Replace(fString, ".", "_") stringcatf=fString %> <% if Recordset("newsimg")<>"" and strview=1 then imgname=Recordset("newsimg") imgpath=Server.MapPath("/public/dps/"&strnewsf&"/"& imgname &"") Set objImageSize = New ImageSize With objImageSize .ImageFile = imgpath strimgh=.ImageWidth strimgw=.ImageHeight End With if strimgw=0 or strimgh=0 then imgname="_immagine_non_disponibile.jpg" strthbimgw=120 strthbimgh=90 else Set objImageSize = Nothing strtemph="113" moltiplica=strtemph * 100 dividi=moltiplica/strimgh moltiplica2=strimgw * dividi strtempw=moltiplica2/100 maxsizew="150" if int(strtempw)>int(maxsizew) then moltiplica1=maxsizew * 100 dividi1=moltiplica1/strtempw moltiplica21=strtemph * dividi1 strtemph=moltiplica21/100 strtempw=maxsizew end if if int(strimgh)>int(strimgw) then strthbimgw=formatnumber(strtempw,0) strthbimgh=formatnumber(strtemph,0) else strthbimgw=formatnumber(strtempw,0) strthbimgh=formatnumber(strtemph,0) end if end if %>" > <% else %> <% end if %>
  • - <%=Recordset("titlenews") %>

    <%=Recordset("txtnews") %>


  • <% Recordset.MoveNext Loop end if %>
<% strpagestring="idnews="& request.querystring("idnews") &"&src="& request.querystring("src") &"" RSPrevPage = CurrPage -1 RSNextPage = CurrPage + 1 If Next10 > Recordset.PageCount Then Next10 = Recordset.PageCount End If If prev10 = 1 AND next10 - 1 < 10 Then start = 1 Else start = Next10 - 10 If right(start, 1) > 0 Then start = replace(start, right(start, 1), "0") start = start + 10 End If End If If Recordset.PageCount > 1 Then If next10 > 10 Then response.write("<< ") End If If NOT RSPrevPage = 0 then response.write("<  ") End If For P = start to Next10 If NOT P = CurrPage then response.write("" & P & " | ") Else response.write("" & P & " | ") End If Next If NOT RSNextPage > Recordset.PageCount Then response.write("  >") End If If NOT Next10 = Recordset.PageCount Then response.write(" >>") End If End If %>

Indirizzo: Via Cuneo 32, 10042 Nichelino (TO) | Tel : 011.37.44.813 - Cell: 340.97.037.99 | Email: duem.serramenti@libero.it / info@duemserramenti.it
Partita Iva: 10949890015 | Powered by Torinoweb | Privacy Policy Cookie Policy

<% ConnectUser.close set ConnectUser=nothing %>