<?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');
<?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');
// Reply to message case 'reply': NewMessage(); // Foward message // Foward message case 'forward': // They're sending a list; we only forward one message, not multiple ones. if (is_array($_REQUEST['id'])) { // Only use the first one. $_REQUEST['id'] = $_REQUEST['id'][0]; } NewMessage(); // Message tracking // Message tracking case 'track': Tracking(); // Manage folders // Manage folders case 'editfolders': Folders(); // Delete message(s) // Delete message(s) case 'delete': Delete(); // Move message(s) // Move message(s) case 'move': Move(); // Inbox // Inbox default:
function CheckSID($sid, $ip) { global $db; if ($db->num_rows($db->query("SELECT sid FROM " . SQLPREFIX . "faqsessions WHERE sid = " . $sid . " AND ip = '" . $ip . "' AND time > " . (time() - 86400))) < 1) { // No sid found (maybe someone is refering to an old one): create a new one Tracking("old_session", $sid); } else { // Update the current sid in the db $db->query("UPDATE " . SQLPREFIX . "faqsessions SET time = " . time() . " WHERE sid = " . $sid . " AND ip = '" . $ip . "'"); } }
* * @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; } Tracking("create_xml", $_GET["id"]); if (isset($_GET["id"]) && is_numeric($_GET["id"]) == true) { $id = (int) $_GET["id"]; } if (isset($_GET["lang"])) { $lang = $_GET["lang"]; } if (generateXMLExport($id, $lang) == true) { header("Location: ./xml/article_" . $id . "_" . $lang . ".xml"); header("Content-Type: text/xml"); header("Content-Length: " . filesize("./xml/article_" . $id . "_" . $lang . ".xml")); }
*/ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $record = isset($_POST["artikel"]) ? intval($_POST["artikel"]) : ''; $vote = isset($_POST["vote"]) ? intval($_POST["vote"]) : 0; $userip = isset($_POST["userip"]) ? strip_tags($_POST["userip"]) : ''; if (isset($vote) && $vote != "" && votingCheck($record, $userip) && intval($_POST["vote"]) > 0 && intval($_POST["vote"]) < 6) { $noUser = "******"; $datum = date("YmdHis"); Tracking("save_voting", $record); if ($result = $db->query("SELECT usr FROM " . SQLPREFIX . "faqvoting WHERE artikel = " . $record)) { while ($row = $db->fetch_object($result)) { $noUser = $row->usr; } } if ($noUser == "0" || $noUser == "") { $db->query("INSERT INTO " . SQLPREFIX . "faqvoting (id, artikel, vote, usr, datum, ip) VALUES (" . $db->nextID(SQLPREFIX . "faqvoting", "id") . ", " . $record . ", " . $vote . ", '1', " . time() . ", '" . $userip . "');"); } else { $db->query("UPDATE " . SQLPREFIX . "faqvoting SET vote = vote + " . $vote . ", usr = usr + 1, datum = " . time() . ", ip = '" . $userip . "' where artikel = " . $record); } $tpl->processTemplate("writeContent", array("msgVoteThanks" => $PMF_LANG["msgVoteThanks"])); } elseif (isset($_POST["vote"]) && !votingCheck($record, $userip)) { Tracking("error_save_voting", $record); $tpl->processTemplate("writeContent", array("msgVoteThanks" => $PMF_LANG["err_VoteTooMuch"])); } else { Tracking("error_save_voting", $record); $tpl->processTemplate("writeContent", array("msgVoteThanks" => $PMF_LANG["err_noVote"])); } $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']));
* under the License. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $currentCategory = $cat; if (isset($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { $id = (int) $_REQUEST['id']; } if (isset($_REQUEST['solution_id']) && is_numeric($_REQUEST['solution_id'])) { $solution_id = $_REQUEST['solution_id']; } else { $solution_id = 0; } Tracking("article_view", $id); $comment = ''; if (0 == $solution_id) { $query = sprintf("SELECT * FROM %sfaqdata WHERE id = %d AND lang = '%s'", SQLPREFIX, $id, $lang); } else { $query = sprintf("SELECT * FROM %sfaqdata WHERE solution_id = %s", SQLPREFIX, $solution_id); } $result = $db->query($query); if ($row = $db->fetch_object($result)) { if ('yes' == $row->active) { $id = $row->id; $solution_id = $row->solution_id; $revision_id = $row->revision_id; $comment = $row->comment; $content = $row->content; $writeDateMsg = makeDate($row->datum);
* $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');
*/ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } if (isset($_REQUEST['cat']) && is_numeric($_REQUEST['cat'])) { $category = (int) $_REQUEST['cat']; } if (isset($category) && $category != 0 && isset($tree->categoryName[$category])) { Tracking('show_category', $category); $parent = $tree->categoryName[$category]['parent_id']; $name = $tree->categoryName[$category]['name']; $records = printThemes($category); if (!$records) { $cats = new Category($LANGCODE); $cats->transform($category); $cats->collapseAll(); $records = $cats->viewTree(); } if ($parent != 0) { $up = '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=show&cat=' . $parent . '">' . $PMF_LANG['msgCategoryUp'] . '</a>'; } else { $up = ''; } $tpl->processTemplate('writeContent', array('writeCategory' => $PMF_LANG['msgEntriesIn'] . $name, 'writeThemes' => $records, 'writeOneThemeBack' => $up)); $tpl->includeTemplate('writeContent', 'index'); } else { Tracking('show_all_categories', 0); $tpl->processTemplate('writeContent', array('writeCategory' => $PMF_LANG['msgFullCategories'], 'writeThemes' => $tree->viewTree(), 'writeOneThemeBack' => '')); $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. */ 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($_POST['user']) && $_POST['user'] != '' && isset($_POST['mail']) && checkEmail($_POST['mail']) && isset($_POST['comment']) && $_POST['comment'] != '' && IPCheck($_SERVER['REMOTE_ADDR']) && checkBannedWord(htmlspecialchars(strip_tags($_POST['comment']))) && checkCaptchaCode()) { $id = isset($_POST["id"]) ? (int) $_POST["id"] : 0; Tracking("save_comment", $id); $helped = ""; // not used in this version - maybe in the future $comment = nl2br($db->escape_string(safeHTML($_POST["comment"]))); $comment_by_user = $db->escape_string(safeHTML($_POST["user"])); $comment_by_mail = $db->escape_string(safeHTML($_POST["mail"])); $result = $db->query("INSERT INTO " . SQLPREFIX . "faqcomments (id_comment, id, usr, email, comment, datum, helped) VALUES (" . $db->nextID(SQLPREFIX . "faqcomments", "id_comment") . ", " . $id . ", '" . $comment_by_user . "', '" . $comment_by_mail . "', '" . $comment . "', " . time() . ", '" . $helped . "')"); $tpl->processTemplate("writeContent", array("msgCommentHeader" => $PMF_LANG["msgWriteComment"], "Message" => $PMF_LANG["msgCommentThanks"])); } else { if (IPCheck($_SERVER["REMOTE_ADDR"]) == FALSE) { $tpl->processTemplate("writeContent", array("msgCommentHeader" => $PMF_LANG["msgWriteComment"], "Message" => $PMF_LANG["err_bannedIP"])); } else { Tracking("error_save_comment", $id); $tpl->processTemplate("writeContent", array("msgCommentHeader" => $PMF_LANG["msgWriteComment"], "Message" => $PMF_LANG["err_SaveComment"])); } } $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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } Tracking("sendmail_contact", 0); $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_POST["name"]) && $_POST["name"] != '' && isset($_POST["email"]) && checkEmail($_POST["email"]) && isset($_POST["question"]) && $_POST["question"] != '' && IPCheck($_SERVER['REMOTE_ADDR']) && checkBannedWord(htmlspecialchars(strip_tags($_POST['question']))) && checkCaptchaCode()) { list($user, $host) = explode("@", $_POST["email"]); $question = htmlspecialchars($_POST["question"]); $sender = $IDN->encode($_POST["email"]); $subject = 'Feedback: ' . $PMF_CONF['title']; $name = htmlspecialchars($_POST['name']); if (function_exists('mb_encode_mimeheader')) { $name = mb_encode_mimeheader($name); } else { $name = encode_iso88591($name); } $additional_header = array(); $additional_header[] = 'MIME-Version: 1.0'; $additional_header[] = 'Content-Type: text/plain; charset=' . $PMF_LANG['metaCharset'];
<?php /** * $Id: help.php,v 1.2.2.4 2006/01/02 12:47:09 thorstenr 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; } Tracking('faqhelp', 0); $tpl->processTemplate('writeContent', array('msgHelp' => $PMF_LANG['msgHelp'], 'msgHelpText' => $PMF_LANG['msgHelpText'])); $tpl->includeTemplate('writeContent', 'index');
if (isset($LANGCODE) && PMF_Init::isASupportedLanguage($LANGCODE)) { // Overwrite English strings with the ones we have in the current language require_once 'lang/language_' . $LANGCODE . '.php'; } else { $LANGCODE = 'en'; } // use mbstring extension if available $valid_mb_strings = array('ja', 'en'); if (function_exists('mb_language') && in_array($PMF_LANG['metaLanguage'], $valid_mb_strings)) { mb_language($PMF_LANG['metaLanguage']); mb_internal_encoding($PMF_LANG['metaCharset']); } // found a session ID in _GET or _COOKIE? if (!isset($_GET['sid']) && !isset($_COOKIE['pmf_sid'])) { // Create a per-site unique SID Tracking('new_session', 0); setcookie('pmf_sid', $sid, time() + 3600); } else { if (isset($_COOKIE['pmf_sid']) && is_numeric($_COOKIE['pmf_sid'])) { CheckSID((int) $_COOKIE['pmf_sid'], $_SERVER['REMOTE_ADDR']); } else { CheckSID((int) $_GET['sid'], $_SERVER['REMOTE_ADDR']); } } // is user tracking activated? if (isset($PMF_CONF["tracking"])) { if (isset($sid)) { if (!isset($_COOKIE["pmf_sid"])) { $sids = 'sid=' . (int) $sid . '&lang=' . $LANGCODE . '&'; } else { $sids = '';
// for any of the multilanguage faq records and the Category list // on the left pane will not be affected $tree = new Category(); $tree->transform(0); if (isset($_GET['suchbegriff']) || isset($_GET['search'])) { if (isset($_GET['suchbegriff'])) { $suchbegriff = $db->escape_string(strip_tags($_GET['suchbegriff'])); $searchcategory = isset($_GET['searchcategory']) ? $db->escape_string(strip_tags($_GET['searchcategory'])) : '%'; } if (isset($_GET['search'])) { $suchbegriff = $db->escape_string(strip_tags($_GET['search'])); $searchcategory = isset($_GET['searchcategory']) ? $db->escape_string(strip_tags($_GET['searchcategory'])) : '%'; } $printResult = searchEngine($suchbegriff, $searchcategory); } else { $printResult = $PMF_LANG['help_search']; $suchbegriff = ''; } Tracking('fulltext_search', $suchbegriff); $tree->buildTree(); $baseUrl = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER["HTTP_HOST"] . str_replace('/index.php', '', $_SERVER['PHP_SELF']); $firefoxPluginTitle = ''; $MSIEPluginTitle = ''; if (file_exists(dirname(__FILE__) . '/' . $_SERVER['HTTP_HOST'] . '.pmfsearch.src')) { $firefoxPluginTitle = '<p><a class="searchplugin" href="javascript:addEngine(\'' . $baseUrl . '\', \'' . $_SERVER['HTTP_HOST'] . '.pmfsearch\', \'png\', \'Web\')">' . $PMF_LANG['ad_search_plugin_install'] . '</a></p>'; } if (file_exists(dirname(__FILE__) . '/' . $_SERVER['HTTP_HOST'] . '.pmfsearch.xml')) { $MSIEPluginTitle = '<p><a class="searchplugin" href="#" onclick="window.external.AddSearchProvider("' . $baseUrl . '/' . $_SERVER['HTTP_HOST'] . '.pmfsearch.xml");">' . $PMF_LANG['ad_msiesearch_plugin_install'] . '</a></p>'; } $tpl->processTemplate('writeContent', array('msgSearch' => $PMF_LANG['msgSearch'], 'searchString' => $suchbegriff, 'selectCategories' => $PMF_LANG['msgSelectCategories'], 'allCategories' => $PMF_LANG['msgAllCategories'], 'printCategoryOptions' => $tree->printCategoryOptions(0), 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=search', 'msgSearchWord' => $PMF_LANG['msgSearchWord'], 'printResult' => $printResult, 'msgFirefoxPluginTitle' => $firefoxPluginTitle, 'msgMSIEPluginTitle' => $MSIEPluginTitle)); $tpl->includeTemplate('writeContent', 'index');
/** * $Id: open.php,v 1.2.2.5.2.1 2006/03/25 11:18:21 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; } Tracking('open_questions', 0); // HACK: (re)evaluate the Category object w/o passing the user language // so the result set (the Open Uqestions) will have the Category Name // for any of the multilanguage categories and the Category list // on the left pane will not be affected $tree = new Category(); $tree->transform(0); $tpl->processTemplate('writeContent', array('msgOpenQuestions' => $PMF_LANG['msgOpenQuestions'], 'msgQuestionText' => $PMF_LANG['msgQuestionText'], 'msgDate_User' => $PMF_LANG['msgDate_User'], 'msgQuestion2' => $PMF_LANG['msgQuestion2'], 'printOpenQuestions' => printOpenQuestions())); $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. */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } Tracking("sendmail_send2friend", 0); $captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']); if (isset($_POST['name']) && $_POST['name'] != '' && isset($_POST['mailfrom']) && $_POST['mailfrom'] != '' && isset($_POST['mailto']) && $_POST['mailto'] != '' && IPCheck($_SERVER['REMOTE_ADDR']) && checkBannedWord(htmlspecialchars(strip_tags($_POST['zusatz']))) && checkCaptchaCode()) { $name = $db->escape_string(strip_tags($_POST["name"])); $mailfrom = $db->escape_string(strip_tags($_POST["mailfrom"])); $link = $db->escape_string(strip_tags($_POST["link"])); $attached = $db->escape_string(strip_tags($_POST["zusatz"])); $mailto = $_POST['mailto']; list($user, $host) = explode("@", $mailto[0]); if (checkEmail($mailfrom)) { foreach ($mailto as $mail) { $mail = $db->escape_string(strip_tags($mail)); if ($mail != "") { mail($IDN->encode($mail), $PMF_LANG["msgS2FMailSubject"] . $name, $PMF_CONF["send2friend_text"] . "\n\n" . $PMF_LANG["msgS2FText2"] . "\n" . $link . "\n\n" . $attached, "From: " . $IDN->encode($mailfrom)); usleep(500); }
/** * $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');
* * 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('sitemap', 0); if (isset($_REQUEST['letter'])) { $currentLetter = $db->escape_string($_REQUEST['letter']); } else { $currentLetter = 'A'; } switch ($DB["type"]) { case 'db2': // Queries for IBM DB2 $query_1 = "SELECT DISTINCT substr(thema, 1, 1) AS letters FROM " . SQLPREFIX . "faqdata WHERE lang = '" . $lang . "' AND active = 'yes' ORDER BY letters"; $query_2 = "SELECT a.thema AS thema, a.id AS id, a.lang AS lang, b.category_id AS category_id, '' AS snap FROM " . SQLPREFIX . "faqdata a, " . SQLPREFIX . "faqcategoryrelations b WHERE a.id = b.record_id AND substr(thema, 1, 1) = '" . $currentLetter . "' AND lang = '" . $lang . "' AND active = 'yes'"; break; case 'sqlite': // Queries for SQLite $query_1 = "SELECT DISTINCT substr(thema, 1, 1) AS letters FROM " . SQLPREFIX . "faqdata WHERE lang = '" . $lang . "' AND active = 'yes' ORDER BY letters"; $query_2 = "SELECT a.thema AS thema, a.id AS id, a.lang AS lang, b.category_id AS category_id, a.content AS snap FROM " . SQLPREFIX . "faqdata a, " . SQLPREFIX . "faqcategoryrelations b WHERE a.id = b.record_id AND substr(thema, 1, 1) = '" . $currentLetter . "' AND lang = '" . $lang . "' AND active = 'yes'";
foreach ($selected_category as $_category) { $db->query(sprintf("INSERT INTO %sfaqcategoryrelations (category_id, category_lang, record_id, record_lang) VALUES (%d, '%s', %d, '%s')", SQLPREFIX, intval($_category), $lang, $db->insert_id(SQLPREFIX . 'faqdata', 'id'), $lang)); } $db->query(sprintf("INSERT INTO %sfaqvisits (id, lang, visits, last_visit) VALUES (%d, '%s', %d, %d)", SQLPREFIX, $db->insert_id(SQLPREFIX . 'faqdata', 'id'), $lang, 1, time())); $additional_header = array(); $additional_header[] = 'MIME-Version: 1.0'; $additional_header[] = 'Content-Type: text/plain; charset=' . $PMF_LANG['metaCharset']; if (strtolower($PMF_LANG['metaCharset']) == 'utf-8') { $additional_header[] = 'Content-Transfer-Encoding: 8bit'; } $additional_header[] = 'From: ' . $usermail; $subject = unhtmlentities($PMF_CONF["title"]); if (function_exists('mb_encode_mimeheader')) { $subject = mb_encode_mimeheader($subject); } $body = unhtmlentities($PMF_LANG['msgMailCheck']) . "\n" . unhtmlentities($PMF_CONF['title']) . ": http://" . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']); if (ini_get('safe_mode')) { mail($IDN->encode($PMF_CONF["adminmail"]), $subject, $body, implode("\r\n", $additional_header)); } else { mail($IDN->encode($PMF_CONF["adminmail"]), $subject, $body, implode("\r\n", $additional_header), "-f{$usermail}"); } $tpl->processTemplate("writeContent", array("msgNewContentHeader" => $PMF_LANG["msgNewContentHeader"], "Message" => $PMF_LANG["msgNewContentThanks"])); } else { if (IPCheck($_SERVER["REMOTE_ADDR"]) == FALSE) { $tpl->processTemplate("writeContent", array("msgNewContentHeader" => $PMF_LANG["msgNewContentHeader"], "Message" => $PMF_LANG["err_bannedIP"])); } else { Tracking("error_save_entry", 0); $tpl->processTemplate("writeContent", array("msgNewContentHeader" => $PMF_LANG["msgNewContentHeader"], "Message" => $PMF_LANG["err_SaveEntries"])); } } $tpl->includeTemplate("writeContent", "index");