Rearrangement of refindex
[Packages/TYPO3.CMS.git] / typo3 / sysext / lowlevel / dbint / index.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Module: Database integrity check
29 *
30 * This module lets you check if all pages and the records relate properly to each other
31 *
32 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
33 */
34
35
36 unset($MCONF);
37 require ('conf.php');
38 require ($BACK_PATH.'init.php');
39 require ($BACK_PATH.'template.php');
40 require_once (PATH_t3lib.'class.t3lib_admin.php');
41 require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
42 require_once (PATH_t3lib.'class.t3lib_querygenerator.php');
43 require_once (PATH_t3lib.'class.t3lib_xml.php');
44 require_once (PATH_t3lib.'class.t3lib_fullsearch.php');
45 require_once (PATH_t3lib.'class.t3lib_refindex.php');
46
47 $BE_USER->modAccess($MCONF,1);
48
49
50
51 // **************************
52 // Setting english (ONLY!) LOCAL_LANG
53 // **************************
54 $LOCAL_LANG = Array (
55 'default' => Array (
56 'tables' => 'Tables:',
57 'fixLostRecord' => 'Click to move this lost record to rootlevel (pid=0)',
58
59 'doktype' => 'Document types:',
60 'pages' => 'Pages:',
61 'total_pages' => 'Total number of pages:',
62 'deleted_pages' => 'Marked-deleted pages:',
63 'hidden_pages' => 'Hidden pages:',
64 'relations' => 'Relations:',
65 'relations_description' => 'This will analyse the content of the tables and check if there are \'empty\' relations between records or if files are missing from their expected position.',
66
67 'files_many_ref' => 'Files referenced from more than one record:',
68 'files_no_ref' => 'Files with no references at all (delete them!):',
69 'files_no_file' => 'Missing files:',
70 'select_db' => 'Select fields:',
71 'group_db' => 'Group fields:',
72
73 'tree' => 'The Page Tree:',
74 'tree_description' => 'This shows all pages in the system in one large tree. Beware that this will probably result in a very long document which will also take some time for the server to compute!',
75 'records' => 'Records Statistics:',
76 'records_description' => 'This shows some statistics for the records in the database. This runs through the entire page-tree and therefore it will also load the server heavily!',
77 'search' => 'Search Whole Database',
78 'search_description' => 'This searches through all database tables and records for a text string.',
79 'filesearch' => 'Search all filenames for pattern',
80 'filesearch_description' => 'Will search recursively for filenames in the PATH_site (subdirs to the website path) matching a certain regex pattern.',
81 'title' => 'Database integrity check'
82 )
83 );
84
85
86
87
88
89 // ***************************
90 // Script Classes
91 // ***************************
92 class SC_mod_tools_dbint_index {
93 var $MCONF=array();
94 var $MOD_MENU=array();
95 var $MOD_SETTINGS=array();
96 var $doc;
97
98 var $content;
99 var $menu;
100
101 /**
102 * @return [type] ...
103 */
104 function init() {
105 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
106 $this->MCONF = $GLOBALS['MCONF'];
107
108 $this->menuConfig();
109
110 $this->doc = t3lib_div::makeInstance('mediumDoc');
111 $this->doc->form='<form action="" method="POST">';
112 $this->doc->backPath = $BACK_PATH;
113 // JavaScript
114 $this->doc->JScode = '
115 <script language="javascript" type="text/javascript">
116 script_ended = 0;
117 function jumpToUrl(URL) {
118 document.location = URL;
119 }
120 </script>
121 ';
122 $this->doc->tableLayout = Array (
123 'defRow' => Array (
124 '0' => Array('<td valign="top">','</td>'),
125 '1' => Array('<td valign="top">','</td>'),
126 'defCol' => Array('<TD><img src="'.$this->doc->backPath.'clear.gif" width="15" height="1"></td><td valign="top">','</td>')
127 )
128 );
129 }
130
131 /**
132 * @return [type] ...
133 */
134 function menuConfig() {
135 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
136
137 // MENU-ITEMS:
138 // If array, then it's a selector box menu
139 // If empty string it's just a variable, that'll be saved.
140 // Values NOT in this array will not be saved in the settings-array for the module.
141 $this->MOD_MENU = array(
142 'function' => array(
143 0 => '[ MENU ]',
144 'records' => 'Record Statistics',
145 'tree' => 'Total Page Tree',
146 'relations' => 'Database Relations',
147 'search' => 'Full search',
148 'filesearch' => 'Find filename',
149 'refindex' => 'Manage Reference Index',
150 ),
151 'search' => array(
152 'raw' => 'Raw search in all fields',
153 'query' => 'Advanced query'
154 ),
155
156 'search_query_smallparts' => '',
157
158 'queryConfig' => '', // Current query
159 'queryTable' => '', // Current table
160 'queryFields' => '', // Current tableFields
161 'queryLimit' => '', // Current limit
162 'queryOrder' => '', // Current Order field
163 'queryOrderDesc' => '', // Current Order field descending flag
164 'queryOrder2' => '', // Current Order2 field
165 'queryOrder2Desc' => '', // Current Order2 field descending flag
166 'queryGroup' => '', // Current Group field
167
168 'storeArray' => '', // Used to store the available Query config memory banks
169 'storeQueryConfigs' => '', // Used to store the available Query configs in memory
170
171 'search_query_makeQuery' => array(
172 'all' => 'Select records',
173 'count' => 'Count results',
174 'explain' => 'Explain query',
175 'csv' => 'CSV Export',
176 'xml' => 'XML Export'
177 ),
178
179 'sword' => ''
180 );
181 // CLEANSE SETTINGS
182 $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
183
184 if (t3lib_div::_GP('queryConfig')) {
185 $qA = t3lib_div::_GP('queryConfig');
186 $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, array('queryConfig'=>serialize($qA)), $this->MCONF['name'], 'ses');
187 }
188 }
189
190 /**
191 * @return [type] ...
192 */
193 function main() {
194 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
195
196 // **************************
197 // Content creation
198 // **************************
199 $this->content.=$this->doc->startPage($LANG->getLL('title'));
200 $this->menu=t3lib_BEfunc::getFuncMenu(0,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']);
201
202 switch($this->MOD_SETTINGS['function']) {
203 case 'search':
204 $this->func_search();
205 break;
206 case 'tree':
207 $this->func_tree();
208 break;
209 case 'records':
210 $this->func_records();
211 break;
212 case 'relations':
213 $this->func_relations();
214 break;
215 case 'filesearch':
216 $this->func_filesearch();
217 break;
218 case 'refindex':
219 $this->func_refindex();
220 break;
221 default:
222 $this->func_default();
223 break;
224 }
225
226 if ($BE_USER->mayMakeShortcut()) {
227 $this->content.=$this->doc->spacer(20).
228 $this->doc->section('',$this->doc->makeShortcutIcon('','function,search,search_query_makeQuery',$this->MCONF['name']));
229 }
230 }
231
232 /**
233 * @return [type] ...
234 */
235 function printContent() {
236
237 $this->content.=$this->doc->endPage();
238 echo $this->content;
239 }
240
241 function func_refindex() {
242 global $TCA,$TYPO3_DB;
243
244 $this->content.=$this->doc->section('',$this->menu);//$this->doc->divider(5);
245 $this->content.=$this->doc->section('',$menu2).$this->doc->spacer(10);
246
247 if (t3lib_div::_GP('_update') || t3lib_div::_GP('_check')) {
248 $testOnly = t3lib_div::_GP('_check')?TRUE:FALSE;
249
250 // Call the functionality
251 $refIndexObj = t3lib_div::makeInstance('t3lib_refindex');
252 list($headerContent,$bodyContent) = $refIndexObj->updateIndex($testOnly);
253
254 // Output content:
255 $this->content.=$this->doc->section($headerContent,str_replace(chr(10),'<br/>',$bodyContent),0,1);
256 }
257
258 // Output content:
259 $content = 'Click here to update reference index: <input type="submit" name="_update" value="Update now!" /><br/>';
260 $content.= 'Click here to test reference index: <input type="submit" name="_check" value="Check now!" /><br/>';
261 $content.= 'You can also run the check as a shell script if the processing takes longer than the PHP max_execution_time allows:<br/>'.
262 t3lib_extMgm::extPath('lowlevel').'dbint/cli/refindex_cli.phpsh';
263 $this->content.=$this->doc->section('Update reference index',$content,0,1);
264 }
265
266 /**
267 * @return [type] ...
268 */
269 function func_search() {
270 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
271
272 $fullsearch = t3lib_div::makeInstance('t3lib_fullsearch');
273 $this->content.=$this->doc->header($LANG->getLL('search'));
274 $this->content.=$this->doc->spacer(5);
275
276 $menu2=t3lib_BEfunc::getFuncMenu(0,'SET[search]',$this->MOD_SETTINGS['search'],$this->MOD_MENU['search']);
277 if ($this->MOD_SETTINGS['search']=='query') {
278 $menu2.=t3lib_BEfunc::getFuncMenu(0,'SET[search_query_makeQuery]',$this->MOD_SETTINGS['search_query_makeQuery'],$this->MOD_MENU['search_query_makeQuery']).
279 '&nbsp;'.t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id,'SET[search_query_smallparts]',$this->MOD_SETTINGS['search_query_smallparts']).'&nbsp;Show SQL parts';
280 }
281 $this->content.=$this->doc->section('',$this->menu);//$this->doc->divider(5);
282 $this->content.=$this->doc->section('',$menu2).$this->doc->spacer(10);
283
284 switch($this->MOD_SETTINGS['search']) {
285 case 'query':
286 $this->content.=$fullsearch->queryMaker();
287 break;
288 case 'raw':
289 default:
290 $this->content.=$this->doc->section('Search options:',$fullsearch->form(),0,1);
291 $this->content.=$this->doc->section('Result:',$fullsearch->search(),0,1);
292 break;
293 }
294 }
295
296 /**
297 * @return [type] ...
298 */
299 function func_tree() {
300 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
301
302 $startID=0;
303 $admin = t3lib_div::makeInstance('t3lib_admin');
304 $admin->genTree_makeHTML=1;
305 $admin->backPath = $BACK_PATH;
306 $admin->genTree(intval($startID),'<img src="'.$BACK_PATH.'clear.gif" width="1" height="1" align="top">');
307
308 $this->content.=$this->doc->header($LANG->getLL('tree'));
309 $this->content.=$this->doc->spacer(5);
310 $this->content.=$this->doc->section('',$this->menu).$this->doc->divider(5);
311 $this->content.=$this->doc->sectionEnd();
312
313 $this->content.=$admin->genTree_HTML;
314 $this->content.=$admin->lostRecords($admin->genTree_idlist.'0');
315 }
316
317 /**
318 * @return [type] ...
319 */
320 function func_records() {
321 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
322 global $PAGES_TYPES;
323
324 $admin = t3lib_div::makeInstance('t3lib_admin');
325 $admin->genTree_makeHTML=0;
326 $admin->backPath = $BACK_PATH;
327 $admin->genTree(0,'');
328
329 $this->content.=$this->doc->header($LANG->getLL('records'));
330 $this->content.=$this->doc->spacer(5);
331 $this->content.=$this->doc->section('',$this->menu);
332
333 // Pages stat
334 $codeArr=Array();
335 $i++;
336 $codeArr[$i][]='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/i/pages.gif','width="18" height="16"').' hspace="4" align="top">';
337 $codeArr[$i][]=$LANG->getLL('total_pages');
338 $codeArr[$i][]=count($admin->page_idArray);
339 $i++;
340 if (t3lib_extMgm::isLoaded('cms')) {
341 $codeArr[$i][]='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/hidden_page.gif','width="18" height="16"').' hspace="4" align="top">';
342 $codeArr[$i][]=$LANG->getLL('hidden_pages');
343 $codeArr[$i][]=$admin->recStat['hidden'];
344 $i++;
345 }
346 $codeArr[$i][]='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/deleted_page.gif','width="18" height="16"').' hspace="4" align="top">';
347 $codeArr[$i][]=$LANG->getLL('deleted_pages');
348 $codeArr[$i][]=$admin->recStat['deleted'];
349
350 $this->content.=$this->doc->section($LANG->getLL('pages'),$this->doc->table($codeArr),0,1);
351
352 // Doktype
353 $codeArr=Array();
354 $doktype=$TCA['pages']['columns']['doktype']['config']['items'];
355 if (is_array($doktype)) {
356 reset($doktype);
357 while(list($n,$setup)=each($doktype)) {
358 if ($setup[1]!='--div--') {
359 $codeArr[$n][]='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/i/'.($PAGES_TYPES[$setup[1]]['icon'] ? $PAGES_TYPES[$setup[1]]['icon'] : $PAGES_TYPES['default']['icon']),'width="18" height="16"').' hspace="4" align="top">';
360 $codeArr[$n][]=$LANG->sL($setup[0]).' ('.$setup[1].')';
361 $codeArr[$n][]=intval($admin->recStat[doktype][$setup[1]]);
362 }
363 }
364 $this->content.=$this->doc->section($LANG->getLL('doktype'),$this->doc->table($codeArr),0,1);
365 }
366
367 // Tables and lost records
368 $id_list='0,'.implode($admin->page_idArray,',');
369 $id_list = t3lib_div::rm_endcomma($id_list);
370 $admin->lostRecords($id_list);
371 if ($admin->fixLostRecord(t3lib_div::_GET('fixLostRecords_table'),t3lib_div::_GET('fixLostRecords_uid'))) {
372 $admin = t3lib_div::makeInstance('admin_int');
373 $admin->backPath = $BACK_PATH;
374 $admin->genTree(0,'');
375 $id_list='0,'.implode($admin->page_idArray,',');
376 $id_list = t3lib_div::rm_endcomma($id_list);
377 $admin->lostRecords($id_list);
378 }
379
380 $codeArr=Array();
381 $countArr=$admin->countRecords($id_list);
382 if (is_array($TCA)) {
383 reset($TCA);
384 while(list($t)=each($TCA)) {
385 $codeArr[$t][]=t3lib_iconWorks::getIconImage($t,array(),$BACK_PATH,'hspace="4" align="top"');
386 $codeArr[$t][]=$LANG->sL($TCA[$t]['ctrl']['title']);
387 $codeArr[$t][]=$t;
388
389 if ($countArr['all'][$t]) {
390 $theNumberOfRe = intval($countArr['non_deleted'][$t]).'/'.(intval($countArr['all'][$t])-intval($countArr['non_deleted'][$t]));
391 } else {
392 $theNumberOfRe ='';
393 }
394 $codeArr[$t][]=$theNumberOfRe;
395
396 $lr='';
397 if (is_array($admin->lRecords[$t])) {
398 reset($admin->lRecords[$t]);
399 while(list(,$data)=each($admin->lRecords[$t])) {
400 if (!t3lib_div::inList($admin->lostPagesList,$data[pid])) {
401 $lr.='<nobr><b><a href="index.php?SET[function]=records&fixLostRecords_table='.$t.'&fixLostRecords_uid='.$data[uid].'"><img src="'.$BACK_PATH.'gfx/required_h.gif" width="10" hspace="3" height="10" border="0" align="top" title="'.$LANG->getLL('fixLostRecord').'"></a>uid:'.$data[uid].', pid:'.$data[pid].', '.t3lib_div::fixed_lgd(strip_tags($data[title]),20).'</b></nobr><br>';
402 } else {
403 $lr.='<nobr><img src="'.$BACK_PATH.'clear.gif" width="16" height="1" border="0"><font color="Gray">uid:'.$data[uid].', pid:'.$data[pid].', '.t3lib_div::fixed_lgd(strip_tags($data[title]),20).'</font></nobr><br>';
404 }
405 }
406 }
407 $codeArr[$t][]=$lr;
408 }
409 $this->content.=$this->doc->section($LANG->getLL('tables'),$this->doc->table($codeArr),0,1);
410 }
411 }
412
413 /**
414 * @return [type] ...
415 */
416 function func_relations() {
417 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
418
419 $this->content.=$this->doc->header($LANG->getLL('relations'));
420 $this->content.=$this->doc->spacer(5);
421 $this->content.=$this->doc->section('',$this->menu);
422
423 $admin = t3lib_div::makeInstance('t3lib_admin');
424 $admin->genTree_makeHTML=0;
425 $admin->backPath = $BACK_PATH;
426
427 $fkey_arrays = $admin->getGroupFields('');
428 $admin->selectNonEmptyRecordsWithFkeys($fkey_arrays);
429
430
431 $fileTest=$admin->testFileRefs();
432
433 $code='';
434 if (is_array($fileTest['noReferences'])) {
435 while(list(,$val)=each($fileTest['noReferences'])) {
436 $code.='<nobr>'.$val[0].'/<b>'.$val[1].'</b></nobr><br>';
437 }
438 }
439 $this->content.=$this->doc->section($LANG->getLL('files_no_ref'),$code,1,1);
440
441 $code='';
442 if (is_array($fileTest[moreReferences])) {
443 while(list(,$val)=each($fileTest['moreReferences'])) {
444 $code.='<nobr>'.$val[0].'/<b>'.$val[1].'</b>: '.$val[2].' references:</nobr><br>'.$val[3].'<br><br>';
445 }
446 }
447 $this->content.=$this->doc->section($LANG->getLL('files_many_ref'),$code,1,1);
448
449 $code='';
450 if (is_array($fileTest['noFile'])) {
451 ksort($fileTest['noFile']);
452 reset($fileTest['noFile']);
453 while(list(,$val)=each($fileTest['noFile'])) {
454 $code.='<nobr>'.$val[0].'/<b>'.$val[1].'</b> is missing! </nobr><br>Referenced from: '.$val[2].'<br><br>';
455 }
456 }
457 $this->content.=$this->doc->section($LANG->getLL('files_no_file'),$code,1,1);
458 $this->content.=$this->doc->section($LANG->getLL('select_db'),$admin->testDBRefs($admin->checkSelectDBRefs),1,1);
459 $this->content.=$this->doc->section($LANG->getLL('group_db'),$admin->testDBRefs($admin->checkGroupDBRefs),1,1);
460 }
461
462 /**
463 * Searching for files with a specific pattern
464 *
465 * @return [type] ...
466 */
467 function func_filesearch() {
468 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
469
470 $this->content.=$this->doc->header($LANG->getLL('relations'));
471 $this->content.=$this->doc->spacer(5);
472 $this->content.=$this->doc->section('',$this->menu);
473
474
475 $pattern = t3lib_div::_GP('pattern');
476 $pcontent='Enter regex pattern: <input type="text" name="pattern" value="'.htmlspecialchars($pattern?$pattern:$GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern']).'"> <input type="submit" name="Search">';
477 $this->content.=$this->doc->section('Pattern',$pcontent,0,1);
478
479 if (strcmp($pattern,'')) {
480 $dirs = t3lib_div::get_dirs(PATH_site);
481 # debug($dirs);
482 $lines=array();
483 $depth=10;
484
485 foreach ($dirs as $key => $value) {
486 $matching_files=array();
487 $info='';
488 if (!t3lib_div::inList('typo3,typo3conf,tslib,media,t3lib',$value)) {
489 $info = $this->findFile(PATH_site.$value.'/',$pattern,$matching_files,$depth);
490 }
491 if (is_array($info)) {
492 $lines[]='<hr><b>'.$value.'/</b> being checked...';
493 $lines[]='Dirs: '.$info[0];
494 if ($info[2]) $lines[]='<span class="typo3-red">ERROR: Directories deeper than '.$depth.' levels</span>';
495 $lines[]='Files: '.$info[1];
496 $lines[]='Matching files:<br><nobr><span class="typo3-red">'.implode('<br>',$matching_files).'</span></nobr>';
497 } else {
498 $lines[]=$GLOBALS['TBE_TEMPLATE']->dfw('<hr><b>'.$value.'/</b> not checked.');
499 }
500 }
501
502 $this->content.=$this->doc->section('Searching for filenames:',implode('<br>',$lines),0,1);
503 }
504 }
505
506 /**
507 * Searching for filename pattern recursively in the specified dir.
508 *
509 * @param [type] $basedir: ...
510 * @param [type] $pattern: ...
511 * @param [type] $matching_files: ...
512 * @param [type] $depth: ...
513 * @return [type] ...
514 */
515 function findFile($basedir,$pattern,&$matching_files,$depth) {
516 $files_searched=0;
517 $dirs_searched=0;
518 $dirs_error=0;
519
520 // Traverse files:
521 $files = t3lib_div::getFilesInDir($basedir,'',1);
522 if (is_array($files)) {
523 $files_searched+=count($files);
524 foreach ($files as $value) {
525 if (eregi($pattern,basename($value))) $matching_files[]=substr($value,strlen(PATH_site));
526 }
527 }
528
529
530 // Traverse subdirs
531 if ($depth>0) {
532 $dirs = t3lib_div::get_dirs($basedir);
533 if (is_array($dirs)) {
534 $dirs_searched+=count($dirs);
535
536 foreach ($dirs as $value) {
537 $inf= $this->findFile($basedir.$value.'/',$pattern,$matching_files,$depth-1);
538 $dirs_searched+=$inf[0];
539 $files_searched+=$inf[1];
540 $dirs_error=$inf[2];
541 }
542 }
543 } else {
544 $dirs = t3lib_div::get_dirs($basedir);
545 if (is_array($dirs) && count($dirs)) {
546 $dirs_error=1; // Means error - there were further subdirs!
547 }
548 }
549
550 return array($dirs_searched,$files_searched,$dirs_error);
551 }
552
553 /**
554 * Menu
555 *
556 * @return [type] ...
557 */
558 function func_default() {
559 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
560
561 $this->content.=$this->doc->header($LANG->getLL('title'));
562 $this->content.=$this->doc->spacer(5);
563 $this->content.=$this->doc->section('',$this->menu);
564 $this->content.=$this->doc->section('<a href="index.php?SET[function]=records">'.$LANG->getLL('records').'</a>',$LANG->getLL('records_description'),1,1,0,1);
565 $this->content.=$this->doc->section('<a href="index.php?SET[function]=tree">'.$LANG->getLL('tree').'</a>',$LANG->getLL('tree_description'),1,1,0,1);
566 $this->content.=$this->doc->section('<a href="index.php?SET[function]=relations">'.$LANG->getLL('relations').'</a>',$LANG->getLL('relations_description'),1,1,0,1);
567 $this->content.=$this->doc->section('<a href="index.php?SET[function]=search">'.$LANG->getLL('search').'</a>',$LANG->getLL('search_description'),1,1,0,1);
568 $this->content.=$this->doc->section('<a href="index.php?SET[function]=filesearch">'.$LANG->getLL('filesearch').'</a>',$LANG->getLL('filesearch_description'),1,1,0,1);
569 $this->content.=$this->doc->spacer(50);
570 }
571 }
572
573 // Include extension?
574 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/lowlevel/dbint/index.php']) {
575 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/lowlevel/dbint/index.php']);
576 }
577
578
579
580
581
582
583
584
585
586 // Make instance:
587 $SOBE = t3lib_div::makeInstance('SC_mod_tools_dbint_index');
588 $SOBE->init();
589 $SOBE->main();
590 $SOBE->printContent();
591 ?>