Documentation TYPO3 par Ameos

index.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 ***************************************************************/
00042  // Regular initialization. Must check if the user has access to the module. This determines if it appears in the menu and if this script will redirect.
00043 unset($MCONF);
00044 require ('conf.php');
00045 require ($BACK_PATH.'init.php');
00046 require ($BACK_PATH.'template.php');
00047 $BE_USER->modAccess($MCONF,1);
00048 
00049 
00050 // ***************************
00051 // Script Classes
00052 // ***************************
00053 class SC_mod_tools_phpadmin_index {
00054         var $MCONF=array();
00055         var $MOD_MENU=array();
00056         var $MOD_SETTINGS=array();
00057         var $doc;       
00058 
00059         function main() {
00060                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
00061                 $this->MCONF = $GLOBALS['MCONF'];
00062 
00063                 if ($this->MCONF['phpMyAdminSubDir'] && @is_dir($this->MCONF['phpMyAdminSubDir']))      {       // If phpMyAdmin is configured in the conf.php script, we continue to load it...
00064                                 // Mapping language keys for phpMyAdmin
00065                 
00066                         //dk|de|no|it|fr|es|nl|cz|pl|si
00067                 
00068                         $LANG_KEY_MAP = Array(
00069                                 'dk'=>'da',
00070                                 'de'=>'de',
00071                                 'no'=>'no',
00072                                 'it'=>'it',
00073                                 'fr'=>'fr',
00074                                 'es'=>'es',
00075                                 'nl'=>'nl',
00076                                 'cz'=>'cs-iso',
00077                                 'pl'=>'pl',
00078                                 'si'=>'sk'
00079                         );
00080                         
00081                         $LANG_KEY = $LANG_KEY_MAP[$LANG->lang];
00082                         if (!$LANG_KEY) $LANG_KEY='en';
00083                                 
00084                                 // Redirecting, setting default database
00085                         $redirect = $this->MCONF['phpMyAdminSubDir'].$this->MCONF['phpMyAdminScript'].'?lang='.$LANG_KEY.'&db='.urlencode(TYPO3_db);
00086                         header('Location: '.$redirect); // Un-comment this line and enter the actual name of the subdirectory of your phpMyAdmin install!
00087                 } else {        // No configuration set:
00088                 
00089                         $this->doc = t3lib_div::makeInstance('mediumDoc');
00090                         $this->doc->backPath = $BACK_PATH;
00091                         $this->content=$this->doc->startPage($LANG->getLL('title'));
00092                         $this->content.=('
00093                 <h3>phpMyAdmin module was not installed</h3>
00094                 '.($this->MCONF['phpMyAdminSubDir'] && !@is_dir($this->MCONF['phpMyAdminSubDir'])?'<hr /><strong>ERROR: The directory, '.$this->MCONF['phpMyAdminSubDir'].', was NOT found!</strong><HR>':'').'
00095                 <ol>
00096                 <li>First, install phpMyAdmin in a subdir to this module (eg. typo3/mod/tools/phpadmin/<strong>phpMyAdmin-2.2.6/</strong>)</li>
00097                 <li><font color=red><strong>Very important for security:</strong></font> Secondly, alter the phpMyAdmin file "config.inc.php" by inserting this line in the very bottom: <br /><br />
00098                 include("../extModInclude.php");<br /><br />This file will override some of the phpMyAdmin configuration.</li>
00099                 <li>Then alter "conf.php" by un-commenting the line that defines the module is installed. Enter the correct path here as well!</li>
00100                 </ol>
00101                         ');
00102                         $this->content.=$this->doc->endPage();
00103                 }
00104         }
00105         function printContent() {
00106                 echo $this->content     ;
00107         }
00108 }
00109 
00110 // Include extension?
00111 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/phpmyadmin/modsub/index.php']) {
00112         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/phpmyadmin/modsub/index.php']);
00113 }
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 // Make instance:
00124 $SOBE = t3lib_div::makeInstance('SC_mod_tools_phpadmin_index');
00125 $SOBE->main();
00126 $SOBE->printContent();
00127 ?>


Généré par Le spécialiste TYPO3 avec  doxygen 1.4.6