选择文件名文件大小最后修改时间操作
[📄] 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
printTrail('table'); $misc->printTabs('table','info'); $misc->printMsg($msg); // common params for printVal $shownull = array('null' => true); // Fetch info $referrers = $data->getReferrers($_REQUEST['table']); $parents = $data->getTableParents($_REQUEST['table']); $children = $data->getTableChildren($_REQUEST['table']); if ($data->hasStatsCollector()) { $tablestatstups = $data->getStatsTableTuples($_REQUEST['table']); $tablestatsio = $data->getStatsTableIO($_REQUEST['table']); $indexstatstups = $data->getStatsIndexTuples($_REQUEST['table']); $indexstatsio = $data->getStatsIndexIO($_REQUEST['table']); } // Check that there is some info if (($referrers === -99 || ($referrers !== -99 && $referrers->recordCount() == 0)) && $parents->recordCount() == 0 && $children->recordCount() == 0 && (!$data->hasStatsCollector() || ($tablestatstups->recordCount() == 0 && $tablestatsio->recordCount() == 0 && $indexstatstups->recordCount() == 0 && $indexstatsio->recordCount() == 0))) { $misc->printMsg($lang['strnoinfo']); } else { // Referring foreign tables if ($referrers !== -99 && $referrers->recordCount() > 0) { echo "

{$lang['strreferringtables']}

\n"; echo "\n"; echo "\t\n\t\t"; if ($data->hasSchemas()) { echo ""; } echo ""; echo ""; echo "\n"; echo "\t\n"; $i = 0; while (!$referrers->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n\t\t"; if ($data->hasSchemas()) { echo ""; } echo ""; echo ""; echo ""; echo "\n"; echo "\t\n"; $referrers->movenext(); $i++; } echo "
{$lang['strschema']}{$lang['strtable']}{$lang['strname']}{$lang['strdefinition']}{$lang['stractions']}
", $misc->printVal($referrers->f['nspname']), "", $misc->printVal($referrers->f['relname']), "", $misc->printVal($referrers->f['conname']), "", $misc->printVal($referrers->f['consrc']), "href}", "&schema=", urlencode($referrers->f['nspname']), "&table=", urlencode($referrers->f['relname']), "\">{$lang['strproperties']}
\n"; } // Parent tables if ($parents->recordCount() > 0) { echo "

{$lang['strparenttables']}

\n"; echo "\n"; echo "\t\n\t\t"; if ($data->hasSchemas()) { echo ""; } echo "\t\t"; echo "\n"; echo "\t\n"; $i = 0; while (!$parents->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n"; if ($data->hasSchemas()) { echo "\t\t"; } echo ""; echo "\n"; echo "\t\n"; $parents->movenext(); $i++; } echo "
{$lang['strschema']}{$lang['strtable']}{$lang['stractions']}
", $misc->printVal($parents->f['nspname']), "", $misc->printVal($parents->f['relname']), "href}", "&schema=", urlencode($parents->f['nspname']), "&table=", urlencode($parents->f['relname']), "\">{$lang['strproperties']}
\n"; } // Child tables if ($children->recordCount() > 0) { echo "

{$lang['strchildtables']}

\n"; echo "\n"; echo "\t\n"; if ($data->hasSchemas()) { echo ""; } echo "\t\t"; echo "\n"; echo "\t\n"; $i = 0; while (!$children->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n"; if ($data->hasSchemas()) { echo "\t\t"; } echo ""; echo "\n"; echo "\t\n"; $children->movenext(); $i++; } echo "
{$lang['strschema']}{$lang['strtable']}{$lang['stractions']}
", $misc->printVal($children->f['schemaname']), "", $misc->printVal($children->f['relname']), "href}", "&schema=", urlencode($children->f['schemaname']), "&table=", urlencode($children->f['relname']), "\">{$lang['strproperties']}
\n"; } if ($data->hasStatsCollector()) { // Row performance if ($tablestatstups->recordCount() > 0) { echo "

{$lang['strrowperf']}

