$options) if ($options !== NULL) foreach ($options as $name => $pagename) if ($pagename === $p) { $page = $p; $n = " - $name"; } if ($page === '') showPage('index', $menu, '', $user); else showPage($page, $menu, $n, $user); } # function def_menu() { $dmenu = array('Home' => array('Home' => ''), 'gap' => NULL, 'Help' => array('Help' => 'help', 'Payouts' => 'payout')); return $dmenu; } # function check() { $dmenu = def_menu(); $menu = array( 'Home' => array( 'Home' => '' ), 'Account' => array( 'Workers' => 'workers', 'Payments' => 'payments', 'Settings' => 'settings' ), 'Pool' => array( 'Stats' => 'stats', 'Blocks' => 'blocks' ), 'Admin' => NULL, 'gap' => NULL, 'Help' => array( 'Help' => 'help', 'Payouts' => 'payout' ) ); tryLogInOut(); $who = loggedIn(); if ($who === false) { $p = getparam('k', true); if ($p == 'reset') showPage('reset', $dmenu, '', $who); else { if (requestRegister() == true) showPage('reg', $dmenu, '', $who); else { $p = getparam('k', true); process($p, $who, $dmenu); } } } else { $p = getparam('k', true); process($p, $who, $menu); } } # check(); # ?>