当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_BEfunc::dateTimeAge方法代码示例

本文整理汇总了PHP中t3lib_BEfunc::dateTimeAge方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::dateTimeAge方法的具体用法?PHP t3lib_BEfunc::dateTimeAge怎么用?PHP t3lib_BEfunc::dateTimeAge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_BEfunc的用法示例。


在下文中一共展示了t3lib_BEfunc::dateTimeAge方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: drawLog


//.........这里部分代码省略.........
        // Show details:
        if (t3lib_div::_GP('qid_details')) {
            // Get entry record:
            list($q_entry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid=' . intval(t3lib_div::_GP('qid_details')));
            // Explode values:
            $resStatus = $this->getResStatus($q_entry);
            $q_entry['parameters'] = unserialize($q_entry['parameters']);
            $q_entry['result_data'] = unserialize($q_entry['result_data']);
            if (is_array($q_entry['result_data'])) {
                $q_entry['result_data']['content'] = unserialize($q_entry['result_data']['content']);
            }
            if (!$this->pObj->MOD_SETTINGS['log_resultLog']) {
                unset($q_entry['result_data']['content']['log']);
            }
            // Print rudimentary details:
            $output .= '
				<br /><br />
				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back') . '" name="_back" />
				<input type="hidden" value="' . $this->pObj->id . '" name="id" />
				<input type="hidden" value="' . $showSetId . '" name="setID" />
				<br />
				Current server time: ' . date('H:i:s', time()) . '<br />' . 'Status: ' . $resStatus . '<br />' . (version_compare(TYPO3_version, '4.5.0', '<') ? t3lib_div::view_array($q_entry) : t3lib_utility_Debug::viewArray($q_entry));
        } else {
            // Show list:
            // If either id or set id, show list:
            if ($this->pObj->id || $showSetId) {
                if ($this->pObj->id) {
                    // Drawing tree:
                    $tree = t3lib_div::makeInstance('t3lib_pageTree');
                    $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                    $tree->init('AND ' . $perms_clause);
                    // Set root row:
                    $HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pObj->pageinfo);
                    $HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pObj->pageinfo);
                    $tree->tree[] = array('row' => $this->pObj->pageinfo, 'HTML' => $HTML);
                    // Get branch beneath:
                    if ($this->pObj->MOD_SETTINGS['depth']) {
                        $tree->getTree($this->pObj->id, $this->pObj->MOD_SETTINGS['depth'], '');
                    }
                    // Traverse page tree:
                    $code = '';
                    $count = 0;
                    foreach ($tree->tree as $data) {
                        $code .= $this->drawLog_addRows($data['row'], $data['HTML'] . t3lib_BEfunc::getRecordTitle('pages', $data['row'], TRUE), intval($this->pObj->MOD_SETTINGS['itemsPerPage']));
                        if (++$count == 1000) {
                            break;
                        }
                    }
                } else {
                    $code = '';
                    $code .= $this->drawLog_addRows($showSetId, 'Set ID: ' . $showSetId);
                }
                if ($code) {
                    $output .= '
						<br /><br />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.reloadlist') . '" name="_reload" />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.downloadcsv') . '" name="_csv" />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushvisiblequeue') . '" name="_flush" onclick="return confirm(\'' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure') . '\');" />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushfullqueue') . '" name="_flush_all" onclick="return confirm(\'' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure') . '\');" />
						<input type="hidden" value="' . $this->pObj->id . '" name="id" />
						<input type="hidden" value="' . $showSetId . '" name="setID" />
						<br />
						' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime') . ': ' . date('H:i:s', time()) . '
						<br /><br />


						<table class="lrPadding c-list crawlerlog">' . $this->drawLog_printTableHeader() . $code . '</table>';
                }
            } else {
                // Otherwise show available sets:
                $setList = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('set_id, count(*) as count_value, scheduled', 'tx_crawler_queue', '', 'set_id, scheduled', 'scheduled DESC');
                $code = '
					<tr class="bgColor5 tableheader">
						<td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.setid') . ':</td>
						<td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count') . 't:</td>
						<td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.time') . ':</td>
					</tr>
				';
                $cc = 0;
                foreach ($setList as $set) {
                    $code .= '
						<tr class="bgColor' . ($cc % 2 ? '-20' : '-10') . '">
							<td><a href="' . htmlspecialchars('index.php?setID=' . $set['set_id']) . '">' . $set['set_id'] . '</a></td>
							<td>' . $set['count_value'] . '</td>
							<td>' . t3lib_BEfunc::dateTimeAge($set['scheduled']) . '</td>
						</tr>
					';
                    $cc++;
                }
                $output .= '
					<br /><br />
					<table class="lrPadding c-list">' . $code . '</table>';
            }
        }
        if ($this->CSVExport) {
            $this->outputCsvFile();
        }
        // Return output
        return $output;
    }