\n"; echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $i = 0; while (!$tablestatstups->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $tablestatstups->movenext(); $i++; } echo "
{$lang['strsequential']}{$lang['strindex']}{$lang['strrows2']}
{$lang['strscan']}{$lang['strread']}{$lang['strscan']}{$lang['strfetch']}{$lang['strinsert']}{$lang['strupdate']}{$lang['strdelete']}
", $misc->printVal($tablestatstups->f['seq_scan'], 'int4', $shownull), "", $misc->printVal($tablestatstups->f['seq_tup_read'], 'int4', $shownull), "", $misc->printVal($tablestatstups->f['idx_scan'], 'int4', $shownull), "", $misc->printVal($tablestatstups->f['idx_tup_fetch'], 'int4', $shownull), "", $misc->printVal($tablestatstups->f['n_tup_ins'], 'int4', $shownull), "", $misc->printVal($tablestatstups->f['n_tup_upd'], 'int4', $shownull), "", $misc->printVal($tablestatstups->f['n_tup_del'], 'int4', $shownull), "
\n"; } // I/O performance if ($tablestatsio->recordCount() > 0) { echo "

{$lang['strioperf']}

\n"; echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $i = 0; while (!$tablestatsio->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n"; $total = $tablestatsio->f['heap_blks_hit'] + $tablestatsio->f['heap_blks_read']; if ($total > 0) $percentage = round(($tablestatsio->f['heap_blks_hit'] / $total) * 100); else $percentage = 0; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; $total = $tablestatsio->f['idx_blks_hit'] + $tablestatsio->f['idx_blks_read']; if ($total > 0) $percentage = round(($tablestatsio->f['idx_blks_hit'] / $total) * 100); else $percentage = 0; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; $total = $tablestatsio->f['toast_blks_hit'] + $tablestatsio->f['toast_blks_read']; if ($total > 0) $percentage = round(($tablestatsio->f['toast_blks_hit'] / $total) * 100); else $percentage = 0; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; $total = $tablestatsio->f['tidx_blks_hit'] + $tablestatsio->f['tidx_blks_read']; if ($total > 0) $percentage = round(($tablestatsio->f['tidx_blks_hit'] / $total) * 100); else $percentage = 0; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $tablestatsio->movenext(); $i++; } echo "
{$lang['strheap']}{$lang['strindex']}{$lang['strtoast']}{$lang['strtoastindex']}
{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}
", $misc->printVal($tablestatsio->f['heap_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->f['heap_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})", $misc->printVal($tablestatsio->f['idx_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->f['idx_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})", $misc->printVal($tablestatsio->f['toast_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->f['toast_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})", $misc->printVal($tablestatsio->f['tidx_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->f['tidx_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})
\n"; } // Index row performance if ($indexstatstups->recordCount() > 0) { echo "

{$lang['stridxrowperf']}

\n"; echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $i = 0; while (!$indexstatstups->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $indexstatstups->movenext(); $i++; } echo "
{$lang['strindex']}{$lang['strscan']}{$lang['strread']}{$lang['strfetch']}
", $misc->printVal($indexstatstups->f['indexrelname']), "", $misc->printVal($indexstatstups->f['idx_scan'], 'int4', $shownull), "", $misc->printVal($indexstatstups->f['idx_tup_read'], 'int4', $shownull), "", $misc->printVal($indexstatstups->f['idx_tup_fetch'], 'int4', $shownull), "
\n"; } // Index I/0 performance if ($indexstatsio->recordCount() > 0) { echo "

{$lang['stridxioperf']}

\n"; echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $i = 0; while (!$indexstatsio->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "\t\n"; $total = $indexstatsio->f['idx_blks_hit'] + $indexstatsio->f['idx_blks_read']; if ($total > 0) $percentage = round(($indexstatsio->f['idx_blks_hit'] / $total) * 100); else $percentage = 0; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; $indexstatsio->movenext(); $i++; } echo "
{$lang['strindex']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}
", $misc->printVal($indexstatsio->f['indexrelname']), "", $misc->printVal($indexstatsio->f['idx_blks_read'], 'int4', $shownull), "", $misc->printVal($indexstatsio->f['idx_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})
\n"; } } } } $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strinfo']); $misc->printBody(); switch ($action) { default: doDefault(); break; } $misc->printFooter(); ?>