punbb-1.2.7/upload/include/email.php |
punbb-1.2.8/upload/include/email.php |
75: $subject = trim(preg_replace('#[\n\r]+#s', '', $subject)); | 75: $subject = trim(preg_replace('#[\n\r]+#s', '', $subject)); |
76: $from = trim(preg_replace('#[\n\r:]+#s', '', $from)); | 76: $from = trim(preg_replace('#[\n\r:]+#s', '', $from)); |
77: | 77: |
78: // Detect what linebreak we should use for the headers | 78: $headers = 'From: '.$from."\r\n".'Date: '.date('r')."\r\n".'MIME-Version: 1.0'."\r\n".'Content-transfer-encoding: 8bit'."\r\n".'Content-type: text/plain; charset='.$lang_common['lang_encoding']."\r\n".'X-Mailer: PunBB Mailer'; |
79: if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) | |
80: $eol = "\r\n"; | |
81: else if (strtoupper(substr(PHP_OS, 0, 3) == 'MAC')) | |
82: $eol = "\r"; | |
83: else | |
84: $eol = "\n"; | |
85: | |
86: $headers = 'From: '.$from.$eol.'Date: '.date('r').$eol.'MIME-Version: 1.0'.$eol.'Content-transfer-encoding: 8bit'.$eol.'Content-type: text/plain; charset='.$lang_common['lang_encoding'].$eol.'X-Mailer: PunBB Mailer'; | |
87: | 79: |
88: // Make sure all linebreaks are CRLF in message | 80: // Make sure all linebreaks are CRLF in message |
89: $message = str_replace("\n", "\r\n", pun_linebreaks($message)); | 81: $message = str_replace("\n", "\r\n", pun_linebreaks($message)); |
91: if ($pun_config['o_smtp_host'] != '') | 83: if ($pun_config['o_smtp_host'] != '') |
92: smtp_mail($to, $subject, $message, $headers); | 84: smtp_mail($to, $subject, $message, $headers); |
93: else | 85: else |
| 86: { |
| 87: // Change the linebreaks used in the headers according to OS |
| 88: if (strtoupper(substr(PHP_OS, 0, 3)) == 'MAC') |
| 89: $headers = str_replace("\r\n", "\r", $headers); |
| 90: else if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') |
| 91: $headers = str_replace("\r\n", "\n", $headers); |
| 92: |
94: mail($to, $subject, $message, $headers); | 93: mail($to, $subject, $message, $headers); |
| 94: } |
95: } | 95: } |
96: | 96: |
97: | 97: |
punbb-1.2.7/upload/include/functions.php |
punbb-1.2.8/upload/include/functions.php |
209: $now = time(); | 209: $now = time(); |
210: | 210: |
211: // Fetch all online list entries that are older than "o_timeout_online" | 211: // Fetch all online list entries that are older than "o_timeout_online" |
212: $result = $db->query('SELECT * FROM '.$db->prefix.'online WHERE logged<'.($now-$pun_config['o_timeout_online'])) or error('Unable to delete from online list', __FILE__, __LINE__, $db->error()); | 212: $result = $db->query('SELECT * FROM '.$db->prefix.'online WHERE logged<'.($now-$pun_config['o_timeout_online'])) or error('Unable to fetch old entries from online list', __FILE__, __LINE__, $db->error()); |
213: while ($cur_user = $db->fetch_assoc($result)) | 213: while ($cur_user = $db->fetch_assoc($result)) |
214: { | 214: { |
215: // If the entry is a guest, delete it | 215: // If the entry is a guest, delete it |
punbb-1.2.7/upload/search.php |
punbb-1.2.8/upload/search.php |
51: $action = (isset($_GET['action'])) ? $_GET['action'] : null; | 51: $action = (isset($_GET['action'])) ? $_GET['action'] : null; |
52: $forum = (isset($_GET['forum'])) ? intval($_GET['forum']) : -1; | 52: $forum = (isset($_GET['forum'])) ? intval($_GET['forum']) : -1; |
53: $sort_dir = (isset($_GET['sort_dir'])) ? (($_GET['sort_dir'] == 'DESC') ? 'DESC' : 'ASC') : 'DESC'; | 53: $sort_dir = (isset($_GET['sort_dir'])) ? (($_GET['sort_dir'] == 'DESC') ? 'DESC' : 'ASC') : 'DESC'; |
| 54: if (isset($search_id)) unset($search_id); |
54: | 55: |
55: // If a search_id was supplied | 56: // If a search_id was supplied |
56: if (isset($_REQUEST['search_id'])) | 57: if (isset($_GET['search_id'])) |
57: { | 58: { |
58: $search_id = intval($_GET['search_id']); | 59: $search_id = intval($_GET['search_id']); |
59: if ($search_id < 1) | 60: if ($search_id < 1) |
punbb-1.2.7/upload/viewforum.php |
punbb-1.2.8/upload/viewforum.php |
242: | 242: |
243: <div class="linksb"> | 243: <div class="linksb"> |
244: <div class="inbox"> | 244: <div class="inbox"> |
245: <p class="pagelink conl"><?php echo $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewforum.php?id='.$id) ?></p> | 245: <p class="pagelink conl"><?php echo $paging_links ?></p> |
246: <?php echo $post_link ?> | 246: <?php echo $post_link ?> |
247: <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul> | 247: <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul> |
248: <div class="clearer"></div> | 248: <div class="clearer"></div> |