选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
getUsers(); // Get groups from the database $groups = $data->getGroups(); $misc->printTrail($_REQUEST['subject']); switch ($mode) { case 'grant': $misc->printTitle($lang['strgrant'],'pg.privilege.grant'); break; case 'revoke': $misc->printTitle($lang['strrevoke'],'pg.privilege.revoke'); break; } $misc->printMsg($msg); echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; // Grant option if ($data->hasGrantOption()) { echo "\n"; echo "\n"; } echo "
{$lang['strusers']}
{$lang['strgroups']}\n"; echo "\n"; // Only show groups if there are groups! if ($groups->recordCount() > 0) { echo "
\n"; } echo "
{$lang['strprivileges']}\n"; foreach ($data->privlist[$_REQUEST['subject']] as $v) { $v = htmlspecialchars($v); echo "
\n"; } echo "
{$lang['stroptions']}\n"; if ($mode == 'grant') { echo "\n"; } elseif ($mode == 'revoke') { echo "
\n"; echo "
\n"; } echo "
\n"; if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo $misc->form; echo "

"; if ($mode == 'grant') echo "\n"; elseif ($mode == 'revoke') echo "\n"; echo ""; echo "

\n"; echo "
\n"; } else { // Determine whether object should be ref'd by name or oid. if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) $object = $_REQUEST[$_REQUEST['subject'].'_oid']; else $object = $_REQUEST[$_REQUEST['subject']]; $status = $data->setPrivileges(($mode == 'grant') ? 'GRANT' : 'REVOKE', $_REQUEST['subject'], $object, isset($_REQUEST['public']), $_REQUEST['username'], $_REQUEST['groupname'], array_keys($_REQUEST['privilege']), isset($_REQUEST['grantoption']), isset($_REQUEST['cascade'])); if ($status == 0) doDefault($lang['strgranted']); elseif ($status == -3 || $status == -4) doAlter(true, $_REQUEST['mode'], $lang['strgrantbad']); else doAlter(true, $_REQUEST['mode'], $lang['strgrantfailed']); } } /** * Show permissions on a database, namespace, relation, language or function */ function doDefault($msg = '') { global $data, $misc, $database; global $PHP_SELF, $lang; $misc->printTrail($_REQUEST['subject']); # @@@FIXME: This switch is just a temporary solution, # need a better way, maybe every type of object should # have a tab bar??? switch ($_REQUEST['subject']) { case 'server': case 'database': case 'schema': case 'table': case 'view': $misc->printTabs($_REQUEST['subject'], 'privileges'); break; default: $misc->printTitle($lang['strprivileges'], 'pg.privilege'); } $misc->printMsg($msg); // Determine whether object should be ref'd by name or oid. if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) $object = $_REQUEST[$_REQUEST['subject'].'_oid']; else $object = $_REQUEST[$_REQUEST['subject']]; // Get the privileges on the object, given its type $privileges = $data->getPrivileges($object, $_REQUEST['subject']); if (sizeof($privileges) > 0) { echo "\n"; echo ""; foreach ($data->privlist[$_REQUEST['subject']] as $v2) { // Skip over ALL PRIVILEGES if ($v2 == 'ALL PRIVILEGES') continue; echo "\n"; } if ($data->hasGrantOption()) { echo ""; } echo "\n"; // Loop over privileges, outputting them $i = 0; foreach ($privileges as $v) { $id = (($i % 2) == 0 ? '1' : '2'); echo "\n"; echo "\n"; echo "\n"; foreach ($data->privlist[$_REQUEST['subject']] as $v2) { // Skip over ALL PRIVILEGES if ($v2 == 'ALL PRIVILEGES') continue; echo "\n"; } if ($data->hasGrantOption()) { echo "\n"; } echo "\n"; $i++; } echo "
{$lang['strtype']}{$lang['struser']}/{$lang['strgroup']}{$v2}{$lang['strgrantor']}
", $misc->printVal($v[0]), "", $misc->printVal($v[1]), ""; if (in_array($v2, $v[2])) echo $lang['stryes']; else echo $lang['strno']; // If we have grant option for this, end mark if ($data->hasGrantOption() && in_array($v2, $v[4])) echo $lang['strasterisk']; echo "", $misc->printVal($v[3]), "
"; } else { echo "

{$lang['strnoprivileges']}

\n"; } // Links for granting to a user or group switch ($_REQUEST['subject']) { case 'table': case 'view': case 'sequence': case 'function': case 'tablespace': $allurl = "{$_REQUEST['subject']}s.php"; $alltxt = $lang["strshowall{$_REQUEST['subject']}s"]; break; case 'schema': $allurl = "database.php"; $alltxt = $lang["strshowallschemas"]; break; case 'database': $allurl = 'all_db.php'; $alltxt = $lang['strshowalldatabases']; break; } $subject = htmlspecialchars(urlencode($_REQUEST['subject'])); $object = htmlspecialchars(urlencode($_REQUEST[$_REQUEST['subject']])); if ($_REQUEST['subject'] == 'function') { $objectoid = $_REQUEST[$_REQUEST['subject'].'_oid']; $alterurl = "{$PHP_SELF}?action=alter&{$misc->href}&{$subject}={$object}&{$subject}_oid=$objectoid&subject={$subject}&mode="; } else { $alterurl = "{$PHP_SELF}?action=alter&{$misc->href}&{$subject}={$object}&subject={$subject}&mode="; } echo "

{$lang['strgrant']} |\n"; echo "{$lang['strrevoke']}\n"; if (isset($allurl)) echo "| href}\">{$alltxt}\n"; echo "

\n"; } $misc->printHeader($lang['strprivileges']); $misc->printBody(); switch ($action) { case 'save': if (isset($_REQUEST['cancel'])) doDefault(); else doAlter(false, $_REQUEST['mode']); break; case 'alter': doAlter(true, $_REQUEST['mode']); break; default: doDefault(); break; } $misc->printFooter(); ?>