Buongiorno a tutti,
avrei bisogno una cortesia; ho creato un pacchetto news per un sito di un hotel:
http://www.mediacentro.com/hotelmedi.../news/news.asp
Il cliente mi chiede però che una volta terminato il periodo di riferimento dell'offerta, la news scompaia automaticamente. (nell'esempio che vedete dovrebbe eliminarsi dopo il 14 novembre). E' possibile fare questo?
Grazie in anticipo
Juan
CODICE file NEWS.ASP:
----------------------------------------------------------------------
<%
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open connStr
%>
----------------------------------------------------------------------
<table width="600" border="0" align="left" cellpadding="0" cellspacing="5">
<%
Set rsNegozi = Server.CreateObject("ADODB.Recordset")
myquery = "SELECT * FROM News ORDER BY data DESC"
rsNegozi.Open myquery, cn
While (NOT rsNegozi.EOF)
%>
<tr>
<td width="74%" height="29" valign="top" bgcolor="#FFFFFF"><div align="left" class="Stile6">
<div align="left" class="Stile69">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%">">[img]arrow.gif[/img]</td>
<td width="97%"><font size="2" face="Arial" color="#666666">"><%=rsNegozi("titolo")%></font></td>
</tr>
<tr>
<td width="5%"></td>
<td width="97%"><font color="#CCCCCC" size="1" face="Arial" class="Stile69"><%=rsNegozi("sottotitolo")%></font></td>
</tr>
</table>
</div>
</div></td>
<td width="26%" valign="top" bgcolor="#FFFFFF"><div align="left"><font color="#004487" size="1" face="Arial" class="Stile5"><%=rsNegozi("data")%></font></div></td>
</tr>
<tr>
<td height="29" colspan="2" valign="middle" bgcolor="#FFFFFF" class="Stile69"><div align="left">------------------------------------------------------------------------------------------------------------------------------</div></td>
</tr>
<%
rsNegozi.MoveNext()
Wend
%>
</table>
----------------------------------------------------------------------