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


PHP template::wrapScriptTags方法代码示例

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


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

示例1: main

    /**
     * Main function, rendering the browsable page tree
     *
     * @return	void
     */
    function main()
    {
        global $LANG, $CLIENT;
        // Produce browse-tree:
        $tree = $this->pagetree->getBrowsableTree();
        // Outputting Temporary DB mount notice:
        if ($this->active_tempMountPoint) {
            $flashText = '
				<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))) . '">' . $LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) . '</a>		<br />' . $LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.path', 1) . ': <span title="' . htmlspecialchars($this->active_tempMountPoint['_thePathFull']) . '">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($this->active_tempMountPoint['_thePath'], -50)) . '</span>
			';
            $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $flashText, '', t3lib_FlashMessage::INFO);
            $this->content .= $flashMessage->render();
        }
        // Outputting page tree:
        $this->content .= '<div id="PageTreeDiv">' . $tree . '</div>';
        // Adding javascript for drag & drop activation and highlighting
        $this->content .= $this->doc->wrapScriptTags('
			' . ($this->doHighlight ? 'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : '') . '
			' . (!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();'));
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $this->getButtons();
        $markers = array('IMG_RESET' => t3lib_iconWorks::getSpriteIcon('actions-document-close', array('id' => 'treeFilterReset', 'alt' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter'), 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter'))), 'WORKSPACEINFO' => $this->getWorkspaceInfo(), 'CONTENT' => $this->content);
        $subparts = array();
        if (!$this->hasFilterBox) {
            $subparts['###SECOND_ROW###'] = '';
        }
        // Build the <body> for the module
        $this->content = $this->doc->startPage('TYPO3 Page Tree');
        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers, $subparts);
        $this->content .= $this->doc->endPage();
        $this->content = $this->doc->insertStylesAndJS($this->content);
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:37,代码来源:alt_db_navframe.php

