} // // Found a article language? // $lang = PMF_Filter::filterInput(INPUT_POST, 'artlang', FILTER_SANITIZE_STRING); if (is_null($lang) && !PMF_Language::isASupportedLanguage($lang)) { $lang = $LANGCODE; } // // Create a new FAQ object // $faq = new PMF_Faq($current_user, $current_groups); // // Create a new Category data provider // $categoryData = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); // // Create a new Tags object // $oTag = new PMF_Tags(); // // Found a record ID? // $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); if (!is_null($id)) { $title = ' - ' . $faq->getRecordTitle($id); $keywords = ',' . $faq->getRecordKeywords($id); $metaDescription = $faq->getRecordPreview($id); } else { $id = ''; $title = ' - powered by phpMyFAQ ' . $faqconfig->get('main.currentVersion');
* @package Administration * @author Thorsten Rinne <*****@*****.**> * @author Minoru TODA <*****@*****.**> * @copyright 2003-2010 phpMyFAQ Team * @license http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1 * @link http://www.phpmyfaq.de * @since 2003-02-23 */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } printf("<h2>%s</h2>\n", $PMF_LANG['ad_entry_aor']); if ($permission['editbt'] || $permission['delbt']) { $categoryRelations = new PMF_Category_Relations(); $categoryData = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); $linkverifier = new PMF_Linkverifier($user->getLogin()); $comment = new PMF_Comment(); $faq = new PMF_Faq(); if ($linkverifier->isReady()) { link_verifier_javascript(); } $cond = $numCommentsByFaq = $numActiveByCat = array(); $internalSearch = $linkState = $searchterm = ''; $searchcat = $currentcategory = 0; $orderby = 1; $sortby = null; $linkState = PMF_Filter::filterInput(INPUT_POST, 'linkstate', FILTER_SANITIZE_STRING); $searchcat = PMF_Filter::filterInput(INPUT_POST, 'searchcat', FILTER_VALIDATE_INT); $searchterm = PMF_Filter::filterInput(INPUT_POST, 'searchterm', FILTER_SANITIZE_STRIPPED);
<script type="text/javascript"> <!-- $(document).ready(function(){ setTimeout(function() { window.location = "index.php?action=view"; }, 5000); }); //--> </script> <?php } else { print $PMF_LANG['ad_entry_savedfail'] . $db->error(); } } elseif (isset($submit['submit'][2]) && !is_null($question) && !is_null($categories)) { // Preview $categoryDataProvider = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); $categoryTree = new PMF_Category_Tree($categoryDataProvider); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper($categoryTree)); $categorylist = ''; foreach ($categories['rubrik'] as $categoryId) { $categoryPath = $categoryDataProvider->getPath($categoryId); $categorylist .= $categoryLayout->renderBreadcrumb($categoryPath) . '<br />'; } ?> <h3><strong><em><?php print $categorylist; ?> </em> <?php print $question; ?>
* * @category phpMyFAQ * @package Administration * @author Thorsten Rinne <*****@*****.**> * @copyright 2003-2010 phpMyFAQ Team * @license http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1 * @link http://www.phpmyfaq.de * @since 2003-02-24 */ if (!defined('IS_VALID_PHPMYFAQ_ADMIN')) { header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } if ($permission['viewlog']) { // Get category data $categoryData = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); // Get rating data $ratings = new PMF_Rating(); //$ratingData = $ratings->fetchAll(); $ratingdata = $ratings->getAllRatings(); $numratings = count($ratingdata); $oldcategory = 0; // Get FAQ record data $faqRecord = new PMF_Faq_Record(); $faqRecord->setLanguage($LANGCODE); $faqData = $faqRecord->fetchAll(); ?> <h2><?php print $PMF_LANG["ad_rs"]; ?>
* @category phpMyFAQ * @package Administration * @author Thorsten Rinne <*****@*****.**> * @copyright 2003-2010 phpMyFAQ Team * @license http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1 * @link http://www.phpmyfaq.de * @since 2003-02-24 */ if (!defined('IS_VALID_PHPMYFAQ_ADMIN')) { 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();