Example #1
0
 public static function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self(\Mep\Container::getFiltroSession());
     }
     return self::$_instance;
 }
Example #2
0
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Update, Insert and Delete</title>
    </head>
    <body>
        <form action="" method="post">
            <div>
                Matricula:<input type="text" name="matricula" value="<?php 
echo Post::MATRICULA();
?>
"> 
            </div>
            <div>
                Nome:<input type="text" name="nome" value="<?php 
echo Post::NOME();
?>
">
            </div>
            <div>
                <?php 
echo \Mep\Container::getLayout()->renderSecurityField();
?>
                <input type="submit">
            </div>
        </form>
    </body>
</html>

Example #3
0
<?php

require_once 'Mep/init.php';
use Mep\Container as Mep;
Mep::getPage()->render();
<?php

header('Content-Type: application/json');
require_once 'Mep/init.php';
use Mep\Container as Mep, Mep\Handlers\FiltroPost as Post;
if (Mep::getToken()->checa(Post::TOKEN_SERVICOS())) {
    $token = Mep::getLayout()->renderSecurityField();
    try {
        $mail = Mep::getFormServicos(['servicos_escolhidos', 'nome', 'telefone', 'celular', 'uf', 'email', 'mensagem'])->prepara()->processa();
        $mail("*****@*****.**", "Marcos Ammon");
        $status = "Email enviado com sucesso";
    } catch (Exception $ex) {
        $status = $ex->getMessage();
    }
    echo \json_encode(["status" => $status, "novoToken" => $token]);
} else {
    Mep::getLayout()->renderNotFound();
    die;
}