开发者ID:b13,项目名称:crawler,代码行数:101,代码来源:class.tx_crawler_modfunc1.php

示例2: generateSingleRedirectContent

	/**
	 * Creates an HTML table row for a single redirect record.
	 *
	 * @param array $rec
	 * @return string
	 */
	protected function generateSingleRedirectContent(array $rec) {
		$output = '<td>'.
					'<a href="'.$this->linkSelf('&cmd=edit&uid=' . rawurlencode($rec['uid'])) .'">'.
					'<img'.t3lib_iconWorks::skinImg($this->pObj->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' title="Edit entry" alt="" />'.
					'</a>'.
					'<a href="'.$this->linkSelf('&cmd=delete&uid=' . rawurlencode($rec['uid'])) . '">'.
					'<img'.t3lib_iconWorks::skinImg($this->pObj->doc->backPath,'gfx/garbage.gif','width="11" height="12"').' title="Delete entry" alt="" />'.
					'</a>'.
				'</td>';
		$output .= sprintf( '<td><a href="%s" target="_blank">/%s</a></td>', htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_SITE_URL').$rec['url']), htmlspecialchars($rec['url']) );
		$destinationURL = $this->getDestinationRedirectURL($rec['destination']);
		$output .= sprintf('<td><a href="%1$s" target="_blank" title="%1$s">%2$s</a></td>', htmlspecialchars($destinationURL), htmlspecialchars(t3lib_div::fixed_lgd_cs($destinationURL, 30)));
		$output .= '<td>' . htmlspecialchars($this->getRedirectDomain($rec['domain_limit'])) . '</td>';
		$output .= '<td align="center">'.($rec['has_moved'] ? '+' : '&nbsp;').'</td>';
		$output .= '<td align="center">'.$rec['counter'].'</td>';

		if ($rec['tstamp']) {
			$output .= '<td>' . t3lib_BEfunc::dateTimeAge($rec['tstamp']) . '</td>';
		}
		else {
			$output .= '<td align="center">&mdash;</td>';
		}

		if ($rec['last_referer']) {
			$lastRef = htmlspecialchars($rec['last_referer']);
			$output .= sprintf('<td><a href="%s" target="_blank" title="%s">%s</a></td>', $lastRef, $lastRef, (strlen($rec['last_referer']) > 30) ? htmlspecialchars(substr($rec['last_referer'], 0, 30)) . '...' : $lastRef);
		}
		else {
			$output .= '<td>&nbsp;</td>';
		}

		// Error:
		$errorMessage = '';
		$pagesWithURL = array_keys($GLOBALS['TYPO3_DB']->exec_SELECTgetRows('page_id','tx_realurl_urlencodecache','content='.$GLOBALS['TYPO3_DB']->fullQuoteStr($rec['url'],'tx_realurl_urlencodecache'), '', '', '', '', 'page_id'));
		if (count($pagesWithURL) > 0) {
			$errorMessage.= $this->pObj->doc->icons(3).'Also a page URL: '.implode(',',array_unique($pagesWithURL));
		}
		$output .='<td>'.$errorMessage.'</td>';

		return $output;
	}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:47,代码来源:class.tx_realurl_modfunc1.php

示例3: dateTimeAge

 /**
  * @param int $tstamp Time stamp, seconds
  * @param int $prefix 1/-1 depending on polarity of age.
  * @param string $date $date=="date" will yield "dd:mm:yy" formatting, otherwise "dd:mm:yy hh:mm
  * @return string
  */
 public function dateTimeAge($tstamp, $prefix = 1, $date = '')
 {
     /** @noinspection PhpDeprecationInspection PhpUndefinedClassInspection */
     return t3lib_BEfunc::dateTimeAge($tstamp, $prefix, $date);
 }
开发者ID:blumenbach,项目名称:bb-online.neu,代码行数:11,代码来源:class.tx_realurl_apiwrapper_4x.php

示例4: getItemColumns

 /**
  * Renders the data columns
  *
  * @param	array		$item item array
  * @return	array
  */
 function getItemColumns($item)
 {
     // Columns rendering
     $columns = array();
     foreach ($this->columnList as $field => $descr) {
         switch ($field) {
             case 'page':
                 // Create output item for pages record
                 $pageRow = $item[$field];
                 $rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
                 $pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
                 $iconAltText = t3lib_BEfunc::getRecordIconAltText($pageRow, 'pages');
                 $icon = t3lib_iconWorks::getIconImage('pages', $pageRow, $GLOBALS['BACK_PATH'], 'title="' . $iconAltText . '" align="top"');
                 if ($this->showRootline) {
                     $title = t3lib_BEfunc::getRecordPath($pageRow['uid'], '1=1', 0);
                     $title = t3lib_div::fixed_lgd_cs($title, -$GLOBALS['BE_USER']->uc['titleLen']);
                 } else {
                     $title = t3lib_BEfunc::getRecordTitle('pages', $pageRow, TRUE);
                 }
                 if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
                     if ($this->enableContextMenus) {
                         $columns[$field] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, 'pages', $pageRow['uid'], 1, '', '+view,edit,info') . $title;
                     } else {
                         $columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
                     }
                 } else {
                     if ($this->enableContextMenus) {
                         $columns[$field] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, 'pages', $pageRow['uid'], 1, '', '+edit,info') . $title;
                     } else {
                         $columns[$field] = $icon . $title;
                     }
                 }
                 break;
             case 'content_element':
                 // Create output item for content record
                 $refTable = $item['tablenames'];
                 $refRow = $item[$field];
                 if ($refTable == 'pages') {
                     // The reference to the media is on a field of a page record
                     if ($GLOBALS['BE_USER']->isInWebMount($refRow['uid']) && $GLOBALS['BE_USER']->doesUserHaveAccess($refRow, 1)) {
                         $columns[$field] = tx_dam_SCbase::getRecordInfoEditLink($refTable, $refRow);
                     } else {
                         $pageRow = $refRow;
                         $rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
                         $pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
                         $iconAltText = t3lib_BEfunc::getRecordIconAltText($refRow, $refTable);
                         $icon = t3lib_iconworks::getIconImage($refTable, $refRow, $GLOBALS['BACK_PATH'], 'class="c-recicon" align="top" title="' . $iconAltText . '"');
                         $title = t3lib_BEfunc::getRecordTitle($refTable, $refRow, 1);
                         if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
                             $columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
                         } else {
                             $columns[$field] = $icon . $title;
                         }
                     }
                 } else {
                     // The reference to the media is on a field of a content element record
                     if ($GLOBALS['BE_USER']->isInWebMount($pageRow['uid']) && $GLOBALS['BE_USER']->doesUserHaveAccess($pageRow, 1)) {
                         $columns[$field] = tx_dam_SCbase::getRecordInfoEditLink($refTable, $refRow);
                     } else {
                         $pageRow = $item['page'];
                         $rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
                         $pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
                         $iconAltText = t3lib_BEfunc::getRecordIconAltText($refRow, $refTable);
                         $icon = t3lib_iconworks::getIconImage($refTable, $refRow, $GLOBALS['BACK_PATH'], 'class="c-recicon" align="top" title="' . $iconAltText . '"');
                         $title = t3lib_BEfunc::getRecordTitle($refTable, $refRow, 1);
                         if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
                             $columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
                         } else {
                             $columns[$field] = $icon . $title;
                         }
                     }
                 }
                 break;
             case 'content_field':
                 // Create output item for reference field
                 $columns[$field] = $item[$field];
                 break;
             case 'softref_key':
                 // Create output item for reference key
                 $columns[$field] = $item['softref_key'] ? $GLOBALS['LANG']->sl('LLL:EXT:dam/lib/locallang.xml:softref_key_' . $item['softref_key']) : $GLOBALS['LANG']->sl('LLL:EXT:dam/lib/locallang.xml:softref_key_media');
                 break;
             case 'content_age':
                 // Create output text describing the age of the content element
                 $columns[$field] = t3lib_BEfunc::dateTimeAge($item[$field], 1);
                 break;
             case 'media_element':
                 // Create output item for tx_dam record
                 $columns[$field] = tx_dam_SCbase::getRecordInfoEditLink('tx_dam', $item);
                 break;
             case 'media_element_age':
                 // Create output text describing the tx_dam record age
                 $columns[$field] = t3lib_BEfunc::dateTimeAge($item['tstamp'], 1);
                 break;
             case '_CLIPBOARD_':
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_dam_listreferences.php

