assign('codigospam',$_SESSION['codigospam']); $cAction = $_GET['action']; if (!$cAction){ $cAction = $_GET['html']; } $smarty->assign('title',$cAction); if ($cAction =="send" ) { $bres=mailSend('mail.contact.conf.php'); if ($bres){ echo "Mensaje enviado con éxito"; }else{ echo "Error enviando mensaje"; } die(); } if($cAction=="contacto"){ $smarty->display('contacto.tpl'); die(); } if (count($_GET)==0){ $smarty->display('index.tpl'); die(); } $_SESSION['loadindex']=true; if (!$cAction) $cAction='main'; $cAction = "$cAction.tpl"; $smarty->assign('template',$cAction); $smarty->display('main.tpl'); ?>