function clear_old_confirm_claims() { $confirm = new Confirm(); $confirm->claimed = null; $confirm->whereAdd('now() - claimed > ' . CLAIM_TIMEOUT); $confirm->update(DB_DATAOBJECT_WHEREADD_ONLY); $confirm->free(); unset($confirm); }
<?php require_once "functions.php"; require_once "../classes/Confirm.class.php"; require_once "../classes/InterestManager.class.php"; if (!isset($_SESSION['logged_in_user_id'])) { header("Location: login.php"); } if (isset($_GET["logout"])) { //kustutame sessiooni muutujad session_destroy(); header("Location: login.php"); } $InterestManager = new InterestManager($mysqli, $_GET["id"]); $Confirm = new Confirm($mysqli); $contest_array = $Confirm->getAllData(); ?> <?php // lehe nimi $page_title = "Kasutaja info"; ?> <?php require_once "../header.php"; ?> <br><br> <div class="container"> <div class="row">
} elseif ($arrInfo['mode'] == 'cut' || $arrInfo['mode'] == 'copy') { $arrInfo['act'] = $GLOBALS['TL_LANG'][$arrInfo['table']][$arrInfo['mode']][0]; } } else { $arrInfo['act'] = $GLOBALS['TL_LANG'][$arrInfo['table']][$arrInfo['act']][0]; } unset($arrInfo['pid']); unset($arrInfo['clipboard']); unset($arrInfo['ref']); unset($arrInfo['mode']); // Template variables $this->Template->confirm = true; $this->Template->link = specialchars($url); $this->Template->info = $arrInfo; $this->Template->labels = $GLOBALS['TL_LANG']['CONFIRM']; $this->Template->explain = $GLOBALS['TL_LANG']['ERR']['invalidTokenUrl']; $this->Template->cancel = $GLOBALS['TL_LANG']['MSC']['cancelBT']; $this->Template->continue = $GLOBALS['TL_LANG']['MSC']['continue']; $this->Template->theme = Backend::getTheme(); $this->Template->base = Environment::get('base'); $this->Template->language = $GLOBALS['TL_LANGUAGE']; $this->Template->title = specialchars($GLOBALS['TL_LANG']['MSC']['invalidTokenUrl']); $this->Template->charset = Config::get('characterSet'); $this->Template->output(); } } /** * Instantiate the controller */ $objConfirm = new Confirm(); $objConfirm->run();
<?php require_once "functions.php"; require_once "../classes/Confirm.class.php"; if (!isset($_SESSION['logged_in_user_id'])) { header("Location: login.php"); } if (isset($_GET["logout"])) { session_destroy(); header("Location: login.php"); } $Confirm = new Confirm($mysqli); if (isset($_GET["edit"])) { $Confirm->saveNewEntry($_GET["edit"], $_SESSION['logged_in_user_id']); } $contest_array = $Confirm->getAllData(); if (isset($_GET["update"])) { $Confirm->updateConfirmData($_GET["confirm_id"], $_GET["result"], $_GET["grade"], $_GET["run_comment"]); header("Location: confirm.php"); exit; } ?> <?php // lehe nimi $page_title = "Tulemused ja kommentaarid"; ?> <?php require_once "../header.php"; ?>