示例5: redirectView

	/**
	 * Redirect view
	 *
	 * @return	string		HTML
	 */
	function redirectView()	{

		$output = $this->pObj->doc->spacer(12);

		// Dispatch actions
		switch (t3lib_div::_GP('cmd')) {
			case 'new':
			case 'edit':
				$output .= $this->getProcessForm();
				break;
			case 'delete':
				$this->deleteRedirectEntry();
				// Fall through
			default:
				$output .= $this->getNewButton();
				break;
		}

		// Sorting
		$gpVars = t3lib_div::_GP('SET');
		$this->pObj->MOD_SETTINGS['ob'] = isset($gpVars['ob']) ? $gpVars['ob'] : 'url';
		$obdir = $this->pObj->MOD_SETTINGS['obdir'] = isset($gpVars['obdir']) ? $gpVars['obdir'] : 'ASC';

		// Create header:
		$output .= '<h2>Redirects</h2>' .
			'<table border="0" cellspacing="2" cellpadding="2" id="tx-realurl-pathcacheTable" class="lrPadding c-list">'.
			'<tr class="bgColor5 tableheader">' .
			'<td>&nbsp;</td>' .
			sprintf('<td><a href="%s">Source:</a></td>', sprintf('index.php?id=%d&SET[type]=%s&SET[ob]=url&SET[obdir]=%s', $this->pObj->id, $this->pObj->MOD_SETTINGS['type'], $obdir)) .
			sprintf('<td><a href="%s">Redirect to:</a></td>', sprintf('index.php?id=%d&SET[type]=%s&SET[ob]=destination&SET[obdir]=%s', $this->pObj->id, $this->pObj->MOD_SETTINGS['type'], $obdir)) .
			sprintf('<td><a href="%s">Permanent:</a></td>', sprintf('index.php?id=%d&SET[type]=%s&SET[ob]=has_moved&SET[obdir]=%s', $this->pObj->id, $this->pObj->MOD_SETTINGS['type'], $obdir)) .
			sprintf('<td><a href="%s">Hits:</a></td>', sprintf('index.php?id=%d&SET[type]=%s&SET[ob]=counter&SET[obdir]=%s', $this->pObj->id, $this->pObj->MOD_SETTINGS['type'], $obdir)) .
			'<td>Last hit time:</td>' .
			sprintf('<td><a href="%s">Last referer:</a></td>', sprintf('index.php?id=%d&SET[type]=%s&SET[ob]=last_referer&SET[obdir]=%s', $this->pObj->id, $this->pObj->MOD_SETTINGS['type'], $obdir)) .
			'<td>Errors:</td></tr>';

		// Select all entries
		$list = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
			'*',
			'tx_realurl_redirects',
			'',
			'',
			$this->pObj->MOD_SETTINGS['ob'] . ' ' . $this->pObj->MOD_SETTINGS['obdir']
		);

		if (is_array($list))	{
			$cc = 0;

			foreach($list as $rec)	{

					// Add data:
				$tCells = array();
				$tCells[] = '<td>'.
							'<a href="'.$this->linkSelf('&cmd=edit&url=' . rawurlencode($rec['url'])) .'">'.
							'<img'.t3lib_iconWorks::skinImg($this->pObj->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' title="Edit entry" alt="" />'.
							'</a>'.
							'<a href="'.$this->linkSelf('&cmd=delete&url=' . rawurlencode($rec['url'])) . '">'.
							'<img'.t3lib_iconWorks::skinImg($this->pObj->doc->backPath,'gfx/garbage.gif','width="11" height="12"').' title="Delete entry" alt="" />'.
							'</a>'.
						'</td>';
				$tCells[] = sprintf( '<td><a href="%s" target="_blank">/%s</a></td>', htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_SITE_URL').$rec['url']), htmlspecialchars($rec['url']) );
				$destinationURL = $this->getDestinationRedirectURL($rec['destination']);
				$tCells[] = sprintf( '<td><a href="%1$s" target="_blank" title="%1$s">%2$s</a></td>', htmlspecialchars($destinationURL), htmlspecialchars(t3lib_div::fixed_lgd_cs($destinationURL, 30)));
				$tCells[] = '<td align="center">'.($rec['has_moved'] ? '+' : '&nbsp;').'</td>';
				$tCells[] = '<td align="center">'.$rec['counter'].'</td>';

				if ($rec['tstamp']) {
					$tCells[] = '<td>' . t3lib_BEfunc::dateTimeAge($rec['tstamp']) . '</td>';
				}
				else {
					$tCells[] = '<td align="center">&mdash;</td>';
				}

				if ($rec['last_referer']) {
					$lastRef = htmlspecialchars($rec['last_referer']);
					$tCells[] = sprintf( '<td><a href="%s" target="_blank" title="%s">%s</a></td>', $lastRef, $lastRef, (strlen($rec['last_referer']) > 30) ? htmlspecialchars(substr($rec['last_referer'], 0, 30)) . '...' : $lastRef);
				} else {
					$tCells[] = '<td>&nbsp;</td>';
				}

				// Error:
				$eMsg = '';
				if (($pagesWithUrl = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('page_id','tx_realurl_urlencodecache','content='.$GLOBALS['TYPO3_DB']->fullQuoteStr($rec['url'],'tx_realurl_urlencodecache'))))	{
					foreach($pagesWithUrl as $k => $temp)	$pagesWithUrl[$k] = $temp['page_id'];
					$eMsg.= $this->pObj->doc->icons(3).'Also a page URL: '.implode(',',array_unique($pagesWithUrl));
				}
				$tCells[]='<td>'.$eMsg.'</td>';

				// Compile Row:
				$output .= '<tr class="bgColor'.($cc%2 ? '-20':'-10').'">' .
						implode('',$tCells).'</tr>';
				$cc++;
			}

			$output .= '</table>';
//.........这里部分代码省略.........
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:101,代码来源:class.tx_realurl_modfunc1.php

示例6: viewEditRecord

 /**
  * Action to edit records
  *
  * @param	array		$record: sys_action record
  * @return	string list of records
  */
 protected function viewEditRecord($record)
 {
     $content = '';
     $actionList = array();
     $dbAnalysis = t3lib_div::makeInstance('t3lib_loadDBGroup');
     $dbAnalysis->fromTC = 0;
     $dbAnalysis->start($record['t4_recordsToEdit'], '*');
     $dbAnalysis->getFromDB();
     // collect the records
     foreach ($dbAnalysis->itemArray as $el) {
         $path = t3lib_BEfunc::getRecordPath($el['id'], $this->taskObject->perms_clause, $GLOBALS['BE_USER']->uc['titleLen']);
         $record = t3lib_BEfunc::getRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']]);
         $title = t3lib_BEfunc::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]);
         $description = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$el['table']]['ctrl']['title'], 1);
         if (isset($record['crdate'])) {
             // @todo: which information could be  needfull
             $description .= ' - ' . t3lib_BEfunc::dateTimeAge($record['crdate']);
         }
         $actionList[$el['id']] = array('title' => $title, 'description' => t3lib_BEfunc::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]), 'descriptionHtml' => $description, 'link' => $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv("REQUEST_URI")) . '&edit[' . $el['table'] . '][' . $el['id'] . ']=edit', 'icon' => t3lib_iconworks::getSpriteIconForRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']], array('title' => htmlspecialchars($path))));
     }
     // render the record list
     $content .= $this->taskObject->renderListMenu($actionList);
     return $content;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:30,代码来源:class.tx_sysaction_task.php

