00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00042
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
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'])) {
00064
00065
00066
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
00085 $redirect = $this->MCONF['phpMyAdminSubDir'].$this->MCONF['phpMyAdminScript'].'?lang='.$LANG_KEY.'&db='.urlencode(TYPO3_db);
00086 header('Location: '.$redirect);
00087 } else {
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
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
00124 $SOBE = t3lib_div::makeInstance('SC_mod_tools_phpadmin_index');
00125 $SOBE->main();
00126 $SOBE->printContent();
00127 ?>