function detailedView($info) { $size = count($info); echo "<table border=1>"; echo "<tr>"; echo "<td colspan=4>Event</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan=4>Description</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Start Time</td>"; echo "<td>End Time</td>"; echo "<td>Location</td>"; echo "<td>Category</td>"; echo "</tr>"; echo "<tr>"; echo "<td>User</td>"; echo "<td colspan=3>Mail</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan=4>Tags</td>"; echo "</tr>"; echo '</table>'; if ($info[8] == 0 || IPCheck()) { echo "<table>"; echo "<tr>"; echo "<td colspan=4>" . $info[0] . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan=4>" . $info[1] . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>" . $info[2] . "</td>"; echo "<td>" . $info[3] . "</td>"; echo "<td>" . $info[4] . "</td>"; echo "<td>" . $info[5] . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>" . $info[6] . "</td>"; $mail = explode("@", $info[7]); echo '<td colspan=3><a href="mailto:' . $info[7] . '">[' . $mail[0] . ']</a></td>'; echo "</tr>"; echo "<tr>"; echo "<td colspan=4>"; for ($i = 9; $i < $size; $i++) { echo $info[$i] . " "; } echo "</td>"; echo "</tr>"; echo '</table>'; } }
$oLink->itemTitle = $news['header']; $urlToContent = $oLink->toString(); } $commentMail = 'User: '******'username'] . ', mailto:' . $commentData['usermail'] . "\n" . 'New comment posted on: ' . $urlToContent . "\n\n" . wordwrap($comment, 72); $mail = new PMF_Mail(); $mail->unsetFrom(); $mail->setFrom($commentData['usermail']); $mail->addTo($emailTo); // Let the category owner get a copy of the message if ($emailTo != $faqconfig->get('main.administrationMail')) { $mail->addCc($faqconfig->get('main.administrationMail')); } $mail->subject = '%sitename%'; $mail->message = strip_tags($commentMail); $result = $mail->send(); unset($mail); $message = $PMF_LANG['msgCommentThanks']; } else { $faqsession->userTracking('error_save_comment', $id); $message = $PMF_LANG['err_SaveComment']; } } else { if (!IPCheck($_SERVER['REMOTE_ADDR'])) { $message = $PMF_LANG['err_bannedIP']; } else { $faqsession->userTracking('error_save_comment', $id); $message = $PMF_LANG['err_SaveComment']; } } $tpl->processTemplate('writeContent', array('msgCommentHeader' => $msgWriteComment, 'Message' => $message)); $tpl->includeTemplate('writeContent', 'index');
* @since 2002-09-17 */ if (!defined('IS_VALID_PHPMYFAQ')) { header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } $faqsession->userTracking('sendmail_contact', 0); $captcha = new PMF_Captcha($sids); $name = PMF_Filter::filterInput(INPUT_POST, 'name', FILTER_SANITIZE_STRING); $email = PMF_Filter::filterInput(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL); $question = PMF_Filter::filterInput(INPUT_POST, 'question', FILTER_SANITIZE_STRIPPED); $code = PMF_Filter::filterInput(INPUT_POST, 'captcha', FILTER_SANITIZE_STRING); // If e-mail address is set to optional if (!PMF_Configuration::getInstance()->get('main.optionalMailAddress') && is_null($email)) { $email = PMF_Configuration::getInstance()->get('main.administrationMail'); } if (!is_null($name) && !is_null($email) && !is_null($question) && IPCheck($_SERVER['REMOTE_ADDR']) && checkBannedWord(PMF_String::htmlspecialchars($question)) && $captcha->checkCaptchaCode($code)) { $mail = new PMF_Mail(); $mail->unsetFrom(); $mail->setFrom($email, $name); $mail->addTo($faqconfig->get('main.administrationMail')); $mail->subject = 'Feedback: %sitename%'; $mail->message = $question; $result = $mail->send(); unset($mail); $message = $PMF_LANG['msgMailContact']; } else { $message = $PMF_LANG['err_sendMail']; } $tpl->processTemplate('writeContent', array('msgContact' => $PMF_LANG['msgContact'], 'Message' => $message)); $tpl->includeTemplate('writeContent', 'index');
} // Sanity check if (is_null($cat) || is_null($id) || is_null($artlang)) { header('HTTP/1.1 403 Forbidden'); print 'Invalid FAQ link.'; exit; } foreach ($mailto['mailto'] as $recipient) { $recipient = trim(strip_tags($recipient)); if (!empty($recipient)) { $mail = new PMF_Mail(); $mail->unsetFrom(); $mail->setFrom($mailfrom, $name); $mail->addTo($recipient); $mail->subject = $PMF_LANG["msgS2FMailSubject"] . $name; $mail->message = $faqconfig->get("main.send2friendText") . "\r\n\r\n" . $PMF_LANG["msgS2FText2"] . "\r\n" . $link . "\r\n\r\n" . $attached; // Send the email $result = $mail->send(); unset($mail); usleep(250); } } $tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'Message' => $PMF_LANG['msgS2FThx'])); } else { if (false === IPCheck($_SERVER["REMOTE_ADDR"])) { $tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'Message' => $PMF_LANG["err_bannedIP"])); } else { $tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'Message' => $PMF_LANG["err_sendMail"])); } } $tpl->includeTemplate("writeContent", "index");
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); } } $tpl->processTemplate("writeContent", array("msgSend2Friend" => $PMF_LANG["msgSend2Friend"], "Message" => $PMF_LANG["msgS2FThx"])); } else { $tpl->processTemplate("writeContent", array("msgSend2Friend" => $PMF_LANG["msgSend2Friend"], "Message" => $PMF_LANG["err_noMailAdress"])); } } else { if (IPCheck($_SERVER["REMOTE_ADDR"]) == FALSE) { $tpl->processTemplate("writeContent", array("msgSend2Friend" => $PMF_LANG["msgSend2Friend"], "Message" => $PMF_LANG["err_bannedIP"])); } else { $tpl->processTemplate("writeContent", array("msgSend2Friend" => $PMF_LANG["msgSend2Friend"], "Message" => $PMF_LANG["err_sendMail"])); } } $tpl->includeTemplate("writeContent", "index");
$catOwnerEmail = $oUser->getUserData('email'); $mail = new PMF_Mail(); $mail->unsetFrom(); $mail->setFrom($usermail); $mail->addTo($faqconfig->get('main.administrationMail')); // Let the category owner get a copy of the message if ($faqconfig->get('main.administrationMail') != $catOwnerEmail) { $mail->addCc($catOwnerEmail); } $mail->subject = '%sitename%'; // TODO: let the email contains the faq article both as plain text and as HTML $mail->message = html_entity_decode($PMF_LANG['msgMailCheck']) . "\n\n" . $faqconfig->get('main.titleFAQ') . ": " . PMF_Link::getSystemUri('/index.php') . '/admin'; $result = $mail->send(); unset($mail); $sent[$userId] = $catOwnerEmail; } } $tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG["msgNewContentHeader"], 'Message' => $isNew ? $PMF_LANG['msgNewContentThanks'] : $PMF_LANG['msgNewTranslationThanks'])); } else { if (false === IPCheck($_SERVER['REMOTE_ADDR'])) { $tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG['msgNewContentHeader'], 'Message' => $PMF_LANG['err_bannedIP'])); } else { if (is_null($faqid)) { $faqsession->userTracking('error_save_entry', 0); } else { $faqsession->userTracking('error_save_translation_entry', 0); } $tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG['msgNewContentHeader'], 'Message' => $PMF_LANG['err_SaveEntries'])); } } $tpl->includeTemplate('writeContent', 'index');
function GetIP() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) { $ip = getenv("HTTP_CLIENT_IP"); } else { if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); } else { if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) { $ip = getenv("REMOTE_ADDR"); } else { if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) { $ip = $_SERVER['REMOTE_ADDR']; } else { $ip = "unknown"; } } } } //20130128 if (!IPCheck($ip)) { $ip = "unknown"; } return $ip; }
* 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']; if (strtolower($PMF_LANG['metaCharset']) == 'utf-8') { $additional_header[] = 'Content-Transfer-Encoding: 8bit';