Documentation TYPO3 par Ameos

header.inc.php

00001 <?php
00002 /* $Id: header.inc.php,v 2.2.4.1 2004/01/23 16:06:54 rabus Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00005 if (empty($GLOBALS['is_header_sent'])) {
00006 
00010     require_once('./libraries/common.lib.php');
00011     require_once('./libraries/ob.lib.php');
00012     if ($GLOBALS['cfg']['OBGzip']) {
00013         $GLOBALS['ob_mode'] = PMA_outBufferModeGet();
00014         if ($GLOBALS['ob_mode']) {
00015             PMA_outBufferPre($GLOBALS['ob_mode']);
00016         }
00017     }
00018 
00019     // garvin: For re-usability, moved http-headers and stylesheets
00020     // to a seperate file. It can now be included by header.inc.php,
00021     // queryframe.php, querywindow.php.
00022 
00023     require_once('./libraries/header_http.inc.php');
00024     require_once('./libraries/header_meta_style.inc.php');
00025 
00026     $title     = '';
00027     if (isset($GLOBALS['db'])) {
00028         $title .= str_replace('\'', '\\\'', $GLOBALS['db']);
00029     }
00030     if (isset($GLOBALS['table'])) {
00031         $title .= (empty($title) ? '' : '.') . str_replace('\'', '\\\'', $GLOBALS['table']);
00032     }
00033     if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) {
00034         $title .= (empty($title) ? 'phpMyAdmin ' : ' ')
00035                . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose'])));
00036     }
00037     $title     .= (empty($title) ? '' : ' - ') . 'phpMyAdmin ' . PMA_VERSION;
00038     ?>
00039     <script type="text/javascript" language="javascript">
00040     <!--
00041     // Updates the title of the frameset if possible (ns4 does not allow this)
00042     if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
00043         && typeof(parent.document.title) == 'string') {
00044         parent.document.title = '<?php echo $title; ?>';
00045     }
00046     <?php
00047     // Add some javascript instructions if required
00048     if (isset($js_to_run) && $js_to_run == 'functions.js') {
00049         echo "\n";
00050         ?>
00051     // js form validation stuff
00052     var errorMsg0   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strFormEmpty']); ?>';
00053     var errorMsg1   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotNumber']); ?>';
00054     var errorMsg2   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotValidNumber']); ?>';
00055     var noDropDbMsg = '<?php echo((!$GLOBALS['cfg']['AllowUserDropDatabase']) ? str_replace('\'', '\\\'', $GLOBALS['strNoDropDatabases']) : ''); ?>';
00056     var confirmMsg  = '<?php echo(($GLOBALS['cfg']['Confirm']) ? str_replace('\'', '\\\'', $GLOBALS['strDoYouReally']) : ''); ?>';
00057     //-->
00058     </script>
00059     <script src="libraries/functions.js" type="text/javascript" language="javascript"></script>
00060         <?php
00061     } else if (isset($js_to_run) && $js_to_run == 'user_password.js') {
00062         echo "\n";
00063         ?>
00064     // js form validation stuff
00065     var jsHostEmpty       = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strHostEmpty']); ?>';
00066     var jsUserEmpty       = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strUserEmpty']); ?>';
00067     var jsPasswordEmpty   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordEmpty']); ?>';
00068     var jsPasswordNotSame = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordNotSame']); ?>';
00069     //-->
00070     </script>
00071     <script src="libraries/user_password.js" type="text/javascript" language="javascript"></script>
00072         <?php
00073     } else if (isset($js_to_run) && $js_to_run == 'server_privileges.js') {
00074         echo "\n";
00075         ?>
00076     // js form validation stuff
00077     var jsHostEmpty       = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strHostEmpty']); ?>';
00078     var jsUserEmpty       = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strUserEmpty']); ?>';
00079     var jsPasswordEmpty   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordEmpty']); ?>';
00080     var jsPasswordNotSame = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordNotSame']); ?>';
00081     //-->
00082     </script>
00083     <script src="libraries/server_privileges.js" type="text/javascript" language="javascript"></script>
00084         <?php
00085     } else if (isset($js_to_run) && $js_to_run == 'indexes.js') {
00086         echo "\n";
00087         ?>
00088     // js index validation stuff
00089     var errorMsg0   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strFormEmpty']); ?>';
00090     var errorMsg1   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotNumber']); ?>';
00091     var errorMsg2   = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotValidNumber']); ?>';
00092     //-->
00093     </script>
00094     <script src="libraries/indexes.js" type="text/javascript" language="javascript"></script>
00095         <?php
00096     } else if (isset($js_to_run) && $js_to_run == 'tbl_change.js') {
00097         echo "\n";
00098         ?>
00099     //-->
00100     </script>
00101     <script src="libraries/tbl_change.js" type="text/javascript" language="javascript"></script>
00102         <?php
00103     } else {
00104         echo "\n";
00105         ?>
00106     //-->
00107     </script>
00108         <?php
00109     }
00110     echo "\n";
00111     ?>
00112         <meta name="OBGZip" content="<?php echo ($cfg['OBGzip'] ? 'true' : 'false'); ?>" />
00113     </head>
00114 
00115 
00116     <?php
00117     if ($GLOBALS['cfg']['RightBgImage'] != '') {
00118         $bkg_img = ' background="' . $GLOBALS['cfg']['RightBgImage'] . '"';
00119     } else {
00120         $bkg_img = '';
00121     }
00122     ?>
00123     <body bgcolor="<?php echo $GLOBALS['cfg']['RightBgColor'] . '"' . $bkg_img; ?>>
00124     <?php
00125     if (!defined('PMA_DISPLAY_HEADING')) {
00126         define('PMA_DISPLAY_HEADING', 1);
00127     }
00128     if (PMA_DISPLAY_HEADING) {
00129         $header_url_qry = '?' . PMA_generate_common_url();
00130         echo '<h1>' . "\n";
00131         $server_info = (!empty($cfg['Server']['verbose'])
00132                         ? $cfg['Server']['verbose']
00133                         : $server_info = $cfg['Server']['host'] . (empty($cfg['Server']['port'])
00134                                                                    ? ''
00135                                                                    : ':' . $cfg['Server']['port']
00136                                                                   )
00137                        );
00138         if (isset($GLOBALS['db'])) {
00139             echo '    ' . $GLOBALS['strDatabase'] . ' <i><a class="h1" href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . $header_url_qry . '&amp;db=' . urlencode($GLOBALS['db']) . '">' . htmlspecialchars($GLOBALS['db']) . '</a></i>' . "\n";
00140             if (!empty($GLOBALS['table'])) {
00141                 echo '    - ' . $GLOBALS['strTable'] . ' <i><a class="h1" href="' . $GLOBALS['cfg']['DefaultTabTable'] . $header_url_qry . '&amp;db=' . urlencode($GLOBALS['db']) . '&amp;table=' . urlencode($GLOBALS['table']) . '">' . htmlspecialchars($GLOBALS['table']) . '</a></i>' . "\n";
00142             }
00143             echo '    ' . sprintf($GLOBALS['strRunning'], '<i><a class="h1" href="' . $GLOBALS['cfg']['DefaultTabServer'] . $header_url_qry . '">' . htmlspecialchars($server_info) . '</a></i>');
00144         } else {
00145             echo '    ' . sprintf($GLOBALS['strServer'], '<i><a class="h1" href="' . $GLOBALS['cfg']['DefaultTabServer'] . $header_url_qry . '">' . htmlspecialchars($server_info) . '</a></i>');
00146         }
00147         echo "\n" . '</h1>' . "\n";
00148     }
00149     echo "\n";
00150 
00151 
00155     $GLOBALS['is_header_sent'] = TRUE;
00156 }
00157 
00158 ?>


Généré par TYPO3 Ameos avec  doxygen 1.4.6