root/ip/tags/release_1_3_0_53/privmsg.php

111163
672
672
673
	// Mighty Gorgon - Quick Quote - BEGIN
673
	// Mighty Gorgon - Quick Quote - BEGIN
674
	$look_up_array = array(
674
	$look_up_array = array(
675
		"\"",
675
		'\"',
676
		'"',
676
		"<",
677
		"<",
677
		">",
678
		">",
678
		"\n",
679
		"\n",
...
...
680
	);
681
	);
681
682
682
	$replacement_array = array(
683
	$replacement_array = array(
683
		"\\\"",
684
		'&q_mg;',
685
		'\"',
684
		"&lt_mg;",
686
		"&lt_mg;",
685
		"&gt_mg;",
687
		"&gt_mg;",
686
		"\\n",
688
		"\\n",
...
...
1122
	{
1124
	{
1123
		$i = 0;
1125
		$i = 0;
1124
		$crlf = "\r\n";
1126
		$crlf = "\r\n";
1125
		$pmtext = $lang['Private_Messaging'] . ' (' . $board_config['sitename'] . ')' . $crlf;
1127
		$pmtext = $lang['Private_Messaging'] . ' (' . ip_stripslashes($board_config['sitename']) . ')' . $crlf;
1126
		$user_dateformat = ($userdata['user_dateformat']) ? $userdata['user_dateformat'] : $board_config['default_dateformat'];
1128
		$user_dateformat = ($userdata['user_dateformat']) ? $userdata['user_dateformat'] : $board_config['default_dateformat'];
1127
		$pmtext .= $disp_folder . ' (' . date($user_dateformat, time()) . ')' . $crlf;
1129
		$pmtext .= $disp_folder . ' (' . gmdate($user_dateformat) . ')' . $crlf;
1128
		while($mark_list[$i] != '')
1130
		while($mark_list[$i] != '')
1129
		{
1131
		{
1130
			$sql = "SELECT pm.privmsgs_date, pm.privmsgs_subject, pm.privmsgs_text, us.username, us.user_id
1132
			$sql = "SELECT pm.privmsgs_date, pm.privmsgs_subject, pm.privmsgs_text, us.username, us.user_id
...
...
1139
				$pmtext .= '------------------------------------------------------------------------------' . $crlf;
1141
				$pmtext .= '------------------------------------------------------------------------------' . $crlf;
1140
				$pmtext .= $lang['Mailbox'] . ': ' . $userdata['username'] . $crlf;
1142
				$pmtext .= $lang['Mailbox'] . ': ' . $userdata['username'] . $crlf;
1141
				$pmtext .= $from . ': ' . $db_row['username'] . $crlf;
1143
				$pmtext .= $from . ': ' . $db_row['username'] . $crlf;
1142
				$pmtext .= $lang['Posted'] . ': ' . date($user_dateformat, $db_row['privmsgs_date']) . $crlf;
1144
				$pmtext .= $lang['Posted'] . ': ' . gmdate($user_dateformat, $db_row['privmsgs_date']) . $crlf;
1143
				$pmtext .= $lang['Subject'] . ': ' . $db_row['privmsgs_subject'] . $crlf . $crlf;
1145
				$pmtext .= $lang['Subject'] . ': ' . $db_row['privmsgs_subject'] . $crlf . $crlf;
1144
				$pmtext .= $tmpmsg . $crlf;
1146
				$pmtext .= $tmpmsg . $crlf;
1145
			}
1147
			}
...
...
1150
			}
1152
			}
1151
			$i++;
1153
			$i++;
1152
		}
1154
		}
1153
		$filename = $board_config['sitename'] . '_' . $disp_folder . '_' . date('Ymd', time());
1155
		$filename = ip_stripslashes($board_config['sitename']) . '_' . $disp_folder . '_' . gmdate('Ymd');
1154
		$filename = ereg_replace("[^A-Za-z0-9]", '_', strtolower($filename)) . '.txt';
1156
		$filename = ereg_replace("[^A-Za-z0-9]", '_', strtolower($filename)) . '.txt';
1155
		header('Content-Type: text/x-delimtext; name="' . $filename . '"');
1157
		header('Content-Type: text/x-delimtext; name="' . $filename . '"');
1156
		header('Content-Disposition: attachment;filename=' . $filename);
1158
		header('Content-Disposition: attachment;filename=' . $filename);
...
...
1657
				}
1659
				}
1658
				$emailer->assign_vars(array(
1660
				$emailer->assign_vars(array(
1659
					'USERNAME' => stripslashes($to_username),
1661
					'USERNAME' => stripslashes($to_username),
1660
					'SITENAME' => $board_config['sitename'],
1662
					'SITENAME' => ip_stripslashes($board_config['sitename']),
1661
					'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
1663
					'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . ip_stripslashes($board_config['board_email_sig'])) : '',
1662
					// Mighty Gorgon - Begin
1664
					// Mighty Gorgon - Begin
1663
					'FROM' => $userdata['username'],
1665
					'FROM' => $userdata['username'],
1664
					'DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
1666
					'DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),