Updated years from 2004 to 2005 + all function indexes. NO actual code changes done!
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_fullsearch.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 * Class used in module tools/dbint (advanced search) and which may hold code specific for that module
29 * However the class has a general principle in it which may be used in the web/export module.
30 *
31 * $Id$
32 *
33 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
34 */
35 /**
36 * [CLASS/FUNCTION INDEX of SCRIPT]
37 *
38 *
39 *
40 * 83: class t3lib_fullsearch
41 * 98: function form()
42 * 112: function makeStoreControl()
43 * 151: function initStoreArray()
44 * 171: function cleanStoreQueryConfigs($storeQueryConfigs,$storeArray)
45 * 188: function addToStoreQueryConfigs($storeQueryConfigs,$index)
46 * 204: function saveQueryInAction($uid)
47 * 251: function loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray)
48 * 267: function procesStoreControl()
49 * 339: function queryMaker()
50 * 402: function getQueryResultCode($mQ,$res,$table)
51 * 509: function csvValues($row,$delim=",",$quote='"')
52 * 519: function tableWrap($str)
53 * 528: function search()
54 * 583: function resultRowDisplay($row,$conf,$table)
55 * 606: function resultRowTitles($row,$conf,$table)
56 *
57 * TOTAL FUNCTIONS: 15
58 * (This index is automatically created/updated by the extension "extdeveval")
59 *
60 */
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75 /**
76 * Class used in module tools/dbint (advanced search) and which may hold code specific for that module
77 * However the class has a general principle in it which may be used in the web/export module.
78 *
79 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
80 * @package TYPO3
81 * @subpackage t3lib
82 */
83 class t3lib_fullsearch {
84 var $storeList = "search_query_smallparts,queryConfig,queryTable,queryFields,queryLimit,queryOrder,queryOrderDesc,queryOrder2,queryOrder2Desc,queryGroup,search_query_makeQuery";
85 var $downloadScript = "index.php";
86 var $formW=48;
87 var $noDownloadB=0;
88
89
90
91
92
93 /**
94 * [Describe function...]
95 *
96 * @return [type] ...
97 */
98 function form() {
99 $out='
100 Search Word:<BR>
101 <input type="text" name="SET[sword]" value="'.htmlspecialchars($GLOBALS["SOBE"]->MOD_SETTINGS["sword"]).'"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(20).'><input type="submit" name="submit" value="Search All Records">
102 ';
103
104 return $out;
105 }
106
107 /**
108 * [Describe function...]
109 *
110 * @return [type] ...
111 */
112 function makeStoreControl() {
113 // Load/Save
114 $storeArray = $this->initStoreArray();
115 $cur="";
116
117 // Store Array:
118 $opt=array();
119 reset($storeArray);
120 while(list($k,$v)=each($storeArray)) {
121 $opt[]='<option value="'.$k.'"'.(!strcmp($cur,$v)?" selected":"").'>'.htmlspecialchars($v).'</option>';
122 }
123
124 // Actions:
125 if (t3lib_extMgm::isLoaded("sys_action")) {
126 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_action', 'type=2', '', 'title');
127 if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
128 $opt[]='<option value="0">__Save to Action:__</option>';
129 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
130 $opt[]='<option value="-'.$row["uid"].'"'.(!strcmp($cur,"-".$row["uid"])?" selected":"").'>'.htmlspecialchars($row["title"]." [".$row["uid"]."]").'</option>';
131 }
132 }
133 $GLOBALS['TYPO3_DB']->sql_free_result($res);
134 }
135
136 $TDparams=' nowrap="nowrap" class="bgColor4"';
137 $tmpCode='
138 <table border=0 cellpadding=3 cellspacing=1>
139 <tr'.$TDparams.'><td><select name="storeControl[STORE]" onChange="document.forms[0][\'storeControl[title]\'].value= this.options[this.selectedIndex].value!=0 ? this.options[this.selectedIndex].text : \'\';">'.implode(chr(10),$opt).'</select><input type="submit" name="storeControl[LOAD]" value="Load"></td></tr>
140 <tr'.$TDparams.'><td nowrap><input name="storeControl[title]" value="" type="text" max=80'.$GLOBALS["SOBE"]->doc->formWidth().'><input type="submit" name="storeControl[SAVE]" value="Save" onClick="if (document.forms[0][\'storeControl[STORE]\'].options[document.forms[0][\'storeControl[STORE]\'].selectedIndex].value<0) return confirm(\'Are you sure you want to overwrite the existing query in this action?\');"><input type="submit" name="storeControl[REMOVE]" value="Remove"></td></tr>
141 </table>
142 ';
143 return $tmpCode;
144 }
145
146 /**
147 * [Describe function...]
148 *
149 * @return [type] ...
150 */
151 function initStoreArray() {
152 $storeArray=array(
153 "0" => "[New]"
154 );
155
156 $savedStoreArray = unserialize($GLOBALS["SOBE"]->MOD_SETTINGS["storeArray"]);
157
158 if (is_array($savedStoreArray)) {
159 $storeArray = array_merge($storeArray,$savedStoreArray);
160 }
161 return $storeArray;
162 }
163
164 /**
165 * [Describe function...]
166 *
167 * @param [type] $storeQueryConfigs: ...
168 * @param [type] $storeArray: ...
169 * @return [type] ...
170 */
171 function cleanStoreQueryConfigs($storeQueryConfigs,$storeArray) {
172 if (is_array($storeQueryConfigs)) {
173 reset($storeQueryConfigs);
174 while(list($k,$v)=each($storeQueryConfigs)) {
175 if (!isset($storeArray[$k])) unset($storeQueryConfigs[$k]);
176 }
177 }
178 return $storeQueryConfigs;
179 }
180
181 /**
182 * [Describe function...]
183 *
184 * @param [type] $storeQueryConfigs: ...
185 * @param [type] $index: ...
186 * @return [type] ...
187 */
188 function addToStoreQueryConfigs($storeQueryConfigs,$index) {
189 $keyArr = explode(",",$this->storeList);
190 reset($keyArr);
191 $storeQueryConfigs[$index]=array();
192 while(list(,$k)=each($keyArr)) {
193 $storeQueryConfigs[$index][$k]=$GLOBALS["SOBE"]->MOD_SETTINGS[$k];
194 }
195 return $storeQueryConfigs;
196 }
197
198 /**
199 * [Describe function...]
200 *
201 * @param [type] $uid: ...
202 * @return [type] ...
203 */
204 function saveQueryInAction($uid) {
205 if (t3lib_extMgm::isLoaded("sys_action")) {
206 $keyArr = explode(",",$this->storeList);
207 reset($keyArr);
208 $saveArr=array();
209 while(list(,$k)=each($keyArr)) {
210 $saveArr[$k]=$GLOBALS["SOBE"]->MOD_SETTINGS[$k];
211 }
212
213 $qOK = 0;
214 // Show query
215 if ($saveArr["queryTable"]) {
216 $qGen = t3lib_div::makeInstance("t3lib_queryGenerator");
217 $qGen->init("queryConfig",$saveArr["queryTable"]);
218 $qGen->makeSelectorTable($saveArr);
219
220 $qGen->enablePrefix=1;
221 $qString = $qGen->getQuery($qGen->queryConfig);
222 $qCount = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', $qGen->table, $qString.t3lib_BEfunc::deleteClause($qGen->table));
223 $qSelect = $qGen->getSelectQuery($qString);
224
225 $res = @$GLOBALS['TYPO3_DB']->sql(TYPO3_db,$qCount);
226 if (!$GLOBALS['TYPO3_DB']->sql_error()) {
227 $dA = array();
228 $dA["t2_data"] = serialize(array(
229 "qC"=>$saveArr,
230 "qCount" => $qCount,
231 "qSelect" => $qSelect,
232 "qString" => $qString
233 ));
234 $GLOBALS['TYPO3_DB']->exec_UPDATEquery("sys_action", "uid=".intval($uid), $dA);
235 $qOK=1;
236 }
237 }
238
239 return $qOK;
240 }
241 }
242
243 /**
244 * [Describe function...]
245 *
246 * @param [type] $storeQueryConfigs: ...
247 * @param [type] $storeIndex: ...
248 * @param [type] $writeArray: ...
249 * @return [type] ...
250 */
251 function loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray) {
252 if ($storeQueryConfigs[$storeIndex]) {
253 $keyArr = explode(",",$this->storeList);
254 reset($keyArr);
255 while(list(,$k)=each($keyArr)) {
256 $writeArray[$k]=$storeQueryConfigs[$storeIndex][$k];
257 }
258 }
259 return $writeArray;
260 }
261
262 /**
263 * [Describe function...]
264 *
265 * @return [type] ...
266 */
267 function procesStoreControl() {
268 $storeArray = $this->initStoreArray();
269 $storeQueryConfigs = unserialize($GLOBALS["SOBE"]->MOD_SETTINGS["storeQueryConfigs"]);
270
271 $storeControl = t3lib_div::_GP("storeControl");
272 $storeIndex = intval($storeControl["STORE"]);
273 $saveStoreArray=0;
274 $writeArray=array();
275 if (is_array($storeControl)) {
276 if ($storeControl["LOAD"]) {
277 if ($storeIndex>0) {
278 $writeArray=$this->loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray);
279 $saveStoreArray=1;
280 $msg="'".htmlspecialchars($storeArray[$storeIndex])."' query loaded!";
281 } elseif ($storeIndex<0 && t3lib_extMgm::isLoaded("sys_action")) {
282 $actionRecord=t3lib_BEfunc::getRecord("sys_action",abs($storeIndex));
283 if (is_array($actionRecord)) {
284 $dA = unserialize($actionRecord["t2_data"]);
285 $dbSC=array();
286 if (is_array($dA["qC"])) {
287 $dbSC[0] = $dA["qC"];
288 }
289 $writeArray=$this->loadStoreQueryConfigs($dbSC,"0",$writeArray);
290 $saveStoreArray=1;
291 $acTitle=htmlspecialchars($actionRecord["title"]);
292 $msg="Query from action '".$acTitle."' loaded!";
293 }
294 }
295 } elseif ($storeControl["SAVE"]) {
296 if ($storeIndex<0) {
297 $qOK = $this->saveQueryInAction(abs($storeIndex));
298 if ($qOK) {
299 $msg="Query OK and saved.";
300 } else {
301 $msg="No query saved!";
302 }
303 } else {
304 if (trim($storeControl["title"])) {
305 if ($storeIndex>0) {
306 $storeArray[$storeIndex]=$storeControl["title"];
307 } else {
308 $storeArray[]=$storeControl["title"];
309 end($storeArray);
310 $storeIndex=key($storeArray);
311 }
312 $storeQueryConfigs=$this->addToStoreQueryConfigs($storeQueryConfigs,$storeIndex);
313 $saveStoreArray=1;
314 $msg="'".htmlspecialchars($storeArray[$storeIndex])."' query saved!";
315 }
316 }
317 } elseif ($storeControl["REMOVE"]) {
318 if ($storeIndex>0) {
319 $msg="'".$storeArray[$storeControl["STORE"]]."' query entry removed!";
320 unset($storeArray[$storeControl["STORE"]]); // Removing
321 $saveStoreArray=1;
322 }
323 }
324 }
325 if ($saveStoreArray) {
326 unset($storeArray[0]); // making sure, index 0 is not set!
327 $writeArray["storeArray"]=serialize($storeArray);
328 $writeArray["storeQueryConfigs"]=serialize($this->cleanStoreQueryConfigs($storeQueryConfigs,$storeArray));
329 $GLOBALS["SOBE"]->MOD_SETTINGS = t3lib_BEfunc::getModuleData($GLOBALS["SOBE"]->MOD_MENU, $writeArray, $GLOBALS["SOBE"]->MCONF["name"], "ses");
330 }
331 return $msg;
332 }
333
334 /**
335 * [Describe function...]
336 *
337 * @return [type] ...
338 */
339 function queryMaker() {
340 global $TCA;
341
342 $msg=$this->procesStoreControl();
343
344 $output.= $GLOBALS["SOBE"]->doc->section('Load/Save Query',$this->makeStoreControl(),0,1);
345 if ($msg) {
346 $output.= $GLOBALS["SOBE"]->doc->section('','<font color=red><strong>'.$msg.'</strong></font>');
347 }
348 $output.= $GLOBALS["SOBE"]->doc->spacer(20);
349
350
351 // Query Maker:
352 $qGen = t3lib_div::makeInstance("t3lib_queryGenerator");
353 $qGen->init("queryConfig",$GLOBALS["SOBE"]->MOD_SETTINGS["queryTable"]);
354 $tmpCode=$qGen->makeSelectorTable($GLOBALS["SOBE"]->MOD_SETTINGS);
355 $output.= $GLOBALS["SOBE"]->doc->section('Make query',$tmpCode,0,1);
356
357 $mQ = $GLOBALS["SOBE"]->MOD_SETTINGS["search_query_makeQuery"];
358
359 // Make form elements:
360 if ($qGen->table && is_array($TCA[$qGen->table])) {
361 if ($mQ) {
362 // Show query
363 $qGen->enablePrefix=1;
364 $qString = $qGen->getQuery($qGen->queryConfig);
365 // debug($qGen->queryConfig);
366
367 switch($mQ) {
368 case "count":
369 $qExplain = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', $qGen->table, $qString.t3lib_BEfunc::deleteClause($qGen->table));
370 break;
371 default:
372 $qExplain = $qGen->getSelectQuery($qString);
373 if ($mQ=="explain") {
374 $qExplain="EXPLAIN ".$qExplain;
375 }
376 break;
377 }
378
379 $output.= $GLOBALS["SOBE"]->doc->section('SQL query',$this->tableWrap(htmlspecialchars($qExplain)),0,1);
380
381 $res = @$GLOBALS['TYPO3_DB']->sql(TYPO3_db,$qExplain);
382 if ($GLOBALS['TYPO3_DB']->sql_error()) {
383 $out.="<BR><strong>Error:</strong><BR><font color=red><strong>".$GLOBALS['TYPO3_DB']->sql_error()."</strong></font>";
384 $output.= $GLOBALS["SOBE"]->doc->section('SQL error',$out,0,1);
385 } else {
386 $cPR = $this->getQueryResultCode($mQ,$res,$qGen->table);
387 $output.=$GLOBALS["SOBE"]->doc->section($cPR["header"],$cPR["content"],0,1);
388 }
389 }
390 }
391 return $output;
392 }
393
394 /**
395 * [Describe function...]
396 *
397 * @param [type] $mQ: ...
398 * @param [type] $res: ...
399 * @param [type] $table: ...
400 * @return [type] ...
401 */
402 function getQueryResultCode($mQ,$res,$table) {
403 global $TCA;
404 $output="";
405 $cPR=array();
406 switch($mQ) {
407 case "count":
408 $row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
409 $cPR["header"]='Count';
410 $cPR["content"]="<BR><strong>".$row[0]. "</strong> records selected.";
411 break;
412 case "all":
413 $rowArr=array();
414 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
415 $rowArr[]=$this->resultRowDisplay($row,$TCA[$table],$table);
416 $lrow=$row;
417 }
418 if (count($rowArr)) {
419 $out.="<table border=0 cellpadding=2 cellspacing=1>".$this->resultRowTitles($lrow,$TCA[$table],$table).implode(chr(10),$rowArr)."</table>";
420 }
421 if (!$out) $out="<em>No rows selected!</em>";
422 $cPR["header"]='Result';
423 $cPR["content"]=$out;
424 break;
425 case "csv":
426 $rowArr=array();
427 $first=1;
428 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
429 if ($first) {
430 $rowArr[]=$this->csvValues(array_keys($row),",","");
431 $first=0;
432 }
433 $rowArr[]=$this->csvValues($row);
434 }
435 if (count($rowArr)) {
436 $out.='<textarea name="whatever" rows="20" wrap="off"'.$GLOBALS["SOBE"]->doc->formWidthText($this->formW,"","off").'>'.t3lib_div::formatForTextarea(implode(chr(10),$rowArr)).'</textarea>';
437 if (!$this->noDownloadB) {
438 $out.='<BR><input type="submit" name="download_file" value="Click to download file" onClick="document.location=\''.$this->downloadScript.'\';">'; // document.forms[0].target=\'_blank\';
439 }
440 // Downloads file:
441 if (t3lib_div::_GP("download_file")) {
442 $filename="TYPO3_".$table."_export_".date("dmy-Hi").".csv";
443 $mimeType = "application/octet-stream";
444 Header("Content-Type: ".$mimeType);
445 Header("Content-Disposition: attachment; filename=".$filename);
446 echo implode(chr(13).chr(10),$rowArr);
447 exit;
448 }
449 }
450 if (!$out) $out="<em>No rows selected!</em>";
451 $cPR["header"]='Result';
452 $cPR["content"]=$out;
453 break;
454 case "xml":
455 $className=t3lib_div::makeInstanceClassName("t3lib_xml");
456 $xmlObj = new $className("typo3_export");
457 $xmlObj->includeNonEmptyValues=1;
458 $xmlObj->renderHeader();
459 $first=1;
460 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
461 if ($first) {
462 $xmlObj->setRecFields($table,implode(",",array_keys($row)));
463 // debug($xmlObj->XML_recFields);
464 $first=0;
465 }
466 $xmlObj->addRecord($table,$row);
467 }
468 $xmlObj->renderFooter();
469 if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
470 $xmlData=$xmlObj->getResult();
471 $out.='<textarea name="whatever" rows="20" wrap="off"'.$GLOBALS["SOBE"]->doc->formWidthText($this->formW,"","off").'>'.t3lib_div::formatForTextarea($xmlData).'</textarea>';
472 if (!$this->noDownloadB) {
473 $out.='<BR><input type="submit" name="download_file" value="Click to download file" onClick="document.location=\''.$this->downloadScript.'\';">'; // document.forms[0].target=\'_blank\';
474 }
475 // Downloads file:
476 if (t3lib_div::_GP("download_file")) {
477 $filename="TYPO3_".$table."_export_".date("dmy-Hi").".xml";
478 $mimeType = "application/octet-stream";
479 Header("Content-Type: ".$mimeType);
480 Header("Content-Disposition: attachment; filename=".$filename);
481 echo $xmlData;
482 exit;
483 }
484 }
485 if (!$out) $out="<em>No rows selected!</em>";
486 $cPR["header"]='Result';
487 $cPR["content"]=$out;
488 break;
489 case "explain":
490 default:
491 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
492 $out.="<BR>".t3lib_div::view_array($row);
493 }
494 $cPR["header"]='Explain SQL query';
495 $cPR["content"]=$out;
496 break;
497 }
498 return $cPR;
499 }
500
501 /**
502 * [Describe function...]
503 *
504 * @param [type] $row: ...
505 * @param [type] $delim: ...
506 * @param [type] $quote: ...
507 * @return [type] ...
508 */
509 function csvValues($row,$delim=",",$quote='"') {
510 return t3lib_div::csvValues($row,$delim,$quote);
511 }
512
513 /**
514 * [Describe function...]
515 *
516 * @param [type] $str: ...
517 * @return [type] ...
518 */
519 function tableWrap($str) {
520 return '<table border=0 cellpadding=10 cellspacing=0 class="bgColor4"><tr><td nowrap><pre>'.$str.'</pre></td></tr></table>';
521 }
522
523 /**
524 * [Describe function...]
525 *
526 * @return [type] ...
527 */
528 function search() {
529 global $TCA;
530 $SET = t3lib_div::_GP("SET");
531 $swords = $SET["sword"];
532
533 $limit=200;
534 $showAlways=0;
535 if ($swords) {
536 reset($TCA);
537 while(list($table)=each($TCA)) {
538 // Get fields list
539 t3lib_div::loadTCA($table);
540 $conf=$TCA[$table];
541
542 reset($conf["columns"]);
543 $list=array();
544 while(list($field,)=each($conf["columns"])) {
545 $list[]=$field;
546 }
547 // Get query
548 $qp = $GLOBALS['TYPO3_DB']->searchQuery(array($swords), $list, $table);
549
550 // Count:
551 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', $table, $qp.t3lib_BEfunc::deleteClause($table));
552 list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
553 if($count || $showAlways) {
554 // Output header:
555 $out.="<strong>TABLE:</strong> ".$GLOBALS["LANG"]->sL($conf["ctrl"]["title"])."<BR>";
556 $out.="<strong>Results:</strong> ".$count."<BR>";
557
558 // Show to limit
559 if ($count) {
560 $rowArr = array();
561 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,pid,'.$conf['ctrl']['label'], $table, $qp.t3lib_BEfunc::deleteClause($table), '', '', $limit);
562 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
563 $rowArr[]=$this->resultRowDisplay($row,$conf,$table);
564 $lrow=$row;
565 }
566 $out.="<table border=0 cellpadding=2 cellspacing=1>".$this->resultRowTitles($lrow,$conf,$table).implode(chr(10),$rowArr)."</table>";
567 }
568 $out.="<HR>";
569 }
570 }
571 }
572 return $out;
573 }
574
575 /**
576 * [Describe function...]
577 *
578 * @param [type] $row: ...
579 * @param [type] $conf: ...
580 * @param [type] $table: ...
581 * @return [type] ...
582 */
583 function resultRowDisplay($row,$conf,$table) {
584 $out='<tr class="bgColor4">';
585 reset($row);
586 while(list($fN,$fV)=each($row)) {
587 $TDparams = " nowrap";
588 $fVnew = t3lib_BEfunc::getProcessedValueExtra($table,$fN,$fV);
589 $out.='<td'.$TDparams.'>'.htmlspecialchars($fVnew).'</td>';
590 }
591 $params = '&edit['.$table.']['.$row["uid"].']=edit';
592 $out.='<td nowrap><A HREF="#" onClick="top.launchView(\''.$table.'\','.$row["uid"].',\''.$GLOBALS["BACK_PATH"].'\');return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/zoom2.gif" width="12" height="12" alt="" /></a><A HREF="#" onClick="'.t3lib_BEfunc::editOnClick($params,$GLOBALS["BACK_PATH"],t3lib_div::getIndpEnv("REQUEST_URI").t3lib_div::implodeArrayForUrl("SET",t3lib_div::_POST("SET"))).'"><img src="'.$GLOBALS["BACK_PATH"].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a></td>
593 </tr>
594 ';
595 return $out;
596 }
597
598 /**
599 * [Describe function...]
600 *
601 * @param [type] $row: ...
602 * @param [type] $conf: ...
603 * @param [type] $table: ...
604 * @return [type] ...
605 */
606 function resultRowTitles($row,$conf,$table) {
607 $out='<tr class="bgColor5">';
608 reset($row);
609 while(list($fN,$fV)=each($row)) {
610 if (strlen($fV)<50) {$TDparams = " nowrap";} else {$TDparams = "";}
611 $out.='<td'.$TDparams.'><strong>'.$GLOBALS["LANG"]->sL($conf["columns"][$fN]["label"]?$conf["columns"][$fN]["label"]:$fN,1).'</strong></td>';
612 }
613 $out.='<td nowrap></td>
614 </tr>
615 ';
616 return $out;
617 }
618 }
619
620 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_fullsearch.php"]) {
621 include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_fullsearch.php"]);
622 }
623 ?>