} ?> </td> </tr> <tr> <td><strong><?php print $PMF_LANG["msgCategory"]; ?> :</strong></td> <td><select class="admin" name="searchcat"> <option value="0"><?php print $PMF_LANG["msgShowAllCategories"]; ?> </option> <?php print $categoryLayout->renderOptions(array($searchcat)); ?> </select></td> <td><input class="submit" type="submit" name="submit" value="<?php print $PMF_LANG["msgSearch"]; ?> " /></td> </tr> </table> </fieldset> </form> <form id="recordSelection" name="recordSelection" method="post"> <fieldset> <legend><?php print $PMF_LANG['ad_menu_entry_edit'];
* @author Thorsten Rinne <*****@*****.**> * @copyright 2002-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 2002-09-16 */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $captcha = new PMF_Captcha($db, $Language); $captcha->setSessionId($sids); if (!is_null($showCaptcha)) { $captcha->showCaptchaImg(); exit; } $faqsession->userTracking('new_entry', 0); // Get possible user input $inputQuestion = PMF_Filter::filterInput(INPUT_GET, 'question', FILTER_VALIDATE_INT); $inputCategory = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT); $question = $readonly = ''; if (!is_null($inputQuestion)) { $faqQuestions = new PMF_Faq_Questions(); $question = $faqQuestions->fetch($inputQuestion); if (PMF_String::strlen($question->question)) { $readonly = ' readonly="readonly"'; } } $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); $tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG['msgNewContentHeader'], 'msgNewContentAddon' => $PMF_LANG['msgNewContentAddon'], 'writeSendAdress' => '?' . $sids . 'action=save', 'defaultContentMail' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('email') : '', 'defaultContentName' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('display_name') : '', 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'msgNewContentCategory' => $PMF_LANG['msgNewContentCategory'], 'printCategoryOptions' => $categoryLayout->renderOptions(array($inputCategory)), 'msgNewContentTheme' => $PMF_LANG['msgNewContentTheme'], 'readonly' => $readonly, 'printQuestion' => $question instanceof PMF_Faq_Questions ? $question->question : '', 'msgNewContentArticle' => $PMF_LANG['msgNewContentArticle'], 'msgNewContentKeywords' => $PMF_LANG['msgNewContentKeywords'], 'msgNewContentLink' => $PMF_LANG['msgNewContentLink'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('add')), 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'])); $tpl->includeTemplate('writeContent', 'index');
* The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * @category phpMyFAQ * @package Frontend * @author Thorsten Rinne <*****@*****.**> * @copyright 2002-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 2002-09-17 */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $captcha = new PMF_Captcha($sids); if (!is_null($showCaptcha)) { $captcha->showCaptchaImg(); exit; } $faqsession->userTracking('ask_question', 0); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); $tpl->processTemplate('writeContent', array('msgQuestion' => $PMF_LANG['msgQuestion'], 'msgNewQuestion' => $PMF_LANG['msgNewQuestion'], 'writeSendAdress' => '?' . $sids . 'action=savequestion', 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('email') : '', 'defaultContentName' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('display_name') : '', 'msgAskCategory' => $PMF_LANG['msgAskCategory'], 'printCategoryOptions' => $categoryLayout->renderOptions(), 'msgAskYourQuestion' => $PMF_LANG['msgAskYourQuestion'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('ask')), 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'])); $tpl->includeTemplate('writeContent', 'index');
$record_ids = $tagging->getRecordsByTagId($inputTag); $printResult = $faq->showAllRecordsByIds($record_ids); } // // Handle the full text search stuff // if (!is_null($inputSearchTerm) || !is_null($search)) { if (!is_null($inputSearchTerm)) { $inputSearchTerm = $db->escapeString(strip_tags($inputSearchTerm)); } if (!is_null($search)) { $inputSearchTerm = $db->escapeString(strip_tags($search)); } $printResult = searchEngine($inputSearchTerm, $inputCategory, $allLanguages); $inputSearchTerm = stripslashes($inputSearchTerm); $faqsearch->logSearchTerm($inputSearchTerm); } // Change a little bit the $searchCategory value; $inputCategory = '%' == $inputCategory ? 0 : $inputCategory; $faqsession->userTracking('fulltext_search', $inputSearchTerm); $openSearchLink = sprintf('<a class="searchplugin" href="#" onclick="window.external.AddSearchProvider(\'%s/opensearch.php\');">%s</a>', PMF_Link::getSystemUri('/index.php'), $PMF_LANG['opensearch_plugin_install']); $mostPopularSearches = ''; $mostPopularSearchData = $faqsearch->getMostPopularSearches($faqconfig->get('main.numberSearchTerms')); foreach ($mostPopularSearchData as $searchItem) { if (PMF_String::strlen($searchItem['searchterm']) > 0) { $mostPopularSearches .= sprintf('<li><a href="?search=%s&submit=Search&action=search">%s</a> (%dx)</li>', urlencode($searchItem['searchterm']), $searchItem['searchterm'], $searchItem['number']); } } $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); $tpl->processTemplate('writeContent', array('msgSearch' => $tagSearch ? $PMF_LANG['msgTagSearch'] : $PMF_LANG['msgSearch'], 'searchString' => PMF_String::htmlspecialchars($inputSearchTerm, ENT_QUOTES, 'utf-8'), 'searchOnAllLanguages' => $PMF_LANG['msgSearchOnAllLanguages'], 'checkedAllLanguages' => $allLanguages ? ' checked="checked"' : '', 'selectCategories' => $PMF_LANG['msgSelectCategories'], 'allCategories' => $PMF_LANG['msgAllCategories'], 'printCategoryOptions' => $categoryLayout->renderOptions(array($inputCategory)), 'writeSendAdress' => '?' . $sids . 'action=search', 'msgSearchWord' => $PMF_LANG['msgSearchWord'], 'printResult' => $printResult, 'openSearchLink' => $openSearchLink, 'msgMostPopularSearches' => $PMF_LANG['msgMostPopularSearches'], 'printMostPopularSearches' => '<ul class="phpmyfaq_ul">' . $mostPopularSearches . '</ul>')); $tpl->includeTemplate('writeContent', 'index');
if (!PMF_Db::checkOnEmptyTable('faqdata')) { if (!PMF_Db::checkOnEmptyTable('faqcategories')) { $categoryData = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryData))); ?> <fieldset><legend><?php print $PMF_LANG['ad_export_which_cat']; ?> </legend> <label class="left" for="rubrik"><?php print $PMF_LANG["ad_entry_category"]; ?> </label> <select name="catid" id="catid" size="1"> <?php print $categoryLayout->renderOptions(); ?> </select> <br /> <label class="left" for="downwards"><?php print $PMF_LANG['ad_export_cat_downwards']; ?> </label> <input type="checkbox" name="downwards" value="1" checked="checked"></input> </fieldset> <br /> <?php } ?> <fieldset><legend><?php print $PMF_LANG['ad_export_type'];
?> " /> <fieldset class="fullwidth"> <legend><?php print $PMF_LANG['ad_entry_faq_record']; ?> </legend> <label class="lefteditor" for="rubrik"><?php print $PMF_LANG["ad_entry_category"]; ?> </label> <select name="rubrik[]" id="rubrik" size="5" multiple="multiple"> <?php print $categoryLayout->renderOptions($categories); ?> </select><br /> <label for="thema"><?php print $PMF_LANG["ad_entry_theme"]; ?> </label> <input name="thema" id="thema" style="width: 720px; height: 30px; font-size: 24px;" value="<?php if (isset($faqData['title'])) { print PMF_String::htmlspecialchars($faqData['title']); } ?> " maxlength="255" /><br /> <label for="content"><?php