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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 class fileList extends t3lib_recordList {
00076 var $iLimit = 40;
00077 var $thumbs = 0;
00078 var $widthGif = '<img src="clear.gif" width="1" height="1" hspace="165" alt="" />';
00079 var $fixedL = 30;
00080 var $script = 'file_list.php';
00081 var $clickMenus=1;
00082
00083 var $sort = '';
00084 var $sortRev = 1;
00085 var $firstElementNumber=0;
00086 var $clipBoard = 0;
00087
00088
00089 var $JScode = '';
00090 var $HTMLcode = '';
00091 var $totalbytes=0;
00092 var $dirs = Array();
00093 var $files = Array();
00094 var $path = '';
00095 var $eCounter=0;
00096 var $dirCounter = 0;
00097 var $totalItems='';
00098
00099 var $CBnames=array();
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 function start($path,$pointer,$sort,$sortRev,$clipBoard=0) {
00114 $this->counter=0;
00115 $this->totalbytes=0;
00116 $this->JScode='';
00117 $this->HTMLcode='';
00118 $this->path = $path;
00119 $this->sort=$sort;
00120 $this->sortRev=$sortRev;
00121 $this->firstElementNumber=$pointer;
00122 $this->clipBoard = $clipBoard;
00123
00124 $this->fixedL = max($this->fixedL, $GLOBALS['BE_USER']->uc['titleLen']);
00125
00126 if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails']) {
00127 $this->thumbScript='gfx/notfound_thumb.gif';
00128 }
00129 $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_common.xml');
00130 }
00131
00132
00133
00134
00135
00136
00137 function generateList() {
00138 $this->dirs = $this->readDirectory($this->path,'dir,link');
00139 $this->files = $this->readDirectory($this->path,'file');
00140 $this->totalItems=count($this->dirs['sorting'])+count($this->files['sorting']);
00141 $this->HTMLcode.=$this->getTable($this->files, $this->dirs, 'fileext,tstamp,size,rw,_REF_');
00142 }
00143
00144
00145
00146
00147
00148
00149 function getButtonsAndOtherMarkers($path) {
00150
00151
00152 $path = $GLOBALS['SOBE']->basicFF->is_directory($path);
00153
00154 if ($path) {
00155 $otherMarkers = array(
00156 'PAGE_ICON' => '',
00157 'TITLE' => '',
00158 );
00159
00160 $buttons = array(
00161 'level_up' => '',
00162 'refresh' => '',
00163 'title' => '',
00164 'page_icon' => '',
00165 );
00166
00167 $theFile = $GLOBALS['SOBE']->basicFF->getTotalFileInfo($path);
00168
00169 list($title,$icon,$path) = $this->dirData($theFile);
00170
00171
00172 $title = $GLOBALS['SOBE']->basicFF->blindPath($path);
00173
00174
00175 if ($GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path'])) {
00176
00177 $otherMarkers['PAGE_ICON'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
00178 if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path);
00179
00180 $buttons['level_up'] .= $this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
00181 $otherMarkers['TITLE'] .= t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20));
00182
00183
00184 } else {
00185 $otherMarkers['PAGE_ICON'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
00186 if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path);
00187 $otherMarkers['TITLE'] .= htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)));
00188 }
00189 }
00190
00191 $buttons['refresh'] = '<a href="'.htmlspecialchars($this->listURL()).'">'.
00192 '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
00193 '</a>';
00194
00195 return array($buttons, $otherMarkers);
00196 }
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207 function linkClipboardHeaderIcon($string,$table,$cmd,$warning='') {
00208 $onClickEvent = 'document.dblistForm.cmd.value=\''.$cmd.'\';document.dblistForm.submit();';
00209 if ($warning) $onClickEvent = 'if (confirm('.$GLOBALS['LANG']->JScharCode($warning).')){'.$onClickEvent.'}';
00210 return '<a href="#" onclick="'.htmlspecialchars($onClickEvent).'return false;">'.$string.'</a>';
00211 }
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221 function getTable($files,$dirs,$rowlist) {
00222
00223 $out='';
00224 $titleCol = 'file';
00225
00226
00227 $rowlist = t3lib_div::rmFromList($titleCol,$rowlist);
00228 $rowlist = t3lib_div::uniqueList($rowlist);
00229 $rowlist = $rowlist ? $titleCol.','.$rowlist : $titleCol;
00230 if ($this->clipBoard) $rowlist.=',_CLIPBOARD_';
00231 $this->fieldArray = explode(',',$rowlist);
00232
00233
00234 $iOut = '';
00235 $iOut.= $this->formatDirList($dirs);
00236
00237 if (count($dirs['sorting'])) {
00238
00239 $theData = Array();
00240 $theData[$titleCol] = '';
00241 }
00242
00243
00244
00245
00246 $iOut.= $this->formatFileList($files,$titleCol);
00247
00248
00249 $theData = Array();
00250 reset($this->fieldArray);
00251 while(list(,$v)=each($this->fieldArray)) {
00252 if ($v=='_CLIPBOARD_') {
00253 $cells=array();
00254 $table='_FILE';
00255 $elFromTable = $this->clipObj->elFromTable($table);
00256 if (count($elFromTable)) {
00257 $cells[]='<a href="'.htmlspecialchars($this->clipObj->pasteUrl('_FILE',$this->path)).'" onclick="return '.htmlspecialchars($this->clipObj->confirmMsg('_FILE',$this->path,'into',$elFromTable)).'">'.
00258 '<img'.t3lib_iconWorks::skinImg('','gfx/clip_pasteafter.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_paste',1).'" alt="" /></a>';
00259 }
00260 if ($this->clipObj->current!='normal' && $iOut) {
00261 $cells[]=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg('','gfx/clip_copy.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_selectMarked',1).'" alt="" />',$table,'setCB');
00262 $cells[]=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg('','gfx/garbage.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_deleteMarked',1).'" alt="" />',$table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning'));
00263 $onClick = 'checkOffCB(\''.implode(',',$this->CBnames).'\'); return false;';
00264 $cells[]='<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
00265 '<img'.t3lib_iconWorks::skinImg('','gfx/clip_select.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_markRecords',1).'" alt="" />'.
00266 '</a>';
00267 }
00268
00269 $theData[$v] = implode('',$cells);
00270 } else {
00271 $theT = $this->linkWrapSort($GLOBALS['LANG']->getLL('c_'.$v,1), $this->path,$v);
00272 $theData[$v] = $theT;
00273 }
00274 }
00275 $out.=$this->addelement(1,'',$theData,' class="c-headLine"','');
00276 $out.=$iOut;
00277
00278
00279
00280
00281 return '
00282
00283
00284 <!--
00285 File list table:
00286 -->
00287 <table border="0" cellpadding="0" cellspacing="1" id="typo3-filelist">
00288 '.$out.'
00289 </table>';
00290 }
00291
00292
00293
00294
00295
00296
00297 function getFolderInfo() {
00298 if($this->counter == 1) {
00299 $fileLabel = $GLOBALS['LANG']->getLL('file', true);
00300 } else {
00301 $fileLabel = $GLOBALS['LANG']->getLL('files', true);
00302 }
00303 return $this->counter . ' ' . $fileLabel . ', ' . t3lib_div::formatSize($this->totalbytes, $GLOBALS['LANG']->getLL('byteSizeUnits', true));
00304 }
00305
00306
00307
00308
00309
00310
00311
00312 function formatDirList($items) {
00313 $out='';
00314
00315
00316 if (count($items['sorting'])) {
00317 reset($items['sorting']);
00318 while (list($key,) = each($items['sorting'])) {
00319 list($flag,$code) = $this->fwd_rwd_nav();
00320 $out.=$code;
00321 if ($flag) {
00322
00323 $theFile = $items['files'][$key];
00324 $this->counter++;
00325
00326 list($title,$icon,$path) = $this->dirData($theFile);
00327
00328
00329 $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
00330 if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path);
00331
00332
00333 $theData = Array();
00334 reset($this->fieldArray);
00335 while(list(,$field)=each($this->fieldArray)) {
00336 switch($field) {
00337 case 'size':
00338 $theData[$field] = t3lib_div::formatSize($theFile[$field], $GLOBALS['LANG']->getLL('byteSizeUnits', true));
00339 break;
00340 case 'rw':
00341 $theData[$field] = (($theFile['readable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', true) . '</strong></span>') . (($theFile['writable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', true) . '</strong></span>');
00342 break;
00343 case 'fileext':
00344 $theData[$field]=strtoupper($theFile['fileext']);
00345 break;
00346 case 'tstamp':
00347 $theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile['tstamp']);
00348 break;
00349 case 'file':
00350 $theData[$field]= $this->linkWrapDir($title,$path);
00351 break;
00352 case '_CLIPBOARD_':
00353 $theData[$field]=$this->makeClip($theFile);
00354 break;
00355 case '_REF_':
00356 $theData[$field]=$this->makeRef($theFile);
00357 break;
00358 default:
00359 $theData[$field]=t3lib_div::fixed_lgd($theFile[$field],$this->fixedL);
00360 break;
00361 }
00362 }
00363 $altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor6' : 'bgColor4') . '"';
00364
00365 $out .= $this->addelement(1, $theIcon, $theData, $altRows);
00366 }
00367 $this->eCounter++;
00368 $this->dirCounter = $this->eCounter;
00369 }
00370 }
00371 return $out;
00372 }
00373
00374
00375
00376
00377
00378
00379
00380
00381 function linkWrapDir($code,$path) {
00382 $href = $this->script.'?id='.rawurlencode($path);
00383 $onclick = ' onclick="'.htmlspecialchars('top.content.nav_frame.hilight_row("file","folder'.t3lib_div::md5int($path).'_"+top.fsMod.currentBank)').'"';
00384
00385
00386 if(!strcmp($code,strip_tags($code))) {
00387 return '<a href="'.htmlspecialchars($href).'"'.$onclick.' title="'.htmlspecialchars($code).'">'.t3lib_div::fixed_lgd($code,$this->fixedL).'</a>';
00388 } else {
00389 return '<a href="'.htmlspecialchars($href).'"'.$onclick.'>'.$code.'</a>';
00390 }
00391 }
00392
00393
00394
00395
00396
00397
00398
00399
00400 function linkWrapFile($code,$path) {
00401
00402 if (t3lib_div::isFirstPartOfStr($path,t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT'))) {
00403 $href = substr($path,strlen(t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT')));
00404 $aOnClick = "return top.openUrlInWindow('".$href."','WebFile');";
00405 $code = '<a href="#" title="'.htmlspecialchars($code).'" onclick="'.htmlspecialchars($aOnClick).'">'.t3lib_div::fixed_lgd($code,$this->fixedL).'</a>';
00406 }
00407 return $code;
00408 }
00409
00410
00411
00412
00413
00414
00415 function listURL() {
00416 return $this->script.'?id='.rawurlencode($this->path).'&imagemode='.$this->thumbs;
00417 }
00418
00419
00420
00421
00422
00423
00424
00425 function dirData($theFile) {
00426 $path = $theFile['path'] . $theFile['file'] . '/';
00427 $webpath = t3lib_BEfunc::getPathType_web_nonweb($path);
00428
00429 $title = htmlspecialchars($theFile['file']);
00430 $icon = 'gfx/i/_icon_' . $webpath . 'folders.gif';
00431 if ($title == '_temp_') {
00432 $icon = 'gfx/i/sysf.gif';
00433 $title = '<strong>' . $GLOBALS['LANG']->getLL('temp', true) . '</strong>';
00434 }
00435 if ($title == '_recycler_') {
00436 $icon = 'gfx/i/recycler.gif';
00437 $title = '<strong>' . $GLOBALS['LANG']->getLL('recycler', true) . '</strong>';
00438 }
00439 $icon = $theFile['writable'] ? 'gfx/i/_icon_' . $webpath . 'folders_ro.gif' : $icon;
00440
00441 return array($title, $icon, $path);
00442 }
00443
00444
00445
00446
00447
00448
00449
00450 function formatFileList($items) {
00451 $out='';
00452
00453
00454 if (count($items['sorting'])) {
00455 reset($items['sorting']);
00456 while (list($key,) = each($items['sorting'])) {
00457 list($flag,$code) = $this->fwd_rwd_nav();
00458 $out.=$code;
00459 if ($flag) {
00460
00461 $theFile = $items['files'][$key];
00462 $this->counter++;
00463
00464 $this->totalbytes+=$theFile['size'];
00465 $ext = $items['files'][$key][fileext];
00466 $icon = t3lib_BEfunc::getFileIcon($ext);
00467
00468
00469 $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
00470 if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$theFile['path'].$theFile['file']);
00471
00472
00473 $theData = Array();
00474 reset($this->fieldArray);
00475 while(list(,$field)=each($this->fieldArray)) {
00476 switch($field) {
00477 case 'size':
00478 $theData[$field] = t3lib_div::formatSize($theFile[$field], $GLOBALS['LANG']->getLL('byteSizeUnits', true));
00479 break;
00480 case 'rw':
00481 $theData[$field] = (($theFile['readable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', true) . '</strong></span>') . (($theFile['writable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', true) . '</strong></span>');
00482 break;
00483 case 'fileext':
00484 $theData[$field]=strtoupper($theFile[$field]);
00485 break;
00486 case 'tstamp':
00487 $theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile[$field]);
00488 break;
00489 case '_CLIPBOARD_':
00490 $theData[$field]=$this->makeClip($theFile);
00491 break;
00492 case '_REF_':
00493 $theData[$field]=$this->makeRef($theFile);
00494 break;
00495 case 'file':
00496 $theData[$field] = $this->linkWrapFile($theFile[$field],$theFile['path'].$theFile['file']);
00497 break;
00498 default:
00499 $theData[$field]=t3lib_div::fixed_lgd($theFile[$field],$this->fixedL);
00500 break;
00501 }
00502 }
00503 if ($this->dirCounter % 2 == 0) {
00504 $altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor6' : 'bgColor4') . '"';
00505 } else {
00506 $altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '"';
00507 }
00508
00509 $out .= $this->addelement(1, $theIcon, $theData, $altRows);
00510
00511
00512 if ($this->thumbs && $this->isImage($theFile['fileext'])) {
00513 $thumbData = array();
00514 $theFile_R = rawurlencode($theFile['path'].$theFile['file']);
00515 $titleCol = $this->fieldArray[0];
00516
00517 $theFile_abs = $theFile['path'].$theFile['file'];
00518 $check = basename($theFile_abs).':'.filemtime($theFile_abs).':'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
00519 $params = '&file='.$theFile_R;
00520 $params.= '&md5sum='.t3lib_div::shortMD5($check);
00521 $href = $this->backPath.$this->thumbScript.'?&dummy='.$GLOBALS['EXEC_TIME'].$params;
00522
00523 $thumbData[$titleCol]='<img src="'.htmlspecialchars($href).'" hspace="2" title="'.htmlspecialchars(trim($theFile['file'])).'" alt="" />';
00524 $out.= $this->addelement(4,'',$thumbData);
00525 }
00526 }
00527 $this->eCounter++;
00528 }
00529 }
00530 return $out;
00531 }
00532
00533
00534
00535
00536
00537
00538
00539 function isImage($ext) {
00540 return t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],strtolower($ext));
00541 }
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551 function linkWrapSort($code,$path,$col) {
00552 if ($this->sort==$col && !$this->sortRev) {
00553 $params='&SET[sort]='.$col.'&SET[reverse]=1';
00554 } else {
00555 $params='&SET[sort]='.$col.'&SET[reverse]=0';
00556 }
00557 $href = $this->script.'?id='.rawurlencode($path).$params;
00558 return '<a href="'.htmlspecialchars($href).'">'.$code.'</a>';
00559 }
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569 function readDirectory($path,$type,$extList='') {
00570 $items = Array('files'=>array(), 'sorting'=>array());
00571 $path = $GLOBALS['SOBE']->basicFF->is_directory($path);
00572
00573 if($path && $GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($path.'/')) {
00574 $d = @dir($path);
00575 $tempArray=Array();
00576 if (is_object($d)) {
00577 while(false !== ($entry=$d->read())) {
00578 if ($entry!='.' && $entry!='..') {
00579 $wholePath = $path.'/'.$entry;
00580 if (@file_exists($wholePath) && (!$type || t3lib_div::inList($type,filetype($wholePath)))) {
00581 if ($extList) {
00582 $fI = t3lib_div::split_fileref($entry);
00583 if (t3lib_div::inList($extList,$fI['fileext'])) {
00584 $tempArray[] = $wholePath;
00585 }
00586 } else {
00587 $tempArray[] = $wholePath;
00588 }
00589 }
00590 }
00591 }
00592 $d->close();
00593 }
00594
00595 reset($tempArray);
00596 while (list(,$val)=each($tempArray)) {
00597 $temp = $GLOBALS['SOBE']->basicFF->getTotalFileInfo($val);
00598 $items['files'][] = $temp;
00599 if ($this->sort) {
00600 $items['sorting'][] = strtoupper($temp[$this->sort]);
00601 } else {
00602 $items['sorting'][] = '';
00603 }
00604 }
00605
00606 if ($this->sort) {
00607 if (!$this->sortRev) {
00608 asort($items['sorting']);
00609 } else {
00610 arsort($items['sorting']);
00611 }
00612 }
00613 }
00614 return $items;
00615 }
00616
00617
00618
00619
00620
00621
00622
00623 function makeClip($theData) {
00624 $cells=array();
00625 $fullIdent = $theData['path'].$theData['file'];
00626 $md5=t3lib_div::shortmd5($fullIdent);
00627
00628
00629 if ($this->clipObj->current=='normal') {
00630 $isSel = $this->clipObj->isSelected('_FILE',$md5);
00631 $cells[]='<a href="'.htmlspecialchars($this->clipObj->selUrlFile($fullIdent,1,($isSel=='copy'))).'">'.
00632 '<img'.t3lib_iconWorks::skinImg('','gfx/clip_copy'.($isSel=='copy'?'_h':'').'.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.copy',1).'" alt="" />'.
00633 '</a>';
00634 $cells[]='<a href="'.htmlspecialchars($this->clipObj->selUrlFile($fullIdent,0,($isSel=='cut'))).'">'.
00635 '<img'.t3lib_iconWorks::skinImg('','gfx/clip_cut'.($isSel=='cut'?'_h':'').'.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.cut',1).'" alt="" />'.
00636 '</a>';
00637 } else {
00638 $n='_FILE|'.$md5;
00639 $this->CBnames[]=$n;
00640
00641 $checked = ($this->clipObj->isSelected('_FILE',$md5)?' checked="checked"':'');
00642 $cells[]='<input type="hidden" name="CBH['.$n.']" value="0" />'.
00643 '<input type="checkbox" name="CBC['.$n.']" value="'.htmlspecialchars($fullIdent).'" class="smallCheckboxes"'.$checked.' />';
00644 }
00645
00646
00647 $elFromTable = $this->clipObj->elFromTable('_FILE');
00648 if (@is_dir($fullIdent) && count($elFromTable)) {
00649 $cells[]='<a href="'.htmlspecialchars($this->clipObj->pasteUrl('_FILE',$fullIdent)).'" onclick="return '.htmlspecialchars($this->clipObj->confirmMsg('_FILE',$fullIdent,'into',$elFromTable)).'">'.
00650 '<img'.t3lib_iconWorks::skinImg('','gfx/clip_pasteinto.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_pasteInto',1).'" alt="" />'.
00651 '</a>';
00652 }
00653
00654
00655 return ' <!-- CLIPBOARD PANEL: -->
00656 <div class="typo3-clipCtrl">
00657 '.implode('
00658 ',$cells).'
00659 </div>';
00660 }
00661
00662
00663
00664
00665
00666
00667
00668 function makeRef($theData) {
00669
00670
00671 $fullIdent = $theData['path'].$theData['file'];
00672
00673 if (t3lib_div::isFirstPartOfStr($fullIdent,PATH_site)) {
00674 $fullIdent = substr($fullIdent,strlen(PATH_site));
00675 }
00676
00677
00678 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
00679 '*',
00680 'sys_refindex',
00681 'ref_table='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_FILE','sys_refindex').
00682 ' AND ref_string='.$GLOBALS['TYPO3_DB']->fullQuoteStr($fullIdent,'sys_refindex').
00683 ' AND deleted=0'
00684 );
00685
00686
00687 $infoData=array();
00688 if (is_array($rows)) {
00689 foreach($rows as $row) {
00690 $infoData[]=$row['tablename'].':'.$row['recuid'].':'.$row['field'];
00691 }
00692 }
00693
00694 return count($infoData) ? '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$theData['path'].$theData['file'].'\', \'\'); return false;').'" title="'.htmlspecialchars(t3lib_div::fixed_lgd(implode(' / ',$infoData),100)).'">'.count($infoData).'</a>' : '';
00695 }
00696 }
00697
00698
00699
00700 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.file_list.inc']) {
00701 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.file_list.inc']);
00702 }
00703 ?>