Example #1
0
** See CREDITS for the list of developers.                               **
***************************************************************************/
// Get all the classes.
require_once 'config.inc.php';
require_once 'functions.php';
require_once 'includes/PdoDatabase.php';
require_once 'includes/SmartyInit.php';
// Check to see if the database is unavailable.
// Uses the true variable as the public uses this page.
if (Offline::isOffline()) {
    echo Offline::getOfflineMessage(true);
    die;
}
// TODO: move me to a maintenance job
if ($enableEmailConfirm == 1) {
    Request::cleanExpiredUnconfirmedRequests();
}
$antispoofProvider = new $antispoofProviderClass();
$xffTrustProvider = new $xffTrustProviderClass($squidIpList);
$database = gGetDb();
// Display the header of the interface.
BootstrapSkin::displayPublicHeader();
if (isset($_GET['action']) && $_GET['action'] == "confirm") {
    try {
        if (!isset($_GET['id']) || !isset($_GET['si'])) {
            BootstrapSkin::displayAlertBox("Please check the link you received", "alert-error", "Missing parameters", true, false);
            BootstrapSkin::displayPublicFooter();
            die;
        }
        $request = Request::getById($_GET['id'], $database);
        if ($request === false) {