if (isset($_REQUEST['ssi_layers']))
{
if ((get_magic_quotes_gpc() ? addslashes($_REQUEST['ssi_layers']) : $_REQUEST['ssi_layers']) == htmlspecialchars($ssi_layers))
die('Hacking attempt...');
}
if (isset($_REQUEST['ssi_layers'], $ssi_layers) && (@get_magic_quotes_gpc() ? stripslashes($_REQUEST['ssi_layers']) : $_REQUEST['ssi_layers']) == $ssi_layers)
die('Hacking attempt...');
redirectexit('action=packages;sa=install;package=' . $package_name);
redirectexit('action=packages;sa=install;package=' . $package_name . ';sesc=' . $context['session_id']);
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package11'] . ' ]</a>';
elseif ($context['package']['type'] == 'avatar')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package12'] . ' ]</a>';
elseif ($context['package']['type'] == 'language')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package13'] . ' ]</a>';
else
$context['package']['install']['link'] = '';
$context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';
// Free a little bit of memory...
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package11'] . ' ]</a>';
elseif ($context['package']['type'] == 'avatar')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package12'] . ' ]</a>';
elseif ($context['package']['type'] == 'language')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package13'] . ' ]</a>';
else
$context['package']['install']['link'] = '';
$context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';
// Free a little bit of memory...
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package11'] . ' ]</a>';
elseif ($context['package']['type'] == 'avatar')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package12'] . ' ]</a>';
elseif ($context['package']['type'] == 'language')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package13'] . ' ]</a>';
else
$context['package']['install']['link'] = '';
$context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';
unset($context['package']['xml']);
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package11'] . ' ]</a>';
elseif ($context['package']['type'] == 'avatar')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package12'] . ' ]</a>';
elseif ($context['package']['type'] == 'language')
$context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package13'] . ' ]</a>';
else
$context['package']['install']['link'] = '';
$context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';
unset($context['package']['xml']);
// Test install a package.
function PackageInstallTest()
{
global $boarddir, $txt, $context, $scripturl, $sourcedir, $modSettings;
// You have to specify a file!!
if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
// Test install a package.
function PackageInstallTest()
{
global $boarddir, $txt, $context, $scripturl, $sourcedir, $modSettings;
checkSession('request');
// You have to specify a file!!
if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)
function PackageInstall()
{
global $boarddir, $txt, $context, $scripturl, $sourcedir;
// If there's no file, what are we installing?
if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
redirectexit('action=packages');
function PackageInstall()
{
global $boarddir, $txt, $context, $scripturl, $sourcedir;
checkSession('get');
// If there's no file, what are we installing?
if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)
redirectexit('action=packages');
function PackageList()
{
global $txt, $scripturl, $boarddir, $context, $sourcedir;
require_once($sourcedir . '/Subs-Package.php');
// No package? Show him or her the door.
if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
function PackageList()
{
global $txt, $scripturl, $boarddir, $context, $sourcedir;
require_once($sourcedir . '/Subs-Package.php');
// No package? Show him or her the door.
if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)
function ExamineFile()
{
global $txt, $scripturl, $boarddir, $context, $sourcedir;
require_once($sourcedir . '/Subs-Package.php');
// No package? Show him or her the door.
if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
function ExamineFile()
{
global $txt, $scripturl, $boarddir, $context, $sourcedir;
checkSession('get');
require_once($sourcedir . '/Subs-Package.php');
// No package? Show him or her the door.
if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)
$context['filedata'] = '<img src="' . $scripturl . '?action=packages;sa=examine;package=' . $_REQUEST['package'] . ';file=' . $_REQUEST['file'] . ';raw" alt="' . $_REQUEST['file'] . '" />';
$context['filedata'] = '<img src="' . $scripturl . '?action=packages;sa=examine;package=' . $_REQUEST['package'] . ';file=' . $_REQUEST['file'] . ';raw;sesc=' . $context['session_id'] . '" alt="' . $_REQUEST['file'] . '" />';
// Use a specific theme?
$reservedVars = array(
'actual_theme_url',
'actual_images_url',
'base_theme_dir',
'base_theme_url',
'default_images_url',
'default_theme_dir',
'default_theme_url',
'default_template',
'images_url',
'number_recent_posts',
'smiley_sets_default',
'theme_dir',
'theme_id',
'theme_layers',
'theme_templates',
'theme_url',
);
// Can't change reserved vars.
if (in_array(strtolower($_GET['var']), $reservedVars))
redirectexit($settings['images_url'] . '/blank.gif');
// Use a specific theme?
</form>';
}
echo '
</td>
</tr>';
}
echo '
</table>';
}
function template_extract_package()
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
echo '
</td>
</tr>';
}
echo '
</table>';
}
function template_extract_package()
if (!$context['ftp_needed'])
echo '
<a href="', $scripturl, '?action=packages;sa=', $context['uninstalling'] ? 'uninstall2' : 'install2', ';package=', $context['filename'], '">[ ', $txt['smf154'], ' ]</a>';
if (!$context['ftp_needed'])
echo '
<a href="', $scripturl, '?action=packages;sa=', $context['uninstalling'] ? 'uninstall2' : 'install2', ';package=', $context['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf154'], ' ]</a>';
<li><a href="', $scripturl, '?action=packages;sa=examine;package=', $context['filename'], ';file=', $fileinfo['filename'], '" title="', $txt[305], '">', $fileinfo['filename'], '</a> (', $fileinfo['size'], ' ', $txt['package_bytes'], ')</li>';
<li><a href="', $scripturl, '?action=packages;sa=examine;package=', $context['filename'], ';file=', $fileinfo['filename'], ';sesc=', $context['session_id'], '" title="', $txt[305], '">', $fileinfo['filename'], '</a> (', $fileinfo['size'], ' ', $txt['package_bytes'], ')</li>';
<td>', $file['version'], '</td>
<td align="right"><a href="', $scripturl, '?action=packages;sa=uninstall;package=', $file['filename'], '">[ ', $txt['smf198b'], ' ]</a></td>
</tr>';
echo '
</table>
<br />
<a href="', $scripturl, '?action=packages;sa=flush">[ ', $txt['smf198d'], ' ]</a>';
<td>', $file['version'], '</td>
<td align="right"><a href="', $scripturl, '?action=packages;sa=uninstall;package=', $file['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a></td>
</tr>';
echo '
</table>
<br />
<a href="', $scripturl, '?action=packages;sa=flush;sesc=', $context['session_id'], '">[ ', $txt['smf198d'], ' ]</a>';
foreach ($context['available_mods'] as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>
', $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
foreach ($context['available_mods'] as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>
', $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
foreach ($context['available_avatars'] as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>', $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
foreach ($context['available_avatars'] as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>', $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package52'], ' ]</a>
foreach ($context['available_languages'] as $i => $package)
{
echo '
<tr>
<td>' . ++$i . '.</td>
<td>' . $package['name'] . '</td>
<td>' . $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
foreach ($context['available_languages'] as $i => $package)
{
echo '
<tr>
<td>' . ++$i . '.</td>
<td>' . $package['name'] . '</td>
<td>' . $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package52'], ' ]</a>
foreach ($context['available_other'] as $i => $package)
{
echo '
<tr>
<td>' . ++$i . '.</td>
<td>' . $package['name'] . '</td>
<td>' . $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
foreach ($context['available_other'] as $i => $package)
{
echo '
<tr>
<td>' . ++$i . '.</td>
<td>' . $package['name'] . '</td>
<td>' . $package['version'];
if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';
echo '
</td>
<td align="right">';
if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';
echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '"', $package['is_installed'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
Move the included file ".htaccess" to "./Packages". |