示例7: printPhashRow


//.........这里部分代码省略.........
     if ($row['item_type']) {
         $arr = unserialize($row['cHashParams']);
         $page = $arr['key'] ? ' [' . $arr['key'] . ']' : '';
     } else {
         $page = '';
     }
     $elTitle = $this->linkDetails($row['item_title'] ? htmlspecialchars(t3lib_div::fixed_lgd_cs($this->utf8_to_currentCharset($row['item_title']), 20) . $page) : '<em>[No Title]</em>', $row['phash']);
     $cmdLinks = $this->printRemoveIndexed($row['phash'], 'Clear phash-row') . $this->printReindex($row, 'Re-index element');
     switch ($this->pObj->MOD_SETTINGS['type']) {
         case 1:
             // Technical details:
             // Display icon:
             if (!$grouping) {
                 $lines[] = '<td>' . $this->makeItemTypeIcon($row['item_type'], $row['data_filename'] ? $row['data_filename'] : $row['item_title']) . '</td>';
             } else {
                 $lines[] = '<td>&nbsp;</td>';
             }
             // Title displayed:
             $lines[] = '<td' . $titleCellAttribs . '>' . $elTitle . '</td>';
             // Remove-indexing-link:
             $lines[] = '<td>' . $cmdLinks . '</td>';
             // Various data:
             $lines[] = '<td>' . $row['phash'] . '</td>';
             $lines[] = '<td>' . $row['contentHash'] . '</td>';
             if ($row['item_type'] === '0') {
                 $lines[] = '<td>' . ($row['data_page_id'] ? $row['data_page_id'] : '&nbsp;') . '</td>';
                 $lines[] = '<td>' . ($row['data_page_type'] ? $row['data_page_type'] : '&nbsp;') . '</td>';
                 $lines[] = '<td>' . ($row['sys_language_uid'] ? $row['sys_language_uid'] : '&nbsp;') . '</td>';
                 $lines[] = '<td>' . ($row['data_page_mp'] ? $row['data_page_mp'] : '&nbsp;') . '</td>';
             } else {
                 $lines[] = '<td colspan="4">' . htmlspecialchars($row['data_filename']) . '</td>';
             }
             $lines[] = '<td>' . $row['gr_list'] . $this->printExtraGrListRows($extraGrListRows) . '</td>';
             $lines[] = '<td>' . $this->printRootlineInfo($row) . '</td>';
             $lines[] = '<td>' . ($row['page_id'] ? $row['page_id'] : '&nbsp;') . '</td>';
             $lines[] = '<td>' . ($row['phash_t3'] != $row['phash'] ? $row['phash_t3'] : '&nbsp;') . '</td>';
             $lines[] = '<td>' . ($row['freeIndexUid'] ? $row['freeIndexUid'] . ($row['freeIndexSetId'] ? '/' . $row['freeIndexSetId'] : '') : '&nbsp;') . '</td>';
             $lines[] = '<td>' . ($row['recordUid'] ? $row['recordUid'] : '&nbsp;') . '</td>';
             // cHash parameters:
             $arr = unserialize($row['cHashParams']);
             if (!is_array($arr)) {
                 $arr = array('cHash' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.error', true));
             }
             $theCHash = $arr['cHash'];
             unset($arr['cHash']);
             if ($row['item_type']) {
                 // pdf...
                 $lines[] = '<td>' . ($arr['key'] ? 'Page ' . $arr['key'] : '') . '&nbsp;</td>';
             } elseif ($row['item_type'] == 0) {
                 $lines[] = '<td>' . htmlspecialchars(t3lib_div::implodeArrayForUrl('', $arr)) . '&nbsp;</td>';
             } else {
                 $lines[] = '<td class="bgColor">&nbsp;</td>';
             }
             $lines[] = '<td>' . $theCHash . '</td>';
             break;
         case 2:
             // Words and content:
             // Display icon:
             if (!$grouping) {
                 $lines[] = '<td>' . $this->makeItemTypeIcon($row['item_type'], $row['data_filename'] ? $row['data_filename'] : $row['item_title']) . '</td>';
             } else {
                 $lines[] = '<td>&nbsp;</td>';
             }
             // Title displayed:
             $lines[] = '<td' . $titleCellAttribs . '>' . $elTitle . '</td>';
             // Remove-indexing-link:
             $lines[] = '<td>' . $cmdLinks . '</td>';
             // Query:
             $ftrows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'index_fulltext', 'phash = ' . intval($row['phash']));
             $lines[] = '<td style="white-space: normal;">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($this->utf8_to_currentCharset($ftrows[0]['fulltextdata']), 3000)) . '<hr/><em>Size: ' . strlen($ftrows[0]['fulltextdata']) . '</em>' . '</td>';
             // Query:
             $ftrows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('index_words.baseword, index_rel.*', 'index_rel, index_words', 'index_rel.phash = ' . intval($row['phash']) . ' AND index_words.wid = index_rel.wid', '', '', '', 'baseword');
             $wordList = '';
             if (is_array($ftrows)) {
                 $indexed_words = array_keys($ftrows);
                 sort($indexed_words);
                 $wordList = htmlspecialchars($this->utf8_to_currentCharset(implode(' ', $indexed_words)));
                 $wordList .= '<hr/><em>Count: ' . count($indexed_words) . '</em>';
             }
             $lines[] = '<td style="white-space: normal;">' . $wordList . '</td>';
             break;
         default:
             // Overview
             // Display icon:
             if (!$grouping) {
                 $lines[] = '<td>' . $this->makeItemTypeIcon($row['item_type'], $row['data_filename'] ? $row['data_filename'] : $row['item_title']) . '</td>';
             } else {
                 $lines[] = '<td>&nbsp;</td>';
             }
             // Title displayed:
             $lines[] = '<td' . $titleCellAttribs . '>' . $elTitle . '</td>';
             // Remove-indexing-link:
             $lines[] = '<td>' . $cmdLinks . '</td>';
             $lines[] = '<td style="white-space: normal;">' . htmlspecialchars($this->utf8_to_currentCharset($row['item_description'])) . '...</td>';
             $lines[] = '<td>' . t3lib_div::formatSize($row['item_size']) . '</td>';
             $lines[] = '<td>' . t3lib_BEfunc::dateTimeAge($row['tstamp']) . '</td>';
             break;
     }
     return $lines;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:class.tx_indexedsearch_modfunc1.php


注:本文中的t3lib_BEfunc::dateTimeAge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。