/** * Renders the captcha check * * @param PMF_Captcha $captcha * @param string $action * @param string $legend * @param boolean $auth * * @return string */ public function renderCaptcha(PMF_Captcha $captcha, $action, $legend, $auth = false) { $html = ''; if (true === $this->_config->get('spam.enableCaptchaCode') && is_null($auth)) { $html .= '<div class="form-group">'; $html .= ' <label class="col-sm-4 control-label"></label>'; $html .= ' <div class="col-sm-8">'; $html .= ' <p class="form-control-static">'; $html .= $captcha->printCaptcha($action); $html .= ' </p>'; $html .= sprintf('<p class="help-block"><a id="captcha-button" data-action="%s">Refresh Captcha</a></p>', $action); $html .= ' </div>'; $html .= '</div>'; $html .= '<div class="form-group">'; $html .= sprintf('<label class="col-sm-4 control-label">%s</label>', $legend); $html .= ' <div class="controls">'; $html .= ' <div class="col-sm-4">'; $html .= sprintf('<input type="text" name="captcha" id="captcha" size="%d" required class="form-control">', $captcha->caplength); $html .= ' <span class="input-group-btn"><i class="glyphicon glyphicon-refresh"></i></span>'; $html .= ' </div>'; $html .= ' </div>'; $html .= '</div>'; } return $html; }
/** * Renders the captcha check * * @param PMF_Captcha $captcha * @param string $action * @param string $legend * @param boolean $auth * * @return string */ public function renderCaptcha(PMF_Captcha $captcha, $action, $legend, $auth = false) { $html = ''; if (true === $this->_config->get('spam.enableCaptchaCode') && is_null($auth)) { $html .= '<div class="control-group">'; $html .= ' <label class="control-label"></label>'; $html .= ' <div class="controls">'; $html .= $captcha->printCaptcha($action); $html .= ' </div>'; $html .= '</div>'; $html .= '<div class="control-group">'; $html .= sprintf('<label class="control-label">%s</label>', $legend); $html .= ' <div class="controls">'; $html .= ' <div class="input-append">'; $html .= sprintf('<input type="text" name="captcha" id="captcha" size="%d" required>', $captcha->caplength); $html .= sprintf('<a class="btn" id="captcha-button" data-action="%s"><i class="icon-refresh"></i></a>', $action); $html .= ' </div>'; $html .= ' </div>'; $html .= '</div>'; } return $html; }
$minVisits = $_r['visits']; } if ($maxVisits < $_r['visits']) { $maxVisits = $_r['visits']; } if ($record_id == $_r['id'] && $lang == $_r['lang']) { $currVisits = $_r['visits']; } } if ($maxVisits - $minVisits > 0) { $percentage = 100 * ($currVisits - $minVisits) / ($maxVisits - $minVisits); } $faqPopularity = $currVisits . '/' . (int) $percentage . '%'; $translationForm = ''; if (count($arrLanguage) < count(PMF_Language::getAvailableLanguages())) { $translationUrl = sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', $sids, $currentCategory, $record_id, $lang); $translationForm = ' <form action="' . $translationUrl . '" method="post" style="display: inline;"> <img src="images/translate.gif" alt="' . $PMF_LANG['msgTranslate'] . '" title="' . $PMF_LANG['msgTranslate'] . '" width="16" height="16" border="0" /> ' . $PMF_LANG['msgTranslate'] . ' ' . PMF_Language::selectLanguages($LANGCODE, false, $arrLanguage, 'translation') . ' <input class="submit" type="submit" name="submit" value="' . $PMF_LANG['msgTranslateSubmit'] . '" /> </form>'; } // Get rating $recordRating = $faqrating->fetch($record_id); if (!is_null($recordRating)) { $printVoting = sprintf(' %s (%s)', round($recordRating->sumVotings / $recordRating->numVotings, 2), $plr->GetMsg('plmsgVotes', $recordRating->numVotings)); } else { $printVoting = sprintf('0 (%s)', $plr->GetMsg('plmsgVotes', 0)); } // Set the template variables $tpl->processTemplate("writeContent", array('writeRubrik' => $categoryName . '<br />', 'solution_id' => $faq->faqRecord['solution_id'], 'writeThema' => $thema, 'writeArticleCategoryHeader' => $PMF_LANG['msgArticleCategories'], 'writeArticleCategories' => $writeMultiCategories, 'writeContent' => $content, 'writeTagHeader' => $PMF_LANG['msg_tags'] . ': ', 'writeArticleTags' => $tagging->getAllLinkTagsById($record_id), 'writeRelatedArticlesHeader' => $PMF_LANG['msg_related_articles'] . ': ', 'writeRelatedArticles' => $relevant->getAllRelatedById($record_id, $faq->faqRecord['title'], $faq->faqRecord['keywords']), 'writePopularity' => $faqPopularity, 'writeDateMsg' => $PMF_LANG['msgLastUpdateArticle'] . $faq->faqRecord['date'], 'writeRevision' => $PMF_LANG['ad_entry_revision'] . ': 1.' . $faq->faqRecord['revision_id'], 'writeAuthor' => $PMF_LANG['msgAuthor'] . ': ' . $faq->faqRecord['author'], 'editThisEntry' => $editThisEntry, 'writeDiggMsgTag' => 'Digg it!', 'link_digg' => sprintf('http://digg.com/submit?phase=2&url=%s', urlencode($diggItUrl)), 'writeFacebookMsgTag' => 'Share on Facebook', 'link_facebook' => sprintf('http://www.facebook.com/sharer.php?u=%s', urlencode($facebookUrl)), 'link_email' => sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=send2friend&cat=%d&id=%d&artlang=%s', $sids, $currentCategory, $record_id, $lang), 'link_pdf' => sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'pdf.php?cat=%d&id=%d&artlang=%s', $currentCategory, $record_id, $lang), 'writePDFTag' => $PMF_LANG['msgPDF'], 'writePrintMsgTag' => $PMF_LANG['msgPrintArticle'], 'writeSend2FriendMsgTag' => $PMF_LANG['msgSend2Friend'], 'translationForm' => $translationForm, 'saveVotingPATH' => sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=savevoting', $sids), 'saveVotingID' => $record_id, 'saveVotingIP' => $_SERVER['REMOTE_ADDR'], 'msgAverageVote' => $PMF_LANG['msgAverageVote'], 'printVotings' => $printVoting, 'switchLanguage' => $switchLanguage, 'msgVoteUseability' => $PMF_LANG['msgVoteUseability'], 'msgVoteBad' => $PMF_LANG['msgVoteBad'], 'msgVoteGood' => $PMF_LANG['msgVoteGood'], 'msgVoteSubmit' => $PMF_LANG['msgVoteSubmit'], 'writeCommentMsg' => $commentMessage, 'msgWriteComment' => $PMF_LANG['msgWriteComment'], 'writeSendAdress' => '?' . $sids . 'action=savecomment', 'id' => $record_id, 'lang' => $lang, 'msgCommentHeader' => $PMF_LANG['msgCommentHeader'], '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') : '', 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('writecomment')), 'writeComments' => $comment->getComments($record_id, PMF_Comment::COMMENT_TYPE_FAQ))); $tpl->includeTemplate('writeContent', 'index');
$messages[] = $user->error(); } else { // set user data (realname, email) $user->userdata->set(array('display_name', 'email'), array($user_realname, $user_email)); // set user status $user->setStatus($defaultUserStatus); $text = sprintf("New user has been registrated:\n\nUsername: %s\nLoginname: %s\n\n" . "To activate this user do please use the administration interface.", $lastname, $loginname); $mail = new PMF_Mail(); $mail->unsetFrom(); $mail->setFrom($user_email); $mail->addTo($faqconfig->get('main.administrationMail')); $mail->subject = PMF_Utils::resolveMarkers($PMF_LANG['emailRegSubject']); $mail->message = $text; $result = $mail->send(); unset($mail); header("Location: index.php?action=thankyou"); exit; } } // no errors, show list if (count($messages) == 0) { $userAction = $defaultUserAction; // display error messages and show form again } else { $tpl->processTemplate('writeContent', array('regErrors' => sprintf("<strong>%s</strong> <br /> - %s <br /><br />", $PMF_LANG['msgRegError'], implode("<br />- ", $messages)), 'msgUserData' => $PMF_LANG['msgUserData'], 'login_errorRegistration' => !is_null($loginname) ? $PMF_LANG['errorRegistration'] : '', 'name_errorRegistration' => !is_null($lastname) ? $PMF_LANG['errorRegistration'] : '', 'email_errorRegistration' => !is_null($email) ? $PMF_LANG['errorRegistration'] : '', 'loginname' => $PMF_LANG["ad_user_loginname"], 'lastname' => $PMF_LANG["ad_user_realname"], 'email' => $PMF_LANG["ad_entry_email"], 'loginname_value' => $loginname, 'lastname_value' => $lastname, 'email_value' => $email, 'submitRegister' => $PMF_LANG['submitRegister'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('add'), $captcha->caplength, isset($captchaError) ? $captchaError : ''))); $tpl->includeTemplate('writeContent', 'index'); } } else { $tpl->processTemplate('writeContent', array('regErrors' => '', 'msgUserData' => $PMF_LANG['msgUserData'], 'login_errorRegistration' => '', 'name_errorRegistration' => '', 'email_errorRegistration' => '', 'loginname' => $PMF_LANG["ad_user_loginname"], 'lastname' => $PMF_LANG["ad_user_realname"], 'email' => $PMF_LANG["ad_entry_email"], 'loginname_value' => $loginname, 'lastname_value' => $lastname, 'email_value' => $email, 'submitRegister' => $PMF_LANG['submitRegister'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('add'), $captcha->caplength, isset($captchaError) ? $captchaError : ''))); $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-16 */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $faqsession->userTracking('contact', 0); $captcha = new PMF_Captcha($db, $Language); $captcha->setSessionId($sids); if (!is_null($showCaptcha)) { $captcha->showCaptchaImg(); exit; } $tpl->processTemplate('writeContent', array('msgContact' => $PMF_LANG['msgContact'], 'msgContactOwnText' => nl2br($faqconfig->get('main.contactInformations')), 'msgContactEMail' => $PMF_LANG['msgContactEMail'], 'writeSendAdress' => '?' . $sids . 'action=sendmail', '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') : '', 'msgMessage' => $PMF_LANG['msgMessage'], 'msgS2FButton' => $PMF_LANG['msgS2FButton'], 'version' => $faqconfig->get('main.currentVersion'), 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('contact')))); $tpl->includeTemplate('writeContent', 'index');
/** * Renders the main navigation * * @param string $legend Text of the HTML Legend element * @param string $img HTML code for the Captcha image * @param string $error Error message * * @return string */ public function renderCaptcha(PMF_Captcha $captcha, $action, $legend, $error = '') { $html = ''; if (PMF_Configuration::getInstance()->get('spam.enableCaptchaCode')) { if ($error != '') { $html .= sprintf('<div class="error">%s</div>', $error); } $html .= sprintf('<div class="captchaInfo">%s:</div>', $legend); $html .= sprintf('<div class="captchaImage">%s', $captcha->printCaptcha($action)); $html .= sprintf('<div class="captchaRefresh"><a href="javascript:;" onclick="refreshCaptcha(\'%s\');">%s</a></div>', $action, 'click to refresh'); $html .= ' ' . sprintf('<input type="text" name="captcha" id="captcha" class="captcha" size="%d" required="required" /><br/>', $captcha->caplength); $html .= '</div>'; } return $html; }
<?php /** * $Id: writecomment.php,v 1.3.2.6.2.7 2006/04/25 12:07:24 matteo Exp $ * * @author Thorsten Rinne <*****@*****.**> * @since 2002-08-29 * @copyright (c) 2001-2006 phpMyFAQ Team * * 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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_GET['gen'])) { $captcha->showCaptchaImg(); exit; } Tracking('write_comment', $_GET['id']); $tpl->processTemplate('writeContent', array('msgCommentHeader' => $PMF_LANG['msgWriteComment'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=savecomment', 'ID' => $_GET['id'], 'LANG' => $_GET['artlang'], 'writeThema' => getThema($_GET['id'], $_GET['artlang']), 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('writecomment'), $captcha->caplength), 'copyright_eintrag' => unhtmlentities($PMF_CONF['copyright_eintrag']))); $tpl->includeTemplate('writeContent', 'index');
* $Id: send2friend.php,v 1.3.2.5.2.5 2006/04/25 12:07:24 matteo Exp $ * * The send2friend page * * @author Thorsten Rinne <*****@*****.**> * @since 2002-09-16 * @copyright (c) 2001-2006 phpMyFAQ Team * * 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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_GET['gen'])) { $captcha->showCaptchaImg(); exit; } Tracking('send2friend', 0); $send2friendLink = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . '?action=artikel&cat=' . $_REQUEST['cat'] . '&id=' . $_REQUEST['id'] . '&artlang=' . $_REQUEST['artlang']; $tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=mailsend2friend', 'msgS2FReferrer' => 'link', 'msgS2FName' => $PMF_LANG['msgS2FName'], 'msgS2FEMail' => $PMF_LANG['msgS2FEMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgS2FFriends' => $PMF_LANG['msgS2FFriends'], 'msgS2FEMails' => $PMF_LANG['msgS2FEMails'], 'msgS2FText' => $PMF_LANG['msgS2FText'], 'send2friend_text' => $PMF_CONF['send2friend_text'], 'msgS2FText2' => $PMF_LANG['msgS2FText2'], 'send2friendLink' => $send2friendLink, 'msgS2FMessage' => $PMF_LANG['msgS2FMessage'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('send2friend'), $captcha->caplength), 'msgS2FButton' => $PMF_LANG['msgS2FButton'])); $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');
// Get all data from the news record $news = $oNews->getNewsEntry($news_id); $content = $news['content']; $header = $news['header']; // Add Glossary entries $oGlossary = new PMF_Glossary(); $content = $oGlossary->insertItemsIntoContent($content); $header = $oGlossary->insertItemsIntoContent($header); // Add information link if existing if (strlen($news['link']) > 0) { $content .= sprintf('</p><p>%s<a href="%s" target="%s">%s</a>', $PMF_LANG['msgInfo'], $news['link'], $news['target'], $news['linkTitle']); } // Show link to edit the news? $editThisEntry = ''; if (isset($permission['editnews'])) { $editThisEntry = sprintf('<a href="%sadmin/index.php?action=news&do=edit&id=%d">%s</a>', PMF_Link::getSystemRelativeUri('index.php'), $news_id, $PMF_LANG['ad_menu_news_edit']); } // Is the news item expired? $expired = date('YmdHis') > $news['dateEnd']; // Does the user have the right to add a comment? if (!$news['active'] || !$news['allowComments'] || $expired) { $commentMessage = $PMF_LANG['msgWriteNoComment']; } else { $oLink = new PMF_Link($_SERVER['SCRIPT_NAME'] . '?' . str_replace('&', '&', $_SERVER['QUERY_STRING'])); $oLink->itemTitle = $header; $commentHref = $oLink->toString() . '#comment'; $commentMessage = sprintf('<a onclick="javascript:$(\'#comment\').show();" href="%s">%s</a>', $commentHref, $PMF_LANG['newsWriteComment']); } // Set the template variables $tpl->processTemplate("writeContent", array('writeNewsHeader' => $writeNewsHeader, 'writeNewsRSS' => $writeNewsRSS, 'writeHeader' => $header, 'writeContent' => $content, 'writeDateMsg' => $news['active'] && !$expired ? $PMF_LANG['msgLastUpdateArticle'] . '<span id="newsLastUpd">' . $news['date'] . '</span>' : '', 'writeAuthor' => $news['active'] && !$expired ? $PMF_LANG['msgAuthor'] . ': ' . $news['authorName'] : '', 'editThisEntry' => $editThisEntry, 'writeCommentMsg' => $commentMessage, 'msgWriteComment' => $PMF_LANG['newsWriteComment'], 'writeSendAdress' => '?' . $sids . 'action=savecomment', 'newsId' => $news_id, 'newsLang' => $news['lang'], 'msgCommentHeader' => $PMF_LANG['msgCommentHeader'], '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') : '', 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('writecomment')), 'writeComments' => $comment->getComments($news_id, PMF_Comment::COMMENT_TYPE_NEWS))); $tpl->includeTemplate('writeContent', 'index');
<?php /** * $Id: contact.php,v 1.3.2.4.2.2 2006/04/25 12:07:24 matteo Exp $ * * @author Thorsten Rinne <*****@*****.**> * @since 2002-09-16 * @copyright (c) 2001-2006 phpMyFAQ Team * * 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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } Tracking('contact', 0); $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_GET['gen'])) { $captcha->showCaptchaImg(); exit; } $tpl->processTemplate('writeContent', array('msgContact' => $PMF_LANG['msgContact'], 'msgContactOwnText' => unhtmlentities($PMF_CONF['msgContactOwnText']), 'msgContactEMail' => $PMF_LANG['msgContactEMail'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=sendmail', 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgMessage' => $PMF_LANG['msgMessage'], 'msgS2FButton' => $PMF_LANG['msgS2FButton'], 'version' => $PMF_CONF['version'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('contact'), $captcha->caplength))); $tpl->includeTemplate('writeContent', 'index');
* 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-16 */ 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('send2friend', 0); $cat = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT); $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); $artlang = PMF_Filter::filterInput(INPUT_GET, 'artlang', FILTER_SANITIZE_STRIPPED); $send2friendLink = sprintf('%s/index.php?action=artikel&cat=%d&id=%d&artlang=%s', $faqconfig->get('main.referenceURL'), (int) $cat, (int) $id, urlencode($artlang)); $tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'writeSendAdress' => '?' . $sids . 'action=mailsend2friend', 'msgS2FReferrer' => 'link', 'msgS2FName' => $PMF_LANG['msgS2FName'], 'msgS2FEMail' => $PMF_LANG['msgS2FEMail'], 'defaultContentMail' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('email') : '', 'defaultContentName' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('display_name') : '', 'msgS2FFriends' => $PMF_LANG['msgS2FFriends'], 'msgS2FEMails' => $PMF_LANG['msgS2FEMails'], 'msgS2FText' => $PMF_LANG['msgS2FText'], 'send2friend_text' => $faqconfig->get('main.send2friendText'), 'msgS2FText2' => $PMF_LANG['msgS2FText2'], 'send2friendLink' => $send2friendLink, 'msgS2FMessage' => $PMF_LANG['msgS2FMessage'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('send2friend')), 'msgS2FButton' => $PMF_LANG['msgS2FButton'])); $tpl->includeTemplate('writeContent', 'index');
* @since 2006-11-12 */ 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; } $translationLanguage = PMF_Filter::filterInput(INPUT_POST, 'translation', FILTER_SANITIZE_STRIPPED, $LANGCODE); if (!PMF_Language::isASupportedLanguage($translationLanguage)) { $translationLanguage = $LANGCODE; } $faqSource['id'] = 'writeSourceFaqId'; $faqSource['lang'] = $translationLanguage; $faqSource['title'] = 'writeSourceTitle'; $faqSource['content'] = 'writeSourceContent'; $faqSource['keywords'] = 'writeSourceKeywords'; $faqsession->userTracking('new_translation_entry', 0); $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); $srclang = PMF_Filter::filterInput(INPUT_GET, 'srclang', FILTER_SANITIZE_STRIPPED); if (!is_null($id) && !is_null($srclang) && PMF_Language::isASupportedLanguage($srclang)) { $oFaq = new PMF_Faq(); $oFaq->getRecord($id); $faqSource = $oFaq->faqRecord; } $tpl->processTemplate('writeContent', array('writeSourceFaqId' => $faqSource['id'], 'writeSourceTitle' => $faqSource['title'], 'writeSourceContent' => $faqSource['content'], 'writeSourceKeywords' => $faqSource['keywords'], 'msgNewTranslationHeader' => $PMF_LANG['msgNewTranslationHeader'], 'msgNewTranslationAddon' => $PMF_LANG['msgNewTranslationAddon'], 'msgNewTransSourcePane' => $PMF_LANG['msgNewTransSourcePane'], 'msgNewTranslationPane' => $PMF_LANG['msgNewTranslationPane'], 'writeSendAdress' => '?' . $sids . 'action=save', 'defaultContentName' => $user ? $user->getUserData('display_name') : '', 'defaultContentMail' => $user ? $user->getUserData('email') : '', 'msgNewTranslationName' => $PMF_LANG['msgNewTranslationName'], 'msgNewTranslationMail' => $PMF_LANG['msgNewTranslationMail'], 'msgNewTranslationKeywords' => $PMF_LANG['msgNewTranslationKeywords'], 'writeTransFaqLanguage' => $translationLanguage, 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('translate')), 'msgNewTranslationSubmit' => $PMF_LANG['msgNewTranslationSubmit'], 'tinyMCELanguage' => PMF_Language::isASupportedTinyMCELanguage($LANGCODE) ? $LANGCODE : 'en')); $tpl->includeTemplate('writeContent', 'index');
/** * $Id: ask.php,v 1.3.2.5.2.9 2006/04/25 12:07:24 matteo Exp $ * * @author Thorsten Rinne <*****@*****.**> * @since 2002-09-17 * @copyright (c) 2001-2006 phpMyFAQ Team * * 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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_GET['gen'])) { $captcha->showCaptchaImg(); exit; } Tracking('ask_question', 0); $tree->buildTree(); $tpl->processTemplate('writeContent', array('msgQuestion' => $PMF_LANG['msgQuestion'], 'msgNewQuestion' => $PMF_LANG['msgNewQuestion'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=savequestion', 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgAskCategory' => $PMF_LANG['msgAskCategory'], 'printCategoryOptions' => $tree->printCategoryOptions(), 'msgAskYourQuestion' => $PMF_LANG['msgAskYourQuestion'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('ask'), $captcha->caplength), 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'])); $tpl->includeTemplate('writeContent', 'index');
* 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-08-29 */ 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; } $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); $artlang = PMF_Filter::filterInput(INPUT_GET, 'artlang', FILTER_SANITIZE_STRIPPED); $faqsession->userTracking('write_comment', $id); $tpl->processTemplate('writeContent', array('msgCommentHeader' => $PMF_LANG['msgWriteComment'], 'writeSendAdress' => '?' . $sids . 'action=savecomment', 'ID' => $id, 'LANG' => $artlang, 'writeThema' => $faq->getRecordTitle($id), 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('writecomment')))); $tpl->includeTemplate('writeContent', 'index');
* @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');
* @author Thorsten Rinne <*****@*****.**> * @since 2002-09-16 * @version SVN: $Id$ * @copyright 2002-2009 phpMyFAQ Team * * 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. */ 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('send2friend', 0); $cat = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT); $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); $artlang = PMF_Filter::filterInput(INPUT_GET, 'artlang', FILTER_SANITIZE_STRING); $send2friendLink = sprintf('http://%s%s?action=artikel&cat=%d&id=%d&artlang=%s', $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'], $cat, $id, urlencode($artlang)); $tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=mailsend2friend', 'msgS2FReferrer' => 'link', 'msgS2FName' => $PMF_LANG['msgS2FName'], 'msgS2FEMail' => $PMF_LANG['msgS2FEMail'], 'defaultContentMail' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('email') : '', 'defaultContentName' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('display_name') : '', 'msgS2FFriends' => $PMF_LANG['msgS2FFriends'], 'msgS2FEMails' => $PMF_LANG['msgS2FEMails'], 'msgS2FText' => $PMF_LANG['msgS2FText'], 'send2friend_text' => PMF_htmlentities($PMF_CONF['main.send2friendText'], ENT_QUOTES, $PMF_LANG['metaCharset']), 'msgS2FText2' => $PMF_LANG['msgS2FText2'], 'send2friendLink' => $send2friendLink, 'msgS2FMessage' => $PMF_LANG['msgS2FMessage'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('send2friend'), $captcha->caplength), 'msgS2FButton' => $PMF_LANG['msgS2FButton'])); $tpl->includeTemplate('writeContent', 'index');
* 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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_GET['gen'])) { $captcha->showCaptchaImg(); exit; } Tracking('new_entry', 0); if (isset($_GET['question'])) { $question = strip_tags($_GET['question']); $readonly = ' readonly="readonly"'; } else { $question = ''; $readonly = ''; } if (isset($_GET['cat']) && is_numeric($_GET['cat'])) { $rubrik = intval($_GET['cat']); $category = array(array('category_id' => $rubrik, 'category_lang' => $LANGCODE)); } else { $category = array(); } $tree->buildTree(); $tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG['msgNewContentHeader'], 'msgNewContentAddon' => $PMF_LANG['msgNewContentAddon'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=save', 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'msgNewContentCategory' => $PMF_LANG['msgNewContentCategory'], 'printCategoryOptions' => $tree->printCategoryOptions($category), 'msgNewContentTheme' => $PMF_LANG['msgNewContentTheme'], 'readonly' => $readonly, 'printQuestion' => $question, 'msgNewContentArticle' => $PMF_LANG['msgNewContentArticle'], 'msgNewContentKeywords' => $PMF_LANG['msgNewContentKeywords'], 'msgNewContentLink' => $PMF_LANG['msgNewContentLink'], 'copyright_eintrag' => unhtmlentities($PMF_CONF['copyright_eintrag']), 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('add'), $captcha->caplength), 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'])); $tpl->includeTemplate('writeContent', 'index');