$n_beca = $beca->getBecaByMd5($md5);
if ($n_beca['estado_id'] == 0) {
    if (!empty($n_beca)) {
        $beca->confirmar($n_beca['beca_id']);
    } else {
        exit('<div align="center" style="color:red"> Ups! No existe lo que estas buscando ;)</div>');
    }
}
$alumno = new Alumno();
//Agrego alumno, devuelve id
//@params : Formatear solo campos de alumno
//$alumno_id = $alumno->save($params);
//$d_beca = array('tipo_beca_id'=>$params['tipo_beca'],'alumno_id'=>$alumno_id,'md5'=>$md5);
//$res_beca = $beca->save($d_beca);
//Traigo datos alumno y beca
$n_alumno = $alumno->getAlumnoById($n_beca['alumno_id']);
//echo "<pre>";
//print_r($n_alumno);
//$n_beca = $beca->getBeca($res_beca);
$datetime = new DateTime($n_beca['timestamp']);
//echo "<pre>";
//print_r($n_beca);
//exit;
if ($n_beca) {
    ?>
<div align="center" style="background-color:#6796C8;"  class="noprint">
<img src="./iso-logo.png" width="205" height="89"></img>
</div>
<p>
<div class="noprint" align="center">
<b style="color:blue">Solicitud confirmada con &eacute;xito!
$d_beca['f_ingreso_caba'] = date_format($f_i_caba_datetime, "Y-m-d");
/*$fecha_inicio = '1-'.$params['f_sem_inicio_b'].'-'.$params['f_inicio_b'];
$f_inicio = date_create($fecha_inicio);
$f_i_datetime = date_format($f_inicio,"Y-m-d");

$fecha_fin = '1-'.$params['f_sem_final_b'].'-'.$params['f_final_b'];
$f_fin = date_create($fecha_fin);
$f_f_datetime = date_format($f_fin,"Y-m-d");
*/
$d_beca['f_inicio_b'] = $params['f_inicio_b'];
//$f_i_datetime;
$d_beca['f_final_b'] = $params['f_final_b'];
//$f_f_datetime;
$res_beca = $beca->save($d_beca);
//Traigo datos alumno y beca
$n_alumno = $alumno->getAlumnoById($alumno_id);
$n_beca = $beca->getBeca($res_beca);
//$datetime = new DateTime($n_beca['timestamp']);
//if($params['mail'] == $params['mail'])//if ok - send email
$mailer = new Mailer();
$params['md5'] = $md5;
$mailer->sendEmail($params);
?>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<title></title>
<script type="text/javascript" charset="utf8" src="./js/jquery-1.11.2.js"></script>

<script>