Exemplo n.º 1
0
                header("Location:aluno.php?a=as&msg=" . base64_encode("@lng[A senha deve ter no mínimo 6 caracteres]"));
            }
        } else {
            header("Location:aluno.php?a=as&msg=" . base64_encode("@lng[As senhas não são iguais]"));
        }
    }
    $ins->setCodigo($usu->getCodigoInstituicao());
    $ins->Carrega();
    if ($_GET['msg']) {
        $tplmsg = file_get_contents("tpl/aluno/mensagem.html");
        $tplmsg = str_replace('<!--mensagem-->', base64_decode($_GET['msg']), $tplmsg);
        $tpl = str_replace('<!--localmensagem-->', $tplmsg, $tpl);
    }
    $sNome = split(' ', $usu->getNome());
    $tpl = str_replace("<!--NomeAluno-->", $sNome[0], $tpl);
    $tpl = str_replace("<!--NomeInstituicao-->", '<a target="_blank" href="http://' . $ins->getSite() . '">' . $ins->getNomeCompleto() . '</a>', $tpl);
    if ($_GET['a']) {
        switch ($_GET['a']) {
            case 'as':
                AlteraSenha($tpl);
        }
    } else {
        Principal($tpl, $usu);
    }
}
if (Comuns::EstaLogado()) {
    Main();
} else {
    $msg = base64_encode("Você deve estar logado para acessar esta tela");
    header("Location:index.php?m=" . $msg);
}