post_toHTML($_POST['comment'], true, 'retain_nl, emotes_off, no_make_clickable'); } if(!empty($_POST['author_name'])) { $author = $tp->post_toHTML($_POST['author_name'], false,'emotes_off, no_make_clickable'); } if(!empty($_POST['email_send'])) { $email_send = check_email($_POST['email_send']); } if (isset($_POST['emailsubmit'])) { if (!$email_send) { $error .= LAN_EMAIL_106; } if($use_imagecode) { if(!isset($_POST['code_verify']) || !isset($_POST['rand_num'])) { e107::redirect(); exit; } if (!$sec_img->verify_code($_POST['rand_num'], $_POST['code_verify'])) { e107::redirect(); exit; } } if ($comments == '') { $message = LAN_EMAIL_6.' '.SITENAME.' ('.SITEURL.')'; if (USER == TRUE) { $message .= "\n\n".LAN_EMAIL_1." ".USERNAME; } else { $message .= "\n\n".LAN_EMAIL_1." ".$author; } } //else // { // $message .= $comments."\n"; // Added to message later on // } $ip = e107::getIPHandler()->getIP(FALSE); $message .= "\n\n".LAN_EMAIL_2." ".$ip."\n\n"; if (substr($source,0,7) == 'plugin:') { $plugin = substr($source,7); $text = ''; if(file_exists(e_PLUGIN.$plugin.'/e_emailprint.php')) { include_once(e_PLUGIN.$plugin.'/e_emailprint.php'); $text = email_item($parms); $emailurl = SITEURL; } if($text == '') { e107::redirect(); exit; } $message .= $text; } elseif($source == 'referer') { if(!isset($_POST['referer']) || $_POST['referer'] == '') { e107::redirect(); exit; } $message .= strip_tags($_POST['referer']); $emailurl = strip_tags($_POST['referer']); } else { $emailurl = strip_tags($_POST['referer']); $message = ''; if($sql->select('news', 'news_title, news_body, news_extended', 'news_id='.((int)$parms))) { $row = $sql->fetch(); $message = "

".$row['news_title']."


".$row['news_body']."
".$row['news_extended']."

{e_BASE}news.php?extend.".$parms."
"; $message = $tp->toEmail($message); } if($message == '') { e107::redirect(); exit; } } if ($error == '') { // Load Mail Handler and Email Template. require_once(e_HANDLER.'mail.php'); $email_body = (trim($comments) != '') ? $tp->toEmail($comments).'
' : ''; $email_body .= $tp->toEmail($message); if (sendemail($email_send, LAN_EMAIL_3.SITENAME,$email_body)) { $text = "
".LAN_EMAIL_10." ".$email_send."
"; } else { $text = "
".LAN_EMAIL_9."
"; } $ns->tablerender(LAN_EMAIL_11, $text); } else { $ns->tablerender(LAN_ERROR, "
".$error."
"); } } // --------------------- Form ------------------------------------------------- $text = "
\n "; if (USER != TRUE) { $text .= ""; } $text .= " "; if($use_imagecode) { $text .= ""; } $text .= "
".LAN_EMAIL_15."
".LAN_EMAIL_8."
".LAN_EMAIL_187."
".LAN_EMAIL_190.""; $text .= $sec_img->r_image(); $text .= "
"; $ns->tablerender(LAN_EMAIL_5, $text); require_once(FOOTERF);