private function deletePoll() { if ($_POST['post_type'] == "delete_poll") { $pollDataGetter = new database_selectpolldata(); $poll_id = app_controller::$strcln->esc($_POST['poll_id']); $poll = $pollDataGetter->selectPollDataParam($poll_id); $isOwnerOfPoll = new database_isownerofpoll(); $isAdminOfPoll = new security_isuseradmin(); if ($isOwnerOfPoll->checkOwner($poll['email']) || $isAdminOfPoll->isAdmin()) { new app_deletepoll($poll['url']); app_controller::$poll_id = null; } } }
public function __construct() { new printing_printbackbutton(); //echo app_controller::$poll_id.' pollpage.php'; $pollDataGetter = new database_selectpolldata(); $poll = $pollDataGetter->selectPollData(); if (!$poll) { return; } $with_dates = $poll['with_dates']; $isOwnerOfPoll = new database_isownerofpoll(); $isAdminOfPoll = new security_isuseradmin(); if ($isOwnerOfPoll->checkOwner($poll['email']) || $isAdminOfPoll->isAdmin()) { new printing_printdeletebutton(); } $this->selectPollUsers($poll); new printing_printpollinfo($poll); $this->isPersonInPoll($with_dates, $poll); }