public static function menu() { if (Privileges::access(__METHOD__) !== true || !G::isLoggedIn()) { return ''; } $html = Tag::hTag('b') . 'Database Menu' . Tag::_hTag('b') . Tag::form(['method' => 'get']) . Response::factory()->action(__CLASS__ . '->index()')->toHidden(false) . Lists::select('tblName', self::TABLES_SQL, ['size' => '10', 'onClick' => 'submit();']) . Tag::_form(); return $html; }
public static function menu() { if (Privileges::access(__METHOD__) !== true || !G::isLoggedIn()) { return ''; } $resp = new Response(); $html = Tag::hTag('b') . 'Super Admin Menu' . Tag::_hTag('b') . Tag::ul(['id' => 'menuList']); foreach (self::getMenu() as $title => $action) { $html .= Tag::li() . Tag::hRef('?' . $resp->action($action)->toUrl(), $title) . Tag::_li(); } $html .= Tag::_ul(); return $html; }
private static function checkPriviliages($action) { if (!Cfg::get('check_priviliages', false)) { return $action; } if (($loginAction = Privileges::access($action)) === false) { return false; } if (is_string($loginAction) && isset($_SERVER["REQUEST_URI"])) { Request::set(self::SAVE_URL, $_SERVER["REQUEST_URI"]); $action = $loginAction; } return $action; }