// Clear any "relative" URL. Since "server" is not present, "relative" is garbage.
unset($_GET['relative']);
// Clear any "relative" URL. Since "server" is not present, "relative" is garbage.
unset($_GET['relative']);
$token = checkConfirm('get_absolute_url');
if ($token !== true)
{
$context['sub_template'] = 'package_confirm';
$context['page_title'] = $txt['smf183'];
$context['confirm_message'] = sprintf($txt['package_confirm_view_package_content'], htmlspecialchars($_GET['absolute']));
$context['proceed_href'] = $scripturl . '?action=packageget;sa=browse;absolute=' . urlencode($_GET['absolute']) . ';confirm=' . $token;
return;
}
// Check whether a form has been submitted twice.
function checkSubmitOnce($action, $is_fatal = true)
{
function checkConfirm($action)
{
global $modSettings;
if (isset($_GET['confirm']) && isset($_SESSION['confirm_' . $action]) && md5($_GET['confirm'] . $_SERVER['HTTP_USER_AGENT']) !== $_SESSION['confirm_' . $action])
return true;
else
{
$token = md5(mt_rand() . session_id() . (string) microtime() . $modSettings['rand_seed']);
$_SESSION['confirm_' . $action] = md5($token, $_SERVER['HTTP_USER_AGENT']);
return $token;
}
}
// Check whether a form has been submitted twice.
function checkSubmitOnce($action, $is_fatal = true)
{
function template_package_list()
{
function template_package_confirm()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr class="titlebg">
<td>' . $context['page_title'] . '</td>
</tr>
<tr>
<td width="100%" align="left" valign="middle" class="windowbg2">
', $context['confirm_message'], '<br />
<br />
<a href="', $context['proceed_href'], '">[ ', $txt['package_confirm_proceed'], ' ]</a> <a href="JavaScript:history.go(-1);">[ ', $txt['package_confirm_go_back'], ' ]</a>
</td>
</tr>
</table>';
}
function template_package_list()
{
$txt['package_no_zlib'] = 'Sorry, your PHP configuration doesn\'t have support for <b>zlib</b>. Without this, the package manager cannot function. Please contact your host about this for more information.';
$txt['package_no_zlib'] = 'Sorry, your PHP configuration doesn\'t have support for <b>zlib</b>. Without this, the package manager cannot function. Please contact your host about this for more information.';
$txt['package_confirm_view_package_content'] = 'Are you sure you want to view the package contents from this location:<br /><br />%1$s';
$txt['package_confirm_proceed'] = 'Proceed';
$txt['package_confirm_go_back'] = 'Go back';