<!-- #include File="../includes/conexao.asp"-->

<script language="javascript">
	function excluir(codEvento) {
		var e = confirm('Deseja realmente excluir o Evento?');
		if (e) { location.href='AdminEvento.asp?codEvento='+codEvento+'&action=excluir' }
	}
</script>
<link href="../../includes/estilos.css" rel="stylesheet" type="text/css" />
<%
'dim conexaodb
Call AbreConexao
if trim(request("action"))="Publicar" then
	SQL = "update Eventos set ideAtivo='S' where codEvento=" & request("codEvento")
	Conexaodb.execute(SQL)
end if

if trim(request("action"))="excluir" then
	SQL = "delete from Eventos where codEvento=" & request("codEvento")
	Conexaodb.execute(SQL)
end if


if trim(request("action"))="desPublicar" then
	SQL = "update Eventos set ideAtivo='N' where codEvento=" & request("codEvento")
	Conexaodb.execute(SQL)
end if

SQL = "Select i.NUMsEQUENCIAL, i.desTitulo, i.datEnvio from Envio_marketing i "  & _
		" order by i.datEnvio" 
set rcdconteudo = Conexaodb.execute(SQL)
if not rcdconteudo.eof  then 
    vultCodCategoria = 0
			%>
	
<table width="648" border="0" align="left" cellpadding=1 class="txtgeral">
		<TR>
		  <TD colspan="2" align="center"><a href="#" onclick="location.href='principal.asp?ir=emailMarketing.asp'" class="Link">Criar e-mail marketing</a></span></div></TD>
  </TR>
<TR>
			<TD colspan="2" class="lblGrande"><strong>E-mails Enviados</strong></TD>
		</TR>
        <TR>
            <TD align="center" class="lblGrande" width="301"><div align="center"><B>Título</b></div></TD>
			 <TD align="center" class="lblGrande" width="331"><div align="center"><B>Data</b></div></TD>
		</tr>

		
		<%	Do While not rcdconteudo.eof 				%>
				<tr> 
				<TD><%=rcdconteudo("desTitulo")%></TD>
				<TD align=center><%=mid(rcdconteudo("datEnvio"),7,2) & "/" & mid(rcdconteudo("datEnvio"),5,2) & "/" & mid(rcdconteudo("datEnvio"),1,4) %></TD>
				</tr>
				<tr>
					<td bgcolor="#958065" height="1" colspan="2"><img src="../imagens/pix_transp.gif" width="1" height="1" /></td>
				</tr>
		<%		'vultCodCategoria= rcdConteudo("codCategoria")
        		rcdconteudo.movenext
			loop%>
</table>
<%	
	else
		'response.Write "Registro não encontrado"
end if
rcdconteudo.close
Conexaodb.close
'set conn = nothing
%><P>&nbsp;</p>
