Example #1
0
        $_SESSION['status'] = 'alerted';
        // Try alerting the database
    } else {
        if (isset($_POST['phone']) || isset($_POST['fname']) || isset($_POST['lname'])) {
            htmlspecialchars($_POST['phone'], ENT_QUOTES);
            htmlspecialchars($_POST['fname'], ENT_QUOTES);
            htmlspecialchars($_POST['lname'], ENT_QUOTES);
            $_SESSION['status'] = 'identified';
        }
    }
}
require_once __DIR__ . '/source/php/ast/Page.php';
$index = new Page('en');
$index->add(__DIR__ . '/source/template/head.tpl');
switch ($_SESSION['status']) {
    case 'new':
        $index->add(__DIR__ . '/source/template/index.tpl');
        break;
    case 'alerted':
        $index->add(__DIR__ . '/source/template/alert.tpl');
        break;
    case 'identified':
        $index->add(__DIR__ . '/source/template/ident.tpl');
        break;
}
$index->add(__DIR__ . '/source/template/call_links.tpl');
$index->add(__DIR__ . '/source/template/footer.tpl');
$index->setPath(__DIR__ . '/source/locale/home_{LANG}.json');
$index->setFall('en');
$index->init();
echo $index;