Documentation TYPO3 par Ameos

config.auth.lib.php

00001 <?php
00002 /* $Id: config.auth.lib.php,v 2.2 2003/11/26 22:52:24 rabus 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;
00071     global $connect_func, $server_port, $server_socket, $cfg;
00072     global $right_font_family, $font_size, $font_bigger;
00073     global $is_header_sent;
00074     if (PMA_mysql_error()) {
00075         $conn_error = PMA_mysql_error();
00076     } else if (isset($php_errormsg)) {
00077         $conn_error = $php_errormsg;
00078     } else {
00079         $conn_error = 'Cannot connect: invalid settings.';
00080     }
00081 /* Commented out by Nijel: This causes displaying login and password from
00082  * config when connection to MySQL server can't be established. (SQL parser
00083  * fails on this and then displays it as wrong SQL.
00084  */
00085 /*      $local_query    = $connect_func . '('
00086                     . $cfg['Server']['host'] . $server_port . $server_socket . ', '
00087                     . $cfg['Server']['user'] . ', '
00088                     . $cfg['Server']['password'] . ')';*/
00089     $local_query     = '';
00090 
00091     // Defines the charset to be used
00092     header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
00093     ?>
00094 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
00095     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00096 <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']; ?>">
00097 
00098 <head>
00099 <title><?php echo $GLOBALS['strAccessDenied']; ?></title>
00100 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
00101 <style type="text/css">
00102 <!--
00103 body     {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
00104 h1       {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
00105 //-->
00106 </style>
00107 </head>
00108 
00109 <body bgcolor="<?php echo $cfg['RightBgColor']; ?>">
00110 <br /><br />
00111 <center>
00112     <h1><?php echo sprintf($GLOBALS['strWelcome'], ' phpMyAdmin ' . PMA_VERSION); ?></h1>
00113 </center>
00114 <br />
00115     <?php
00116     echo "\n";
00117     $is_header_sent = TRUE;
00118     echo '<p>' . $GLOBALS['strAccessDeniedExplanation'] . '</p>' . "\n";
00119     PMA_mysqlDie($conn_error, $local_query, FALSE);
00120 
00121     return TRUE;
00122 } // end of the 'PMA_auth_fails()' function
00123 
00124 ?>


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