header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } if ($permission['delquestion']) { $questionId = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); $delete = PMF_Filter::filterInput(INPUT_GET, 'delete', FILTER_SANITIZE_STRING, 'no'); $categoryData = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); $faqQuestions = new PMF_Faq_Questions(); if ($delete == 'yes') { $faqQuestions->delete($questionId); print $PMF_LANG['ad_entry_delsuc']; } else { $toggleQuestion = PMF_Filter::filterInput(INPUT_GET, 'is_visible', FILTER_SANITIZE_STRING); if ($toggleQuestion == 'toggle') { $is_visible = $faqQuestions->getVisibility($questionId); if (!is_null($is_visible)) { $faqQuestions->setVisibility($questionId, $is_visible == 'N' ? 'Y' : 'N'); } } printf("<h2>%s</h2>", $PMF_LANG['msgOpenQuestions']); $openQuestions = $faqQuestions->fetchAll(); if (count($openQuestions) > 0) { ?> <table id="tableOpenQuestions"> <thead> <tr> <th><?php print $PMF_LANG['ad_entry_author']; ?> </th>