<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

echo "<html>\r\n<head>\r\n<LINK REL=\"StyleSheet\" HREF=\"style.css\" TYPE=\"text/css\">\r\n</head>\r\n     \t\t\r\n<body link=\"#096f9e\" vlink=\"#096f9e\" alink=\"#096f9e\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n          ";
include( "config.php" );
include( "class_td.php" );
$classe = new td_class( );
$mid = $classe->checkcookie( );
$emailatual = $_POST['emailatual'];
$novoemail = $_POST['novoemail'];
$renovoemail = $_POST['renovoemail'];
if ( $novoemail != $renovoemail )
{
    echo "<script>alert(\"O novo email não conciede.\"); window.location='';</script>";
}
if ( $alterarok )
{
    $classe->checacaracteresemail( $emailatual, "Email Atual" );
    $classe->checacaracteresemail( $novoemail, "Novo Email" );
    $classe->verificaemailexistente( $mid, $emailatual );
    $classe->verificaemailexiste( $novoemail );
    $classe->executatrocadeemail( $mid, $novoemail );
}
echo "<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\r\n<tr><td>\r\n<table width=\"66%\" border=\"0\" align=\"center\">\r\n<form name=\"form1\" method=\"post\" action=\"\" target=\"_self\">\r\n<tr bgcolor=\"#096f9e\">\r\n<td height=\"22\" colspan=\"3\" align=\"center\"><font color=\"#FFFFFF\" face=\"Arial Black\">ALTERAR E-MAIL DE CADASTRO</font></td>\r\n</tr>\r\n\r\n<tr bgcolor=\"#EFEFEF\">\r\n<td width=\"26%\" align=\"center\">E-mail Atual:\r\n<td width=\"79\" colspan=\"2\"><input type=\"text\" name=\"emailatual\" value=\"\" maxlength=\"70\" size=\"60\"></td>\r\n</tr>\r\n<tr bgcolor=\"#EFEFEF\">\r\n<td width=\"26%\" align=\"center\">Novo E-mail:\r\n<td width=\"79\" colspan=\"2\"><input type=\"text\" name=\"novoemail\" value=\"\" maxlength=\"70\" size=\"60\"></td>\r\n</tr>\r\n<tr bgcolor=\"#EFEFEF\">\r\n<td width=\"26%\" align=\"center\">Re - Novo Email:\r\n<td width=\"79\" colspan=\"2\"><input type=\"text\" name=\"renovoemail\" value=\"\" maxlength=\"70\" size=\"60\"></td>\r\n</tr>\r\n<tr bgcolor=\"#EFEFEF\">\r\n<td colspan=\"3\" align=\"center\"><input name=\"alterarok\" id=\"alterarok\" type=\"submit\" value=\"Alterar\"></td>\r\n</tr></form>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>";
?>
