Commit 01391268 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* Finally fixed typo3/show_item.php and typo3/wizard_colorpicker.php scripts for TYPO3 3.6.0 compliance. Now only extensions and some t3lib/ are missing clean-up.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@313 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 8043ef08
2004-05-19 Kasper Skårhøj,,, <kasper@typo3.com>
* Finally fixed typo3/show_item.php and typo3/wizard_colorpicker.php scripts for TYPO3 3.6.0 compliance. Now only extensions and some t3lib/ are missing clean-up.
2004-05-18 Kasper Skårhøj,,, <kasper@typo3.com>
* Added t3lib_cs::specCharsToASCII() for converting special chars (like umlauts) to their double-byte alternatives in ASCII (like au, oe etc...). Function is NOT finished at all, only added so I could use it for the conversion of filenames in simulateStaticDocuments.
* TypoScript charset compatibility extended: tslib_cObj::caseshift(), tslib_cObj::substring(), tslib_cObj::crop() uses functions in t3lib_cs now. Also stdWrap.strftime will automatically convert localized string from locale charset (guessed by t3lib_cs) to renderCharset.
......
......@@ -327,7 +327,7 @@ XQCR: t3lib/class.t3lib_clipboard.php
-QC-: t3lib/class.t3lib_cs.php
XQCR: t3lib/class.t3lib_diff.php
XQCR: t3lib/class.t3lib_div.php
t3lib/class.t3lib_dmailer.php [Pekue?]
t3lib/class.t3lib_dmailer.php [Jan-Erik?]
t3lib/class.t3lib_exec.php [Rene]
t3lib/class.t3lib_extfilefunc.php
-QCR: t3lib/class.t3lib_extmgm.php
......@@ -335,7 +335,7 @@ XQCR: t3lib/class.t3lib_div.php
XQCR: t3lib/class.t3lib_foldertree.php
-QCR: t3lib/class.t3lib_formmail.php
t3lib/class.t3lib_fullsearch.php
t3lib/class.t3lib_htmlmail.php [Pekue?]
t3lib/class.t3lib_htmlmail.php [Jan-Erik?]
XQCR: t3lib/class.t3lib_iconworks.php
t3lib/class.t3lib_install.php
-QCR: t3lib/class.t3lib_loaddbgroup.php
......@@ -457,14 +457,14 @@ XQCR: listframe_loader.php
XQCR: login_frameset.php
-QC-: logout.php TODO: Check "redirect" GPvar for XSS hole!?
XQCR: move_el.php
show_item.php [Peter Kuehn]
XQCR: show_item.php
XQCR: show_rechis.php
-QCR: tce_db.php
-QCR: tce_file.php
XQCR: template.php
XQCR: view_help.php
XQCR: wizard_add.php
wizard_colorpicker.php [Matthias]
XQCR: wizard_colorpicker.php
XQCR: wizard_edit.php
XQCR: wizard_forms.php
XQCR: wizard_list.php
......@@ -479,6 +479,11 @@ XQCR: mod/web/func/index.php
XQCR: mod/web/perm/index.php
typo3/sysext/___________________________________________:
install/ [ingmar]
OK cms/
OK lang/
typo3/ext/_____________________________________:
OK aboutmodules/
belog/ (2 / 500)
......@@ -487,7 +492,7 @@ OK aboutmodules/
OK conf_userts/
OK context_help/
css_styled_content/ (1/200) [H]
direct_mail/ (3/2500) [Peter Kuehn] + class.t3lib_htmlmail.php
direct_mail/ (3/2500) [Jan-Erik] + class.t3lib_htmlmail.php
OK direct_mail_subscription/
XQCR: extra_page_cm_options/
extrep_wizard/ (2/4500) [H]
......
......@@ -2291,13 +2291,13 @@ class t3lib_div {
function view_array($array_in) {
if (is_array($array_in)) {
$result='<table border="1" cellpadding="1" cellspacing="0" bgcolor="white">';
if (!count($array_in)) {$result.= '<tr><td><font face="Verdana,Arial" size="1"><b>'.HTMLSpecialChars("EMPTY!").'</b></font></td></tr>';}
if (!count($array_in)) {$result.= '<tr><td><font face="Verdana,Arial" size="1"><b>'.htmlspecialchars("EMPTY!").'</b></font></td></tr>';}
while (list($key,$val)=each($array_in)) {
$result.= '<tr><td><font face="Verdana,Arial" size="1">'.HTMLSpecialChars((string)$key).'</font></td><td>';
$result.= '<tr><td><font face="Verdana,Arial" size="1">'.htmlspecialchars((string)$key).'</font></td><td>';
if (is_array($array_in[$key])) {
$result.=t3lib_div::view_array($array_in[$key]);
} else
$result.= '<font face="Verdana,Arial" size="1" color="red">'.nl2br(HTMLSpecialChars((string)$val)).'<br /></font>';
$result.= '<font face="Verdana,Arial" size="1" color="red">'.nl2br(htmlspecialchars((string)$val)).'<br /></font>';
$result.= '</td></tr>';
}
$result.= '</table>';
......@@ -2334,7 +2334,7 @@ class t3lib_div {
*/
function debug($var="",$brOrHeader=0) {
if ($brOrHeader && !t3lib_div::testInt($brOrHeader)) {
echo '<table border="0" cellpadding="0" cellspacing="0" bgcolor="white" style="border:0px;margin-top:3px;margin-bottom:3px;"><tr><td bgcolor="#bbbbbb"><font face="Verdana,Arial" size="1">&nbsp;<b>'.(string)HTMLSpecialChars($brOrHeader).'</b></font></td></tr><td>';
echo '<table border="0" cellpadding="0" cellspacing="0" bgcolor="white" style="border:0px; margin-top:3px; margin-bottom:3px;"><tr><td style="background-color:#bbbbbb; font-family: verdana,arial; font-weight: bold; font-size: 10px;">'.htmlspecialchars((string)$brOrHeader).'</td></tr><td>';
} elseif ($brOrHeader<0) {
for($a=0;$a<abs(intval($brOrHeader));$a++){echo '<br />';}
}
......@@ -2346,7 +2346,7 @@ class t3lib_div {
print_r($var);
echo '</pre>|</b>';
} elseif ((string)$var!='') {
echo '<b>|'.HTMLSpecialChars((string)$var).'|</b>';
echo '<b>|'.htmlspecialchars((string)$var).'|</b>';
} else {
echo '<b>| debug |</b>';
}
......
......@@ -1847,7 +1847,7 @@ class t3lib_stdGraphic {
} else {
$returnArr = $this->imageMagickIdentify($imageFile);
}
if($returnArr) {
if ($returnArr) {
$this->cacheImageDimensions($returnArr);
return $returnArr;
}
......
......@@ -220,19 +220,21 @@ class t3lib_superadmin {
break;
case 'page':
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<style type="text/css">
.redclass {color: red;}
P {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px}
BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
H1 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; color: #000066;}
H2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; color: #000066;}
H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000066;}
H4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: maroon;}
TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
</style>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
.redclass {color: red;}
P {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px}
BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
H1 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; color: #000066;}
H2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; color: #000066;}
H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000066;}
H4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: maroon;}
TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
</style>
<title>TYPO3 Super Admin</title>
</head>
<body>
......@@ -277,11 +279,11 @@ class t3lib_superadmin {
$lines[]=$this->setMenuItem('info','INFO');
$lines[]=$this->setMenuItem('update','UPDATE');
$lines[]='';
$lines[]='<a href="'.$this->scriptName.'?type=page" target="TSApage">Default</a>';
$lines[]='<a href="'.$this->scriptName.'?type=page&show=all" target="TSApage">All details</a>';
$lines[]='<a href="'.$this->scriptName.'?type=page&show=admin" target="TSApage">Admin logins</a>';
$lines[]='<a href="'.$this->scriptName.'?type=phpinfo" target="TSApage">phpinfo()</a>';
$lines[]='<a href="'.$this->scriptName.'?type=page&show=localext" target="TSApage">Local extensions</a>';
$lines[]='<a href="'.htmlspecialchars($this->scriptName.'?type=page').'" target="TSApage">Default</a>';
$lines[]='<a href="'.htmlspecialchars($this->scriptName.'?type=page&show=all').'" target="TSApage">All details</a>';
$lines[]='<a href="'.htmlspecialchars($this->scriptName.'?type=page&show=admin').'" target="TSApage">Admin logins</a>';
$lines[]='<a href="'.htmlspecialchars($this->scriptName.'?type=phpinfo').'" target="TSApage">phpinfo()</a>';
$lines[]='<a href="'.htmlspecialchars($this->scriptName.'?type=page&show=localext').'" target="TSApage">Local extensions</a>';
$lines[]='';
$content = implode('<br />',$lines);
$content.= '<hr />';
......
......@@ -2280,6 +2280,7 @@ class t3lib_TCEforms {
if (!$wConf['notNewRecords'] || t3lib_div::testInt($row['uid'])) {
$params = array();
$params['params'] = $wConf['params'];
$params['exampleImg'] = $wConf['exampleImg'];
$params['table'] = $table;
$params['uid'] = $row['uid'];
$params['pid'] = $row['pid'];
......
......@@ -820,11 +820,11 @@ class SC_browse_links {
window.opener.'.$v;
}
$P2=array();
$P2['itemName']=$this->P['itemName'];
$P2['formName']=$this->P['formName'];
$P2['fieldChangeFunc']=$this->P['fieldChangeFunc'];
$addPassOnParams.=t3lib_div::implodeArrayForUrl('P',$P2);
$P2 = array();
$P2['itemName'] = $this->P['itemName'];
$P2['formName'] = $this->P['formName'];
$P2['fieldChangeFunc'] = $this->P['fieldChangeFunc'];
$addPassOnParams.= t3lib_div::implodeArrayForUrl('P',$P2);
$JScode.='
function link_typo3Page(id,anchor) { //
......
......@@ -1205,7 +1205,7 @@ EXTENSION KEYS:
$content = '
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td nowrap="nowrap">Extension:&nbsp;<strong>'.$this->extensionTitleIconHeader($extKey,$list[$extKey],'absmiddle').'</strong> ('.$extKey.')</td>
<td nowrap="nowrap">Extension:&nbsp;<strong>'.$this->extensionTitleIconHeader($extKey,$list[$extKey]).'</strong> ('.$extKey.')</td>
<td align="right" nowrap="nowrap">'.
t3lib_BEfunc::getFuncMenu(0,'SET[singleDetails]',$this->MOD_SETTINGS['singleDetails'],$this->MOD_MENU['singleDetails'],'','&CMD[showExt]='.$extKey).' &nbsp; &nbsp; '.
'<a href="index.php" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/goback.gif','width="14" height="14"').' class="absmiddle" alt="" /> Go back</a></td>
......
......@@ -28,6 +28,7 @@
* Shows information about a database or file item
*
* $Id$
* Revised for TYPO3 3.7 May/2004 by Kasper Skaarhoj
*
* @author Kasper Skaarhoj <kasper@typo3.com>
*/
......@@ -36,27 +37,29 @@
*
*
*
* 79: class transferData extends t3lib_transferData
* 95: function regItem($table, $id, $field, $content)
* 81: class transferData extends t3lib_transferData
* 98: function regItem($table, $id, $field, $content)
*
*
* 133: class SC_show_item
* 151: function init()
* 220: function main()
* 348: function printContent()
* 132: class SC_show_item
* 157: function init()
* 224: function main()
* 252: function renderDBInfo()
* 300: function renderFileInfo($returnLinkTag)
* 414: function printContent()
*
* TOTAL FUNCTIONS: 4
* TOTAL FUNCTIONS: 6
* (This index is automatically created/updated by the extension "extdeveval")
*
*/
$BACK_PATH='';
require ($BACK_PATH.'init.php');
require ($BACK_PATH.'template.php');
require_once (PATH_t3lib.'class.t3lib_page.php');
require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
require_once (PATH_t3lib.'class.t3lib_transferdata.php');
$BACK_PATH = '';
require($BACK_PATH.'init.php');
require($BACK_PATH.'template.php');
require_once(PATH_t3lib.'class.t3lib_page.php');
require_once(PATH_t3lib.'class.t3lib_loaddbgroup.php');
require_once(PATH_t3lib.'class.t3lib_transferdata.php');
......@@ -77,6 +80,7 @@ require_once (PATH_t3lib.'class.t3lib_transferdata.php');
* @subpackage core
*/
class transferData extends t3lib_transferData {
var $formname = 'loadform';
var $loading = 1;
......@@ -86,11 +90,11 @@ class transferData extends t3lib_transferData {
/**
* Register item function.
*
* @param [type] $table: ...
* @param [type] $id: ...
* @param [type] $field: ...
* @param [type] $content: ...
* @return [type] ...
* @param string Table name
* @param integer Record uid
* @param string Field name
* @param string Content string.
* @return void
*/
function regItem($table, $id, $field, $content) {
t3lib_div::loadTCA($table);
......@@ -120,234 +124,296 @@ class transferData extends t3lib_transferData {
/**
* Script Class
*
* GPvars:
* $table : Record table (or filename)
* $uid : Record uid (or '' when filename)
* Script Class for showing information about an item.
*
* @author Kasper Skaarhoj <kasper@typo3.com>
* @package TYPO3
* @subpackage core
*/
class SC_show_item {
var $include_once=array();
var $content;
var $perms_clause;
var $access;
var $pageinfo;
var $type;
var $file;
var $relPath;
var $row;
var $table;
var $uid;
var $doc;
// GET vars:
var $table; // Record table (or filename)
var $uid; // Record uid (or '' when filename)
// Internal, static:
var $perms_clause; // Page select clause
var $access; // If true, access to element is granted
var $type; // Which type of element: "file" or "db"
var $doc; // Document Template Object
// Internal, dynamic:
var $content; // Content Accumulation
var $file; // For type "file": Filename
var $pageinfo; // For type "db": Set to page record of the parent page of the item set (if type="db")
var $row; // For type "db": The database record row.
/**
* @return [type] ...
* Initialization of the class
* Will determine if table/uid GET vars are database record or a file and if the user has access to view information about the item.
*
* @return void
*/
function init() {
global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
global $BE_USER,$LANG,$BACK_PATH,$TCA;
// Setting input variables.
$this->table = t3lib_div::_GET('table');
$this->uid = t3lib_div::_GET('uid');
// Initialize:
$this->perms_clause = $BE_USER->getPagePermsClause(1);
$this->table = t3lib_div::_GP('table');
$this->uid = t3lib_div::_GP("uid");
$this->access = 0; // Set to true if there is access to the record / file.
$this->type = ''; // Sets the type, "db" or "file". If blank, nothing can be shown.
$this->access=0;
$this->type="";
if (isset($TCA[$this->table]) && $BE_USER->check("tables_select",$this->table)) {
// Checking if the $table value is really a table and if the user has access to it.
if (isset($TCA[$this->table])) {
t3lib_div::loadTCA($this->table);
$this->type="db";
$this->uid=intval($this->uid);
if ($this->uid) {
if ((string)$this->table=="pages") {
$this->type = 'db';
$this->uid = intval($this->uid);
// Check permissions and uid value:
if ($this->uid && $BE_USER->check('tables_select',$this->table)) {
if ((string)$this->table=='pages') {
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->uid,$this->perms_clause);
$this->access = is_array($this->pageinfo) ? 1 : 0;
$this->row=$this->pageinfo;
$this->row = $this->pageinfo;
} else {
$this->row=t3lib_BEfunc::getRecord ($this->table,$this->uid);
$this->row = t3lib_BEfunc::getRecord($this->table,$this->uid);
if ($this->row) {
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->row["pid"],$this->perms_clause);
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->row['pid'],$this->perms_clause);
$this->access = is_array($this->pageinfo) ? 1 : 0;
}
}
$treatData = t3lib_div::makeInstance("t3lib_transferData");
$treatData = t3lib_div::makeInstance('t3lib_transferData');
$treatData->renderRecord($this->table, $this->uid, 0, $this->row);
$cRow = $treatData->theRecord;
}
} else {
// if the filereference $this->file is relative, we correct the path
if (substr($this->table,0,3)=="../") {
$this->file = PATH_site.ereg_replace("^\.\./","",$this->table);
$this->relPath=1;
if (substr($this->table,0,3)=='../') {
$this->file = PATH_site.ereg_replace('^\.\./','',$this->table);
} else {
$this->file = $this->table;
$this->relPath=0;
}
if (@is_file($this->file)) {
$this->type="file";
$this->access=1;
if (@is_file($this->file) && t3lib_div::isAllowedAbsPath($this->file)) {
$this->type = 'file';
$this->access = 1;
$this->include_once[]=PATH_t3lib."class.t3lib_stdgraphic.php";
require_once(PATH_t3lib.'class.t3lib_stdgraphic.php');
}
}
$this->doc = t3lib_div::makeInstance("smallDoc");
// Initialize document template object:
$this->doc = t3lib_div::makeInstance('smallDoc');
$this->doc->backPath = $BACK_PATH;
$this->doc->tableLayout = Array (
"defRow" => Array (
"0" => Array('<TD valign="top">','</td>'),
"defCol" => Array('<TD><img src="'.$this->backPath.'clear.gif" width=15 height=1></td><td valign="top">','</td>')
)
);
$this->doc->docType = 'xhtml_trans';
$this->content.=$this->doc->startPage($LANG->sL("LLL:EXT:lang/locallang_core.php:show_item.php.viewItem"));
$this->content.=$this->doc->header($LANG->sL("LLL:EXT:lang/locallang_core.php:show_item.php.viewItem"));
// Starting the page by creating page header stuff:
$this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:show_item.php.viewItem'));
$this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:show_item.php.viewItem'));
$this->content.=$this->doc->spacer(5);
}
/**
* [Describe function...]
* Main function. Will generate the information to display for the item set internally.
*
* @return [type] ...
* @return void
*/
function main() {
global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
global $LANG;
if ($this->access) {
$returnLinkTag = t3lib_div::_GP("returnUrl") ? '<a href="'.t3lib_div::_GP("returnUrl").'" class="typo3-goBack">' : '<a href="#" onClick="window.close();">';
if ($this->type=="db") {
$code=$this->doc->getHeader($this->table,$this->row,$this->pageinfo["_thePath"],1).'<br />';
$this->content.=$this->doc->section('',$code);
$codeArr=Array();
$i=0;
$fieldList=explode(",",$TCA[$this->table]["interface"]["showRecordFieldList"]);
while(list(,$name)=each($fieldList)) {
$name=trim($name);
if ($TCA[$this->table]["columns"][$name]) {
if (!$TCA[$this->table]["columns"][$name]["exclude"] || $GLOBALS["BE_USER"]->check("non_exclude_fields",$this->table.":".$name)) {
$i++;
$codeArr[$i][]=$LANG->sL(t3lib_BEfunc::getItemLabel($this->table,$name));
$codeArr[$i][]=htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table,$name,$this->row[$name]));
}
}
}
$this->content.=$this->doc->section('',$this->doc->table($codeArr));
$this->content.=$this->doc->divider(2);
$returnLinkTag = t3lib_div::_GP('returnUrl') ? '<a href="'.t3lib_div::_GP('returnUrl').'" class="typo3-goBack">' : '<a href="#" onclick="window.close();">';
// Branch out based on type:
switch($this->type) {
case 'db':
$this->renderDBInfo();
break;
case 'file':
$this->renderFileInfo($returnLinkTag);
break;
}
$code="";
$code.='Path: '.t3lib_div::fixed_lgd_cs($this->pageinfo["_thePath"],-48).'<br />';
$code.='Table: '.$LANG->sL($TCA[$this->table]["ctrl"]["title"]).' ('.$this->table.') - UID: '.$this->uid.'<br />';
$this->content.=$this->doc->section('',$code);
// If return Url is set, output link to go back:
if (t3lib_div::_GP('returnUrl')) {
$this->content.= $this->doc->section('','<br />'.$returnLinkTag.'<strong>'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.goBack',1).'</strong></a>');
}
if ($this->type=="file") {
$imgInfo="";
$imgObj = t3lib_div::makeInstance("t3lib_stdGraphic");
$imgObj->init();
$imgObj->mayScaleUp=0;
$imgObj->tempPath=PATH_site.$imgObj->tempPath;
$imgInfo = $imgObj->getImageDimensions($this->file);
$fI = t3lib_div::split_fileref($this->file);
$ext = $fI["fileext"];
// debug($fI);
if ($imgInfo) {
$code="";
if ($this->relPath || t3lib_div::isFirstPartOfStr($this->file,PATH_site)) {
$code.='<a href="../'.substr($this->file,strlen(PATH_site)).'" target="_blank"><b>'.$LANG->sL("LLL:EXT:lang/locallang_core.php:show_item.php.file").':</b> '.$fI["file"].'</a>';
} else {
$code.='<b>'.$LANG->sL("LLL:EXT:lang/locallang_core.php:show_item.php.file").':</b> '.$fI["file"];
}
$code.=' &nbsp;&nbsp;<b>'.$LANG->sL("LLL:EXT:lang/locallang_core.php:show_item.php.filesize").':</b> '.t3lib_div::formatSize(@filesize($this->file));
$code.='<br />';
$code.='<b>'.$LANG->sL("LLL:EXT:lang/locallang_core.php:show_item.php.dimensions").':</b> '.$imgInfo[0].'x'.$imgInfo[1].' pixels';
$this->content.=$this->doc->section('',$code);
}
}
$this->content.=$this->doc->divider(2);
/**
* Main function. Will generate the information to display for the item set internally.
*
* @return void
*/
function renderDBInfo() {
global $LANG,$TCA;
// Print header, path etc:
$code = $this->doc->getHeader($this->table,$this->row,$this->pageinfo['_thePath'],1).'<br />';
$this->content.= $this->doc->section('',$code);
// Initialize variables:
$tableRows = Array();
$i = 0;
// Traverse the list of fields to display for the record:
$fieldList = t3lib_div::trimExplode(',',$TCA[$this->table]['interface']['showRecordFieldList'],1);
foreach($fieldList as $name) {
$name = trim($name);
if ($TCA[$this->table]['columns'][$name]) {
if (!$TCA[$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields',$this->table.':'.$name)) {
$i++;
$tableRows[] = '
<tr>
<td class="bgColor5">'.$LANG->sL(t3lib_BEfunc::getItemLabel($this->table,$name),1).'</td>
<td class="bgColor4">'.htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table,$name,$this->row[$name])).'</td>
</tr>';
}
}
}
$imgInfo = $imgObj->imageMagickConvert($this->file,"web","346","200m","","","",1);
$imgInfo[3] = "../".substr($imgInfo[3],strlen(PATH_site));
$code= '<br /><div align="center">'.$returnLinkTag.$imgObj->imgTag($imgInfo).'</a></div>';
$this->content.=$this->doc->section('',$code);
} else {
$code="";
$icon = t3lib_BEfunc::getFileIcon($ext);
$url = 'gfx/fileicons/'.$icon;
$code.='<a href="../'.substr($this->file,strlen(PATH_site)).'" target="_blank"><img src="'.$url.'" width=18 height=16 align="top" border=0> <b>File:</b> '.$fI["file"].'</a> &nbsp;&nbsp;<b>Size:</b> '.t3lib_div::formatSize(@filesize($this->file)).'<br />';
$this->content.=$this->doc->section('',$code);
$lowerFilename = strtolower($this->file);
if (TYPO3_OS!="WIN" && !$GLOBALS["TYPO3_CONF_VARS"]["BE"]["disable_exec_function"]) {
if ($ext=="zip") {
$this->content.=$this->doc->divider(10);
$code="";
exec("unzip -l ".$this->file, $t);
if (is_array($t)) {
reset($t);
next($t);
next($t);
next($t);
while(list(,$val)=each($t)) {
$parts = explode(" ",trim($val),7);
$code.=$parts[6]."<br />";
}
$code='<span class="nobr">'.$code.'</span>';
}
$this->content.=$this->doc->section('',$code);
} elseif($ext=="tar" || $ext=="tgz" || substr($lowerFilename,-6)=="tar.gz" || substr($lowerFilename,-5)=="tar.z") {
$this->content.=$this->doc->divider(10);
$code="";
if ($ext=="tar") {
$compr="";
} else {
$compr="z";
}
exec("tar t".$compr."f ".$this->file, $t);
if (is_array($t)) {
reset($t);
while(list(,$val)=each($t)) {
$code.=$val."<br />";
}
$code='<span class="nobr">'.$code.'</span>';
}
$this->content.=$this->doc->section('',$code);
// Create table from the information:
$tableCode = '
<table border="0" cellpadding="1" cellspacing="1" id="typo3-showitem">
'.implode('',$tableRows).'
</table>';
$this->content.=$this->doc->section('',$tableCode);
$this->content.=$this->doc->divider(2);
// Add path and table information in the bottom:
$code = '';
$code.= $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-48).'<br />';
$code.= $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.table').': '.$LANG->sL($TCA[$this->table]['ctrl']['title']).' ('.$this->table.') - UID: '.$this->uid.'<br />';
$this->content.= $this->doc->section('', $code);
}