Recreate adminstuds.php with Smarty style (Work in progress)
This commit is contained in:
parent
7c5ba2eb17
commit
844315ada4
1231
adminstuds.php
1231
adminstuds.php
File diff suppressed because it is too large
Load Diff
1214
old_adminstuds.php
Normal file
1214
old_adminstuds.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user