本文整理汇总了PHP中t3lib_BEfunc::getFuncMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::getFuncMenu方法的具体用法?PHP t3lib_BEfunc::getFuncMenu怎么用?PHP t3lib_BEfunc::getFuncMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_BEfunc
的用法示例。
在下文中一共展示了t3lib_BEfunc::getFuncMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/**
* Main function
*
* @return string HTML output
*/
function main()
{
$content = '';
$content .= $this->pObj->getHeaderBar('', t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[tx_dam_tools_serviceinfo.func]', $this->pObj->MOD_SETTINGS['tx_dam_tools_serviceinfo.func'], $this->pObj->MOD_MENU['tx_dam_tools_serviceinfo.func']));
$content .= $this->pObj->doc->spacer(10);
$content .= $this->moduleContent();
return $content;
}
示例2: main
/**
* Main function
*
* @return string HTML output
*/
function main()
{
global $LANG;
$content = '';
$content .= $this->pObj->getHeaderBar('', $LANG->getLL('tx_dam_tools_config.showConfig') . t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[tx_dam_tools_config.func]', $this->pObj->MOD_SETTINGS['tx_dam_tools_config.func'], $this->pObj->MOD_MENU['tx_dam_tools_config.func']));
$content .= $this->pObj->doc->spacer(10);
$content .= $this->moduleContent();
return $content;
}
示例3: main
/**
* MAIN function for page information of localization
*
* @return string Output HTML for the module.
*/
function main()
{
global $BACK_PATH, $LANG, $SOBE;
if ($this->pObj->id) {
$theOutput = '';
// Depth selector:
$h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
$h_func .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php');
$theOutput .= $h_func;
// Add CSH:
$theOutput .= t3lib_BEfunc::cshItem('_MOD_web_info', 'lang', $GLOBALS['BACK_PATH'], '|<br/>');
// Showing the tree:
// Initialize starting point of page tree:
$treeStartingPoint = intval($this->pObj->id);
$treeStartingRecord = t3lib_BEfunc::getRecordWSOL('pages', $treeStartingPoint);
$depth = $this->pObj->MOD_SETTINGS['depth'];
// Initialize tree object:
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
$tree->addField('l18n_cfg');
// Creating top icon; the current page
$HTML = t3lib_iconWorks::getIconImage('pages', $treeStartingRecord, $GLOBALS['BACK_PATH'], 'align="top"');
$tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => $HTML);
// Create the tree from starting point:
if ($depth) {
$tree->getTree($treeStartingPoint, $depth, '');
}
#debug($tree->tree);
// Add CSS needed:
$css_content = '
TABLE#langTable {
margin-top: 10px;
}
TABLE#langTable TR TD {
padding-left : 2px;
padding-right : 2px;
white-space: nowrap;
}
TD.c-notvisible { background-color: red; }
TD.c-visible { background-color: #669966; }
TD.c-translated { background-color: #A8E95C; }
TD.c-nottranslated { background-color: #E9CD5C; }
TD.c-leftLine {border-left: 2px solid black; }
.bgColor5 { font-weight: bold; }
';
$marker = '/*###POSTCSSMARKER###*/';
$this->pObj->content = str_replace($marker, $css_content . chr(10) . $marker, $this->pObj->content);
// Render information table:
$theOutput .= $this->renderL10nTable($tree);
}
return $theOutput;
}
示例4: main
/**
* Main function of the module. Write the content to $this->content
*
* @return void
*/
public function main()
{
$this->thisScript = 'mod.php?M=' . $this->MCONF['name'];
// Clean up settings:
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
// Draw the header
$this->doc = t3lib_div::makeInstance('noDoc');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->form = '<form action="" method="post">';
// JavaScript
$this->doc->JScode = $this->doc->wrapScriptTags('
script_ended = 0;
function jumpToUrl(URL) { //
window.location.href = URL;
}
');
// DBAL page title:
$this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->section('', $this->doc->funcMenu('', t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
// Debug log:
switch ($this->MOD_SETTINGS['function']) {
case 'info':
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Cached_info'), $this->printCachedInfo());
break;
case 'sqlcheck':
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('SQL_check'), $this->printSqlCheck());
break;
case 0:
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Debug_log'), $this->printLogMgm());
break;
}
// ShortCut
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
}
$this->content .= $this->doc->spacer(10);
}
示例5: main
/**
* Main function of the module. Write the content to $this->content
*/
function main()
{
global $AB, $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $HTTP_GET_VARS, $HTTP_POST_VARS, $CLIENT, $TYPO3_CONF_VARS;
// Draw the header.
$this->doc = t3lib_div::makeInstance("mediumDoc");
$this->doc->backPath = $BACK_PATH;
$this->doc->form = '<form action="" method="POST">';
// JavaScript
$this->doc->JScode = '
<script language="javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
';
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
if ($this->id && $access || $BE_USER->user["admin"] && !$this->id) {
if ($BE_USER->user["admin"] && !$this->id) {
$this->pageinfo = array("title" => "[root-level]", "uid" => 0, "pid" => 0);
}
$headerSection = $this->doc->getHeader("pages", $this->pageinfo, $this->pageinfo["_thePath"]) . "<br>" . $LANG->php3Lang["labels"]["path"] . ": " . t3lib_div::fixed_lgd_pre($this->pageinfo["_thePath"], 50);
$this->content .= $this->doc->startPage($LANG->getLL("title"));
$this->content .= $this->doc->header($LANG->getLL("title"));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->section("", $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, "SET[function]", $this->MOD_SETTINGS["function"], $this->MOD_MENU["function"])));
$this->content .= $this->doc->divider(5);
// Render content:
$this->moduleContent();
// ShortCut
if ($BE_USER->mayMakeShortcut()) {
$this->content .= $this->doc->spacer(20) . $this->doc->section("", $this->doc->makeShortcutIcon("id", implode(",", array_keys($this->MOD_MENU)), $this->MCONF["name"]));
}
}
$this->content .= $this->doc->spacer(10);
}
示例6: main
/**
* Main function of the module. Write the content to $this->content
*
* @return void
*/
public function main()
{
// Draw the header.
$this->doc = t3lib_div::makeInstance('mediumDoc');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->form = '<form action="" method="post">';
// JavaScript
$this->doc->JScode = '
<script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
';
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
if ($GLOBALS['BE_USER']->user['admin'] && !$this->id) {
$this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
}
$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);
$this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
$this->content .= $this->doc->divider(5);
// Render content
$this->moduleContent();
// Shortcut
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
}
}
$this->content .= $this->doc->spacer(10);
}
示例7: getFunctionMenu
/**
* Gets the function menu selector for this backend module.
*
* @return string The HTML representation of the function menu selector
*/
protected function getFunctionMenu()
{
return t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
}
示例8: notEdit
/**
* Showing the permissions in a tree ($this->edit = false)
* (Adding content to internal content variable)
*
* @return void
*/
public function notEdit()
{
global $BE_USER, $LANG, $BACK_PATH;
// Get usernames and groupnames: The arrays we get in return contains only 1) users which are members of the groups of the current user, 2) groups that the current user is member of
$beGroupKeys = $BE_USER->userGroupsUID;
$beUserArray = t3lib_BEfunc::getUserNames();
if (!$GLOBALS['BE_USER']->isAdmin()) {
$beUserArray = t3lib_BEfunc::blindUserNames($beUserArray, $beGroupKeys, 0);
}
$beGroupArray = t3lib_BEfunc::getGroupNames();
if (!$GLOBALS['BE_USER']->isAdmin()) {
$beGroupArray = t3lib_BEfunc::blindGroupNames($beGroupArray, $beGroupKeys, 0);
}
// Length of strings:
$tLen = $this->MOD_SETTINGS['mode'] == 'perms' ? 20 : 30;
// Selector for depth:
$code .= $LANG->getLL('Depth') . ': ';
$code .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[depth]', $this->MOD_SETTINGS['depth'], $this->MOD_MENU['depth']);
$this->content .= $this->doc->section('', $code);
$this->content .= $this->doc->spacer(5);
// Initialize tree object:
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->init('AND ' . $this->perms_clause);
$tree->addField('perms_user', 1);
$tree->addField('perms_group', 1);
$tree->addField('perms_everybody', 1);
$tree->addField('perms_userid', 1);
$tree->addField('perms_groupid', 1);
$tree->addField('hidden');
$tree->addField('fe_group');
$tree->addField('starttime');
$tree->addField('endtime');
$tree->addField('editlock');
// Creating top icon; the current page
$HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pageinfo);
$tree->tree[] = array('row' => $this->pageinfo, 'HTML' => $HTML);
// Create the tree from $this->id:
$tree->getTree($this->id, $this->MOD_SETTINGS['depth'], '');
// Make header of table:
$code = '';
if ($this->MOD_SETTINGS['mode'] == 'perms') {
$code .= '
<tr class="t3-row-header">
<td colspan="2"> </td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td>' . $LANG->getLL('Owner', TRUE) . '</td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('Group', TRUE) . '</td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('Everybody', TRUE) . '</td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('EditLock', TRUE) . '</td>
</tr>
';
} else {
$code .= '
<tr class="t3-row-header">
<td colspan="2"> </td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center" nowrap="nowrap">' . $LANG->getLL('User', TRUE) . ': ' . htmlspecialchars($BE_USER->user['username']) . '</td>
' . (!$BE_USER->isAdmin() ? '<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('EditLock', TRUE) . '</td>' : '') . '
</tr>';
}
// Traverse tree:
foreach ($tree->tree as $data) {
$cells = array();
$pageId = $data['row']['uid'];
// Background colors:
$bgCol = $this->lastEdited == $pageId ? ' class="bgColor-20"' : '';
$lE_bgCol = $bgCol;
// User/Group names:
$userName = $beUserArray[$data['row']['perms_userid']] ? $beUserArray[$data['row']['perms_userid']]['username'] : ($data['row']['perms_userid'] ? $data['row']['perms_userid'] : '');
if ($data['row']['perms_userid'] && !$beUserArray[$data['row']['perms_userid']]) {
$userName = SC_mod_web_perm_ajax::renderOwnername($pageId, $data['row']['perms_userid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($userName, 20)), false);
} else {
$userName = SC_mod_web_perm_ajax::renderOwnername($pageId, $data['row']['perms_userid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($userName, 20)));
}
$groupName = $beGroupArray[$data['row']['perms_groupid']] ? $beGroupArray[$data['row']['perms_groupid']]['title'] : ($data['row']['perms_groupid'] ? $data['row']['perms_groupid'] : '');
if ($data['row']['perms_groupid'] && !$beGroupArray[$data['row']['perms_groupid']]) {
$groupName = SC_mod_web_perm_ajax::renderGroupname($pageId, $data['row']['perms_groupid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($groupName, 20)), false);
} else {
$groupName = SC_mod_web_perm_ajax::renderGroupname($pageId, $data['row']['perms_groupid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($groupName, 20)));
}
// Seeing if editing of permissions are allowed for that page:
$editPermsAllowed = $data['row']['perms_userid'] == $BE_USER->user['uid'] || $BE_USER->isAdmin();
// First column:
$cellAttrib = $data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '';
$cells[] = '
<td align="left" nowrap="nowrap"' . ($cellAttrib ? $cellAttrib : $bgCol) . '>' . $data['HTML'] . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'], $tLen)) . ' </td>';
// "Edit permissions" -icon
if ($editPermsAllowed && $pageId) {
$aHref = 'index.php?mode=' . $this->MOD_SETTINGS['mode'] . '&depth=' . $this->MOD_SETTINGS['depth'] . '&id=' . ($data['row']['_ORIG_uid'] ? $data['row']['_ORIG_uid'] : $pageId) . '&return_id=' . $this->id . '&edit=1';
$cells[] = '
//.........这里部分代码省略.........
示例9: main
/**
* Main function of the module. Write the content to $this->content
* If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
*
* @return [type] ...
*/
public function main()
{
global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
// Access check!
// The page will show only if there is a valid page and if this page may be viewed by the user
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
$docHeaderButtons = $this->getButtons();
if ($this->id && $access || $BE_USER->user['admin'] && !$this->id) {
// Draw the form
$this->doc->form = '<form action="" method="post" enctype="multipart/form-data">';
// JavaScript
$this->doc->JScode = '
<script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
';
$this->doc->postCode = '
<script language="javascript" type="text/javascript">
script_ended = 1;
if (top.fsMod) top.fsMod.recentIds["web"] = 0;
</script>
';
// Render content:
$this->getModuleContent();
} else {
// If no access or if ID == zero
$docHeaderButtons['save'] = '';
$this->content .= $this->doc->spacer(10);
}
// compile document
$markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
$markers['CONTENT'] = $this->content;
// Build the <body> for the module
$this->content = $this->doc->startPage($LANG->getLL('title'));
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例10: main
/**
* This functions builds the content of the page
*
* @return void
*/
function main()
{
$this->content = '';
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('backendUserAdministration', true));
$this->content .= $this->doc->spacer(5);
switch ($this->MOD_SETTINGS['function']) {
case 'compare':
if (t3lib_div::_GP('ads')) {
$compareFlags = t3lib_div::_GP('compareFlags');
$GLOBALS['BE_USER']->pushModuleData('tools_beuser/index.php/compare', $compareFlags);
} else {
$compareFlags = $GLOBALS['BE_USER']->getModuleData('tools_beuser/index.php/compare', 'ses');
}
$this->content .= $this->compareUsers($compareFlags);
break;
case 'whoisonline':
$this->content .= $this->whoIsOnline();
break;
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
//$markers['CSH'] = $docHeaderButtons['csh'];
$markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
$markers['CONTENT'] = $this->content;
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render('Backend User Administration', $this->content);
}
示例11: getFunctionMenu
protected function getFunctionMenu()
{
$functionMenu = 'No sites configured for Solr yet.';
if ($this->site) {
$functionMenu = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
}
return $functionMenu;
}
示例12: main
/**
* Main function, rendering the content of the rename form
*
* @return void
*/
function main()
{
//TODO remove global, change $LANG into $GLOBALS['LANG'], change locallang*.php to locallang*.xml
global $LANG;
// Make page header:
$this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
$pageContent = $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
$pageContent .= $this->doc->spacer(5);
$pageContent .= $this->doc->divider(5);
$code = '<form action="tce_file.php" method="post" name="editform">';
// Making the formfields for renaming:
$code .= '
<div id="c-rename">
<input type="text" name="file[rename][0][data]" value="' . htmlspecialchars(basename($this->shortPath)) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' />
<input type="hidden" name="file[rename][0][target]" value="' . htmlspecialchars($this->target) . '" />
</div>
';
// Making submit button:
$code .= '
<div id="c-submit">
<input type="submit" value="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.submit', 1) . '" />
<input type="submit" value="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.cancel', 1) . '" onclick="backToList(); return false;" />
<input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) . '" />
</div>
';
$code .= '</form>';
// Add the HTML as a section:
$pageContent .= $code;
$docHeaderButtons = array();
$docHeaderButtons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
// Add the HTML as a section:
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $pageContent, 'PATH' => $this->title);
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例13: main
/**
* Main function of class
*
* @return string HTML output
*/
function main()
{
global $LANG;
$menu = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[tsconf_parts]', $this->pObj->MOD_SETTINGS['tsconf_parts'], $this->pObj->MOD_MENU['tsconf_parts']);
$menu .= '<br /><label for="checkTsconf_alphaSort">' . $GLOBALS['LANG']->getLL('sort_alphabetic', true) . '</label> ' . t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[tsconf_alphaSort]', $this->pObj->MOD_SETTINGS['tsconf_alphaSort'], '', '', 'id="checkTsconf_alphaSort"');
$menu .= '<br /><br />';
if ($this->pObj->MOD_SETTINGS['tsconf_parts'] == 99) {
$TSparts = t3lib_BEfunc::getPagesTSconfig($this->pObj->id, '', 1);
$lines = array();
$pUids = array();
foreach ($TSparts as $k => $v) {
if ($k != 'uid_0') {
if ($k == 'defaultPageTSconfig') {
$pTitle = '<strong>' . $GLOBALS['LANG']->getLL('editTSconfig_default', 1) . '</strong>';
$editIcon = '';
} else {
$pUids[] = substr($k, 4);
$row = t3lib_BEfunc::getRecordWSOL('pages', substr($k, 4));
$pTitle = $this->pObj->doc->getHeader('pages', $row, '', 0);
$editIdList = substr($k, 4);
$params = '&edit[pages][' . $editIdList . ']=edit&columnsOnly=TSconfig';
$onclickUrl = t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], '');
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $GLOBALS['LANG']->getLL('editTSconfig', 1) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
}
$TScontent = nl2br(htmlspecialchars(trim($v) . chr(10)));
$tsparser = t3lib_div::makeInstance('t3lib_TSparser');
$tsparser->lineNumberOffset = 0;
$TScontent = $tsparser->doSyntaxHighlight(trim($v) . LF, '', 0);
$lines[] = '
<tr><td nowrap="nowrap" class="bgColor5">' . $pTitle . '</td></tr>
<tr><td nowrap="nowrap" class="bgColor4">' . $TScontent . $editIcon . '</td></tr>
<tr><td> </td></tr>
';
}
}
if (count($pUids)) {
$params = '&edit[pages][' . implode(',', $pUids) . ']=edit&columnsOnly=TSconfig';
$onclickUrl = t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], '');
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $GLOBALS['LANG']->getLL('editTSconfig_all', 1) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '<strong>' . $GLOBALS['LANG']->getLL('editTSconfig_all', 1) . '</strong>' . '</a>';
} else {
$editIcon = '';
}
$theOutput .= $this->pObj->doc->section($LANG->getLL('tsconf_title'), t3lib_BEfunc::cshItem('_MOD_' . $GLOBALS['MCONF']['name'], 'tsconfig_edit', $GLOBALS['BACK_PATH'], '|<br />') . $menu . '
<br /><br />
<!-- Edit fields: -->
<table border="0" cellpadding="0" cellspacing="1">' . implode('', $lines) . '</table><br />' . $editIcon, 0, 1);
} else {
$tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext');
// Defined global here!
$tmpl->tt_track = 0;
// Do not log time-performance information
$tmpl->fixedLgd = 0;
$tmpl->linkObjects = 0;
$tmpl->bType = '';
$tmpl->ext_expandAllNotes = 1;
$tmpl->ext_noPMicons = 1;
switch ($this->pObj->MOD_SETTINGS['tsconf_parts']) {
case '1':
$modTSconfig = t3lib_BEfunc::getModTSconfig($this->pObj->id, 'mod');
break;
case '1a':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_layout', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '1b':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_view', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '1c':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_modules', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '1d':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_list', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '1e':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_info', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '1f':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_func', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '1g':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_ts', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '2':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('RTE', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '5':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('TCEFORM', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '6':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('TCEMAIN', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '3':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('TSFE', t3lib_BEfunc::getPagesTSconfig($this->pObj->id));
break;
case '4':
//.........这里部分代码省略.........
示例14: 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'), '');
}
}
示例15: main
/**
* Main function, rendering the upload file form fields
*
* @return void
*/
function main()
{
// Make page header:
$this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
$form = $this->renderUploadForm();
$pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle')) . $this->doc->section('', $form);
// Header Buttons
$docHeaderButtons = array('csh' => t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_upload', $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, 'PATH' => $this->title);
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}