Documentation TYPO3 par Ameos

extModInclude.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00032 // This includes the TYPO3 module configuration as required:
00033 unset($MCONF);
00034 $MCONF['extModInclude']=1;
00035 include ('../conf.php');
00036 
00037 // It phpMyAdmin is congured for, proceed
00038 if ($MCONF['phpMyAdminSubDir']) {       // If phpMyAdmin is configured in the conf.php script, we continue to load it...
00039                 // Now, the init.php script is included. This loads a lot of stuff and includes TYPO3 specific libraries which we don't need directly for the application.
00040                 // However this is the only way to get the TYPO3 backend user authenticated so we know if this user is actually allowed to access this module!
00041         require ($BACK_PATH.'init.php');
00042         require ($BACK_PATH.'template.php');
00043         $BE_USER->modAccess($MCONF,1);
00044 
00045                 // By now the TYPO3 backend user is authenticated and if that failed and error is outputted and the script has exited.
00046                 // So now we go on, altering certain configoptions of phpMyAdmin (for details here, see the phpMyAdmin config-file, config.inc.php)
00047 
00048                         // Set some interface values:
00049                 $cfg['LeftWidth']           = 200;          // left frame width
00050                 $cfg['LeftBgColor']         = $TBE_TEMPLATE->bgColor;    // background color for the left frame
00051                 $cfg['RightBgColor']        = $TBE_TEMPLATE->bgColor;    // background color for the right frame
00052                 $cfg['ThBgcolor']           = $TBE_TEMPLATE->bgColor5;    // table header row colour
00053                 $cfg['BgcolorOne']          = $TBE_TEMPLATE->bgColor4;    // table data row colour
00054                 $cfg['BgcolorTwo']          = t3lib_div::modifyHTMLColor($TBE_TEMPLATE->bgColor4,+20,+20,+20);    // table data row colour, alternate
00055                 $cfg['BrowsePointerColor']  = $TBE_TEMPLATE->bgColor6;    // color of the pointer in browse mode
00056                 $cfg['LeftPointerColor']    = $TBE_TEMPLATE->bgColor6;    // color of the pointer in left frame
00057                 $cfg['DefaultDisplay']      = 'horizontal'; // default display direction (horizontal|vertical)
00058                 $cfg['ShowBlob']              = TRUE;  // display blob field contents
00059 
00060                         // Setting the database information, using 'server1'. The other servers are NOT configured or reset, so you may set then independantly if you like.
00061                 $cfg['Servers'][1]['host']          = TYPO3_db_host; // MySQL hostname
00062                 $cfg['Servers'][1]['user']          = TYPO3_db_username;      // MySQL user (only needed with basic auth)
00063                 $cfg['Servers'][1]['password']      = TYPO3_db_password;          // MySQL password (only needed with basic auth)
00064                 $cfg['Servers'][1]['only_db']       = TYPO3_db;          // If set to a db-name, only this db is accessible
00065 
00066                 $cfg['PmaAbsoluteUri'] = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR');
00067 } else {
00068         die ('phpMyAdmin was not configured in mod/tools/phpadmin/conf.php!');
00069 }
00070 
00071 ?>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6