Exemplo n.º 1
0
    exit;
}
/* Controlador de acciones */
$a = check_get('a');
switch ($a) {
    case 'login':
        check_login();
        break;
    case 'register':
        echo "quieres registrarte";
        break;
    case 'forgot':
        echo "quieres recuperar tu contraseña";
        break;
    case 'logout':
        end_session();
        break;
}
?>
<!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Foundation | Welcome</title>
    <link rel="stylesheet" href="css/foundation.css" />
    <script src="js/vendor/modernizr.js"></script>
  </head>
  <body>

    <h1>Bienvenido <?php 
function logout_success()
{
    $_SESSION['login_status'] = false;
    end_session();
}
function after_successful_logout()
{
    $_SESSION['logged_in'] = false;
    end_session();
}
Exemplo n.º 4
0
function logout()
{
    end_session();
    header('Location: controller.php?page=main');
    exit(0);
}
Exemplo n.º 5
0
<?php

if (!defined("_GIRUDATSU_")) {
    exit;
}
$f3->route('GET /', function ($f3) {
    is_session($f3);
    include 'app/controllers/index.php';
});
$f3->route('GET /session', function ($f3) {
    is_session($f3);
    include 'app/controllers/session.php';
});
$f3->route('GET /logout', function ($f3) {
    end_session($f3);
    $f3->reroute('/session');
});
$f3->route('POST /session', function ($f3) {
    if (verif_session($f3->get('POST.api')) == 'true') {
        $f3->reroute('/');
    } else {
        $f3->set('ESCAPE', FALSE);
        $f3->set('message', '<div class="alert alert-danger">Invalid <a class="alert-link" href="#">Girudatsu API Key</a>.');
        include 'app/controllers/session.php';
    }
});
$f3->route('GET /api/stripe', function ($f3) {
    is_session($f3);
    include 'app/controllers/api.stripe.php';
});
$f3->route('GET /api/paypal', function ($f3) {