auth(); $inc->template(); if (isset($_POST['username']) && isset($_POST['password'])) { $GLOBALS['auth']->login(addslashes($_POST['username']), addslashes($_POST['password'])); } // Define the three sets of links in the template $GLOBALS['template']->links('none', 'none'); $GLOBALS['template']->assign('links_main', ''); // If the person is logged in, load sound files and redirect them to the index page if ($GLOBALS['auth']->operator()) { header('Location: '.$GLOBALS['conf']['url'].'/admin/index.php'); } else { if (isset($_POST['username']) && isset($_POST['password'])) { $GLOBALS['template']->assign('login_text', $GLOBALS['lang']['login_failure']); } // Assign the page's title and the content template that needs to be used $GLOBALS['template']->assign('title', $GLOBALS['lang']['login']); $GLOBALS['template']->assign('content', 'admin_login.tpl'); // Display the output $GLOBALS['template']->display('admin.tpl'); } // do events that need to be done at the end of the file $inc->finished(); ?>