示例2: init

    /**
     * @return	[type]		...
     */
    function init()
    {
        global $BE_USER, $LANG, $BACK_PATH;
        $this->editorNo = t3lib_div::_GP('editorNo');
        $this->siteUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->bodyTagAdditions = 'onload="Init();"';
        $this->doc->form = '
	<form action="" id="process" name="process" method="post">
		<input type="hidden" name="processContent" value="" />
		<input type="hidden" name="returnUrl" value="' . htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')) . '" />
		';
        $JScode = '
			var plugin = window.parent.RTEarea["' . $this->editorNo . '"].editor.getPlugin("UserElements");
			var HTMLArea = window.parent.HTMLArea;
			var editor = plugin.editor;

			function Init() {
			};
			function insertHTML(content,noHide) {
				plugin.restoreSelection();
				editor.insertHTML(content);
				if(!noHide) plugin.close();
			};
			function wrapHTML(wrap1,wrap2,noHide) {
				plugin.restoreSelection();
				if(editor.hasSelectedText()) {
					editor.surroundHTML(wrap1,wrap2);
				} else {
					alert(' . $LANG->JScharCode($LANG->getLL('noTextSelection')) . ');
				}
				if(!noHide) plugin.close();
			};
			function processSelection(script) {
				plugin.restoreSelection();
				document.process.action = script;
				document.process.processContent.value = editor.getSelectedHTML();
				document.process.submit();
			};
			function jumpToUrl(URL)	{
				var RTEtsConfigParams = "&RTEtsConfigParams=' . rawurlencode(t3lib_div::_GP('RTEtsConfigParams')) . '";
				var editorNo = "&editorNo=' . rawurlencode($this->editorNo) . '";
				theLocation = "' . t3lib_div::getIndpEnv('SCRIPT_NAME') . '"+URL+RTEtsConfigParams+editorNo;
				window.location.href = theLocation;
			}
		';
        $this->doc->JScode = $this->doc->wrapScriptTags($JScode);
        $this->modData = $BE_USER->getModuleData('user.php', 'ses');
        if (t3lib_div::_GP('OC_key')) {
            $parts = explode('|', t3lib_div::_GP('OC_key'));
            $this->modData['openKeys'][$parts[1]] = $parts[0] == 'O' ? 1 : 0;
            $BE_USER->pushModuleData('user.php', $this->modData);
        }
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:58,代码来源:class.tx_rtehtmlarea_user.php

示例3: init

    /**
     * Initialize script class
     *
     * @return	void
     */
    function init()
    {
        //TODO remove global
        global $BACK_PATH, $TYPO3_CONF_VARS;
        // Setting target, which must be a file reference to a file within the mounts.
        $this->target = $this->origTarget = t3lib_div::_GP('target');
        $this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
        // Creating file management object:
        $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
        $this->basicff->init($GLOBALS['FILEMOUNTS'], $TYPO3_CONF_VARS['BE']['fileExtensions']);
        if (file_exists($this->target)) {
            $this->target = $this->basicff->cleanDirectoryName($this->target);
            // Cleaning and checking target (file or dir)
        } else {
            $this->target = '';
        }
        $key = $this->basicff->checkPathAgainstMounts($this->target . '/');
        if (!$this->target || !$key) {
            $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE);
            $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE);
            throw new RuntimeException($title . ': ' . $message);
        }
        // Finding the icon
        switch ($GLOBALS['FILEMOUNTS'][$key]['type']) {
            case 'user':
                $this->icon = 'gfx/i/_icon_ftp_user.gif';
                break;
            case 'group':
                $this->icon = 'gfx/i/_icon_ftp_group.gif';
                break;
            default:
                $this->icon = 'gfx/i/_icon_ftp.gif';
                break;
        }
        $this->icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, $this->icon, 'width="18" height="16"') . ' title="" alt="" />';
        // Relative path to filemount, $key:
        $this->shortPath = substr($this->target, strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
        // Setting title:
        $this->title = $this->icon . $GLOBALS['FILEMOUNTS'][$key]['name'] . ': ' . $this->shortPath;
        // ***************************
        // Setting template object
        // ***************************
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->setModuleTemplate('templates/file_edit.html');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->JScode = $this->doc->wrapScriptTags('
			function backToList()	{	//
				top.goToModule("file_list");
			}
		');
        $this->doc->form = '<form action="tce_file.php" method="post" name="editform">';
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:57,代码来源:file_edit.php

示例4: main

    /**
     * Main function, rendering the folder tree
     *
     * @return	void
     */
    function main()
    {
        global $LANG, $CLIENT;
        // Produce browse-tree:
        $tree = $this->foldertree->getBrowsableTree();
        // Outputting page tree:
        $this->content .= $tree;
        // Adding javascript for drag & drop activation and highlighting
        $this->content .= $this->doc->wrapScriptTags('
			' . ($this->doHighlight ? 'Tree.highlightActiveItem("", top.fsMod.navFrameHighlightedID["file"]);' : '') . '
			' . (!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();'));
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $this->getButtons();
        $markers = array('IMG_RESET' => '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"') . ' id="treeFilterReset" alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter') . '" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter') . '" />', 'CONTENT' => $this->content);
        $subparts = array();
        // Possible filter/search like in page tree
        $subparts['###SECOND_ROW###'] = '';
        // Build the <body> for the module
        $this->content = $this->doc->startPage('TYPO3 Folder Tree');
        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers, $subparts);
        $this->content .= $this->doc->endPage();
        $this->content = $this->doc->insertStylesAndJS($this->content);
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:28,代码来源:alt_file_navframe.php

