';
}
echo '
';
// Toggle options.
echo '
';
// Get the currently selected item from a select list
echo '
';
// And a bit more for database changes.
if (!empty($context['database_changes']))
echo '
';
}
function template_extract_package()
{
global $context, $options, $txt, $scripturl;
if (!empty($context['redirect_url']))
{
echo '
';
}
echo '
';
// Now go through and turn off all the sections.
if (!empty($context['package_list']))
{
$section_count = count($context['package_list']);
echo '
';
}
}
function template_downloaded()
{
global $context, $options, $txt, $scripturl;
echo '
';
if (!empty($context['package_ftp']['destination']))
echo '
';
// Hide the details of the list.
if (empty($context['package_ftp']['form_elements_only']))
echo '
';
// Quick generate the test button.
echo '
';
// Make sure the button gets generated last.
$context['insert_after_template'] .= '
';
}
function template_ftp_required()
{
global $context, $options, $txt, $scripturl;
echo '
';
}
function template_view_operations()
{
global $context, $txt, $settings;
echo '
', $txt['operation_title'], '
', $context['operations']['search'], '
', $context['operations']['replace'], '
';
}
function template_file_permissions()
{
global $txt, $scripturl, $context, $settings;
// This will handle expanding the selection.
echo '
';
echo '
', $txt['package_file_perms_warning'], ':
', $txt['package_file_perms_warning_desc'], '
';
}
function template_permission_show_contents($ident, $contents, $level, $has_more = false)
{
global $settings, $txt, $scripturl, $context;
$js_ident = preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident);
// Have we actually done something?
$drawn_div = false;
foreach ($contents as $name => $dir)
{
if (isset($dir['perms']))
{
if (!$drawn_div)
{
$drawn_div = true;
echo '
';
if (!empty($dir['contents']))
{
template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files']));
}
}
}
// We have more files to show?
if ($has_more)
echo '
';
if ($drawn_div)
{
// Hide anything too far down the tree.
$isFound = false;
foreach ($context['look_for'] as $tree)
{
if (substr($tree, 0, strlen($ident)) == $ident)
$isFound = true;
}
if ($level > 1 && !$isFound)
echo '
';
}
}
function template_action_permissions()
{
global $txt, $scripturl, $context;
$countDown = 3;
echo '