Documentation TYPO3 par Ameos

class.tx_cms_layout.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 ***************************************************************/
00114 class tx_cms_layout extends recordList {
00115 
00116                 // External, static: For page statistics:
00117         var $stat_select_field='page_id';               // fieldname from sys_stat to select on.
00118         var $stat_codes=array();                                // eg.  "HITS_days:-1"
00119 
00120                 // External, static: Flags of various kinds:
00121         var $pI_showUser=0;                                             // If true, users/groups are shown in the page info box.
00122         var $pI_showStat=1;                                             // If true, hit statistics are shown in the page info box.
00123         var $nextThree = 3;                                             // The number of successive records to edit when showing content elements.
00124         var $pages_noEditColumns=0;                             // If true, disables the edit-column icon for tt_content elements
00125         var $option_showBigButtons=1;                   // If true, shows bit buttons for editing page header, moving, creating elements etc. in the columns view.
00126         var $option_newWizard=1;                                // If true, new-wizards are linked to rather than the regular new-element list.
00127         var $ext_function=0;                                    // If set to "1", will link a big button to content element wizard.
00128         var $doEdit=1;                                                  // If true, elements will have edit icons (probably this is whethere the user has permission to edit the page content). Set externally.
00129         var $agePrefixes = ' min| hrs| days| yrs';      // Age prefixes for displaying times. May be set externally to localized values.
00130         var $externalTables = array();                  // Array of tables which is configured to be listed by the Web > Page module in addition to the default tables.
00131         var $descrTable;                                                // "Pseudo" Description -table name
00132         var $defLangBinding=FALSE;                              // If set true, the language mode of tt_content elements will be rendered with hard binding between default language content elements and their translations!
00133 
00134                 // External, static: Configuration of tt_content element display:
00135         var $tt_contentConfig = Array (
00136                 'showInfo' => 1,                                        // Boolean: Display info-marks or not
00137                 'showCommands' => 1,                            // Boolean: Display up/down arrows and edit icons for tt_content records
00138                 'showCommands_info' => 1,                       // Boolean: Displays infoGif with the command buttons
00139                 'single' => 1,                                          // Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown in the total width of the page
00140                 'showSingleCol' => 0,                           // The column(s) to show if single mode (under each other)
00141                 'languageCols' => 0,
00142                 'languageMode' => 0,
00143                 'languageColsPointer' => 0,
00144                 'showHidden' => 1,                                      // Displays hidden records as well
00145                 'sys_language_uid' => 0,                        // Which language
00146                 'cols' => '1,0,2,3'                                     // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
00147         );
00148 
00149                 // Internal, dynamic:
00150         var $allowedTableNames=array();                 // Will contain a list of tables which can be listed by the user.
00151         var $activeTables = array();                    // Contains icon/title of pages which are listed in the tables menu (see getTableMenu() function )
00152         var $tt_contentData = Array(
00153                 'nextThree' => Array(),
00154                 'prev' => Array(),
00155                 'next' => Array()
00156         );
00157         var $CType_labels=array();                              // Used to store labels for CTypes for tt_content elements
00158         var $itemLabels=array();                                // Used to store labels for the various fields in tt_content elements
00159 
00160 
00161 
00162 
00163 
00164 
00165 
00166         /*****************************************
00167          *
00168          * Renderings
00169          *
00170          *****************************************/
00171 
00179         function getTable($table,$id)   {
00180 
00181                         // Load full table definition:
00182                 t3lib_div::loadTCA($table);
00183 
00184                 if (isset($this->externalTables[$table]))       {
00185                         $fList = $this->externalTables[$table][0]['fList'];     // eg. "name;title;email;company,image"
00186                         $icon = $this->externalTables[$table][0]['icon'];       // Boolean,
00187 
00188                                 // Create listing
00189                         $out = $this->makeOrdinaryList($table, $id, $fList, $icon);
00190                         return $out;
00191                 } else {
00192                                 // Branch out based on table name:
00193                                 // Notice: Most of these tables belongs to other extensions than 'cms'. Each of these tables can be rendered only if the extensions they belong to is loaded.
00194                         switch($table)  {
00195                                 case 'pages':
00196                                         return $this->getTable_pages($id);
00197                                 break;
00198                                 case 'tt_content':
00199                                         return $this->getTable_tt_content($id);
00200                                 break;
00201                                 case 'fe_users':
00202                                         return $this->getTable_fe_users($id);
00203                                 break;
00204                                 case 'sys_note':
00205                                         return $this->getTable_sys_note($id);
00206                                 break;
00207                                 case 'tt_board':
00208                                         return $this->getTable_tt_board($id);
00209                                 break;
00210                                 case 'tt_address':
00211                                         return $this->getTable_tt_address($id);
00212                                 break;
00213                                 case 'tt_links':
00214                                         return $this->getTable_tt_links($id);
00215                                 break;
00216                                 case 'tt_guest':
00217                                         return $this->getTable_tt_guest($id);
00218                                 break;
00219                                 case 'tt_news':
00220                                         return $this->getTable_tt_news($id);
00221                                 break;
00222                                 case 'tt_calender':
00223                                         return $this->getTable_tt_calender($id);
00224                                 break;
00225                                 case 'tt_products':
00226                                         return $this->getTable_tt_products($id);
00227                                 break;
00228                         }
00229                 }
00230         }
00231 
00239         function getTable_pages($id)    {
00240                 global $TCA;
00241 
00242                         // Initializing:
00243                 $out='';
00244                 $delClause = t3lib_BEfunc::deleteClause('pages').' AND '.$GLOBALS['BE_USER']->getPagePermsClause(1);            // Select clause for pages:
00245 
00246                         // Select current page:
00247                 if (!$id)       {
00248                         $row = $GLOBALS['SOBE']->pageinfo;              // The root has a pseudo record in pageinfo...
00249                 } else {
00250                         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid='.intval($id).$delClause);
00251                         $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
00252                 }
00253 
00254                         // If there was found a page:
00255                 if (is_array($row))     {
00256 
00257                                 // Select which fields to show:
00258                         $pKey = $GLOBALS['SOBE']->MOD_SETTINGS['function']=='tx_cms_webinfo_hits' ? 'hits' : $GLOBALS['SOBE']->MOD_SETTINGS['pages'];
00259                         switch($pKey)   {
00260                                 case 'hits':
00261                                         $this->fieldArray = explode(',','title,'.implode(',',$this->stat_codes));
00262                                 break;
00263                                 case 1:
00264                                         $this->cleanTableNames();
00265                                         $tableNames=$this->allowedTableNames;
00266                                         $this->fieldArray = explode(',','title,uid,'.implode(',',array_keys($tableNames)));
00267                                 break;
00268                                 case 2:
00269                                         $this->fieldArray = explode(',','title,uid,lastUpdated,newUntil,no_cache,cache_timeout,php_tree_stop,TSconfig,storage_pid,is_siteroot');
00270                                 break;
00271                                 default:
00272                                         $this->fieldArray = explode(',','title,uid,alias,starttime,endtime,fe_group,target,url,shortcut');
00273                                 break;
00274                         }
00275 
00276                                 // Getting select-depth:
00277                         $depth=intval($GLOBALS['SOBE']->MOD_SETTINGS['pages_levels']);
00278 
00279                                 // Half line is drawn
00280                         $theData = Array();
00281                         $theData['subject'] = $this->widthGif;
00282                         $out.=$this->addelement(0,'',$theData);
00283 
00284                                 // Overriding a few things:
00285                         $this->no_noWrap=0;
00286                         $this->oddColumnsTDParams=' class="bgColor3-20"';
00287 
00288                                 // Items
00289                         $this->eCounter=$this->firstElementNumber;
00290 
00291                                 // Creating elements:
00292                         list($flag,$code) = $this->fwd_rwd_nav();
00293                         $out.=$code;
00294                         $editUids=array();
00295                         if ($flag)      {
00296 
00297                                         // Getting children:
00298                                 $theRows = Array();
00299                                 $theRows = $this->pages_getTree($theRows,$row['uid'],$delClause,'',$depth);
00300                                 if ($GLOBALS['BE_USER']->doesUserHaveAccess($row,2))    $editUids[]=$row['uid'];
00301                                 $out.=$this->pages_drawItem($row,$this->fieldArray);
00302 
00303                                         // Traverse all pages selected:
00304                                 foreach($theRows as $n => $sRow)        {
00305                                         if ($GLOBALS['BE_USER']->doesUserHaveAccess($sRow,2))   $editUids[]=$sRow['uid'];
00306                                         $out.=$this->pages_drawItem($sRow,$this->fieldArray);
00307                                 }
00308                                 $this->eCounter++;
00309                         }
00310 
00311                                 // Header line is drawn
00312                         $theData = Array();
00313                         $editIdList = implode(',', $editUids);
00314 
00315                                 // Traverse fields (as set above) in order to create header values:
00316                         foreach($this->fieldArray as $field)    {
00317                                 if ($editIdList && isset($TCA['pages']['columns'][$field]) && $field!='uid' && !$this->pages_noEditColumns)     {
00318                                         $params='&edit[pages]['.$editIdList.']=edit&columnsOnly='.$field.'&disHelp=1';
00319                                         $iTitle = sprintf($GLOBALS['LANG']->getLL('editThisColumn'),ereg_replace(':$','',trim($GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('pages',$field)))));
00320                                         $eI= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,'')).'">'.
00321                                                         '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($iTitle).'" alt="" />'.
00322                                                         '</a>';
00323                                 } else $eI='';
00324                                 switch($field)  {
00325                                         case 'title':
00326                                                 $theData[$field] = '&nbsp;<b>'.$GLOBALS['LANG']->sL($TCA['pages']['columns'][$field]['label']).'</b>'.$eI;
00327                                         break;
00328                                         case 'uid':
00329                                                 $theData[$field] = '&nbsp;<b>ID:</b>';
00330                                         break;
00331                                         default:
00332                                                 if (substr($field,0,6)=='table_')       {
00333                                                         $f2 = substr($field,6);
00334                                                         if ($TCA[$f2])  {
00335                                                                 $theData[$field] = '&nbsp;'.t3lib_iconWorks::getIconImage($f2,array(),$this->backPath,'title="'.$GLOBALS['LANG']->sL($TCA[$f2]['ctrl']['title'],1).'"');
00336                                                         }
00337                                                 } elseif (substr($field,0,5)=='HITS_')  {
00338                                                         $fParts = explode(':',substr($field,5));
00339                                                         switch($fParts[0])      {
00340                                                                 case 'days':
00341                                                                         $timespan = mktime (0,0,0)+intval($fParts[1])*3600*24;
00342                                                                         $theData[$field]='&nbsp;'.date('d',$timespan);
00343                                                                 break;
00344                                                                 default:
00345                                                                         $theData[$field] = '';
00346                                                                 break;
00347                                                         }
00348                                                 } else {
00349                                                         $theData[$field] = '&nbsp;&nbsp;<b>'.$GLOBALS['LANG']->sL($TCA['pages']['columns'][$field]['label'],1).'</b>'.$eI;
00350                                                 }
00351                                         break;
00352                                 }
00353                         }
00354 
00355                                 // Start table:
00356                         $this->oddColumnsTDParams = '';
00357 
00358                                 // CSH:
00359                         $out = t3lib_BEfunc::cshItem($this->descrTable,'func_'.$pKey,$GLOBALS['BACK_PATH']).
00360                                 '
00361                                 <table border="0" cellpadding="0" cellspacing="0" class="typo3-page-pages">
00362                                         '.$this->addelement(1,'',$theData,' class="c-headLine"',20).
00363                                         $out.'
00364                                 </table>';
00365                 }
00366                 $this->oddColumnsTDParams = '';
00367                 return $out;
00368         }
00369 
00376         function getTable_tt_content($id)       {
00377                 global $TCA;
00378 
00379                 $this->initializeLanguages();
00380 
00381                         // Initialize:
00382                 $RTE = $GLOBALS['BE_USER']->isRTE();
00383                 $lMarg=1;
00384                 $showHidden = $this->tt_contentConfig['showHidden']?'':t3lib_BEfunc::BEenableFields('tt_content');
00385                 $pageTitleParamForAltDoc='&recTitle='.rawurlencode(t3lib_BEfunc::getRecordTitle('pages',t3lib_BEfunc::getRecord('pages',$id),1));
00386 
00387                         // Get labels for CTypes and tt_content element fields in general:
00388                 $this->CType_labels =array();
00389                 foreach($TCA['tt_content']['columns']['CType']['config']['items'] as $val)              {
00390                         $this->CType_labels[$val[1]]=$GLOBALS['LANG']->sL($val[0]);
00391                 }
00392                 $this->itemLabels =array();
00393                 foreach($TCA['tt_content']['columns'] as $name => $val) {
00394                         $this->itemLabels[$name]=$GLOBALS['LANG']->sL($val['label']);
00395                 }
00396 
00397 
00398                         // Select display mode:
00399                 if (!$this->tt_contentConfig['single']) {               // MULTIPLE column display mode, side by side:
00400 
00401                                 // Setting language list:
00402                         $langList = $this->tt_contentConfig['sys_language_uid'];
00403                         if ($this->tt_contentConfig['languageMode'])    {
00404                                 if ($this->tt_contentConfig['languageColsPointer'])     {
00405                                         $langList='0,'.$this->tt_contentConfig['languageColsPointer'];
00406                                 } else {
00407                                         $langList=implode(',',array_keys($this->tt_contentConfig['languageCols']));
00408                                 }
00409                                 $languageColumn = array();
00410                         }
00411                         $langListArr = explode(',',$langList);
00412                         $defLanguageCount = array();
00413                         $defLangBinding = array();
00414 
00415                                 // For EACH languages... :
00416                         foreach($langListArr as $lP)    {       // If NOT languageMode, then we'll only be through this once.
00417                                 $showLanguage = $this->defLangBinding && $lP==0 ? ' AND sys_language_uid IN (0,-1)' : ' AND sys_language_uid='.$lP;
00418                                 $cList = explode(',',$this->tt_contentConfig['cols']);
00419                                 $content = array();
00420                                 $head = array();
00421 
00422                                         // For EACH column, render the content into a variable:
00423                                 foreach($cList as $key) {
00424                                         if (!$lP) $defLanguageCount[$key] = array();
00425 
00426                                                 // Select content elements from this column/language:
00427                                         $queryParts = $this->makeQueryArray('tt_content', $id, 'AND colPos='.intval($key).$showHidden.$showLanguage);
00428                                         $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
00429 
00430                                                 // If it turns out that there are not content elements in the column, then display a big button which links directly to the wizard script:
00431                                         if ($this->doEdit && $this->option_showBigButtons && !intval($key) && !$GLOBALS['TYPO3_DB']->sql_num_rows($result))     {
00432                                                 $onClick = "document.location='db_new_content_el.php?id=".$id.'&colPos='.intval($key).'&sys_language_uid='.$lP.'&uid_pid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';";
00433                                                 $theNewButton = $GLOBALS['SOBE']->doc->t3Button($onClick,$GLOBALS['LANG']->getLL('newPageContent'));
00434                                                 $content[$key].= '<img src="clear.gif" width="1" height="5" alt="" /><br />'.$theNewButton;
00435                                         }
00436 
00437                                                 // Traverse any selected elements and render their display code:
00438                                         $rowArr = $this->getResult($result);
00439 
00440                                         foreach($rowArr as $row)        {
00441                                                 $singleElementHTML = '';
00442                                                 if (!$lP) $defLanguageCount[$key][] = $row['uid'];
00443 
00444                                                 $editUidList.= $row['uid'].',';
00445                                                 $singleElementHTML.= $this->tt_content_drawHeader($row,$this->tt_contentConfig['showInfo']?15:5, $this->defLangBinding && $lP>0, TRUE);
00446 
00447                                                 $isRTE = $RTE && $this->isRTEforField('tt_content',$row,'bodytext');
00448                                                 $singleElementHTML.= $this->tt_content_drawItem($row,$isRTE);
00449 
00450                                                 if ($this->defLangBinding && $this->tt_contentConfig['languageMode'])   {
00451                                                         $defLangBinding[$key][$lP][$row[($lP ? 'l18n_parent' : 'uid')]] = $singleElementHTML;
00452                                                 } else {
00453                                                         $content[$key].= $singleElementHTML;
00454                                                 }
00455                                         }
00456 
00457                                                 // Add new-icon link, header:
00458                                         $newP = $this->newContentElementOnClick($id,$key,$lP);
00459                                         $head[$key].= $this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key), ($this->doEdit&&count($rowArr)?'&edit[tt_content]['.$editUidList.']=edit'.$pageTitleParamForAltDoc:''), $newP);
00460                                         $editUidList = '';
00461                                 }
00462 
00463                                         // For EACH column, fit the rendered content into a table cell:
00464                                 $out='';
00465                                 foreach($cList as $k => $key)   {
00466                                         if (!$k)        {
00467                                                 $out.= '
00468                                                         <td><img src="clear.gif" width="'.$lMarg.'" height="1" alt="" /></td>';
00469                                         } else {
00470                                                 $out.= '
00471                                                         <td><img src="clear.gif" width="4" height="1" alt="" /></td>
00472                                                         <td bgcolor="black"><img src="clear.gif" width="1" height="1" alt="" /></td>
00473                                                         <td><img src="clear.gif" width="4" height="1" alt="" /></td>';
00474                                         }
00475                                         $out.= '
00476                                                         <td valign="top">'.$head[$key].$content[$key].'</td>';
00477 
00478                                                 // Storing content for use if languageMode is set:
00479                                         if ($this->tt_contentConfig['languageMode'])    {
00480                                                 $languageColumn[$key][$lP] = $head[$key].$content[$key];
00481                                                 if (!$this->defLangBinding)     {
00482                                                         $languageColumn[$key][$lP].='<br /><br />'.$this->newLanguageButton($this->getNonTranslatedTTcontentUids($defLanguageCount[$key],$id,$lP),$lP);
00483                                                 }
00484                                         }
00485                                 }
00486 
00487                                         // Wrap the cells into a table row:
00488                                 $out = '
00489                                         <table border="0" cellpadding="0" cellspacing="0" width="480" class="typo3-page-cols">
00490                                                 <tr>'.$out.'
00491                                                 </tr>
00492                                         </table>';
00493 
00494                                         // CSH:
00495                                 $out.= t3lib_BEfunc::cshItem($this->descrTable,'columns_multi',$GLOBALS['BACK_PATH']);
00496                         }
00497 
00498                                 // If language mode, then make another presentation:
00499                                 // Notice that THIS presentation will override the value of $out! But it needs the code above to execute since $languageColumn is filled with content we need!
00500                         if ($this->tt_contentConfig['languageMode'])    {
00501 
00502                                         // Get language selector:
00503                                 $languageSelector = $this->languageSelector($id);
00504 
00505                                         // Reset out - we will make new content here:
00506                                 $out='';
00507                                         // Separator between language columns (black thin line)
00508                                 $midSep = '
00509                                                 <td><img src="clear.gif" width="4" height="1" alt="" /></td>
00510                                                 <td bgcolor="black"><img src="clear.gif" width="1" height="1" alt="" /></td>
00511                                                 <td><img src="clear.gif" width="4" height="1" alt="" /></td>';
00512 
00513                                         // Traverse languages found on the page and build up the table displaying them side by side:
00514                                 $cCont=array();
00515                                 $sCont=array();
00516                                 foreach($langListArr as $lP)    {
00517 
00518                                                 // Header:
00519                                         $cCont[$lP]='
00520                                                 <td valign="top" align="center" class="bgColor6"><strong>'.htmlspecialchars($this->tt_contentConfig['languageCols'][$lP]).'</strong></td>';
00521 
00522                                                 // "View page" icon is added:
00523                                         $viewLink = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id,$this->backPath,t3lib_BEfunc::BEgetRootLine($this->id),'','','&L='.$lP)).'">'.
00524                                                 '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom.gif','width="12" height="12"').' class="absmiddle" title="" alt="" />'.
00525                                                 '</a>';
00526 
00527                                                 // Language overlay page header:
00528                                         if ($lP)        {
00529 
00530                                                 list($lpRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay','pid',$id,'AND sys_language_uid='.intval($lP));
00531                                                 $params='&edit[pages_language_overlay]['.$lpRecord['uid'].']=edit&overrideVals[pages_language_overlay][sys_language_uid]='.$lP;
00532                                                 $lPLabel = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon(t3lib_iconWorks::getIconImage('pages_language_overlay',$lpRecord,$this->backPath,'  class="absmiddle"'),'pages_language_overlay',$lpRecord['uid']).
00533                                                         $viewLink.
00534                                                         ($GLOBALS['BE_USER']->check('tables_modify','pages_language_overlay') ? '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
00535                                                         '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('edit',1).'" class="absmiddle" alt="" />'.
00536                                                         '</a>' : '').
00537                                                         htmlspecialchars(t3lib_div::fixed_lgd_cs($lpRecord['title'],20));
00538                                         } else {
00539                                                 $lPLabel = $viewLink;
00540                                         }
00541                                         $sCont[$lP]='
00542                                                 <td nowrap="nowrap">'.$lPLabel.'</td>';
00543                                 }
00544                                         // Add headers:
00545                                 $out.='
00546                                         <tr>'.implode($midSep,$cCont).'
00547                                         </tr>';
00548                                 $out.='
00549                                         <tr>'.implode($midSep,$sCont).'
00550                                         </tr>';
00551 
00552                                         // Traverse previously built content for the columns:
00553                                 foreach($languageColumn as $cKey => $cCont)     {
00554                                         $out.='
00555                                         <tr>
00556                                                 <td valign="top">'.implode('</td>'.$midSep.'
00557                                                 <td valign="top">',$cCont).'</td>
00558                                         </tr>';
00559 
00560                                         if ($this->defLangBinding)      {
00561                                                         // "defLangBinding" mode
00562                                                 foreach($defLanguageCount[$cKey] as $defUid)    {
00563                                                         $cCont=array();
00564                                                         foreach($langListArr as $lP)    {
00565                                                                 $cCont[] = $defLangBinding[$cKey][$lP][$defUid].
00566                                                                                 '<br/>'.$this->newLanguageButton($this->getNonTranslatedTTcontentUids(array($defUid),$id,$lP),$lP);
00567                                                         }
00568                                                         $out.='
00569                                                         <tr>
00570                                                                 <td valign="top">'.implode('</td>'.$midSep.'
00571                                                                 <td valign="top">',$cCont).'</td>
00572                                                         </tr>';
00573                                                 }
00574 
00575                                                         // Create spacer:
00576                                                 $cCont=array();
00577                                                 foreach($langListArr as $lP)    {
00578                                                         $cCont[] = '&nbsp;';
00579                                                 }
00580                                                 $out.='
00581                                                 <tr>
00582                                                         <td valign="top">'.implode('</td>'.$midSep.'
00583                                                         <td valign="top">',$cCont).'</td>
00584                                                 </tr>';
00585                                         }
00586                                 }
00587 
00588                                         // Finally, wrap it all in a table and add the language selector on top of it:
00589                                 $out = $languageSelector.'
00590                                         <table border="0" cellpadding="0" cellspacing="0" width="480" class="typo3-page-langMode">
00591                                                 '.$out.'
00592                                         </table>';
00593 
00594                                         // CSH:
00595                                 $out.= t3lib_BEfunc::cshItem($this->descrTable,'language_list',$GLOBALS['BACK_PATH']);
00596                         }
00597                 } else {                // SINGLE column mode (columns shown beneath each other):
00598 #debug('single column');
00599                         if ($this->tt_contentConfig['sys_language_uid']==0 || !$this->defLangBinding)   {
00600 
00601                                         // Initialize:
00602                                 $showLanguage = $this->defLangBinding && $this->tt_contentConfig['sys_language_uid']==0 ? ' AND sys_language_uid IN (0,-1)' : ' AND sys_language_uid='.$this->tt_contentConfig['sys_language_uid'];
00603 
00604                                 $cList = explode(',',$this->tt_contentConfig['showSingleCol']);
00605                                 $content=array();
00606                                 $out='';
00607 
00608                                         // Expand the table to some preset dimensions:
00609                                 $out.='
00610                                         <tr>
00611                                                 <td><img src="clear.gif" width="'.$lMarg.'" height="1" alt="" /></td>
00612                                                 <td valign="top"><img src="clear.gif" width="150" height="1" alt="" /></td>
00613                                                 <td><img src="clear.gif" width="10" height="1" alt="" /></td>
00614                                                 <td valign="top"><img src="clear.gif" width="300" height="1" alt="" /></td>
00615                                         </tr>';
00616 
00617                                         // Traverse columns to display top-on-top
00618                                 while(list($counter,$key)=each($cList)) {
00619 
00620                                                 // Select content elements:
00621                                         $queryParts = $this->makeQueryArray('tt_content', $id, 'AND colPos='.intval($key).$showHidden.$showLanguage);
00622                                         $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
00623                                         $c = 0;
00624                                         $rowArr = $this->getResult($result);
00625                                         $rowOut = '';
00626 
00627                                                 // If it turns out that there are not content elements in the column, then display a big button which links directly to the wizard script:
00628                                         if ($this->doEdit && $this->option_showBigButtons && !intval($key) && !$GLOBALS['TYPO3_DB']->sql_num_rows($result))     {
00629                                                 $onClick="document.location='db_new_content_el.php?id=".$id.'&colPos='.intval($key).'&sys_language_uid='.$lP.'&uid_pid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';";
00630                                                 $theNewButton=$GLOBALS['SOBE']->doc->t3Button($onClick,$GLOBALS['LANG']->getLL('newPageContent'));
00631                                                 $theNewButton='<img src="clear.gif" width="1" height="5" alt="" /><br />'.$theNewButton;
00632                                         } else $theNewButton='';
00633 
00634                                                 // Traverse any selected elements:
00635                                         foreach($rowArr as $row)        {
00636                                                 $c++;
00637                                                 $editUidList.=$row['uid'].',';
00638                                                 $isRTE=$RTE && $this->isRTEforField('tt_content',$row,'bodytext');
00639 
00640                                                         // Create row output:
00641                                                 $rowOut.='
00642                                                         <tr>
00643                                                                 <td></td>
00644                                                                 <td valign="top">'.$this->tt_content_drawHeader($row).'</td>
00645                                                                 <td></td>
00646                                                                 <td valign="top">'.$this->tt_content_drawItem($row,$isRTE).'</td>
00647                                                         </tr>';
00648 
00649                                                         // If the element was not the last element, add a divider line:
00650                                                 if ($c != $GLOBALS['TYPO3_DB']->sql_num_rows($result))  {
00651                                                         $rowOut.='
00652                                                         <tr>
00653                                                                 <td></td>
00654                                                                 <td colspan="3"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/stiblet_medium2.gif','width="468" height="1"').' class="c-divider" alt="" /></td>
00655                                                         </tr>';
00656                                                 }
00657                                         }
00658 
00659                                                 // Add spacer between sections in the vertical list
00660                                         if ($counter)   {
00661                                                 $out.='
00662                                                         <tr>
00663                                                                 <td></td>
00664                                                                 <td colspan="3"><br /><br /><br /><br /></td>
00665                                                         </tr>';
00666                                         }
00667 
00668                                                 // Add section header:
00669                                         $newP = $this->newContentElementOnClick($id,$key,$this->tt_contentConfig['sys_language_uid']);
00670                                         $out.='
00671 
00672                                                 <!-- Column header: -->
00673                                                 <tr>
00674                                                         <td></td>
00675                                                         <td valign="top" colspan="3">'.
00676                                                                 $this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key), ($this->doEdit&&count($rowArr)?'&edit[tt_content]['.$editUidList.']=edit'.$pageTitleParamForAltDoc:''), $newP).
00677                                                                 $theNewButton.
00678                                                                 '<br /></td>
00679                                                 </tr>';
00680 
00681                                                 // Finally, add the content from the records in this column:
00682                                         $out.=$rowOut;
00683                                 }
00684 
00685                                         // Finally, wrap all table rows in one, big table:
00686                                 $out = '
00687                                         <table border="0" cellpadding="0" cellspacing="0" width="400" class="typo3-page-columnsMode">
00688                                                 '.$out.'
00689                                         </table>';
00690 
00691                                         // CSH:
00692                                 $out.= t3lib_BEfunc::cshItem($this->descrTable,'columns_single',$GLOBALS['BACK_PATH']);
00693                         } else {
00694                                 $out = '<br/><br/>'.$GLOBALS['SOBE']->doc->icons(1).'Sorry, you cannot view a single language in this localization mode (Default Language Binding is enabled)<br/><br/>';
00695                         }
00696                 }
00697 
00698 
00699                         // Add the big buttons to page:
00700                 if ($this->option_showBigButtons)       {
00701                         $bArray=array();
00702 
00703                         if (!$GLOBALS['SOBE']->current_sys_language)    {
00704                                 if ($this->ext_CALC_PERMS&2)    $bArray[0]=$GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages]['.$id."]=edit",$this->backPath,''),$GLOBALS['LANG']->getLL('editPageTitle'));
00705                         } else {
00706                                 if ($this->doEdit && $GLOBALS['BE_USER']->check('tables_modify','pages_language_overlay'))      {
00707                                         list($languageOverlayRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay','pid',$id,'AND sys_language_uid='.intval($GLOBALS['SOBE']->current_sys_language));
00708                                         $bArray[0]=$GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages_language_overlay]['.$languageOverlayRecord['uid']."]=edit",$this->backPath,''),$GLOBALS['LANG']->getLL('editPageTitle_curLang'));
00709                                 }
00710                         }
00711                         if ($this->ext_CALC_PERMS&4 || $this->ext_CALC_PERMS&2) $bArray[1]=$GLOBALS['SOBE']->doc->t3Button("document.location='".$this->backPath."move_el.php?table=pages&uid=".$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';",$GLOBALS['LANG']->getLL('move_page'));
00712                         if ($this->ext_CALC_PERMS&8)    $bArray[2]=$GLOBALS['SOBE']->doc->t3Button("document.location='".$this->backPath."db_new.php?id=".$id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';",$GLOBALS['LANG']->getLL('newPage2'));
00713                         if ($this->doEdit && $this->ext_function==1) $bArray[3]=$GLOBALS['SOBE']->doc->t3Button("document.location='db_new_content_el.php?id=".$id.'&sys_language_uid='.$GLOBALS['SOBE']->current_sys_language.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';",$GLOBALS['LANG']->getLL('newPageContent2'));
00714                         $out = '
00715                                 <table border="0" cellpadding="4" cellspacing="0" class="typo3-page-buttons">
00716                                         <tr>
00717                                                 <td>'.implode('</td>
00718                                                 <td>',$bArray).'</td>
00719                                         </tr>
00720                                 </table>
00721                                 <img src="clear.gif" width="1" height="5" alt="" /><br />
00722                                 '.t3lib_BEfunc::cshItem($this->descrTable,'button_panel',$GLOBALS['BACK_PATH']).        // CSH
00723                                 $out;
00724                 }
00725 
00726                         // Return content:
00727                 return $out;
00728         }
00729 
00736         function getTable_fe_users($id) {
00737 
00738                 $this->addElement_tdParams=array(
00739                         'username'=>' nowrap="nowrap"',
00740                         'password'=>' nowrap="nowrap"',
00741                         'usergroup'=>' nowrap="nowrap"',
00742                         'name'=>' nowrap="nowrap"',
00743                         'address'=>' nowrap="nowrap"',
00744                         'zip'=>' nowrap="nowrap"',
00745                         'city'=>' nowrap="nowrap"',
00746                         'email'=>' nowrap="nowrap"',
00747                         'telephone'=>' nowrap="nowrap"'
00748                 );
00749                 $fList = 'username,password,usergroup,name,email,telephone,address,zip,city';
00750                 $out = $this->makeOrdinaryList('fe_users',$id, $fList, 1);
00751                 $this->addElement_tdParams=array();
00752                 return $out;
00753         }
00754 
00762         function getTable_sys_note($id) {
00763                 global $TCA;
00764 
00765                 if (!t3lib_extMgm::isLoaded('sys_note'))        return '';
00766 
00767                         // INIT:
00768                 $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
00769                 $tree = $this->getTreeObject($id,intval($GLOBALS['SOBE']->MOD_SETTINGS['pages_levels']),$perms_clause);
00770 
00771                 $this->itemLabels =array();
00772                 foreach($TCA['sys_note']['columns'] as $name => $val)   {
00773                         $this->itemLabels[$name]=$GLOBALS['LANG']->sL($val['label']);
00774                 }
00775 
00776                         // If page ids were found, select all sys_notes from the page ids:
00777                 $out='';
00778                 if (count($tree->ids))          {
00779                         $delClause = t3lib_BEfunc::deleteClause('sys_note');
00780                         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_note', 'pid IN ('.implode(',',$tree->ids).') AND (!personal OR cruser='.intval($GLOBALS['BE_USER']->user['uid']).')'.$delClause);
00781                         $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
00782 
00783                                 // If sys_notes were found, render them:
00784                         if ($dbCount)   {
00785                                 $this->fieldArray = explode(',','__cmds__,info,note');
00786 
00787                                         // header line is drawn
00788                                 $theData = Array();
00789                                 $theData['__cmds__'] ='';
00790                                 $theData['info'] = '<b>Info</b><br /><img src="clear.gif" height="1" width="220" alt="" />';
00791                                 $theData['note'] = '<b>Note</b>';
00792                                 $out.=$this->addelement(1,'',$theData,' class="c-headLine"',20);
00793 
00794                                         // half line is drawn
00795                                 $theData = Array();
00796                                 $theData['info'] = $this->widthGif;
00797                                 $out.=$this->addelement(0,'',$theData);
00798 
00799                                 $this->no_noWrap=1;
00800 
00801                                         // Items
00802                                 $this->eCounter=$this->firstElementNumber;
00803                                 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))   {
00804                                         list($flag,$code) = $this->fwd_rwd_nav();
00805                                         $out.=$code;
00806                                         if ($flag)      {
00807                                                 $color = Array (
00808                                                         0 => '',                // No category
00809                                                         1 => ' class="bgColor4"',               // Instructions
00810                                                         2 => ' class="bgColor2"',               // Template
00811                                                         3 => '',                // Notes
00812                                                         4 => ' class="bgColor5"'                // To-do
00813                                                 );
00814                                                 $tdparams = $color[$row['category']];
00815                                                 $info = Array();;
00816                                                 $theData = Array();
00817                                                 $this->getProcessedValue('sys_note','subject,category,author,email,personal',$row,$info);
00818                                                 $cont=implode('<br />',$info);
00819                                                 $head = '<b>Page:</b> '.t3lib_BEfunc::getRecordPath($row['pid'],$perms_clause,10).'<br />';
00820 
00821                                                 $theData['__cmds__']= $this->getIcon('sys_note',$row);
00822                                                 $theData['info'] = $head.$cont;
00823                                                 $theData['note'] = nl2br($row['message']);
00824 
00825                                                 $out.=$this->addelement(1,'',$theData,$tdparams,20);
00826 
00827 
00828                                                         // half line is drawn
00829                                                 $theData = Array();
00830                                                 $theData['info'] = $this->widthGif;
00831                                                 $out.=$this->addelement(0,'',$theData);
00832                                         }
00833                                         $this->eCounter++;
00834                                 }
00835 
00836                                         // Wrap it all in a table:
00837                                 $out='
00838                                         <table border="0" cellpadding="1" cellspacing="2" width="480" class="typo3-page-sysnote">
00839                                                 '.$out.'
00840                                         </table>';
00841                         }
00842                 }
00843                 return $out;
00844         }
00845 
00853         function getTable_tt_board($id) {
00854 
00855                         // Initialize:
00856                 $delClause = t3lib_BEfunc::deleteClause('tt_board');
00857                 $queryParts = $this->makeQueryArray('tt_board', $id, 'AND parent=0');
00858                 $this->setTotalItems($queryParts);
00859                 $dbCount = 0;
00860 
00861                         // If items were selected, make query:
00862                 if ($this->totalItems)  {
00863                         $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
00864                         $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
00865                 }
00866 
00867                         // If results came out of that, render the list:
00868                 $out='';
00869                 if ($dbCount)   {
00870 
00871                                 // Setting fields to display first:
00872                         if ($GLOBALS['SOBE']->MOD_SETTINGS['tt_board']=='expand')       {
00873                                 $this->fieldArray = explode(',','subject,author,date,age');
00874                         } else {
00875                                 $this->fieldArray = explode(',','subject,author,date,age,replys');
00876                         }
00877 
00878                                 // Header line is drawn
00879                         $theData = Array();
00880                         $theData['subject'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_subject',1).'</b>';
00881                         $theData['author'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_author',1).'</b>';
00882                         $theData['date'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_date',1).'</b>';
00883                         $theData['age'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_age',1).'</b>';
00884                         if ($GLOBALS['SOBE']->MOD_SETTINGS['tt_board']!='expand') {
00885                                 $theData['replys'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_RE',1).'</b>';
00886                         }
00887                         $out.=$this->addelement(1,'',$theData,' class="c-headLine"',20);
00888 
00889                                 // half line is drawn
00890                         $theData = Array();
00891                         $theData['subject'] = $this->widthGif;
00892                         $out.=$this->addelement(0,'',$theData);
00893 
00894                                 // Items
00895                         $this->eCounter=$this->firstElementNumber;
00896                         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))   {
00897                                 list($flag,$code) = $this->fwd_rwd_nav();
00898                                 $out.=$code;
00899 
00900                                 if ($flag)      {
00901 
00902                                         $theRows = Array();
00903                                         $theRows = $this->tt_board_getTree ($theRows,$row['uid'],$id,$delClause,'');
00904                                         $out.=$this->tt_board_drawItem('tt_board',$row,count($theRows));
00905 
00906                                         if ($GLOBALS['SOBE']->MOD_SETTINGS['tt_board']=='expand')       {
00907                                                 reset($theRows);
00908                                                 while(list($n,$sRow)=each($theRows))    {
00909                                                         $out.=$this->tt_board_drawItem('tt_board',$sRow,0);
00910                                                 }
00911                                         }
00912                                 }
00913                                 $this->eCounter++;
00914                         }
00915 
00916                                 // Wrap it all in a table:
00917                         $out='
00918                                 <table border="0" cellpadding="0" cellspacing="0" class="typo3-page-listTTboard">
00919                                         '.$out.'
00920                                 </table>';
00921                 }
00922 
00923                 return $out;
00924         }
00925 
00933         function getTable_tt_address($id)       {
00934 
00935                         // Define fieldlist to show:
00936                 switch($GLOBALS['SOBE']->MOD_SETTINGS['tt_address'])    {
00937                         case 1:
00938                                 $icon = 0;
00939                                 $fList = 'name,address,zip,city,country';
00940                         break;
00941                         case 2:
00942                                 $icon = 1;
00943                                 $fList = 'name;title;email;company,image';
00944                         break;
00945                         default:
00946                                 $icon = 0;
00947                                 $fList = 'name,email,www,phone,fax,mobile';
00948                         break;
00949                 }
00950 
00951                         // Create listing
00952                 $out = $this->makeOrdinaryList('tt_address',$id, $fList, $icon);
00953                 return $out;
00954         }
00955 
00963         function getTable_tt_links($id) {
00964 
00965                         // Define fieldlist to show:
00966                 switch($GLOBALS['SOBE']->MOD_SETTINGS['tt_links'])      {
00967                         case 1:
00968                                 $fList = 'title,hidden,url';
00969                         break;
00970                         case 2:
00971                                 $fList = 'title;url,note2';
00972                         break;
00973                         default:
00974                                 $fList = 'title;url,note';
00975                         break;
00976                 }
00977 
00978                 $out = $this->makeOrdinaryList('tt_links',$id, $fList,1);
00979                 return $out;
00980         }
00981 
00989         function getTable_tt_guest($id) {
00990 
00991                         // Define fieldlist to show:
00992                 $fList = 'title;cr_name;cr_email,note';
00993                 $out = $this->makeOrdinaryList('tt_guest',$id, $fList, 1);
00994                 return $out;
00995         }
00996 
01004         function getTable_tt_news($id)  {
01005 
01006                 $this->addElement_tdParams=array(
01007                         'title'=>' nowrap="nowrap"',
01008                         'datetime'=>' nowrap="nowrap"',
01009                         'starttime'=>' nowrap="nowrap"',
01010                         'author'=>' nowrap="nowrap"'
01011                 );
01012                 $fList = 'title,author,author_email,datetime,starttime,category,image';
01013                 $out = $this->makeOrdinaryList('tt_news',$id, $fList, 1);
01014                 $this->addElement_tdParams=array();
01015                 return $out;
01016         }
01017 
01025         function getTable_tt_calender($id)      {
01026 
01027                 $type=$GLOBALS['SOBE']->MOD_SETTINGS['tt_calender'];
01028                 switch($type)   {
01029                         case 'date':
01030                                         // Date default
01031                                 $fList = 'date,title';
01032                                 $icon=0;
01033                                 $out = $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=0');
01034                                 return $out;
01035                         break;
01036                         case 'date_ext':
01037                                         // Date extended
01038                                 $fList = 'title;date;time;datetext;link,note';
01039                                 $icon=1;
01040                                 $out = $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=0');
01041                                 return $out;
01042                         break;
01043                         case 'todo':
01044                                         // Todo default
01045                                 $fList = 'title,complete,priority,date';
01046                                 $icon=0;
01047                                 $out = $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=1');
01048                                 return $out;
01049                         break;
01050                         case 'todo_ext':
01051                                         // Todo extended
01052                                 $fList = 'title;complete;priority;date;workgroup;responsible;category,note';
01053                                 $icon=1;
01054                                 $out = $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=1');
01055                                 return $out;
01056                         break;
01057                         default:
01058                                         // Overview, both todo and calender
01059                                 $fList = 'title,date,time,week';
01060                                 $icon=1;
01061                                 $out = $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=0');
01062                                 $out.= $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=1');
01063                                 return $out;
01064                         break;
01065                 }
01066         }
01067 
01075         function getTable_tt_products($id)      {
01076 
01077                 $type = $GLOBALS['SOBE']->MOD_SETTINGS['tt_products'];
01078                 switch($type)   {
01079                         case 'ext':
01080                                 $fList = 'title;itemnumber;price;price2;inStock;category,image,note';
01081                                 $icon=1;
01082                                 $out = $this->makeOrdinaryList('tt_products',$id, $fList, $icon);
01083                         break;
01084                         default:
01085                                 $fList = 'title,itemnumber,price,category,image';
01086                                 $icon=1;
01087                                 $out = $this->makeOrdinaryList('tt_products',$id, $fList, $icon);
01088                         break;
01089                 }
01090 
01091                 return $out;
01092         }
01093 
01094 
01095 
01096 
01097 
01098 
01099 
01100 
01101 
01102 
01103 
01104 
01105         /**********************************
01106          *
01107          * Generic listing of items
01108          *
01109          **********************************/
01110 
01121         function makeOrdinaryList($table, $id, $fList, $icon=0, $addWhere='')   {
01122                 global $TCA;
01123 
01124                         // Initialize:
01125                 $out = '';
01126                 $queryParts = $this->makeQueryArray($table, $id, $addWhere);
01127                 $this->setTotalItems($queryParts);
01128                 $dbCount = 0;
01129 
01130                         // Make query for records if there were any records found in the count operation:
01131                 if ($this->totalItems)  {
01132                         $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
01133                         $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
01134                 }
01135 
01136                         // If records were found, render the list:
01137                 $out = '';
01138                 if ($dbCount)   {
01139 
01140                                 // Set fields
01141                         $this->fieldArray = explode(',','__cmds__,'.$fList);
01142 
01143                                 // Header line is drawn
01144                         $theData = array();
01145                         $theData = $this->headerFields($this->fieldArray,$table,$theData);
01146                         $out.= $this->addelement(1,'',$theData,' class="c-headLine"',15);
01147 
01148                                 // Render Items
01149                         $this->eCounter = $this->firstElementNumber;
01150                         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))   {
01151                                 list($flag,$code) = $this->fwd_rwd_nav();
01152                                 $out.= $code;
01153                                 if ($flag)      {
01154                                         $params = '&edit['.$table.']['.$row['uid'].']=edit';
01155                                         $Nrow = array();
01156 
01157                                                 // Setting icons/edit links:
01158                                         if ($icon)      {
01159                                                 $Nrow['__cmds__']= $this->getIcon($table,$row);
01160                                         }
01161                                         if ($this->doEdit)      {
01162                                                 $Nrow['__cmds__'].= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
01163                                                                                 '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('edit',1).'" alt=