SELECT mem.ID_MEMBER
FROM {$db_prefix}ban_groups AS bg
LEFT JOIN {$db_prefix}ban_items AS bi ON (bg.ID_BAN_GROUP = bi.ID_BAN_GROUP)
LEFT JOIN {$db_prefix}members AS mem ON (bi.ID_MEMBER = mem.ID_MEMBER OR mem.emailAddress LIKE bi.email_address)
WHERE (bg.cannot_access = 1 OR bg.cannot_login = 1) AND (ISNULL(bg.expire_time) OR bg.expire_time > " . time() . ")
AND NOT ISNULL(mem.ID_MEMBER)
GROUP BY mem.ID_MEMBER", __FILE__, __LINE__);
$banMembers = array();
while ($row = mysql_fetch_row($request))
list ($banMembers[]) = $row;
mysql_free_result($request);
$condition .= empty($banMembers) ? '' : '
AND mem.ID_MEMBER NOT IN (' . implode(', ', $banMembers) . ')';
SELECT DISTINCT mem.ID_MEMBER
FROM {$db_prefix}ban_groups AS bg
INNER JOIN {$db_prefix}ban_items AS bi ON (bg.ID_BAN_GROUP = bi.ID_BAN_GROUP)
INNER JOIN {$db_prefix}members AS mem ON (bi.ID_MEMBER = mem.ID_MEMBER)
WHERE (bg.cannot_access = 1 OR bg.cannot_login = 1)
AND (ISNULL(bg.expire_time) OR bg.expire_time > " . time() . ")", __FILE__, __LINE__);
$condition_array = array();
$members = array();
while ($row = mysql_fetch_assoc($request))
$members[] = $row['ID_MEMBER'];
if (!empty($members))
$condition_array[] = 'mem.ID_MEMBER NOT IN (' . implode(', ', $members) . ')';
$request = db_query("
SELECT DISTINCT bi.email_address
FROM {$db_prefix}ban_items AS bi
INNER JOIN {$db_prefix}ban_groups AS bg ON (bg.ID_BAN_GROUP = bi.ID_BAN_GROUP)
WHERE (bg.cannot_access = 1 OR bg.cannot_login = 1)
AND (ISNULL(bg.expire_time) OR bg.expire_time > " . time() . ")
AND bi.email_address != ''", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$condition_array[] = "mem.emailAddress NOT LIKE '" . $row['email_address'] . "'";
if (!empty($condition_array))
$condition = '
AND ' . implode('
AND ', $condition_array);
$report_body .= "\n[b]$_REQUEST[reason][/b]\n\n";
$report_body .= stripslashes("\n[b]$_REQUEST[reason][/b]\n\n");
'subject' => ($func['strpos']($subject, $txt['pm_report_pm_subject']) === false ? $txt['pm_report_pm_subject'] : '') . $subject,
'body' => $report_body,
'subject' => addslashes(($func['strpos']($subject, $txt['pm_report_pm_subject']) === false ? $txt['pm_report_pm_subject'] : '') . $subject),
'body' => addslashes($report_body),
if (isset($_COOKIE[$cookiename]))
if (isset($_COOKIE[$cookiename]) && preg_match('~^a:[34]:\{i:0;(i:\d{1,6}|s:[1-8]:"\d{1,8}");i:1;s:(0|40):"([a-fA-F0-9]{40})?";i:2;[id]:\d{1,14};(i:3;i:\d;)?\}$~', $_COOKIE[$cookiename]) === 1)
$_SESSION['login_' . $cookiename] = $data;
// Make sure the user logs in with a new session ID.
if (!isset($_SESSION['login_' . $cookiename]) || $_SESSION['login_' . $cookiename] !== $data)
{
// Backup and remove the old session.
$oldSessionData = $_SESSION;
$_SESSION = array();
session_destroy();
// Recreate and restore the new session.
loadSession();
session_regenerate_id();
$_SESSION = $oldSessionData;
// Version 4.3.2 didn't store the cookie of the new session.
if (version_compare(PHP_VERSION, '4.3.2') === 0)
setcookie(session_name(), session_id(), time() + $cookie_length, $cookie_url[1], '', 0);
$_SESSION['login_' . $cookiename] = $data;
}
}
// PHP < 4.3.2 doesn't have this function
if (!function_exists('session_regenerate_id'))
{
function session_regenerate_id()
{
// Too late to change the session now.
if (headers_sent())
return false;
session_id(strtolower(md5(uniqid(rand(), true))));
return true;
}
// Globalize cookies across domains (filter out IP-addresses)?
if ($global && preg_match('~^\d{1,3}(\.\d{1,3}){3}$~', $parsed_url['host']) == 0)
{
// If we can't figure it out, just skip it.
if (preg_match('~(?:[^\.]+\.)?([^\.]{2,}\..+)\z~i', $parsed_url['host'], $parts) == 1)
$parsed_url['host'] = '.' . $parts[1];
}
// We shouldn't use a host at all if both options are off.
elseif (!$local)
$parsed_url['host'] = '';
// Globalize cookies across domains (filter out IP-addresses)?
if ($global && preg_match('~^\d{1,3}(\.\d{1,3}){3}$~', $parsed_url['host']) == 0 && preg_match('~(?:[^\.]+\.)?([^\.]{2,}\..+)\z~i', $parsed_url['host'], $parts) == 1)
$parsed_url['host'] = '.' . $parts[1];
// We shouldn't use a host at all if both options are off.
elseif (!$local && !$global)
$parsed_url['host'] = '';
// The host also shouldn't be set if there aren't any dots in it.
elseif (!isset($parsed_url['host']) || strpos($parsed_url['host'], '.') === false)
$parsed_url['host'] = '';
if (!mktree(dirname($strPath), $mode))
// Is this an invalid path and/or we can't make the directory?
if ($strPath == dirname($strPath) || !mktree(dirname($strPath), $mode))
// Set the debug level.
// If we're using this try to get some more memory.
@ini_set('memory_limit', '32M');
// Set the debug level.
$tag = preg_quote($match[1], '/');
$reg = '/\A(.*?(<' . $tag . ' .*?' . '>.*?<\/' . $tag . '>.*?)*?)<\/' . $tag . '>/s';
// Remove the element and fetch the inner data.
preg_match($reg, $data, $inner_match);
$data = preg_replace($reg, '', $data, 1);
if (!isset($inner_match[1]))
continue;
// Parse the inner data.
if (strpos($inner_match[1], '<') !== false)
$el += $this->_parse($inner_match[1]);
elseif (trim($inner_match[1]) != '')
{
$text_value = $this->_from_cdata($inner_match[1]);
if ($text_value != '')
$el[] = array(
'name' => '!',
'value' => $text_value
);
// Because PHP 5.2.0+ seems to croak using regex, we'll have to do this the less fun way.
$last_tag_end = strpos($data, '</' . $match[1]. '>');
if ($last_tag_end === false)
continue;
$offset = 0;
while (1 == 1)
{
// Where is the next start tag?
$next_tag_start = strpos($data, '<' . $match[1], $offset);
// If the next start tag is after the last end tag then we've found the right close.
if ($next_tag_start === false || $next_tag_start > $last_tag_end)
break;
// If not then find the next ending tag.
$next_tag_end = strpos($data, '</' . $match[1]. '>', $offset);
// Didn't find one? Then just use the last and sod it.
if ($next_tag_end === false)
break;
else
{
$last_tag_end = $next_tag_end;
$offset = $next_tag_start + 1;
}
}
// Parse the insides.
$inner_match = substr($data, 0, $last_tag_end);
// Data now starts from where this section ends.
$data = substr($data, $last_tag_end + strlen('</' . $match[1]. '>'));
if (!empty($inner_match))
{
// Parse the inner data.
if (strpos($inner_match, '<') !== false)
$el += $this->_parse($inner_match);
elseif (trim($inner_match) != '')
{
$text_value = $this->_from_cdata($inner_match);
if ($text_value != '')
$el[] = array(
'name' => '!',
'value' => $text_value
);
}
function addslashes__recursive($var)
function addslashes__recursive($var, $level = 0)
$new_var[addslashes($k)] = addslashes__recursive($v);
$new_var[addslashes($k)] = $level > 25 ? null : addslashes__recursive($v, $level + 1);
function htmlspecialchars__recursive($var)
function htmlspecialchars__recursive($var, $level = 0)
return array_map('htmlspecialchars__recursive', $var);
foreach ($var as $k => $v)
$var[$k] = $level > 25 ? null : htmlspecialchars__recursive($v, $level + 1);
return $var;
function urldecode__recursive($var)
function urldecode__recursive($var, $level = 0)
$new_var[urldecode($k)] = urldecode__recursive($v);
$new_var[urldecode($k)] = $level > 25 ? null : urldecode__recursive($v, $level + 1);
function stripslashes__recursive($var)
function stripslashes__recursive($var, $level = 0)
$new_var[stripslashes($k)] = stripslashes__recursive($v);
$new_var[stripslashes($k)] = $level > 25 ? null : stripslashes__recursive($v, $level + 1);
SELECT IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body, m.ID_TOPIC, m.subject
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_MSG = " . (int) $_REQUEST['quote'] . "
AND b.ID_BOARD = m.ID_BOARD
AND $user_info[query_see_board]
LIMIT 1", __FILE__, __LINE__);
$context['close_window'] = mysql_num_rows($request) == 0;
SELECT IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body, m.ID_TOPIC, m.subject, t.locked
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b, {$db_prefix}topics AS t)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_MSG = " . (int) $_REQUEST['quote'] . "
AND b.ID_BOARD = m.ID_BOARD
AND t.ID_TOPIC = m.ID_TOPIC
AND $user_info[query_see_board]" . (!isset($_REQUEST['modify']) || (!empty($moderate_boards) && $moderate_boards[0] == 0) ? '' : '
AND (t.locked = 0' . (empty($moderate_boards) ? '' : ' OR b.ID_BOARD IN (' . implode(', ', $moderate_boards)) . ')') . "
LIMIT 1", __FILE__, __LINE__);
$context['close_window'] = mysql_num_rows($request) == 0;
$context['sub_template'] = 'quotefast';
$context['quote'] = array(
'xml' => '',
'mozilla' => '',
'text' => '',
);
$context['sub_template'] = 'quotefast';
$context['quote'] = array(
'xml' => '',
'mozilla' => '',
'text' => '',
);
if (isset($_POST['message']) || isset($_POST['subject']) || isset($_POST['icon']))
{
if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any'))
if (isset($_POST['message']) || isset($_POST['subject']) || isset($_POST['icon']))
{
if (!empty($row['locked']))
isAllowedTo('moderate_board');
if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any'))
'can_modify' => allowedTo('modify_any') || (allowedTo('modify_replies') && $context['user']['started']) || (allowedTo('modify_own') && $message['ID_MEMBER'] == $ID_MEMBER && (empty($modSettings['edit_disable_time']) || $message['posterTime'] + $modSettings['edit_disable_time'] * 60 > time())),
'can_modify' => (!$context['is_locked'] || allowedTo('moderate_board')) && (allowedTo('modify_any') || (allowedTo('modify_replies') && $context['user']['started']) || (allowedTo('modify_own') && $message['ID_MEMBER'] == $ID_MEMBER && (empty($modSettings['edit_disable_time']) || $message['posterTime'] + $modSettings['edit_disable_time'] * 60 > time()))),