Documentation TYPO3 par Ameos

class.tx_cms_layout.php

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