return $retval; } /** * Main */ $mode = ''; if (isset($_POST['mode'])) { $mode = COM_applyFilter($_POST['mode']); } else { if (isset($_GET['mode'])) { $mode = COM_applyFilter($_GET['mode']); } } $T = new Template($_MG_CONF['template_path']); $T->set_file('admin', 'administration.thtml'); $T->set_var(array('site_admin_url' => $_CONF['site_admin_url'], 'site_url' => $_MG_CONF['site_url'], 'lang_admin' => $LANG_MG00['admin'], 'xhtml' => XHTML)); if ($mode == $LANG_MG01['save'] && !empty($LANG_MG01['save'])) { $T->set_var(array('admin_body' => MG_staticSortAlbumsSave())); } elseif ($mode == $LANG_MG01['cancel']) { echo COM_refresh($_MG_CONF['admin_url'] . 'index.php'); exit; } else { $T->set_var(array('admin_body' => MG_staticSortAlbumOptions(), 'title' => $LANG_MG01['static_sort_albums'], 'lang_help' => '<img src="' . MG_getImageFile('button_help.png') . '" border="0" alt="?">', 'help_url' => $_MG_CONF['site_url'] . '/docs/usage.html#Static_Sort_Albums')); } $T->parse('output', 'admin'); $display = COM_startBlock($LANG_MG00['admin'], '', COM_getBlockTemplate('_admin_block', 'header')); $display .= MG_showAdminMenu('batch_sessions'); $display .= $T->finish($T->get_var('output')); $display .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); $display = COM_createHTMLDocument($display); COM_output($display);
/** * Main */ $mode = isset($_REQUEST['mode']) ? COM_applyFilter($_REQUEST['mode']) : ''; $display = ''; $mode = ''; if (isset($_POST['mode'])) { $mode = $_POST['mode']; } else { if (isset($_GET['mode'])) { $mode = $_GET['mode']; } } $T = new Template($_MG_CONF['template_path'] . '/admin'); $T->set_file(array('admin' => 'administration.thtml')); $T->set_var(array('site_admin_url' => $_CONF['site_admin_url'], 'site_url' => $_MG_CONF['site_url'], 'mg_navigation' => MG_navigation(), 'lang_admin' => $LANG_MG00['admin'], 'version' => $_MG_CONF['pi_version'])); if ($mode == $LANG_MG01['save'] && !empty($LANG_MG01['save'])) { // save the config $T->set_var(array('admin_body' => MG_staticSortAlbumsSave(), 'mg_navigation' => MG_navigation())); } elseif ($mode == $LANG_MG01['cancel']) { echo COM_refresh($_MG_CONF['admin_url'] . 'index.php'); exit; } else { $T->set_var(array('admin_body' => MG_staticSortAlbumOptions(), 'title' => $LANG_MG01['static_sort_albums'], 'lang_help' => '<img src="' . MG_getImageFile('button_help.png') . '" border="0" alt="?">', 'help_url' => $_MG_CONF['site_url'] . '/docs/usage.html#Static_Sort_Albums')); } $T->parse('output', 'admin'); $display = COM_siteHeader(); $display .= $T->finish($T->get_var('output')); $display .= COM_siteFooter(); echo $display; exit;