示例5: main

    /**
     * Main function, rendering the browsable page tree
     *
     * @return	void		...
     */
    function main()
    {
        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'doktype = 254 AND module in (\'dmail\')' . BackendUtility::deleteClause('pages'), '', 'title');
        $out = '';
        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
            if (BackendUtility::readPageAccess($row['uid'], $GLOBALS['BE_USER']->getPagePermsClause(1))) {
                $out .= '<tr onmouseover="this.style.backgroundColor=\'' . GeneralUtility::modifyHTMLColorAll($this->doc->bgColor, -5) . '\'" onmouseout="this.style.backgroundColor=\'\'">' . '<td id="dmail_' . $row['uid'] . '" ><a href="#" onclick="top.fsMod.recentIds[\'txdirectmailM1\']=' . $row['uid'] . ';jumpTo(\'id=' . $row['uid'] . '\',this,\'dmail_' . $row['uid'] . '\');">' . IconUtility::getSpriteIconForRecord('pages', $row, array('title' => htmlspecialchars(BackendUtility::getRecordPath($row['uid'], ' 1=1', 20)), 'align' => 'top')) . htmlspecialchars($row['title']) . '</a></td></tr>';
            }
        }
        $GLOBALS['TYPO3_DB']->sql_free_result($res);
        $content = '<table cellspacing="0" cellpadding="0" border="0" width="100%">' . $out . '</table>';
        // Adding highlight - JavaScript
        if ($this->doHighlight) {
            $content .= $this->doc->wrapScriptTags('
			hilight_row("",top.fsMod.navFrameHighlightedID["web"]);
		');
        }
        $docHeaderButtons = array('CSH' => BackendUtility::cshItem($this->cshTable, 'folders', $GLOBALS['BACK_PATH'], TRUE), 'REFRESH' => '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('unique' => uniqid('directmail_navframe')))) . '">' . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/refresh_n.gif', 'width="14" height="14"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.refresh', 1) . '" alt="" /></a>');
        $markers = array('HEADLINE' => '', 'CONTENT' => $GLOBALS['LANG']->getLL('dmail_folders') . $content);
        // Build the <body> for the module
        $this->content = $this->doc->startPage('TYPO3 Direct Mail Navigation');
        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
    }
开发者ID:preinboth,项目名称:direct_mail,代码行数:28,代码来源:NavFrame.php

示例6: workspaceSelector

 /**
  * Create selector for workspaces and change workspace if command is given to do that.
  *
  * @return	string		HTML
  */
 function workspaceSelector()
 {
     global $TYPO3_DB, $BE_USER, $LANG;
     // Changing workspace and if so, reloading entire backend:
     if (strlen($this->changeWorkspace)) {
         $BE_USER->setWorkspace($this->changeWorkspace);
         return $this->doc->wrapScriptTags('top.location.href="' . t3lib_BEfunc::getBackendScript() . '";');
     }
     // Changing workspace and if so, reloading entire backend:
     if (strlen($this->changeWorkspacePreview)) {
         $BE_USER->setWorkspacePreview($this->changeWorkspacePreview);
     }
     // Create options array:
     $options = array();
     if ($BE_USER->checkWorkspace(array('uid' => 0))) {
         $options[0] = '[' . $LANG->getLL('shortcut_onlineWS') . ']';
     }
     if ($BE_USER->checkWorkspace(array('uid' => -1))) {
         $options[-1] = '[' . $LANG->getLL('shortcut_offlineWS') . ']';
     }
     // Add custom workspaces (selecting all, filtering by BE_USER check):
     $workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
     if (count($workspaces)) {
         foreach ($workspaces as $rec) {
             if ($BE_USER->checkWorkspace($rec)) {
                 $options[$rec['uid']] = $rec['uid'] . ': ' . $rec['title'];
             }
         }
     }
     // Build selector box:
     if (count($options)) {
         foreach ($options as $value => $label) {
             $selected = (int) $BE_USER->workspace === $value ? ' selected="selected"' : '';
             $options[$value] = '<option value="' . htmlspecialchars($value) . '"' . $selected . '>' . htmlspecialchars($label) . '</option>';
         }
     } else {
         $options[] = '<option value="-99">' . $LANG->getLL('shortcut_noWSfound', 1) . '</option>';
     }
     $selector = '';
     // Preview:
     if ($BE_USER->workspace !== 0) {
         $selector .= '<label for="workspacePreview">Frontend Preview:</label> <input type="checkbox" name="workspacePreview" id="workspacePreview" onclick="changeWorkspacePreview(' . ($BE_USER->user['workspace_preview'] ? 0 : 1) . ')"; ' . ($BE_USER->user['workspace_preview'] ? 'checked="checked"' : '') . '/>&nbsp;';
     }
     $selector .= '<a href="mod/user/ws/index.php" target="content">' . t3lib_iconWorks::getSpriteIconForRecord('sys_workspace', array()) . '</a>';
     if (count($options) > 1) {
         $selector .= '<select name="_workspaceSelector" onchange="changeWorkspace(this.options[this.selectedIndex].value);">' . implode('', $options) . '</select>';
     }
     return $selector;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:54,代码来源:alt_shortcut.php

示例7: main

    /**
     * Main function, creating the content for the access editing forms/listings
     *
     * @return	void
     */
    public function main()
    {
        global $BE_USER, $LANG;
        // 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);
        // Checking access:
        if ($this->id && $access || $BE_USER->isAdmin() && !$this->id) {
            if ($BE_USER->isAdmin() && !$this->id) {
                $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
            }
            // This decides if the editform can and will be drawn:
            $this->editingAllowed = $this->pageinfo['perms_userid'] == $BE_USER->user['uid'] || $BE_USER->isAdmin();
            $this->edit = $this->edit && $this->editingAllowed;
            // If $this->edit then these functions are called in the end of the page...
            if ($this->edit) {
                $this->doc->postCode .= $this->doc->wrapScriptTags('
					setCheck("check[perms_user]","data[pages][' . $this->id . '][perms_user]");
					setCheck("check[perms_group]","data[pages][' . $this->id . '][perms_group]");
					setCheck("check[perms_everybody]","data[pages][' . $this->id . '][perms_everybody]");
				');
            }
            // Draw the HTML page header.
            $this->content .= $this->doc->header($LANG->getLL('permissions') . ($this->edit ? ': ' . $LANG->getLL('Edit') : ''));
            $this->content .= $this->doc->spacer(5);
            $vContent = $this->doc->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->doc->section('', $vContent);
            }
            // Main function, branching out:
            if (!$this->edit) {
                $this->notEdit();
            } else {
                $this->doEdit();
            }
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $this->docHeaderButtons['csh'];
            $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
            $markers['CONTENT'] = $this->content;
            // Build the <body> for the module
            $this->content = $this->doc->startPage($LANG->getLL('permissions'));
            $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        } else {
            // If no access or if ID == zero
            $this->content .= $this->doc->startPage($LANG->getLL('permissions'));
            $this->content .= $this->doc->header($LANG->getLL('permissions'));
        }
        $this->content .= $this->doc->endPage();
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:55,代码来源:index.php

示例8: main

    /**
     * Main function, starting the rendering of the list.
     *
     * @return	void
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $CLIENT;
        // Start document template object:
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->setModuleTemplate('templates/db_list.html');
        // Loading current page record and checking access:
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        // Initialize the dblist object:
        $dblist = t3lib_div::makeInstance('localRecordList');
        $dblist->backPath = $BACK_PATH;
        $dblist->calcPerms = $BE_USER->calcPerms($this->pageinfo);
        $dblist->thumbs = $BE_USER->uc['thumbnailsByDefault'];
        $dblist->returnUrl = $this->returnUrl;
        $dblist->allFields = $this->MOD_SETTINGS['bigControlPanel'] || $this->table ? 1 : 0;
        $dblist->localizationView = $this->MOD_SETTINGS['localization'];
        $dblist->showClipboard = 1;
        $dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
        $dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
        $dblist->hideTables = $this->modTSconfig['properties']['hideTables'];
        $dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
        $dblist->clickTitleMode = $this->modTSconfig['properties']['clickTitleMode'];
        $dblist->alternateBgColors = $this->modTSconfig['properties']['alternateBgColors'] ? 1 : 0;
        $dblist->allowedNewTables = t3lib_div::trimExplode(',', $this->modTSconfig['properties']['allowedNewTables'], 1);
        $dblist->deniedNewTables = t3lib_div::trimExplode(',', $this->modTSconfig['properties']['deniedNewTables'], 1);
        $dblist->newWizards = $this->modTSconfig['properties']['newWizards'] ? 1 : 0;
        $dblist->pageRow = $this->pageinfo;
        $dblist->counter++;
        $dblist->MOD_MENU = array('bigControlPanel' => '', 'clipBoard' => '', 'localization' => '');
        $dblist->modTSconfig = $this->modTSconfig;
        // Clipboard is initialized:
        $dblist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
        // Start clipboard
        $dblist->clipObj->initializeClipboard();
        // Initialize - reads the clipboard content from the user session
        // Clipboard actions are handled:
        $CB = t3lib_div::_GET('CB');
        // CB is the clipboard command array
        if ($this->cmd == 'setCB') {
            // CBH is all the fields selected for the clipboard, CBC is the checkbox fields which were checked. By merging we get a full array of checked/unchecked elements
            // This is set to the 'el' array of the CB after being parsed so only the table in question is registered.
            $CB['el'] = $dblist->clipObj->cleanUpCBC(array_merge((array) t3lib_div::_POST('CBH'), (array) t3lib_div::_POST('CBC')), $this->cmd_table);
        }
        if (!$this->MOD_SETTINGS['clipBoard']) {
            $CB['setP'] = 'normal';
        }
        // If the clipboard is NOT shown, set the pad to 'normal'.
        $dblist->clipObj->setCmd($CB);
        // Execute commands.
        $dblist->clipObj->cleanCurrent();
        // Clean up pad
        $dblist->clipObj->endClipboard();
        // Save the clipboard content
        // This flag will prevent the clipboard panel in being shown.
        // It is set, if the clickmenu-layer is active AND the extended view is not enabled.
        $dblist->dontShowClipControlPanels = $CLIENT['FORMSTYLE'] && !$this->MOD_SETTINGS['bigControlPanel'] && $dblist->clipObj->current == 'normal' && !$BE_USER->uc['disableCMlayers'] && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers'];
        // If there is access to the page, then render the list contents and set up the document template object:
        if ($access) {
            // Deleting records...:
            // Has not to do with the clipboard but is simply the delete action. The clipboard object is used to clean up the submitted entries to only the selected table.
            if ($this->cmd == 'delete') {
                $items = $dblist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'), $this->cmd_table, 1);
                if (count($items)) {
                    $cmd = array();
                    foreach ($items as $iK => $value) {
                        $iKParts = explode('|', $iK);
                        $cmd[$iKParts[0]][$iKParts[1]]['delete'] = 1;
                    }
                    $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                    $tce->stripslashes_values = 0;
                    $tce->start(array(), $cmd);
                    $tce->process_cmdmap();
                    if (isset($cmd['pages'])) {
                        t3lib_BEfunc::setUpdateSignal('updatePageTree');
                    }
                    $tce->printLogErrorMessages(t3lib_div::getIndpEnv('REQUEST_URI'));
                }
            }
            // Initialize the listing object, dblist, for rendering the list:
            $this->pointer = t3lib_div::intInRange($this->pointer, 0, 100000);
            $dblist->start($this->id, $this->table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
            $dblist->setDispFields();
            // Render versioning selector:
            if (t3lib_extMgm::isLoaded('version')) {
                $dblist->HTMLcode .= $this->doc->getVersionSelector($this->id);
            }
            // Render the list of tables:
            $dblist->generateList();
            // Write the bottom of the page:
            $dblist->writeBottom();
            // Add JavaScript functions to the page:
            $this->doc->JScode = $this->doc->wrapScriptTags('
				function jumpToUrl(URL)	{	//
//.........这里部分代码省略.........
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:db_list.php

示例9: 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'), '');
        }
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:file_list.php


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