login
| |
minisiti
|
|
<%
Set cmdUpdate = Server.CreateObject("ADODB.Command")
cmdUpdate.CommandType = 1
Set cmdUpdate.ActiveConnection = Session("CONNECTION")
cmdUpdate.CommandText = "SELECT * FROM updates WHERE focus = 1 AND lingua_id = " & Session("idl") & " ORDER BY updates.data DESC"
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
rsUpdate.Open cmdUpdate, , 1, 3
if not(rsUpdate.BOF and rsUpdate.EOF) then
rcount = rsUpdate.RecordCount
%>
<%=ShowDate(rsUpdate("data"))%>
<%
if not IsNull(rsUpdate("testo")) and rsUpdate("testo") <> "" then
%>
&m=5">
<%
else
%>
<%
end if
%>
<%=rsUpdate("titolo")%>
<%
text = rsUpdate("anteprima")
lun = 60
if Len(text)>CInt(lun) then
if InStr(CInt(lun),text," ") > InStr(CInt(lun),text,vbCr) and InStr(CInt(lun),text,vbCr) > 0 then
limite = InStr(CInt(lun),text,vbCr)
else
limite = InStr(CInt(lun),text," ")
end if
Response.Write(Replace(Left(text,limite),vbCr," ") & " ...")
else
Response.Write(Replace(text,vbCr," "))
end if
end if
rsUpdate.Close
%> |
<%
Set cmdCase = Server.CreateObject("ADODB.Command")
cmdCase.CommandType = 1
Set cmdCase.ActiveConnection = Session("CONNECTION")
cmdCase.CommandText = "SELECT * FROM casehistory WHERE focus = 1 AND lingua_id = " & Session("idl") & " AND pubblicato = 1"
Set rsCase = Server.CreateObject("ADODB.Recordset")
rsCase.Open cmdCase, , 1, 3
if not(rsCase.BOF and rsCase.EOF) then
%>
&m=2"><%=rsCase("etichetta")%>
<%text = rsCase("testo_home")
lun = 500
if Len(text)>CInt(lun) then
if InStr(CInt(lun),text," ") > InStr(CInt(lun),text,vbCr) and InStr(CInt(lun),text,vbCr) > 0 then
limite = InStr(CInt(lun),text,vbCr)
else
limite = InStr(CInt(lun),text," ")
end if
Response.Write(Replace(Left(text,limite),vbCr," ") & " ...")
else
Response.Write(Replace(text & ".",vbCr," "))
end if%>
<%
rsCase.MoveNext
if not rsCase.EOF then
%>
&m=2"><%=rsCase("etichetta")%>
<%text = rsCase("testo_home")
lun = 500
if Len(text)>CInt(lun) then
if InStr(CInt(lun),text," ") > InStr(CInt(lun),text,vbCr) and InStr(CInt(lun),text,vbCr) > 0 then
limite = InStr(CInt(lun),text,vbCr)
else
limite = InStr(CInt(lun),text," ")
end if
Response.Write(Replace(Left(text,limite),vbCr," ") & " ...")
else
Response.Write(Replace(text & ".",vbCr," "))
end if%>
<%
end if
end if
rsCase.Close
%>
|
|
|