File: script_end.inc.php

package info (click to toggle)
ibwebadmin 0.98-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,916 kB
  • ctags: 1,950
  • sloc: php: 12,454; makefile: 7
file content (124 lines) | stat: -rw-r--r-- 3,345 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php
// File           script_end.inc.php / ibWebAdmin
// Purpose        output the whole html source for the page
// Author         Lutz Brueckner <irie@gmx.de>
// Copyright      (c) 2000, 2001, 2002, 2003, 2004 by Lutz Brueckner,
//                published under the terms of the GNU General Public Licence v.2,
//                see file LICENCE for details
// Created        <00/10/18 09:12:24 lb>
//
// $Id: script_end.inc.php,v 1.22 2004/05/30 16:43:24 lbrueckner Exp $


// Varibles:   $title    title string for the page
//             $panels   panel array for the page

$title = build_title ($menu_strings[$active]);

echo html_head($title);
echo html_body();

require('./inc/show_menu.inc.php');


// display the panels on the active page
foreach ($panels as $nr => $panel) {

    // take respect for the $HIDE_PANELS configuration
    if (in_array($panel[0], $HIDE_PANELS)
    &&  ($s_login['user'] != 'SYSDBA'  ||  SYSDBA_GET_ALL == FALSE  ||  $s_connected == FALSE)) {

        continue;
    }

    echo '<div id="p'.$nr."\">\n";
    if ($panel[2] == 'open'  ||
        ($panel[0] == 'info'  &&  critical_error())) {

        include('./panels/open_panel.php');
    }
    else {

        echo get_closed_panel($panel[1], $active, $nr, $open_icon);
    }

    echo "</div>\n";
}

echo $js_stack;

if ($s_use_jsrs == TRUE) {
    echo js_jsrs_client();
    echo js_jsrs_close_panel();
}

// close the db connection
if (isset($dbhandle)  &&  is_resource($dbhandle)) {
    // ibase_close() chrashes the apache-process,
    // this was a bug in some revisions of the ibase-module
    //    ibase_close($dbhandle);
}



if (DEBUG === TRUE) {
    echo "<div align=\"left\">\n";

    show_time_consumption($start_time, microtime());

    // see http://xdebug.derickrethans.nl/
    if (function_exists('xdebug_memory_usage')) {
        echo 'memory usage: '.xdebug_memory_usage()."<br>\n";
    }

    // display links to display the session, post or get variables
    $session_url = url_session('./inc/display_variable.php?var=SESSION');
    echo '<a href="'.$session_url.'" target="_blank">[ Session ]</a>'."\n";

    $post_url = url_session('./inc/display_variable.php?var=POST');
    echo '<a href="'.$post_url.'" target="_blank">[ POST ]</a>'."\n";

    $get_url = url_session('./inc/display_variable.php?var=GET');
    echo '<a href="'.$get_url.'" target="_blank">[ GET ]</a>'."\n";

    echo '<a href="./inc/phpinfo.php" target="_blank">[ phpinfo ]</a>'."\n";

    $kill_url = url_session('./inc/kill_session.php');
    echo '<a href="'.$kill_url.'">[ kill session ]</a>'."\n";

    // Inhalt von $_POST und $_GET in der Session hinterlegen
    $s_POST = $HTTP_POST_VARS;
    $s_GET  = $HTTP_GET_VARS;

    echo "</div>\n";
}


if (DEBUG_HTML) {
    $fname = TMPPATH.substr_replace(basename($HTTP_SERVER_VARS['PHP_SELF']), 'html', -3);
    write_output_buffer($fname);

//     if (in_array('tidy', get_loaded_extensions())) {
//         $tidy = tidy_parse_file($fname);
//         debug_var(tidy_get_error_buffer($tidy));
//     }
}


echo html_bottom();

globalize_session_vars();


//
// check the global error-variables
//
function critical_error() {

    return !empty($GLOBALS['error'])  ||
           !empty($GLOBALS['ib_error'])  ||
           !empty($GLOBALS['php_error'])  ||
           !empty($GLOBALS['externcmd']);
}

?>