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) { BootstrapSkin::displayAlertBox($smarty->fetch('request/request-not-found.tpl'), "alert-error", "Request not found", true, false); BootstrapSkin::displayPublicFooter(); die; } if ($request->getEmailConfirm() == "Confirmed") { $smarty->display("request/email-confirmed.tpl");