| 176 | | // we need this for some mail texts |
|---|
| 177 | | require(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php'); |
|---|
| 178 | | |
|---|
| 179 | | $urlarray = parse_url(JLOG_PATH); |
|---|
| 180 | | $com_form['email'] = empty($com_form['email']) ? "no-reply@".$urlarray['host'] : $com_form['email']; |
|---|
| 181 | | $mail['topic'] = $l['admin']['comments_mailsubject']." - ".$blogentry['topic']; |
|---|
| 182 | | $mail['headers'] = "MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"; |
|---|
| 183 | | $mail['headers'] .= "From: "; |
|---|
| 184 | | if(!empty($com_form['name'])) $mail['headers'] .= str_replace(array("\n", "\r"), "", $com_form['name']); |
|---|
| 185 | | else $mail['headers'] .= $l['admin']['comments_anonym']; |
|---|
| 186 | | if(!empty($com_form['email'])) $mail['headers'] .= " <".str_replace(array("\n", "\r"), "", $com_form['email']).">"; |
|---|
| 187 | | $mail['headers'] .= "\r\nX-Mailer: PHP/".phpversion(); |
|---|
| 188 | | |
|---|
| 189 | | $mail['text'] = $l['admin']['comments_mail_txt']." »".$blogentry['topic']."«\n- -\n"; |
|---|
| 190 | | if(!empty($com_form['name'])) $mail['text'] .= $com_form['name']; |
|---|
| 191 | | else $mail['text'] .= $l['admin']['comments_anonym']; |
|---|
| 192 | | if(!empty($com_form['city'])) $mail['text'] .= " ".$l['comments_from']." ".$com_form['city']; |
|---|
| 193 | | $mail['text'] .= " ".$l['admin']['comments_posted']." ".$date.":\n\n"; |
|---|
| 194 | | $mail['text'] .= html_entity_decode(strip_tags($bbcomments->parse($com_form['content']))); |
|---|
| 195 | | $mail['text'] .= "\n\n".str_replace ( '&', '&', blog($blogentry['date'], $blogentry['url']))."#c".$cid; |
|---|
| 196 | | $mail['text'] .= "\n\n".$l['admin']['kill_c_email']."\n".JLOG_PATH."/admin/comments.php?action=trash&id=".$cid; |
|---|
| 197 | | |
|---|
| 198 | | ### Plugin Hook |
|---|
| 199 | | $mail = $plugins->callHook('adminMail', $mail, $blogentry); |
|---|
| 200 | | |
|---|
| 201 | | if(empty($mail['nomail'])) @mail(JLOG_EMAIL, $mail['topic'], $mail['text'], $mail['headers']); |
|---|
| 202 | | } |
|---|
| 203 | | |
|---|
| 204 | | $mail['topic'] = $l['comments_mailsubject']." - ".$blogentry['topic']; |
|---|
| 205 | | $mail['headers'] = "MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"; |
|---|
| 206 | | $mail['headers'] .= "From: ".JLOG_WEBSITE." <".JLOG_EMAIL.">\r\n" |
|---|
| 207 | | ."X-Mailer: PHP/".phpversion(); |
|---|
| 208 | | |
|---|
| 209 | | $mail['all_text'] = $l['comments_mail_txt']." »".$blogentry['topic']."«\n- -\n"; |
|---|
| 210 | | if(!empty($com_form['name'])) $mail['all_text'] .= $com_form['name']; |
|---|
| 211 | | else $mail['all_text'] .= $l['comments_anonym']; |
|---|
| 212 | | if(!empty($com_form['city'])) $mail['all_text'] .= " ".$l['comments_from']." ".$com_form['city']; |
|---|
| 213 | | $mail['all_text'] .= " ".$l['comments_posted']." ".$date.":\n\n"; |
|---|
| 214 | | $mail['all_text'] .= html_entity_decode(strip_tags($bbcomments->parse($com_form['content']))); |
|---|
| 215 | | $mail['all_text'] .= "\n\n".str_replace ( '&', '&', blog($blogentry['date'], $blogentry['url']))."#c".$cid.""; |
|---|
| 216 | | $mail['all_text'] .= "\n-- \n".$l['comments_stop_receiving']."\n"; |
|---|
| 217 | | $mail['all_text'] .= JLOG_PATH."/stop.php?id=".$blogentry['id']."&email="; |
|---|
| | 176 | // we need this for some mail texts |
|---|
| | 177 | require(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php'); |
|---|
| | 178 | |
|---|
| | 179 | $urlarray = parse_url(JLOG_PATH); |
|---|
| | 180 | $com_form['email'] = empty($com_form['email']) ? "no-reply@".$urlarray['host'] : $com_form['email']; |
|---|
| | 181 | $mail['topic'] = $l['admin']['comments_mailsubject']." - ".$blogentry['topic']; |
|---|
| | 182 | $mail['headers'] = "MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"; |
|---|
| | 183 | $mail['headers'] .= "From: "; |
|---|
| | 184 | if(!empty($com_form['name'])) $mail['headers'] .= str_replace(array("\n", "\r"), "", $com_form['name']); |
|---|
| | 185 | else $mail['headers'] .= $l['admin']['comments_anonym']; |
|---|
| | 186 | if(!empty($com_form['email'])) $mail['headers'] .= " <".str_replace(array("\n", "\r"), "", $com_form['email']).">"; |
|---|
| | 187 | $mail['headers'] .= "\r\nX-Mailer: PHP/".phpversion(); |
|---|
| | 188 | |
|---|
| | 189 | $mail['text'] = $l['admin']['comments_mail_txt']." »".$blogentry['topic']."«\n- -\n"; |
|---|
| | 190 | if(!empty($com_form['name'])) $mail['text'] .= $com_form['name']; |
|---|
| | 191 | else $mail['text'] .= $l['admin']['comments_anonym']; |
|---|
| | 192 | if(!empty($com_form['city'])) $mail['text'] .= " ".$l['comments_from']." ".$com_form['city']; |
|---|
| | 193 | $mail['text'] .= " ".$l['admin']['comments_posted']." ".$date.":\n\n"; |
|---|
| | 194 | $mail['text'] .= html_entity_decode(strip_tags($bbcomments->parse($com_form['content']))); |
|---|
| | 195 | $mail['text'] .= "\n\n".str_replace ( '&', '&', blog($blogentry['date'], $blogentry['url']))."#c".$cid; |
|---|
| | 196 | $mail['text'] .= "\n\n".$l['admin']['kill_c_email']."\n".JLOG_PATH."/admin/comments.php?action=trash&id=".$cid; |
|---|
| | 197 | |
|---|
| | 198 | ### Plugin Hook |
|---|
| | 199 | $mail = $plugins->callHook('adminMail', $mail, $blogentry); |
|---|
| | 200 | |
|---|
| | 201 | if(empty($mail['nomail'])) @mail(JLOG_EMAIL, $mail['topic'], $mail['text'], $mail['headers'], "-f".JLOG_EMAIL); |
|---|
| | 202 | } |
|---|
| | 203 | |
|---|
| | 204 | $mail['topic'] = $l['comments_mailsubject']." - ".$blogentry['topic']; |
|---|
| | 205 | $mail['headers'] = "MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"; |
|---|
| | 206 | $mail['headers'] .= "From: ".JLOG_WEBSITE." <".JLOG_EMAIL.">\r\n" |
|---|
| | 207 | ."X-Mailer: PHP/".phpversion(); |
|---|
| | 208 | |
|---|
| | 209 | $mail['all_text'] = $l['comments_mail_txt']." »".$blogentry['topic']."«\n- -\n"; |
|---|
| | 210 | if(!empty($com_form['name'])) $mail['all_text'] .= $com_form['name']; |
|---|
| | 211 | else $mail['all_text'] .= $l['comments_anonym']; |
|---|
| | 212 | if(!empty($com_form['city'])) $mail['all_text'] .= " ".$l['comments_from']." ".$com_form['city']; |
|---|
| | 213 | $mail['all_text'] .= " ".$l['comments_posted']." ".$date.":\n\n"; |
|---|
| | 214 | $mail['all_text'] .= html_entity_decode(strip_tags($bbcomments->parse($com_form['content']))); |
|---|
| | 215 | $mail['all_text'] .= "\n\n".str_replace ( '&', '&', blog($blogentry['date'], $blogentry['url']))."#c".$cid.""; |
|---|
| | 216 | $mail['all_text'] .= "\n-- \n".$l['comments_stop_receiving']."\n"; |
|---|
| | 217 | $mail['all_text'] .= JLOG_PATH."/stop.php?id=".$blogentry['id']."&email="; |
|---|