<% if request.querystring("idnews")<>"" then set RecSet1 = Server.CreateObject("ADODB.Recordset") Visa1 = "SELECT * FROM news where idnews like '"& request.querystring("idnews") &"'" RecSet1.Open Visa1, Connect, adOpenStatic, adLockOptimistic %>
<%=recset1("titlenews")%> < Torna alle comunicazioni

<% html = "" if recset1("newsimg")<>"" then imgname=recset1("newsimg") imgpath=Server.MapPath("public/dps/news/"& imgname &"") Set objImageSize = New ImageSize With objImageSize .ImageFile = imgpath strimgh=.ImageWidth strimgw=.ImageHeight End With Set objImageSize = Nothing strtemph="450" moltiplica=strtemph * 100 dividi=moltiplica/strimgh moltiplica2=strimgw * dividi strtempw=moltiplica2/100 maxsizew="280" 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 html = html & "" if recset1("newsdsc")<>"" then html = html & "" end if if recset1("newsimg2")<>"" then imgname=recset1("newsimg2") imgpath=Server.MapPath("public/dps/news/"& imgname &"") Set objImageSize = New ImageSize With objImageSize .ImageFile = imgpath strimgh=.ImageWidth strimgw=.ImageHeight End With Set objImageSize = Nothing strtemph="450" moltiplica=strtemph * 100 dividi=moltiplica/strimgh moltiplica2=strimgw * dividi strtempw=moltiplica2/100 maxsizew="280" 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 html = html & "" if recset1("newsdsc2")<>"" then html = html & "" end if end if if recset1("newsimg3")<>"" then imgname=recset1("newsimg3") imgpath=Server.MapPath("public/dps/news/"& imgname &"") Set objImageSize = New ImageSize With objImageSize .ImageFile = imgpath strimgh=.ImageWidth strimgw=.ImageHeight End With Set objImageSize = Nothing strtemph="450" moltiplica=strtemph * 100 dividi=moltiplica/strimgh moltiplica2=strimgw * dividi strtempw=moltiplica2/100 maxsizew="280" 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 html = html & "" if recset1("newsdsc3")<>"" then html = html & "" end if end if 'stradgoogle=" " &_ 'vbCrlf & "" 'html = html & "" html = html & "
"& recset1("newsdsc") &"
 
"& recset1("newsdsc2") &"
 
"& recset1("newsdsc3") &"
 

"& stradgoogle &"

" %> <%=html%><% end if %><%=recset1("txtnews")%>

<% else %> <% 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") 'if request.querystring("src")<>"" then 'sSQL="SELECT * FROM news where titlenews like '%"& replace(request.querystring("src"),"'","''") &"%' or txtnews like '%"& replace(request.querystring("src"),"'","''") &"%' order by datenews desc" 'else sSQL="SELECT * FROM news order by datenews desc" 'end if Recordset.CursorLocation = 3 Recordset.open sSQL, connect Recordset.PageSize = 15 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 = Recordset("txtnews") iMaxChar = 55 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 %> <% Recordset.MoveNext Loop else %> <% end if %>
  "><%=Recordset("titlenews") %>
<% 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 %>
<% end if %>

LUAN Tecnologie Medico Estetiche - Corso Susa 242, 10098 Rivoli (TO) - Tel / Fax +39 011.978.34.36 / 32.45