Recreate adminstuds.php with Smarty style (Work in progress)

This commit is contained in:
Olivier PEREZ 2014-12-17 23:20:12 +01:00
parent 7c5ba2eb17
commit 844315ada4
3 changed files with 1260 additions and 1189 deletions

File diff suppressed because it is too large Load Diff

1214
old_adminstuds.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,7 @@ include_once __DIR__ . '/app/inc/init.php';
/* Variables */
/* --------- */
$poll_id = null;
$poll = null;
$message = null;
/* Services */
@ -39,10 +40,9 @@ $inputService = new InputService();
if(!empty($_GET['poll'])) {
$poll_id = filter_input(INPUT_GET, 'poll', FILTER_VALIDATE_REGEXP, ['options'=>['regexp'=>'/^[a-z0-9]+$/']]);
$poll = $pollService->findById($poll_id);
}
$poll = $pollService->findById($poll_id);
if (!$poll) {
$smarty->assign('error', 'This poll doesn\'t exist');
$smarty->display('error.tpl');