本文整理汇总了PHP中t3lib_BEfunc::getFuncCheck方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::getFuncCheck方法的具体用法?PHP t3lib_BEfunc::getFuncCheck怎么用?PHP t3lib_BEfunc::getFuncCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_BEfunc
的用法示例。
在下文中一共展示了t3lib_BEfunc::getFuncCheck方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/**
* Calls showStats to generate output.
*
* @return string html table with results from showStats()
*/
function main()
{
// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
global $SOBE, $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($LANG->getLL('title'), $this->showStats(), 0, 1);
$menu = array();
$menu[] = t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[tx_indexedsearch_modfunc2_check]', $this->pObj->MOD_SETTINGS['tx_indexedsearch_modfunc2_check'], '', '', 'id="checkTx_indexedsearch_modfunc2_check"') . '<label for="checkTx_indexedsearch_modfunc2_check"' . $LANG->getLL('checklabel') . '</label>';
$theOutput .= $this->pObj->doc->spacer(5);
return $theOutput;
}
示例2: workspaceMenu
function workspaceMenu()
{
if ($this->id) {
$menu = '';
if ($GLOBALS['BE_USER']->workspace === 0) {
$menu .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
$menu .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
}
if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly) {
$menu .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[diff]', $this->MOD_SETTINGS['diff'], '', '', 'id="checkDiff"') . ' <label for="checkDiff">' . $GLOBALS['LANG']->getLL('showDiffView') . '</label>';
}
if ($menu) {
return $menu;
}
}
}
示例3: main
//.........这里部分代码省略.........
function jumpToUrl(URL) { //
window.location.href = URL;
return false;
}
function jumpExt(URL,anchor) { //
var anc = anchor?anchor:"";
window.location.href = URL+(T3_THIS_LOCATION?"&returnUrl="+T3_THIS_LOCATION:"")+anc;
return false;
}
function jumpSelf(URL) { //
window.location.href = URL+(T3_RETURN_URL?"&returnUrl="+T3_RETURN_URL:"");
return false;
}
function setHighlight(id) { //
top.fsMod.recentIds["web"]=id;
top.fsMod.navFrameHighlightedID["web"]="pages"+id+"_"+top.fsMod.currentBank; // For highlighting
if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
top.content.nav_frame.refresh_nav();
}
}
' . $this->doc->redirectUrls($dblist->listURL()) . '
' . $dblist->CBfunctions() . '
function editRecords(table,idList,addParams,CBflag) { //
window.location.href="' . $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&edit["+table+"]["+idList+"]=edit"+addParams;
}
function editList(table,idList) { //
var list="";
// Checking how many is checked, how many is not
var pointer=0;
var pos = idList.indexOf(",");
while (pos!=-1) {
if (cbValue(table+"|"+idList.substr(pointer,pos-pointer))) {
list+=idList.substr(pointer,pos-pointer)+",";
}
pointer=pos+1;
pos = idList.indexOf(",",pointer);
}
if (cbValue(table+"|"+idList.substr(pointer))) {
list+=idList.substr(pointer)+",";
}
return list ? list : idList;
}
if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
}
// access
// Begin to compile the whole page, starting out with page header:
$this->body = '';
$this->body .= '<form action="' . htmlspecialchars($dblist->listURL()) . '" method="post" name="dblistForm">';
$this->body .= $dblist->HTMLcode;
$this->body .= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
// If a listing was produced, create the page footer with search form etc:
if ($dblist->HTMLcode) {
// Making field select box (when extended view for a single table is enabled):
if ($dblist->table) {
$this->body .= $dblist->fieldSelectBox($dblist->table);
}
// Adding checkbox options for extended listing and clipboard display:
$this->body .= '
<!--
Listing options for clipboard and thumbnails
-->
<div id="typo3-listOptions">
<form action="" method="post">';
$this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], 'db_list.php', $this->table ? '&table=' . $this->table : '', 'id="checkLargeControl"') . ' <label for="checkLargeControl">' . $LANG->getLL('largeControl', 1) . '</label><br />';
if ($dblist->showClipboard) {
$this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], 'db_list.php', $this->table ? '&table=' . $this->table : '', 'id="checkShowClipBoard"') . ' <label for="checkShowClipBoard">' . $LANG->getLL('showClipBoard', 1) . '</label><br />';
}
$this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], 'db_list.php', $this->table ? '&table=' . $this->table : '', 'id="checkLocalization"') . ' <label for="checkLocalization">' . $LANG->getLL('localization', 1) . '</label><br />';
$this->body .= '
</form>
</div>';
$this->body .= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_options', $GLOBALS['BACK_PATH']);
// Printing clipboard if enabled:
if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard) {
$this->body .= $dblist->clipObj->printClipboard();
$this->body .= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_clipboard', $GLOBALS['BACK_PATH']);
}
// Search box:
$this->body .= $dblist->getSearchBox();
// Display sys-notes, if any are found:
$this->body .= $dblist->showSysNotesForPage();
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $dblist->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'CONTENT' => $this->body);
// Build the <body> for the module
$this->content = $this->doc->startPage('DB list');
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例4: renderDSO
/**
* Renders the display of Data Structure Objects.
*
* @return void
*/
function renderDSO()
{
global $TYPO3_DB;
if (intval($this->displayUid) > 0) {
$row = t3lib_BEfunc::getRecordWSOL('tx_templavoila_datastructure', $this->displayUid);
if (is_array($row)) {
// Get title and icon:
$icon = t3lib_iconworks::getIconImage('tx_templavoila_datastructure', $row, $GLOBALS['BACK_PATH'], ' align="top" title="UID: ' . $this->displayUid . '"');
$title = t3lib_BEfunc::getRecordTitle('tx_templavoila_datastructure', $row, 1);
$content .= $this->doc->wrapClickMenuOnIcon($icon, 'tx_templavoila_datastructure', $row['uid'], 1) . '<strong>' . $title . '</strong><br />';
// Get Data Structure:
$origDataStruct = $dataStruct = $this->getDataStructFromDSO($row['dataprot']);
if (is_array($dataStruct)) {
// Showing Data Structure:
$tRows = $this->drawDataStructureMap($dataStruct);
$content .= '
<!--
Data Structure content:
-->
<div id="c-ds">
<h4>Data Structure in record:</h4>
<table border="0" cellspacing="2" cellpadding="2">
<tr class="bgColor5">
<td nowrap="nowrap"><strong>Data Element:</strong>' . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_dataElement', $this->doc->backPath, '', TRUE) . '</td>
<td nowrap="nowrap"><strong>Mapping instructions:</strong>' . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_mapping_instructions', $this->doc->backPath, '', TRUE) . '</td>
<td nowrap="nowrap"><strong>Rules:</strong>' . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_Rules', $this->doc->backPath, '', TRUE) . '</td>
</tr>
' . implode('', $tRows) . '
</table>
</div>';
// CSH
$content .= $this->cshItem('xMOD_tx_templavoila', 'mapping_ds', $this->doc->backPath);
} else {
$content .= '<h4>' . $GLOBALS['LANG']->getLL('error') . ': ' . $GLOBALS['LANG']->getLL('noDSDefined') . '</h4>';
}
// Get Template Objects pointing to this Data Structure
$res = $TYPO3_DB->exec_SELECTquery('*', 'tx_templavoila_tmplobj', 'pid IN (' . $this->storageFolders_pidList . ') AND datastructure=' . intval($row['uid']) . t3lib_BEfunc::deleteClause('tx_templavoila_tmplobj') . t3lib_BEfunc::versioningPlaceholderClause('tx_templavoila_tmplobj'));
$tRows = array();
$tRows[] = '
<tr class="bgColor5">
<td><strong>Uid:</strong></td>
<td><strong>Title:</strong></td>
<td><strong>File reference:</strong></td>
<td><strong>Mapping Data Lgd:</strong></td>
</tr>';
$TOicon = t3lib_iconworks::getIconImage('tx_templavoila_tmplobj', array(), $GLOBALS['BACK_PATH'], ' align="top"');
// Listing Template Objects with links:
while (false !== ($TO_Row = $TYPO3_DB->sql_fetch_assoc($res))) {
t3lib_BEfunc::workspaceOL('tx_templavoila_tmplobj', $TO_Row);
$tRows[] = '
<tr class="bgColor4">
<td>[' . $TO_Row['uid'] . ']</td>
<td nowrap="nowrap">' . $this->doc->wrapClickMenuOnIcon($TOicon, 'tx_templavoila_tmplobj', $TO_Row['uid'], 1) . '<a href="' . htmlspecialchars('index.php?table=tx_templavoila_tmplobj&uid=' . $TO_Row['uid'] . '&_reload_from=1') . '">' . t3lib_BEfunc::getRecordTitle('tx_templavoila_tmplobj', $TO_Row, 1) . '</a>' . '</td>
<td nowrap="nowrap">' . htmlspecialchars($TO_Row['fileref']) . ' <strong>' . (!t3lib_div::getFileAbsFileName($TO_Row['fileref'], 1) ? '(NOT FOUND!)' : '(OK)') . '</strong></td>
<td>' . strlen($TO_Row['templatemapping']) . '</td>
</tr>';
}
$content .= '
<!--
Template Objects attached to Data Structure Record:
-->
<div id="c-to">
<h4>Template Objects using this Data Structure:</h4>
<table border="0" cellpadding="2" cellspacing="2">
' . implode('', $tRows) . '
</table>
</div>';
// CSH
$content .= $this->cshItem('xMOD_tx_templavoila', 'mapping_ds_to', $this->doc->backPath);
// Display XML of data structure:
if (is_array($dataStruct)) {
require_once PATH_t3lib . 'class.t3lib_syntaxhl.php';
// Make instance of syntax highlight class:
$hlObj = t3lib_div::makeInstance('t3lib_syntaxhl');
$dataStructureXML = t3lib_div::array2xml_cs($origDataStruct, 'T3DataStructure', array('useCDATA' => 1));
$content .= '
<!--
Data Structure XML:
-->
<br />
<div id="c-dsxml">
<h3>Data Structure XML:</h3>
' . $this->cshItem('xMOD_tx_templavoila', 'mapping_ds_showXML', $this->doc->backPath) . '
<p>' . t3lib_BEfunc::getFuncCheck('', 'SET[showDSxml]', $this->MOD_SETTINGS['showDSxml'], '', t3lib_div::implodeArrayForUrl('', $_GET, '', 1, 1)) . ' Show XML</p>
<pre>' . ($this->MOD_SETTINGS['showDSxml'] ? $hlObj->highLight_DS($dataStructureXML) : '') . '
</pre>
</div>
';
}
} else {
$content .= 'ERROR: No Data Structure Record with the UID ' . $this->displayUid;
}
//.........这里部分代码省略.........
示例5: main
//.........这里部分代码省略.........
}
if (!$this->MOD_SETTINGS['clipBoard']) {
$CB['setP'] = 'normal';
}
$this->filelist->clipObj->setCmd($CB);
$this->filelist->clipObj->cleanCurrent();
$this->filelist->clipObj->endClipboard();
// Saves
// If the "cmd" was to delete files from the list (clipboard thing), do that:
if ($this->cmd == 'delete') {
$items = $this->filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'), '_FILE', 1);
if (count($items)) {
// Make command array:
$FILE = array();
foreach ($items as $v) {
$FILE['delete'][] = array('data' => $v);
}
// Init file processing object for deleting and pass the cmd array.
$fileProcessor = t3lib_div::makeInstance('t3lib_extFileFunctions');
$fileProcessor->init($FILEMOUNTS, $TYPO3_CONF_VARS['BE']['fileExtensions']);
$fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
$fileProcessor->dontCheckForUnique = $this->overwriteExistingFiles ? 1 : 0;
$fileProcessor->start($FILE);
$fileProcessor->processData();
$fileProcessor->printLogErrorMessages();
}
}
if (!isset($this->MOD_SETTINGS['sort'])) {
// Set default sorting
$this->MOD_SETTINGS['sort'] = 'file';
$this->MOD_SETTINGS['reverse'] = 0;
}
// Start up filelisting object, include settings.
$this->pointer = t3lib_div::intInRange($this->pointer, 0, 100000);
$this->filelist->start($this->id, $this->pointer, $this->MOD_SETTINGS['sort'], $this->MOD_SETTINGS['reverse'], $this->MOD_SETTINGS['clipBoard'], $this->MOD_SETTINGS['bigControlPanel']);
// Generate the list
$this->filelist->generateList();
// Write the footer
$this->filelist->writeBottom();
// Set top JavaScript:
$this->doc->JScode = $this->doc->wrapScriptTags('
if (top.fsMod) top.fsMod.recentIds["file"] = unescape("' . rawurlencode($this->id) . '");
function jumpToUrl(URL) { //
window.location.href = URL;
}
' . $this->filelist->CBfunctions());
// This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
$this->doc->getContextMenuCode();
// Setting up the buttons and markers for docheader
list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->id);
// add the folder info to the marker array
$otherMarkers['FOLDER_INFO'] = $this->filelist->getFolderInfo();
$docHeaderButtons = array_merge($this->getButtons(), $buttons);
// Build the <body> for the module
// Create output
$pageContent = '';
$pageContent .= '<form action="' . htmlspecialchars($this->filelist->listURL()) . '" method="post" name="dblistForm">';
$pageContent .= $this->filelist->HTMLcode;
$pageContent .= '<input type="hidden" name="cmd" /></form>';
if ($this->filelist->HTMLcode) {
// Making listing options:
$pageContent .= '
<!--
Listing options for extended view, clipboard and thumbnails
-->
<div id="typo3-listOptions">
';
// Add "display bigControlPanel" checkbox:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') {
$pageContent .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], 'file_list.php', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE) . '</label><br />';
}
// Add "display thumbnails" checkbox:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') {
$pageContent .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], 'file_list.php', '', 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->getLL('displayThumbs', TRUE) . '</label><br />';
}
// Add "clipboard" checkbox:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') {
$pageContent .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], 'file_list.php', '', 'id="checkClipBoard"') . ' <label for="checkClipBoard">' . $GLOBALS['LANG']->getLL('clipBoard', TRUE) . '</label>';
}
$pageContent .= '
</div>
';
// Set clipboard:
if ($this->MOD_SETTINGS['clipBoard']) {
$pageContent .= $this->filelist->clipObj->printClipboard();
$pageContent .= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
}
}
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $pageContent);
$this->content = $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers));
// Renders the module page
$this->content = $this->doc->render($LANG->getLL('files'), $this->content);
} else {
// Create output - no access (no warning though)
$this->content = $this->doc->render($LANG->getLL('files'), '');
}
}
示例6: functionMenus
/**
* Create the checkbox buttons in the bottom of the pages.
*
* @return string HTML for function menus.
*/
function functionMenus()
{
global $LANG;
if ($GLOBALS['BE_USER']->getTSConfigVal('options.enableShowPalettes')) {
// Show palettes:
return '
<!-- Function menu (checkbox for showing all palettes): -->
<br />' . t3lib_BEfunc::getFuncCheck('', 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'alt_doc.php', t3lib_div::implodeArrayForUrl('', array_merge($this->R_URL_getvars, array('SET' => ''))) . t3lib_BEfunc::getUrlToken('editRecord'), 'id="checkShowPalettes"') . '<label for="checkShowPalettes">' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPalettes', 1) . '</label>';
} else {
return '';
}
}
示例7: main
/**
* Main function
*
* @return string HTML output
*/
function main()
{
global $LANG, $BACK_PATH;
$this->incLocalLang();
$this->loadExtensionSettings();
if (empty($this->pObj->MOD_SETTINGS['processListMode'])) {
$this->pObj->MOD_SETTINGS['processListMode'] = 'simple';
}
// Set CSS styles specific for this document:
$this->pObj->content = str_replace('/*###POSTCSSMARKER###*/', '
TABLE.c-list TR TD { white-space: nowrap; vertical-align: top; }
', $this->pObj->content);
$this->pObj->content .= '<style type="text/css"><!--
table.url-table,
table.param-expanded,
table.crawlerlog {
border-bottom: 1px solid grey;
border-spacing: 0;
border-collapse: collapse;
}
table.crawlerlog td,
table.url-table td {
border: 1px solid lightgrey;
border-bottom: 1px solid grey;
white-space: nowrap; vertical-align: top;
}
--></style>
<link rel="stylesheet" type="text/css" href="' . $BACK_PATH . '../typo3conf/ext/crawler/template/res.css" />
';
// Type function menu:
$h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[crawlaction]', $this->pObj->MOD_SETTINGS['crawlaction'], $this->pObj->MOD_MENU['crawlaction'], 'index.php');
/*
// Showing depth-menu in certain cases:
if ($this->pObj->MOD_SETTINGS['crawlaction']!=='cli' && $this->pObj->MOD_SETTINGS['crawlaction']!== 'multiprocess' && ($this->pObj->MOD_SETTINGS['crawlaction']!=='log' || $this->pObj->id)) {
$h_func .= t3lib_BEfunc::getFuncMenu(
$this->pObj->id,
'SET[depth]',
$this->pObj->MOD_SETTINGS['depth'],
$this->pObj->MOD_MENU['depth'],
'index.php'
);
}
*/
// Additional menus for the log type:
if ($this->pObj->MOD_SETTINGS['crawlaction'] === 'log') {
$h_func .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
$quiPart = t3lib_div::_GP('qid_details') ? '&qid_details=' . intval(t3lib_div::_GP('qid_details')) : '';
$setId = intval(t3lib_div::_GP('setID'));
$h_func .= '<hr/>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.display') . ': ' . t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[log_display]', $this->pObj->MOD_SETTINGS['log_display'], $this->pObj->MOD_MENU['log_display'], 'index.php', '&setID=' . $setId) . ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showresultlog') . ': ' . t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[log_resultLog]', $this->pObj->MOD_SETTINGS['log_resultLog'], 'index.php', '&setID=' . $setId . $quiPart) . ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showfevars') . ': ' . t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[log_feVars]', $this->pObj->MOD_SETTINGS['log_feVars'], 'index.php', '&setID=' . $setId . $quiPart) . ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage') . ': ' . t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[itemsPerPage]', $this->pObj->MOD_SETTINGS['itemsPerPage'], $this->pObj->MOD_MENU['itemsPerPage'], 'index.php');
}
$theOutput = $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($LANG->getLL('title'), $h_func, 0, 1);
// Branch based on type:
switch ((string) $this->pObj->MOD_SETTINGS['crawlaction']) {
case 'start':
if (empty($this->pObj->id)) {
$theOutput .= '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noPageSelected');
} else {
$theOutput .= $this->pObj->doc->section('', $this->drawURLs(), 0, 1);
}
break;
case 'log':
$theOutput .= $this->pObj->doc->section('', $this->drawLog(), 0, 1);
break;
case 'cli':
$theOutput .= $this->pObj->doc->section('', $this->drawCLIstatus(), 0, 1);
break;
case 'multiprocess':
$theOutput .= $this->pObj->doc->section('', $this->drawProcessOverviewAction(), 0, 1);
break;
}
return $theOutput;
}
示例8: makeSelectorTable
/**
* [Describe function...]
*
* @param [type] $modSettings: ...
* @param [type] $enableList: ...
* @return [type] ...
*/
function makeSelectorTable($modSettings, $enableList = 'table,fields,query,group,order,limit')
{
$enableArr = explode(',', $enableList);
// Make output
$TDparams = ' class="bgColor5" nowrap';
if (in_array('table', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableSelectATable']) {
$out = '
<tr>
<td' . $TDparams . '><strong>Select a table:</strong></td>
<td' . $TDparams . '>' . $this->mkTableSelect('SET[queryTable]', $this->table) . '</td>
</tr>';
}
if ($this->table) {
// Init fields:
$this->setAndCleanUpExternalLists('queryFields', $modSettings['queryFields'], 'uid,' . $this->getLabelCol());
$this->setAndCleanUpExternalLists('queryGroup', $modSettings['queryGroup']);
$this->setAndCleanUpExternalLists('queryOrder', $modSettings['queryOrder'] . ',' . $modSettings['queryOrder2']);
// Limit:
$this->extFieldLists['queryLimit'] = $modSettings['queryLimit'];
if (!$this->extFieldLists['queryLimit']) {
$this->extFieldLists['queryLimit'] = 100;
}
$parts = t3lib_div::intExplode(',', $this->extFieldLists['queryLimit']);
if ($parts[1]) {
$this->limitBegin = $parts[0];
$this->limitLength = $parts[1];
} else {
$this->limitLength = $this->extFieldLists['queryLimit'];
}
$this->extFieldLists['queryLimit'] = implode(',', array_slice($parts, 0, 2));
// Insert Descending parts
if ($this->extFieldLists['queryOrder']) {
$descParts = explode(',', $modSettings['queryOrderDesc'] . ',' . $modSettings['queryOrder2Desc']);
$orderParts = explode(',', $this->extFieldLists['queryOrder']);
$reList = array();
foreach ($orderParts as $kk => $vv) {
$reList[] = $vv . ($descParts[$kk] ? ' DESC' : '');
}
$this->extFieldLists['queryOrder_SQL'] = implode(',', $reList);
}
// Query Generator:
$this->procesData($modSettings['queryConfig'] ? unserialize($modSettings['queryConfig']) : '');
// debug($this->queryConfig);
$this->queryConfig = $this->cleanUpQueryConfig($this->queryConfig);
// debug($this->queryConfig);
$this->enableQueryParts = $modSettings['search_query_smallparts'];
$codeArr = $this->getFormElements();
$queryCode = $this->printCodeArray($codeArr);
if (in_array('fields', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableSelectFields']) {
$out .= '
<tr>
<td' . $TDparams . '><strong>Select fields:</strong></td>
<td' . $TDparams . '>' . $this->mkFieldToInputSelect('SET[queryFields]', $this->extFieldLists['queryFields']) . '</td>
</tr>';
}
if (in_array('query', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableMakeQuery']) {
$out .= '<tr>
<td colspan="2"' . $TDparams . '><strong>Make Query:</strong></td>
</tr>
<tr>
<td colspan="2">' . $queryCode . '</td>
</tr>
';
}
if (in_array('group', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableGroupBy']) {
$out .= '<tr>
<td' . $TDparams . '><strong>Group By:</strong></td>
<td' . $TDparams . '>' . $this->mkTypeSelect('SET[queryGroup]', $this->extFieldLists['queryGroup'], '') . '</td>
</tr>';
}
if (in_array('order', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableOrderBy']) {
$orderByArr = explode(',', $this->extFieldLists['queryOrder']);
// debug($orderByArr);
$orderBy = '';
$orderBy .= $this->mkTypeSelect('SET[queryOrder]', $orderByArr[0], '') . ' ' . t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[queryOrderDesc]', $modSettings['queryOrderDesc'], '', '', 'id="checkQueryOrderDesc"') . ' <label for="checkQueryOrderDesc">Descending</label>';
if ($orderByArr[0]) {
$orderBy .= '<BR>' . $this->mkTypeSelect('SET[queryOrder2]', $orderByArr[1], '') . ' ' . t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[queryOrder2Desc]', $modSettings['queryOrder2Desc'], '', '', 'id="checkQueryOrder2Desc"') . ' <label for="checkQueryOrder2Desc">Descending</label>';
}
$out .= '<tr>
<td' . $TDparams . '><strong>Order By:</strong></td>
<td' . $TDparams . '>' . $orderBy . '</td>
</tr>';
}
if (in_array('limit', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableLimit']) {
$limit = '<input type="Text" value="' . htmlspecialchars($this->extFieldLists['queryLimit']) . '" name="SET[queryLimit]" id="queryLimit"' . $GLOBALS['TBE_TEMPLATE']->formWidth(10) . '>' . $this->updateIcon();
$prevLimit = $this->limitBegin - $this->limitLength < 0 ? 0 : $this->limitBegin - $this->limitLength;
if ($this->limitBegin) {
$prevButton = '<input type="button" value="previous ' . $this->limitLength . '" onclick=\'document.getElementById("queryLimit").value="' . $prevLimit . ',' . $this->limitLength . '";document.forms[0].submit();\'>';
}
if (!$this->limitLength) {
$this->limitLength = 100;
}
$nextLimit = $this->limitBegin + $this->limitLength;
//.........这里部分代码省略.........
示例9: main
//.........这里部分代码省略.........
$out = '';
if (!$this->pObj->MOD_SETTINGS['ts_browser_TLKeys_' . $bType][$this->pObj->sObj]) {
if (count($theSetup)) {
$out = '<a href="index.php?id=' . $this->pObj->id . '&addKey[' . rawurlencode($this->pObj->sObj) . ']=1&SET[ts_browser_toplevel_' . $bType . ']=' . rawurlencode($this->pObj->sObj) . '">';
$out .= sprintf($GLOBALS['LANG']->getLL('addKey'), htmlspecialchars($this->pObj->sObj));
}
} else {
$out = '<a href="index.php?id=' . $this->pObj->id . '&addKey[' . rawurlencode($this->pObj->sObj) . ']=0&SET[ts_browser_toplevel_' . $bType . ']=0">';
$out .= sprintf($GLOBALS['LANG']->getLL('removeKey'), htmlspecialchars($this->pObj->sObj));
}
if ($out) {
$theOutput .= $this->pObj->doc->divider(5);
$theOutput .= $this->pObj->doc->section("", $out);
}
// back
$out = $GLOBALS['LANG']->getLL('back');
$out = '<a href="index.php?id=' . $this->pObj->id . '"><strong>' . $out . '</strong></a>';
$theOutput .= $this->pObj->doc->divider(5);
$theOutput .= $this->pObj->doc->section("", $out);
} else {
$tmpl->tsbrowser_depthKeys = $this->pObj->MOD_SETTINGS["tsbrowser_depthKeys_" . $bType];
if (t3lib_div::_POST('search') && t3lib_div::_POST('search_field')) {
// If any POST-vars are send, update the condition array
$tmpl->tsbrowser_depthKeys = $tmpl->ext_getSearchKeys($theSetup, '', t3lib_div::_POST('search_field'), array());
}
$menu = '<div class="tsob-menu"><label>' . $GLOBALS['LANG']->getLL('browse') . '</label>';
$menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[ts_browser_type]', $bType, $this->pObj->MOD_MENU['ts_browser_type']);
$menu .= '<label for="ts_browser_toplevel_' . $bType . '">' . $GLOBALS['LANG']->getLL('objectList') . '</label>';
$menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[ts_browser_toplevel_' . $bType . ']', $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType], $this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]);
//search
$menu .= '<label for="search_field">' . $GLOBALS['LANG']->getLL('search') . '</label>';
$menu .= '<input type="Text" name="search_field" id="search_field" value="' . htmlspecialchars($POST['search_field']) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . '/>';
$menu .= '<input type="Submit" name="search" class="tsob-search-submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:search') . '" />';
$menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_regexsearch]', $this->pObj->MOD_SETTINGS['ts_browser_regexsearch'], '', '', 'id="checkTs_browser_regexsearch"');
$menu .= '<label for="checkTs_browser_regexsearch">' . $GLOBALS['LANG']->getLL('regExp') . '</label>';
$menu .= '</div>';
$theOutput .= $this->pObj->doc->section('', '<nobr>' . $menu . '</nobr>');
$theKey = $this->pObj->MOD_SETTINGS["ts_browser_toplevel_" . $bType];
if (!$theKey || !str_replace("-", "", $theKey)) {
$theKey = "";
}
list($theSetup, $theSetupValue) = $tmpl->ext_getSetup($theSetup, $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType] ? $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType] : '');
$tree = $tmpl->ext_getObjTree($theSetup, $theKey, '', '', $theSetupValue, $this->pObj->MOD_SETTINGS['ts_browser_alphaSort']);
$tree = $tmpl->substituteCMarkers($tree);
// Parser Errors:
$pEkey = $bType == "setup" ? "config" : "constants";
if (count($tmpl->parserErrors[$pEkey])) {
$errMsg = array();
foreach ($tmpl->parserErrors[$pEkey] as $inf) {
$errMsg[] = $inf[1] . ": " . $inf[0];
}
$theOutput .= $this->pObj->doc->spacer(10);
$flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', implode($errMsg, '<br />'), $GLOBALS['LANG']->getLL('errorsWarnings'), t3lib_FlashMessage::ERROR);
$theOutput .= $flashMessage->render();
}
if (isset($this->pObj->MOD_SETTINGS["ts_browser_TLKeys_" . $bType][$theKey])) {
$remove = '<td width="1%" nowrap><a href="index.php?id=' . $this->pObj->id . '&addKey[' . $theKey . ']=0&SET[ts_browser_toplevel_' . $bType . ']=0"><strong>' . $GLOBALS['LANG']->getLL('removeKey') . '</strong></a></td>';
} else {
$remove = '';
}
$label = $theKey ? $theKey : ($bType == 'setup' ? $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $GLOBALS['LANG']->getLL('setupRoot'), 'toUpper') : $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $GLOBALS['LANG']->getLL('constantRoot'), 'toUpper'));
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->sectionEnd();
$theOutput .= '<table border="0" cellpadding="1" cellspacing="0" id="typo3-objectBrowser" width="100%">
<tr>
<td><img src=clear.gif width=4 height=1></td>
示例10: func_search
/**
* Search (Full / Advanced)
*
* @return void
*/
function func_search()
{
global $LANG;
$fullsearch = t3lib_div::makeInstance('t3lib_fullsearch');
$fullsearch->setFormName($this->formName);
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('search'));
$this->content .= $this->doc->spacer(5);
$menu2 = '';
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$menu2 = t3lib_BEfunc::getFuncMenu(0, 'SET[search]', $this->MOD_SETTINGS['search'], $this->MOD_MENU['search']);
}
if ($this->MOD_SETTINGS['search'] == 'query' && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$menu2 .= t3lib_BEfunc::getFuncMenu(0, 'SET[search_query_makeQuery]', $this->MOD_SETTINGS['search_query_makeQuery'], $this->MOD_MENU['search_query_makeQuery']) . '<br />';
}
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopCheckboxes'] && $this->MOD_SETTINGS['search'] == 'query') {
$menu2 .= t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_query_smallparts]', $this->MOD_SETTINGS['search_query_smallparts'], '', '', 'id="checkSearch_query_smallparts"') . ' <label for="checkSearch_query_smallparts">' . $GLOBALS['LANG']->getLL('showSQL') . '</label><br />';
$menu2 .= t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_result_labels]', $this->MOD_SETTINGS['search_result_labels'], '', '', 'id="checkSearch_result_labels"') . ' <label for="checkSearch_result_labels">' . $GLOBALS['LANG']->getLL('useFormattedStrings') . '</label><br />';
$menu2 .= t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[labels_noprefix]', $this->MOD_SETTINGS['labels_noprefix'], '', '', 'id="checkLabels_noprefix"') . ' <label for="checkLabels_noprefix">' . $GLOBALS['LANG']->getLL('dontUseOrigValues') . '</label><br />';
$menu2 .= t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[options_sortlabel]', $this->MOD_SETTINGS['options_sortlabel'], '', '', 'id="checkOptions_sortlabel"') . ' <label for="checkOptions_sortlabel">' . $GLOBALS['LANG']->getLL('sortOptions') . '</label><br />';
$menu2 .= t3lib_BEfunc::getFuncCheck($GLOBALS['SOBE']->id, 'SET[show_deleted]', $this->MOD_SETTINGS['show_deleted'], '', '', 'id="checkShow_deleted"') . ' <label for="checkShow_deleted">' . $GLOBALS['LANG']->getLL('showDeleted') . '</label>';
}
$this->content .= $this->doc->section('', $menu2) . $this->doc->spacer(10);
switch ($this->MOD_SETTINGS['search']) {
case 'query':
$this->content .= $fullsearch->queryMaker();
break;
case 'raw':
default:
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('searchOptions'), $fullsearch->form(), false, true);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('result'), $fullsearch->search(), false, true);
break;
}
}
示例11: checkForUpdates
/**
* Checks if there are newer versions of installed extensions in the TER
* integrated from the extension "ter_update_check" for TYPO3 4.2 by Christian Welzel
*
* @return nothing
*/
function checkForUpdates()
{
global $LANG;
$content = '';
if (is_file(PATH_site . 'typo3temp/extensions.xml.gz')) {
$content = $this->extensionList->showExtensionsToUpdate() . t3lib_BEfunc::getFuncCheck(0, 'SET[display_installed]', $this->MOD_SETTINGS['display_installed'], '', '', 'id="checkDisplayInstalled"') . ' <label for="checkDisplayInstalled">' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_nle') . '</label><br />' . t3lib_BEfunc::getFuncCheck(0, 'SET[display_files]', $this->MOD_SETTINGS['display_files'], '', '', 'id="checkDisplayFiles"') . ' <label for="checkDisplayFiles">' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_files') . '</label>';
$this->content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_upd_ext'), $content, 0, 1);
$dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
$timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
$content = sprintf($GLOBALS['LANG']->getLL('note_last_update_new'), date($dateFormat . ', ' . $timeFormat, filemtime(PATH_site . 'typo3temp/extensions.xml.gz'))) . '<br />';
}
$content .= sprintf($GLOBALS['LANG']->getLL('note_last_update2_new'), '<a href="' . t3lib_div::linkThisScript(array('SET[function]' => 2)) . '">', '</a>');
$this->content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_vers_ret'), $content, 0, 1);
}
示例12: renderListContent
/**
* Rendering all other listings than QuickEdit
*
* @return void
*/
function renderListContent()
{
global $LANG, $BACK_PATH, $TCA;
// Initialize list object (see "class.db_layout.inc"):
$dblist = t3lib_div::makeInstance('tx_cms_layout');
$dblist->backPath = $BACK_PATH;
$dblist->thumbs = $this->imagemode;
$dblist->no_noWrap = 1;
$dblist->descrTable = $this->descrTable;
$this->pointer = t3lib_div::intInRange($this->pointer, 0, 100000);
$dblist->script = 'db_layout.php';
$dblist->showIcon = 0;
$dblist->setLMargin = 0;
$dblist->doEdit = $this->EDIT_CONTENT;
$dblist->ext_CALC_PERMS = $this->CALC_PERMS;
$dblist->agePrefixes = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
$dblist->id = $this->id;
$dblist->nextThree = t3lib_div::intInRange($this->modTSconfig['properties']['editFieldsAtATime'], 0, 10);
$dblist->option_showBigButtons = $this->modTSconfig['properties']['disableBigButtons'] === '0';
$dblist->option_newWizard = $this->modTSconfig['properties']['disableNewContentElementWizard'] ? 0 : 1;
$dblist->defLangBinding = $this->modTSconfig['properties']['defLangBinding'] ? 1 : 0;
if (!$dblist->nextThree) {
$dblist->nextThree = 1;
}
$dblist->externalTables = $this->externalTables;
// Create menu for selecting a table to jump to (this is, if more than just pages/tt_content elements are found on the page!)
$h_menu = $dblist->getTableMenu($this->id);
// Initialize other variables:
$h_func = '';
$tableOutput = array();
$tableJSOutput = array();
$CMcounter = 0;
// Traverse the list of table names which has records on this page (that array is populated by the $dblist object during the function getTableMenu()):
foreach ($dblist->activeTables as $table => $value) {
// Load full table definitions:
t3lib_div::loadTCA($table);
if (!isset($dblist->externalTables[$table])) {
// Creating special conditions for each table:
switch ($table) {
case 'tt_board':
$h_func = t3lib_BEfunc::getFuncMenu($this->id, 'SET[tt_board]', $this->MOD_SETTINGS['tt_board'], $this->MOD_MENU['tt_board'], 'db_layout.php', '');
break;
case 'tt_address':
$h_func = t3lib_BEfunc::getFuncMenu($this->id, 'SET[tt_address]', $this->MOD_SETTINGS['tt_address'], $this->MOD_MENU['tt_address'], 'db_layout.php', '');
break;
case 'tt_links':
$h_func = t3lib_BEfunc::getFuncMenu($this->id, 'SET[tt_links]', $this->MOD_SETTINGS['tt_links'], $this->MOD_MENU['tt_links'], 'db_layout.php', '');
break;
case 'tt_calender':
$h_func = t3lib_BEfunc::getFuncMenu($this->id, 'SET[tt_calender]', $this->MOD_SETTINGS['tt_calender'], $this->MOD_MENU['tt_calender'], 'db_layout.php', '');
break;
case 'tt_products':
$h_func = t3lib_BEfunc::getFuncMenu($this->id, 'SET[tt_products]', $this->MOD_SETTINGS['tt_products'], $this->MOD_MENU['tt_products'], 'db_layout.php', '');
break;
case 'tt_guest':
case 'tt_news':
case 'fe_users':
// Nothing
break;
case 'tt_content':
$q_count = $this->getNumberOfHiddenElements();
$h_func_b = t3lib_BEfunc::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"') . '<label for="checkTt_content_showHidden">' . (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($LANG->getLL('hiddenCE')) : $LANG->getLL('hiddenCE') . ' (' . $q_count . ')') . '</label>';
$dblist->tt_contentConfig['showCommands'] = 1;
// Boolean: Display up/down arrows and edit icons for tt_content records
$dblist->tt_contentConfig['showInfo'] = 1;
// Boolean: Display info-marks or not
$dblist->tt_contentConfig['single'] = 0;
// Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown in the total width of the page
if ($this->MOD_SETTINGS['function'] == 4) {
// grid view
$dblist->tt_contentConfig['showAsGrid'] = 1;
}
// Setting up the tt_content columns to show:
if (is_array($TCA['tt_content']['columns']['colPos']['config']['items'])) {
$colList = array();
$tcaItems = t3lib_div::callUserFunction('EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getColPosListItemsParsed', $this->id, $this);
foreach ($tcaItems as $temp) {
$colList[] = $temp[1];
}
} else {
// ... should be impossible that colPos has no array. But this is the fallback should it make any sense:
$colList = array('1', '0', '2', '3');
}
if (strcmp($this->colPosList, '')) {
$colList = array_intersect(t3lib_div::intExplode(',', $this->colPosList), $colList);
}
// If only one column found, display the single-column view.
if (count($colList) === 1 && !$this->MOD_SETTINGS['function'] === 4) {
$dblist->tt_contentConfig['single'] = 1;
// Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown in the total width of the page
$dblist->tt_contentConfig['showSingleCol'] = current($colList);
// The column(s) to show if single mode (under each other)
}
$dblist->tt_contentConfig['cols'] = implode(',', $colList);
// The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
//.........这里部分代码省略.........
示例13: main
function main()
{
// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
global $SOBE, $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
global $tmpl, $tplRow, $theConstants, $rootLine;
// **************************
// Checking for more than one template an if, set a menu...
// **************************
$manyTemplatesMenu = $this->pObj->templateMenu();
$template_uid = 0;
if ($manyTemplatesMenu) {
$template_uid = $this->pObj->MOD_SETTINGS["templatesOnPage"];
}
// **************************
// Main
// **************************
// BUGBUG: Should we check if the uset may at all read and write template-records???
$existTemplate = $this->initialize_editor($this->pObj->id, $template_uid);
// initialize
if ($existTemplate) {
$theOutput .= $this->pObj->doc->divider(5);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('currentTemplate', true), t3lib_iconWorks::getSpriteIconForRecord('sys_template', $tplRow) . '<strong>' . $this->pObj->linkWrapTemplateTitle($tplRow["title"]) . '</strong>' . htmlspecialchars(trim($tplRow["sitetitle"]) ? ' - (' . $tplRow["sitetitle"] . ')' : ''));
}
if ($manyTemplatesMenu) {
$theOutput .= $this->pObj->doc->section("", $manyTemplatesMenu);
}
// debug($tmpl->hierarchyInfo);
$tmpl->clearList_const_temp = array_flip($tmpl->clearList_const);
$tmpl->clearList_setup_temp = array_flip($tmpl->clearList_setup);
$pointer = count($tmpl->hierarchyInfo);
$tmpl->hierarchyInfoArr = $tmpl->ext_process_hierarchyInfo(array(), $pointer);
$tmpl->processIncludes();
$hierarArr = array();
$head = '<tr class="t3-row-header">';
$head .= '<td>' . $GLOBALS['LANG']->getLL('title', true) . '</td>';
$head .= '<td>' . $GLOBALS['LANG']->getLL('rootlevel', true) . '</td>';
$head .= '<td>' . $GLOBALS['LANG']->getLL('clearSetup', true) . '</td>';
$head .= '<td>' . $GLOBALS['LANG']->getLL('clearConstants', true) . '</td>';
$head .= '<td>' . $GLOBALS['LANG']->getLL('pid', true) . '</td>';
$head .= '<td>' . $GLOBALS['LANG']->getLL('rootline', true) . '</td>';
$head .= '<td>' . $GLOBALS['LANG']->getLL('nextLevel', true) . '</td>';
$head .= '</tr>';
$hierar = implode(array_reverse($tmpl->ext_getTemplateHierarchyArr($tmpl->hierarchyInfoArr, "", array(), 1)), "");
$hierar = '<table id="ts-analyzer" border="0" cellpadding="0" cellspacing="1">' . $head . $hierar . '</table>';
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('templateHierarchy', true), $hierar, 0, 1);
$completeLink = '<p><a href="index.php?id=' . $GLOBALS['SOBE']->id . '&template=all">' . $GLOBALS['LANG']->getLL('viewCompleteTS', TRUE) . '</a></p>';
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('completeTS', TRUE), $completeLink, 0, 1);
// Output options
$theOutput .= $this->pObj->doc->spacer(25);
$theOutput .= $this->pObj->doc->divider(0);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('displayOptions', true), '', 1, 1);
$addParams = t3lib_div::_GET('template') ? '&template=' . t3lib_div::_GET('template') : '';
$theOutput .= '<div class="tst-analyzer-options">' . t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkLinenum]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"], '', $addParams, 'id="checkTs_analyzer_checkLinenum"') . '<label for="checkTs_analyzer_checkLinenum">' . $GLOBALS['LANG']->getLL('lineNumbers', true) . '</label> ' . t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkSyntax]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"], '', $addParams, 'id="checkTs_analyzer_checkSyntax"') . '<label for="checkTs_analyzer_checkSyntax">' . $GLOBALS['LANG']->getLL('syntaxHighlight', true) . '</label> ' . (!$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"] ? t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkComments]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"], '', $addParams, 'id="checkTs_analyzer_checkComments"') . '<label for="checkTs_analyzer_checkComments">' . $GLOBALS['LANG']->getLL('comments', true) . '</label> ' . t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkCrop]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"], '', $addParams, 'id="checkTs_analyzer_checkCrop"') . '<label for="checkTs_analyzer_checkCrop">' . $GLOBALS['LANG']->getLL('cropLines', true) . '</label> ' : '') . '</div>';
// Output Constants
if (t3lib_div::_GET('template')) {
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('constants', true), "", 0, 1);
$theOutput .= $this->pObj->doc->sectionEnd();
$theOutput .= '
<table border="0" cellpadding="1" cellspacing="0">
';
$tmpl->ext_lineNumberOffset = -2;
// Don't know why -2 and not 0... :-) But works.
$tmpl->ext_lineNumberOffset_mode = "const";
$tmpl->ext_lineNumberOffset += count(explode(LF, t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1;
reset($tmpl->clearList_const);
foreach ($tmpl->constants as $key => $val) {
$cVal = current($tmpl->clearList_const);
if ($cVal == t3lib_div::_GET('template') || t3lib_div::_GET('template') == 'all') {
$theOutput .= '
<tr>
<td><img src="clear.gif" width="3" height="1" alt="" /></td><td class="bgColor2"><strong>' . htmlspecialchars($tmpl->templateTitles[$cVal]) . '</strong></td></tr>
<tr>
<td><img src="clear.gif" width="3" height="1" alt="" /></td>
<td class="bgColor2"><table border="0" cellpadding="0" cellspacing="0" class="bgColor0" width="100%"><tr><td nowrap="nowrap">' . $tmpl->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS['ts_analyzer_checkLinenum'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkComments'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkCrop'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax'], 0) . '</td></tr></table>
</td>
</tr>
';
if (t3lib_div::_GET('template') != "all") {
break;
}
}
$tmpl->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
next($tmpl->clearList_const);
}
$theOutput .= '
</table>
';
}
// Output setup
if (t3lib_div::_GET('template')) {
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('setup', true), "", 0, 1);
$theOutput .= $this->pObj->doc->sectionEnd();
$theOutput .= '
<table border="0" cellpadding="1" cellspacing="0">
';
$tmpl->ext_lineNumberOffset = 0;
$tmpl->ext_lineNumberOffset_mode = "setup";
//.........这里部分代码省略.........
示例14: main_rte
/**
* [Describe function...]
*
* @return [type] ...
*/
function main_rte()
{
global $LANG, $TYPO3_CONF_VARS, $FILEMOUNTS, $BE_USER;
// Starting content:
$this->content = $this->doc->startPage($LANG->getLL('Insert Image', 1));
// Making menu in top:
$menuDef = array();
if (in_array('image', $this->allowedItems) && ($this->act == 'image' || t3lib_div::_GP('cWidth'))) {
$menuDef['page']['isActive'] = $this->act == 'image';
$menuDef['page']['label'] = $LANG->getLL('currentImage', 1);
$menuDef['page']['url'] = '#';
$menuDef['page']['addParams'] = 'onClick="jumpToUrl(\'?act=image&bparams=' . $this->bparams . '\');return false;"';
}
if (in_array('magic', $this->allowedItems)) {
$menuDef['file']['isActive'] = $this->act == 'magic';
$menuDef['file']['label'] = $LANG->getLL('magicImage', 1);
$menuDef['file']['url'] = '#';
$menuDef['file']['addParams'] = 'onClick="jumpToUrl(\'?act=magic&bparams=' . $this->bparams . '\');return false;"';
}
if (in_array('plain', $this->allowedItems)) {
$menuDef['url']['isActive'] = $this->act == 'plain';
$menuDef['url']['label'] = $LANG->getLL('plainImage', 1);
$menuDef['url']['url'] = '#';
$menuDef['url']['addParams'] = 'onClick="jumpToUrl(\'?act=plain&bparams=' . $this->bparams . '\');return false;"';
}
if (in_array('dragdrop', $this->allowedItems)) {
$menuDef['mail']['isActive'] = $this->act == 'dragdrop';
$menuDef['mail']['label'] = $LANG->getLL('dragDropImage', 1);
$menuDef['mail']['url'] = '#';
$menuDef['mail']['addParams'] = 'onClick="jumpToUrl(\'?act=dragdrop&bparams=' . $this->bparams . '\');return false;"';
}
// Call hook for extra options
foreach ($this->hookObjects as $hookObject) {
$menuDef = $hookObject->modifyMenuDefinition($menuDef);
}
$this->content .= $this->doc->getTabMenuRaw($menuDef);
switch ($this->act) {
case 'image':
$JScode = '
document.write(printCurrentImageOptions());
insertImagePropertiesInForm();';
$this->content .= '<br />' . $this->doc->wrapScriptTags($JScode);
break;
case 'plain':
case 'magic':
// Adding upload form, if allowed
$this->content .= $this->insertUploadForm($this->expandFolder);
// Getting flag for showing/not showing thumbnails:
$noThumbs = $BE_USER->getTSConfigVal('options.noThumbsInRTEimageSelect');
if (!$noThumbs) {
// MENU-ITEMS, fetching the setting for thumbnails from File>List module:
$_MOD_MENU = array('displayThumbs' => '');
$_MCONF['name'] = 'file_list';
$_MOD_SETTINGS = t3lib_BEfunc::getModuleData($_MOD_MENU, t3lib_div::_GP('SET'), $_MCONF['name']);
$addParams = '&act=' . $this->act . '&editorNo=' . $this->editorNo . '&expandFolder=' . rawurlencode($this->expandFolder);
$thumbNailCheck = t3lib_BEfunc::getFuncCheck('', 'SET[displayThumbs]', $_MOD_SETTINGS['displayThumbs'], 'select_image.php', $addParams, 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $LANG->sL('LLL:EXT:lang/locallang_mod_file_list.php:displayThumbs', 1) . '</label>';
} else {
$thumbNailCheck = '';
}
// Create folder tree:
$foldertree = t3lib_div::makeInstance('tx_rtehtmlarea_image_folderTree');
$tree = $foldertree->getBrowsableTree();
list(, , $specUid) = explode('_', t3lib_div::_GP('PM'));
$files = $this->expandFolder($foldertree->specUIDmap[$specUid], $this->act == 'plain', $noThumbs ? $noThumbs : !$_MOD_SETTINGS['displayThumbs']);
$this->content .= '<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align: top;">' . $this->barheader($LANG->getLL('folderTree') . ':') . $tree . '</td>
<td> </td>
<td style="vertical-align: top;">' . $files . '</td>
</tr>
</table>
<br />' . $thumbNailCheck;
// Add help message
$helpMessage = $this->getHelpMessage($this->act);
if ($helpMessage) {
$this->content .= $this->getMsgBox($helpMessage);
}
break;
case 'dragdrop':
$foldertree = t3lib_div::makeInstance('TBE_FolderTree');
$foldertree->thisScript = $this->thisScript;
$foldertree->ext_noTempRecyclerDirs = true;
$tree = $foldertree->getBrowsableTree();
list(, , $specUid) = explode('_', t3lib_div::_GP('PM'));
$files = $this->TBE_dragNDrop($foldertree->specUIDmap[$specUid], implode(',', $this->allowedFileTypes));
$this->content .= '<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align: top;">' . $this->barheader($LANG->getLL('folderTree') . ':') . $tree . '</td>
<td> </td>
<td style="vertical-align: top;">' . $files . '</td>
</tr>
</table>';
break;
default:
// Call hook
//.........这里部分代码省略.........
示例15: main
/**
* Main function of the module. Write the content to
*
* @return void
*/
public function main()
{
global $BE_USER, $LANG, $BACK_PATH, $TYPO3_CONF_VARS;
// Get language to export/import
$this->sysLanguage = $this->MOD_SETTINGS["lang"];
// Draw the header.
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('EXT:l10nmgr/templates/cm1_template.html');
$this->doc->form = '<form action="" method="post" enctype="' . $TYPO3_CONF_VARS['SYS']['form_enctype'] . '">';
// JavaScript
$this->doc->JScode = '
<script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/tabs.js') . '"></script>
<link rel="stylesheet" type="text/css" href="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/tabs.css') . '" />';
// Find l10n configuration record
/** @var $l10ncfgObj tx_l10nmgr_l10nConfiguration */
$l10ncfgObj = t3lib_div::makeInstance('tx_l10nmgr_l10nConfiguration');
$l10ncfgObj->load($this->id);
if ($l10ncfgObj->isLoaded()) {
// Setting page id
$this->id = $l10ncfgObj->getData('pid');
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
if ($this->id && $access) {
// Header:
// $this->content.=$this->doc->startPage($LANG->getLL('general.title'));
// $this->content.=$this->doc->header($LANG->getLL('general.title'));
// Create and render view to show details for the current l10nmgrcfg
/** @var $l10nmgrconfigurationView tx_l10nmgr_l10ncfgDetailView */
$l10nmgrconfigurationView = t3lib_div::makeInstance('tx_l10nmgr_l10ncfgDetailView', $l10ncfgObj, $this->doc);
$this->content .= $this->doc->section('', $l10nmgrconfigurationView->render());
$this->content .= $this->doc->divider(15);
$this->content .= $this->doc->section($LANG->getLL('general.export.choose.action.title'), t3lib_BEfunc::getFuncMenu($l10ncfgObj->getId(), "SET[lang]", $this->sysLanguage, $this->MOD_MENU["lang"], '', '&srcPID=' . rawurlencode(t3lib_div::_GET('srcPID'))) . t3lib_BEfunc::getFuncMenu($l10ncfgObj->getId(), "SET[action]", $this->MOD_SETTINGS["action"], $this->MOD_MENU["action"], '', '&srcPID=' . rawurlencode(t3lib_div::_GET('srcPID'))) . t3lib_BEfunc::getFuncCheck($l10ncfgObj->getId(), "SET[onlyChangedContent]", $this->MOD_SETTINGS["onlyChangedContent"], '', '&srcPID=' . rawurlencode(t3lib_div::_GET('srcPID'))) . ' ' . $LANG->getLL('export.xml.new.title') . t3lib_BEfunc::getFuncCheck($l10ncfgObj->getId(), "SET[noHidden]", $this->MOD_SETTINGS["noHidden"], '', '&srcPID=' . rawurlencode(t3lib_div::_GET('srcPID'))) . ' ' . $LANG->getLL('export.xml.noHidden.title') . '</br>');
// Render content:
if (!count($this->MOD_MENU['lang'])) {
$this->content .= $this->doc->section('ERROR', $LANG->getLL('general.access.error.title'));
} else {
$this->moduleContent($l10ncfgObj);
}
}
}
$this->content .= $this->doc->spacer(10);
$markers['CONTENT'] = $this->content;
// Build the <body> for the module
$docHeaderButtons = $this->getButtons();
$this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('general.title'));
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}