Bored? Looking to kill some time? Want to chat with other SMF users? Join us in IRC chat or Discord
var is_ff = (ua.indexOf('firefox') != -1 || ua.indexOf('iceweasel') != -1 || ua.indexOf('icecat') != -1 || ua.indexOf('shiretoko') != -1 || ua.indexOf('minefield') != -1) && !is_opera;
var is_ff = (ua.indexOf('firefox') != -1 || ua.indexOf('iceweasel') != -1 || ua.indexOf('icecat') != -1 || ua.indexOf('shiretoko') != -1 || ua.indexOf('minefield') != -1 || ua.indexOf('PaleMoon') != -1) && !is_opera;
* @version 2.0
* @version 2.0.10
<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
<label for="brd', $board['id'], '"><input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '</label>
</li>';
<li class="board">
<label for="brd', $board['id'], '" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"><input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '</label>
</li>';
$context['config_vars'][$config_var[1]]['value'] = unserialize($context['config_vars'][$config_var[1]]['value']);
$context['config_vars'][$config_var[1]]['value'] = !empty($context['config_vars'][$config_var[1]]['value']) ? unserialize($context['config_vars'][$config_var[1]]['value']) : array();
$context['config_vars'][$config_var[1]]['value'] = !empty($context['config_vars'][$config_var[1]]['value']) ? unserialize($context['config_vars'][$config_var[1]]['value']) : array();
* @version 2.0.9
* @version 2.0.10
$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \' \', \' \' => \'  \', \'[\' => \'[\', \']\' => \']\')) . \'[/html]\';');
$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \' \', \' \' => \'  \', \'[\' => \'[\', \']\' => \']\')) . \'[/html]\';');
* @version 2.0
* @version 2.0.10
$date .= sprintf(\'<br />%1$s <a href="%2$s?topic=%3$d.0.msg%4$d#msg%4$d">%5$s</a>\', $txt[\'in\'], $scripturl, $rowData[\'id_topic\'], $rowData[\'id_msg\'], $rowData[\'subject\']);
$date .= sprintf(\'<br />%1$s <a href="%2$s?topic=%3$d.msg%4$d#msg%4$d">%5$s</a>\', $txt[\'in\'], $scripturl, $rowData[\'id_topic\'], $rowData[\'id_msg\'], $rowData[\'subject\']);
* @version 2.0.9
* @version 2.0.10
// Windows doesn't seem to care about the memory_limit.
if (!empty($modSettings['package_disable_cache']) || ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
// Windows doesn't seem to care about the memory_limit.
if (!empty($modSettings['package_disable_cache']) || @ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
// Try to increase the memory limit - we don't want to run out of ram!
if (!empty($modSettings['package_disable_cache']) || ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
// Try to increase the memory limit - we don't want to run out of ram!
if (!empty($modSettings['package_disable_cache']) || @ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
if ($current['type'] == 5 && substr($current['filename'], -1) != '/')
$current['filename'] .= '/';
foreach ($current as $k => $v)
{
if (in_array($k, $octdec))
$current[$k] = octdec(trim($v));
else
$current[$k] = trim($v);
}
foreach ($current as $k => $v)
{
if (in_array($k, $octdec))
$current[$k] = octdec(trim($v));
else
$current[$k] = trim($v);
}
if ($current['type'] == 5 && substr($current['filename'], -1) != '/')
$current['filename'] .= '/';
* @version 2.0.9
* @version 2.0.10
if (isset($_REQUEST['preview']))
{
checkSession();
return Post();
}
if (isset($_REQUEST['preview']))
{
if (checkSession('post', '', false) != '')
{
loadLanguage('Errors');
$context['post_errors']['message'][] = $txt['error_session_timeout'];
unset ($_POST['preview'], $_REQUEST['xml']); // just in case
}
return Post();
}
// Try to find the fore- and background colors.
if ('currentStyle' in this.oFaderHandle)
// Try to find the fore- and background colors.
var modern_browser = 'MozOpacity' in this.oFaderHandle.style || 'Opacity' in this.oFaderHandle.style || 'filter' in this.oFaderHandle.style;
if ('currentStyle' in this.oFaderHandle && !modern_browser)
* @version 2.0.3
* @version 2.0.10
$setting_data = array(
array('text', 'paypal_email', 'subtext' => $txt['paypal_email_desc']),
);
/// We add email and additional emails (the latter for recurring payments)
$setting_data = array(
array('text', 'paypal_email', 'subtext' => $txt['paypal_email_desc']),
array('text', 'paypal_additional_emails', 'subtext' => $txt['paypal_additional_emails_desc']),
);
if (strtolower($_POST['mc_currency']) != $modSettings['paid_currency_code'])
if (strtolower($_POST['mc_currency']) != strtolower($modSettings['paid_currency_code']))
if ($modSettings['paypal_email'] != $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
return false;
if (strtolower($modSettings['paypal_email']) != strtolower($_POST['business']) && (empty($modSettings['paypal_additional_emails']) || !in_array(strtolower($_POST['business']), explode(',', strtolower($modSettings['paypal_additional_emails'])))))
return false;
// Check that this is intended for us.
if ($modSettings['paypal_email'] != $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
// Check that this is intended for us.
if (strtolower($modSettings['paypal_email']) != strtolower($_POST['business']) && (empty($modSettings['paypal_additional_emails']) || !in_array(strtolower($_POST['business']), explode(',', strtolower($modSettings['paypal_additional_emails'])))))
// Version: 2.0; ManagePaid
// Version: 2.0.10; ManagePaid
$txt['paid_note'] = '<strong class="alert">Note:</strong><br />For subscriptions to be automatically updated for your users, you
will need to setup a return URL for each of your payment methods. For all payment types, this return URL should be set as:<br /><br />
• <strong>' . $boardurl . '/subscriptions.php</strong><br /><br />
You can edit the link for paypal directly, by clicking <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-ipn-notify" target="_blank">here</a>.<br />
For the other gateways (If installed) you can normally find it in your customer panels, usually under the term "Return URL" or "Callback URL".';
$txt['paid_note'] = '<strong class="alert">Note:</strong><br />
SMF currently supports <strong>PayPal</strong> as the installed payment method.<br />
• It is not necessary to enable IPN in your PayPal account; if you do, the forum will receive payment notifications for all payments made to your account, and this will generate Paid Subscriptions errors for payments that are not subscription related.<br />
• You must have a business or premier account to use recurring payments.<br />
• You must provide your primary PayPal email address for validation purposes.<br /><br />
If you install a different payment gateway, you may need to set up a return URL for payment notification. For all payment types, this return URL should be set as:<br /><br />
• <strong>' . $boardurl . '/subscriptions.php</strong><br /><br />
You can normally find it in your customer panels, usually under the term "Return URL" or "Callback URL".<br /><br /><br />';
$context['redirect_text'] = !empty($action['filename']) && file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']) ? file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']) : ($context['uninstalling'] ? $txt['package_uninstall_done'] : $txt['package_installed_done']);
$context['redirect_text'] = !empty($action['filename']) && file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']) ? $smcFunc['htmlspecialchars'](file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename'])) : ($context['uninstalling'] ? $txt['package_uninstall_done'] : $txt['package_installed_done']);
// Check if they can vote.
// Check if they can vote.
$already_voted = false;
elseif ($user_info['is_guest'] && $row['guest_vote'] && (!isset($_COOKIE['guest_poll_vote']) || !in_array($row['id_poll'], explode(',', $_COOKIE['guest_poll_vote']))))
$allow_vote = true;
elseif ($user_info['is_guest'])
$allow_vote = false;
elseif ($user_info['is_guest'])
{
// There's a difference between "allowed to vote" and "already voted"...
$allow_vote = $row['guest_vote'];
// Did you already vote?
if (isset($_COOKIE['guest_poll_vote']) && in_array($row['id_poll'], explode(',', $_COOKIE['guest_poll_vote'])))
{
$already_voted = true;
}
}
$allow_vote = $smcFunc['db_num_rows']($request) == 0;
$allow_vote = $smcFunc['db_num_rows']($request) == 0;
$already_voted = $allow_vote;
$allow_view_results = allowedTo('moderate_board') || $row['hide_results'] == 0 || ($row['hide_results'] == 1 && !$allow_vote) || $is_expired;
$allow_view_results = allowedTo('moderate_board') || $row['hide_results'] == 0 || ($row['hide_results'] == 1 && $already_voted) || $is_expired;
foreach ($return['options'] as $option)
echo '
<dt>', $option['option'], '</dt>
<dd>
foreach ($return['options'] as $option)
{
echo '
<dt>', $option['option'], '</dt>
<dd>';
if ($return['allow_view_results'])
{
echo '
', $option['votes'], ' (', $option['percent'], '%)
</dd>';
echo '
</dl>
<strong>', $txt['poll_total_voters'], ': ', $return['total_votes'], '</strong>
', $option['votes'], ' (', $option['percent'], '%)';
}
echo '
</dd>';
}
echo '
</dl>', ($return['allow_view_results'] ? '
<strong>'. $txt['poll_total_voters'] .': '. $return['total_votes'] .'</strong>' : ''), '
return ' . strtr($ent_check[0], array('&' => '&')) . 'htmlspecialchars($string, $quote_style, ' . ($utf8 ? '\'UTF-8\'' : '$charset') . ')' . $ent_check[1] . ';'),
return ' . ($utf8 ? '$smcFunc[\'fix_utf8mb4\'](' : '') . strtr($ent_check[0], array('&' => '&')) . 'htmlspecialchars($string, $quote_style, ' . ($utf8 ? '\'UTF-8\'' : '$charset') . ')' . $ent_check[1] . ($utf8 ? ')' : '') . ';'),
'fix_utf8mb4' => create_function('$string', '
$i = 0;
$len = strlen($string);
$new_string = \'\';
while ($i < $len)
{
$ord = ord($string[$i]);
if ($ord < 128)
{
$new_string .= $string[$i];
$i++;
}
elseif ($ord < 224)
{
$new_string .= $string[$i] . $string[$i+1];
$i += 2;
}
elseif ($ord < 240)
{
$new_string .= $string[$i] . $string[$i+1] . $string[$i+2];
$i += 3;
}
elseif ($ord < 248)
{
// Magic happens.
$val = (ord($string[$i]) & 0x07) << 18;
$val += (ord($string[$i+1]) & 0x3F) << 12;
$val += (ord($string[$i+2]) & 0x3F) << 6;
$val += (ord($string[$i+3]) & 0x3F);
$new_string .= \'&#\' . $val . \';\';
$i += 4;
}
}
return $new_string;'),