Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Fiz o seguinte codigo através do Dreamweaver, que exibe numa página mais ou menos assim:
DATA EVENTOS
DD/MM/AAAA 1 ENCONTRO VER
DD/MM/AAAA 2 ENCONTRO VER
Quando a pessoa clica em ver exibe uma página com todos os detalhes, até ai tudo bem, coloquei a data em orde decrescente.
Mas preciso de ajuda no seguinte gostaria de acrescentar algo que quando chegasse no dia do evento o registro fosse excluido automaticamente.
ai vai o codigo
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><% session.LCID = 1046 %><!--#include file="../Connections/DADOS_IPVC.asp" --><%Dim EventosDim Eventos_numRowsSet Eventos = Server.CreateObject("ADODB.Recordset")Eventos.ActiveConnection = MM_DADOS_IPVC_STRINGEventos.Source = "SELECT * FROM EVENTOS ORDER BY DATA DESC"Eventos.CursorType = 0Eventos.CursorLocation = 2Eventos.LockType = 1Eventos.Open()Eventos_numRows = 0%><%Dim Repeat1__numRowsDim Repeat1__indexRepeat1__numRows = -1Repeat1__index = 0Eventos_numRows = Eventos_numRows + Repeat1__numRows%><%Dim MM_paramName %><%' *** Go To Record and Move To Record: create strings for maintaining URL and Form parametersDim MM_keepNoneDim MM_keepURLDim MM_keepFormDim MM_keepBothDim MM_removeListDim MM_itemDim MM_nextItem' create the list of parameters which should not be maintainedMM_removeList = "&index="If (MM_paramName <> "") ThenMM_removeList = MM_removeList & "&" & MM_paramName & "="End IfMM_keepURL=""MM_keepForm=""MM_keepBoth=""MM_keepNone=""' add the URL parameters to the MM_keepURL stringFor Each MM_item In Request.QueryStringMM_nextItem = "&" & MM_item & "="If (InStr(1,MM_removeList,MM_nextItem,1) = 0) ThenMM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))End IfNext' add the Form variables to the MM_keepForm stringFor Each MM_item In Request.FormMM_nextItem = "&" & MM_item & "="If (InStr(1,MM_removeList,MM_nextItem,1) = 0) ThenMM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))End IfNext' create the Form + URL string and remove the intial '&' from each of the stringsMM_keepBoth = MM_keepURL & MM_keepFormIf (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)End IfIf (MM_keepURL <> "") ThenMM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)End IfIf (MM_keepForm <> "") ThenMM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)End If' a utility function used for adding additional parameters to these stringsFunction MM_joinChar(firstItem)If (firstItem <> "") ThenMM_joinChar = "&"ElseMM_joinChar = ""End IfEnd Function%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css"><!--.style4 {font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; }.style5 {font-size: 12px;font-family: Geneva, Arial, Helvetica, sans-serif;}.style6 {color: #9A9A9A;font-weight: bold;}--></style></head><body><table width="468" border="0" cellspacing="0" cellpadding="0"><tr><td width="100"><div align="center" class="style4">DATA</div></td><td width="338"><div align="center" class="style4">EVENTO</div></td><td width="30"><div align="center" class="style4"></div></td></tr><tr><td colspan="3"><% While ((Repeat1__numRows <> 0) AND (NOT Eventos.EOF)) %><table width="468" border="0" cellspacing="2" cellpadding="2"><tr><td width="100" class="style5"><strong><%=(Eventos.Fields.Item("DATA").Value)%></strong></td><td width="338" class="style5 style6"><%=(Eventos.Fields.Item("EVENTO").Value)%></td><td width="30" class="style5"><div align="center"><strong><A HREF="Exibir.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "ID=" & Eventos.Fields.Item("ID").Value %>">VER</A></strong></div></td></tr></table><% Repeat1__index=Repeat1__index+1Repeat1__numRows=Repeat1__numRows-1Eventos.MoveNext()Wend%><span class="style5"></span></td></tr></table></body></html><%Eventos.Close()Set Eventos = Nothing%>
Qualquer ajuda será muito bem aceita......
* Por favor utilize a TAG
(botão do editor) quando for postar códigos, isso formata e facilita a leitura de seu código.
Carregando comentários...