function MakeMenu() { global $config, $reqsection; $server = false; $web = false; $postprocess = false; foreach ($config as $section) { if ($section->category == CATEGORY_SERVER) { $server = true; } else { if ($section->category == CATEGORY_WEB) { $web = true; } else { if ($section->category == CATEGORY_POSTPROCESS) { $postprocess = true; } } } } if ($web) { echo '<div class = "block"><center>WEB-INTERFACE</center><br>'; echo '<table width="100%">'; foreach ($config as $section) { if ($section->category == CATEGORY_WEB) { echo '<tr><td class="configmenuitem"><a href="?section=' . $section->key . '">' . ($section->key == $reqsection ? '<span class="menuselectedsection">' : '') . $section->name . ($section->key == $reqsection ? '</span>' : '') . '</a></td></tr>'; } } echo '</table>'; echo '</div>'; } if ($server) { echo '<div class = "block"><center>NZBGET-SERVER</center><br>'; echo '<table width="' . (msie() ? '90%' : '100%') . '%">'; foreach ($config as $section) { if ($section->category == CATEGORY_SERVER) { echo '<tr><td class="configmenuitem"><a href="?section=' . $section->key . '">' . ($section->key == $reqsection ? '<span class="menuselectedsection">' : '') . $section->name . ($section->key == $reqsection ? '</span>' : '') . '</a></td></tr>'; } } echo '</table>'; echo '</div>'; } if ($postprocess) { echo '<div class = "block"><center>POSTPROCESSING-SCRIPT</center><br>'; echo '<table width="' . (msie() ? '90%' : '100%') . '%">'; foreach ($config as $section) { if ($section->category == CATEGORY_POSTPROCESS) { echo '<tr><td class="configmenuitem"><a href="?section=' . $section->key . '">' . ($section->key == $reqsection ? '<span class="menuselectedsection">' : '') . $section->name . ($section->key == $reqsection ? '</span>' : '') . '</a></td></tr>'; } } echo '</table>'; echo '</div>'; } }
function msie_png() { return msie() ? '.ie' : ''; }