</form> <?php } elseif ($s_connected == TRUE) { if (is_array($s_tables)) { $vcnt = 0; foreach ($s_tables as $viewname => $properties) { if ($properties['is_view'] == FALSE) { continue; } $vcnt++; $title = $s_views_counts == TRUE && isset($properties['count']) ? $viewname . ' [' . $properties['count'] . ']' : $viewname; $fold_url = fold_detail_url('view', $properties['status'], $viewname, $title); echo '<div id="' . 'v_' . $viewname . "\" class=\"det\">\n"; if ($properties['status'] == 'open') { echo get_opened_view($viewname, $title, $fold_url); } else { // $properties['status'] == 'close' echo get_closed_detail($title, $fold_url); } echo "</div>\n"; } // foreach $s_tables } echo '<form method="post" action="' . url_session($_SERVER['PHP_SELF']) . "\" name=\"acc_view_form\">\n"; if ($vcnt > 0) { ?> <input type="checkbox" name="acc_show_counts" value="yes"<?php if ($s_views_counts == TRUE) { echo ' checked'; }
function detail_view($type, $name, $title) { $url = fold_detail_url($type, 'open', $name, $title); $comment_url = "javascript:requestCommentArea('" . $type . "', '" . $name . "');"; $comment_div = detail_div_prefix($type) . 'c_' . $name; switch ($type) { case 'table': if ($GLOBALS['s_tables_def'] == TRUE) { $GLOBALS['s_fields'] = get_table_defaults_sources($name, $GLOBALS['s_fields']); } $html = get_opened_table($name, $title, $url, $comment_url, $comment_div); $GLOBALS['s_tables'][$name]['status'] = 'open'; break; case 'view': include '../inc/views.inc.php'; $html = get_opened_view($name, $title, $url); $GLOBALS['s_tables'][$name]['status'] = 'open'; break; case 'trigger': include '../inc/triggers.inc.php'; if (empty($GLOBALS['s_triggers'][$name]['source'])) { $GLOBALS['s_triggers'][$name]['source'] = get_trigger_source($name); } $html = get_opened_trigger($name, $GLOBALS['s_triggers'][$name], $url); $GLOBALS['s_triggers'][$name]['display'] = 'open'; break; case 'procedure': include '../inc/procedures.inc.php'; include '../inc/firebird.inc.php'; if (empty($GLOBALS['s_procedures'][$name]['source'])) { $GLOBALS['s_procedures'][$name]['source'] = get_procedure_source($name); list($in, $out) = get_procedure_parameters($name); $GLOBALS['s_procedures'][$name]['in'] = $in; $GLOBALS['s_procedures'][$name]['out'] = $out; } $html = get_opened_procedure($name, $GLOBALS['s_procedures'][$name], $url); $GLOBALS['s_procedures'][$name]['status'] = 'open'; break; } header('Content-Type: text/html;charset=' . $GLOBALS['charset']); echo $html; }