Documentation TYPO3 par Ameos

config.auth.lib.php

00001 <?php
00002 /* $Id: config.auth.lib.php,v 2.10 2005/03/01 14:52:54 lem9 Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00005 // +--------------------------------------------------------------------------+
00006 // | Set of functions used to run config authentication (ie no                |
00007 // | authentication).                                                         |
00008 // +--------------------------------------------------------------------------+
00009 
00010 
00018 function PMA_auth()
00019 {
00020     return TRUE;
00021 } // end of the 'PMA_auth()' function
00022 
00023 
00031 function PMA_auth_check()
00032 {
00033     return TRUE;
00034 } // end of the 'PMA_auth_check()' function
00035 
00036 
00044 function PMA_auth_set_user()
00045 {
00046     return TRUE;
00047 } // end of the 'PMA_auth_set_user()' function 
00048 
00049 
00068 function PMA_auth_fails()
00069 {
00070     global $php_errormsg, $cfg;
00071     global $right_font_family, $font_size, $font_bigger;
00072     if (PMA_DBI_getError()) {
00073         $conn_error = PMA_DBI_getError();
00074     } else if (isset($php_errormsg)) {
00075         $conn_error = $php_errormsg;
00076     } else {
00077         $conn_error = $GLOBALS['strConnectionError'];
00078     }
00079 
00080     // Defines the charset to be used
00081     header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
00082     // Defines the theme to be used
00083     require_once('./libraries/select_theme.lib.php');
00084     ?>
00085 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
00086     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00087 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
00088 
00089 <head>
00090 <title><?php echo $GLOBALS['strAccessDenied']; ?></title>
00091 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
00092 <style type="text/css">
00093 <!--
00094 body     {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
00095 h1       {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
00096 //-->
00097 </style>
00098 <script language="JavaScript" type="text/javascript">
00099 <!--
00100     /* added 2004-06-10 by Michael Keck
00101      *       we need this for Backwards-Compatibility and resolving problems
00102      *       with non DOM browsers, which may have problems with css 2 (like NC 4)
00103     */
00104     var isDOM      = (typeof(document.getElementsByTagName) != 'undefined'
00105                       && typeof(document.createElement) != 'undefined')
00106                    ? 1 : 0;
00107     var isIE4      = (typeof(document.all) != 'undefined'
00108                       && parseInt(navigator.appVersion) >= 4)
00109                    ? 1 : 0;
00110     var isNS4      = (typeof(document.layers) != 'undefined')
00111                    ? 1 : 0;
00112     var capable    = (isDOM || isIE4 || isNS4)
00113                    ? 1 : 0;
00114     // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
00115     if (capable) {
00116         if (typeof(window.opera) != 'undefined') {
00117             var browserName = ' ' + navigator.userAgent.toLowerCase();
00118             if ((browserName.indexOf('konqueror 7') == 0)) {
00119                 capable = 0;
00120             }
00121         } else if (typeof(navigator.userAgent) != 'undefined') {
00122             var browserName = ' ' + navigator.userAgent.toLowerCase();
00123             if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
00124                 capable = 0;
00125             }
00126         } // end if... else if...
00127     } // end if
00128     document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
00129 //-->
00130 </script>
00131 <noscript>
00132     <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right" />
00133 </noscript>
00134 
00135 </head>
00136 
00137 <body bgcolor="<?php echo $cfg['RightBgColor']; ?>">
00138 <br /><br />
00139 <center>
00140     <h1><?php echo sprintf($GLOBALS['strWelcome'], ' phpMyAdmin ' . PMA_VERSION); ?></h1>
00141 </center>
00142 <br />
00143 <table border="0" cellpadding="0" cellspacing="3" align="center" width="80%">
00144     <tr>
00145         <td>
00146     <?php
00147     echo "\n";
00148     $GLOBALS['is_header_sent'] = TRUE;
00149 
00150     //TODO: I have included this div from header.inc.php to work around
00151     //      an undefined variable in tooltip.js, when the server
00152     //      is not responding. Work has to be done to merge all code that
00153     //      starts the page (DOCTYPE and this div) to one place
00154     ?>
00155     <div id="TooltipContainer" name="TooltipContainer" onmouseover="holdTooltip();" onmouseout="swapTooltip('default');"></div>
00156     <?php
00157 
00158     // if we display the "Server not responding" error, do not confuse users
00159     // by telling them they have a settings problem 
00160     // (note: it's true that they could have a badly typed host name, but
00161     //  anyway the current $strAccessDeniedExplanation tells that the server
00162     //  rejected the connection, which is not really what happened)
00163     // 2002 is the error given by mysqli
00164     // 2003 is the error given by mysql
00165 
00166     if (isset($GLOBALS['allowDeny_forbidden']) && $GLOBALS['allowDeny_forbidden']) {
00167         echo '<p>' . $GLOBALS['strAccessDenied'] . '</p>' . "\n";
00168     } else {
00169         if (!isset($GLOBALS['errno']) || (isset($GLOBALS['errno']) && $GLOBALS['errno'] != 2002) && $GLOBALS['errno'] != 2003) {
00170             echo '<p>' . $GLOBALS['strAccessDeniedExplanation'] . '</p>' . "\n";
00171         }
00172         PMA_mysqlDie($conn_error, '');
00173     }
00174 ?>
00175         </td>
00176     </tr>
00177 </table>
00178 <?php
00179     require_once('./footer.inc.php');
00180     return TRUE;
00181 } // end of the 'PMA_auth_fails()' function
00182 
00183 ?>


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