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


PHP t3lib_BEfunc::setUpdateSignal方法代码示例

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


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

示例1: indexAction

 /**
  * Renders the review module user dependent with all workspaces.
  * The module will show all records of one workspace.
  *
  * @return void
  */
 public function indexAction()
 {
     $wsService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
     $this->view->assign('showGrid', !($GLOBALS['BE_USER']->workspace === 0 && !$GLOBALS['BE_USER']->isAdmin()));
     $this->view->assign('showAllWorkspaceTab', $GLOBALS['BE_USER']->isAdmin());
     $this->view->assign('pageUid', t3lib_div::_GP('id'));
     $this->view->assign('showLegend', !($GLOBALS['BE_USER']->workspace === 0 && !$GLOBALS['BE_USER']->isAdmin()));
     $wsList = $wsService->getAvailableWorkspaces();
     $activeWorkspace = $GLOBALS['BE_USER']->workspace;
     $performWorkspaceSwitch = FALSE;
     if (!$GLOBALS['BE_USER']->isAdmin()) {
         $wsCur = array($activeWorkspace => true);
         $wsList = array_intersect_key($wsList, $wsCur);
     } else {
         $wsList = $wsService->getAvailableWorkspaces();
         if (strlen(t3lib_div::_GP('workspace'))) {
             $switchWs = (int) t3lib_div::_GP('workspace');
             if (in_array($switchWs, array_keys($wsList)) && $activeWorkspace != $switchWs) {
                 $activeWorkspace = $switchWs;
                 $GLOBALS['BE_USER']->setWorkspace($activeWorkspace);
                 $performWorkspaceSwitch = TRUE;
                 t3lib_BEfunc::setUpdateSignal('updatePageTree');
             } elseif ($switchWs == tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
                 $this->redirect('fullIndex');
             }
         }
     }
     $this->view->assign('performWorkspaceSwitch', $performWorkspaceSwitch);
     $this->view->assign('workspaceList', $wsList);
     $this->view->assign('activeWorkspaceUid', $activeWorkspace);
     $this->view->assign('activeWorkspaceTitle', tx_Workspaces_Service_Workspaces::getWorkspaceTitle($activeWorkspace));
     $this->view->assign('showPreviewLink', $wsService->canCreatePreviewLink(t3lib_div::_GP('id'), $activeWorkspace));
     $GLOBALS['BE_USER']->setAndSaveSessionData('tx_workspace_activeWorkspace', $activeWorkspace);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:40,代码来源:ReviewController.php

示例2: processDatamap_afterDatabaseOperations

 /**
  * Main function. Hook from t3lib/class.t3lib_tcemain.php
  *
  * @param	string		$status: Status of the current operation, 'new' or 'update
  * @param	string		$table: The table currently processing data for
  * @param	string		$id: The record uid currently processing data for, [integer] or [string] (like 'NEW...')
  * @param	array		$fieldArray: The field array of a record
  * @param	object		$reference: reference to parent object
  * @return	void
  */
 function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, &$reference)
 {
     // Return if not the tx_dam_cat table or if status is not "new" or "update".
     if ($table != 'tx_dam_cat' || !($status == 'new' || $status == 'update')) {
         return;
     }
     // If not returned, update the dam_catedit tree.
     t3lib_BEfunc::setUpdateSignal('updateFolderTree');
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:19,代码来源:class.tx_damcatedit_hooks.php

示例3: main

    /**
     * Generate the main settings formular:
     *
     * @return	void
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TBE_MODULES;
        // file creation / delete
        if ($this->isAdmin) {
            if ($this->installToolFileKeep) {
                $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('enableInstallTool.fileHasKeep'), $LANG->getLL('enableInstallTool.file'), t3lib_FlashMessage::WARNING);
                $this->content .= $flashMessage->render();
            }
            if (t3lib_div::_POST('deleteInstallToolEnableFile')) {
                unlink(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
                $this->setInstallToolFileExists();
                if ($this->getInstallToolFileExists()) {
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('enableInstallTool.fileDelete_failed'), $LANG->getLL('enableInstallTool.file'), t3lib_FlashMessage::ERROR);
                } else {
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('enableInstallTool.fileDelete_ok'), $LANG->getLL('enableInstallTool.file'), t3lib_FlashMessage::OK);
                }
                $this->content .= $flashMessage->render();
            }
            if (t3lib_div::_POST('createInstallToolEnableFile')) {
                touch(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
                t3lib_div::fixPermissions(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
                $this->setInstallToolFileExists();
                if ($this->getInstallToolFileExists()) {
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('enableInstallTool.fileCreate_ok'), $LANG->getLL('enableInstallTool.file'), t3lib_FlashMessage::OK);
                } else {
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('enableInstallTool.fileCreate_failed'), $LANG->getLL('enableInstallTool.file'), t3lib_FlashMessage::ERROR);
                }
                $this->content .= $flashMessage->render();
            }
        }
        if ($this->languageUpdate) {
            $this->doc->JScodeArray['languageUpdate'] .= '
				if (top.refreshMenu) {
					top.refreshMenu();
				} else {
					top.TYPO3ModuleMenu.refreshMenu();
				}
			';
        }
        if ($this->pagetreeNeedsRefresh) {
            t3lib_BEfunc::setUpdateSignal('updatePageTree');
        }
        // Start page:
        $this->doc->loadJavascriptLib('md5.js');
        // use a wrapper div
        $this->content .= '<div id="user-setup-wrapper">';
        // Load available backend modules
        $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
        $this->loadModules->observeWorkspaces = true;
        $this->loadModules->load($TBE_MODULES);
        $this->content .= $this->doc->header($LANG->getLL('UserSettings') . ' - ' . $BE_USER->user['realName'] . ' [' . $BE_USER->user['username'] . ']');
        // show if setup was saved
        if ($this->setupIsUpdated && !$this->tempDataIsCleared && !$this->settingsAreResetToDefault) {
            $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('setupWasUpdated'), $LANG->getLL('UserSettings'));
            $this->content .= $flashMessage->render();
        }
        // Show if temporary data was cleared
        if ($this->tempDataIsCleared) {
            $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('tempDataClearedFlashMessage'), $LANG->getLL('tempDataCleared'));
            $this->content .= $flashMessage->render();
        }
        // Show if temporary data was cleared
        if ($this->settingsAreResetToDefault) {
            $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('settingsAreReset'), $LANG->getLL('resetConfiguration'));
            $this->content .= $flashMessage->render();
        }
        // If password is updated, output whether it failed or was OK.
        if ($this->passwordIsSubmitted) {
            if ($this->passwordIsUpdated) {
                $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('newPassword_ok'), $LANG->getLL('newPassword'));
            } else {
                $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('newPassword_failed'), $LANG->getLL('newPassword'), t3lib_FlashMessage::ERROR);
            }
            $this->content .= $flashMessage->render();
        }
        // render the menu items
        $menuItems = $this->renderUserSetup();
        $this->content .= $this->doc->spacer(20) . $this->doc->getDynTabMenu($menuItems, 'user-setup', FALSE, FALSE, 0, 1, FALSE, 1, $this->dividers2tabs);
        $formToken = $this->formProtection->generateToken('BE user setup', 'edit');
        // Submit and reset buttons
        $this->content .= $this->doc->spacer(20);
        $this->content .= $this->doc->section('', t3lib_BEfunc::cshItem('_MOD_user_setup', 'reset', $BACK_PATH) . '
			<input type="hidden" name="simUser" value="' . $this->simUser . '" />
			<input type="hidden" name="formToken" value="' . $formToken . '" />
			<input type="submit" name="data[save]" value="' . $LANG->getLL('save') . '" />
			<input type="button" value="' . $LANG->getLL('resetConfiguration') . '" onclick="if(confirm(\'' . $LANG->getLL('setToStandardQuestion') . '\')) {document.getElementById(\'setValuesToDefault\').value=1;this.form.submit();}" />
			<input type="button" value="' . $LANG->getLL('clearSessionVars') . '"  onclick="if(confirm(\'' . $LANG->getLL('clearSessionVarsQuestion') . '\')){document.getElementById(\'clearSessionVars\').value=1;this.form.submit();}" />
			<input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />
			<input type="hidden" name="data[clearSessionVars]" value="0" id="clearSessionVars" />');
        // Notice
        $this->content .= $this->doc->spacer(30);
        $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('activateChanges'), '', t3lib_FlashMessage::INFO);
        $this->content .= $flashMessage->render();
        // end of wrapper div
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例4: 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

示例5: importData


//.........这里部分代码省略.........
							' . implode('
							', $row) . '
						</table>
					');
            }
            // Perform import or preview depending:
            $overviewContent = '';
            $extensionInstallationMessage = '';
            $emURL = '';
            $inFile = t3lib_div::getFileAbsFileName($inData['file']);
            if ($inFile && @is_file($inFile)) {
                $trow = array();
                if ($import->loadFile($inFile, 1)) {
                    // Check extension dependencies:
                    $extKeysToInstall = array();
                    if (is_array($import->dat['header']['extensionDependencies'])) {
                        foreach ($import->dat['header']['extensionDependencies'] as $extKey) {
                            if (!t3lib_extMgm::isLoaded($extKey)) {
                                $extKeysToInstall[] = $extKey;
                            }
                        }
                    }
                    if (count($extKeysToInstall)) {
                        $passParams = t3lib_div::_POST('tx_impexp');
                        unset($passParams['import_mode']);
                        unset($passParams['import_file']);
                        $thisScriptUrl = t3lib_div::getIndpEnv('REQUEST_URI') . '?M=xMOD_tximpexp&id=' . $this->id . t3lib_div::implodeArrayForUrl('tx_impexp', $passParams);
                        $emURL = $this->doc->backPath . 'mod/tools/em/index.php?CMD[requestInstallExtensions]=' . implode(',', $extKeysToInstall) . '&returnUrl=' . rawurlencode($thisScriptUrl);
                        $extensionInstallationMessage = 'Before you can install this T3D file you need to install the extensions "' . implode('", "', $extKeysToInstall) . '". Clicking Import will first take you to the Extension Manager so these dependencies can be resolved.';
                    }
                    if ($inData['import_file']) {
                        if (!count($extKeysToInstall)) {
                            $import->importData($this->id);
                            t3lib_BEfunc::setUpdateSignal('updatePageTree');
                        } else {
                            t3lib_utility_Http::redirect($emURL);
                        }
                    }
                    $import->display_import_pid_record = $this->pageinfo;
                    $overviewContent = $import->displayContentOverview();
                }
                // Meta data output:
                $trow[] = '<tr class="bgColor5">
						<td colspan="2"><strong>' . $LANG->getLL('importdata_metaData', 1) . '</strong></td>
					</tr>';
                $opt = array('');
                foreach ($filesInDir as $file) {
                    $opt[$file] = substr($file, strlen(PATH_site));
                }
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_title', 1) . '</strong></td>
					<td width="95%">' . nl2br(htmlspecialchars($import->dat['header']['meta']['title'])) . '</td>
					</tr>';
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_description', 1) . '</strong></td>
					<td width="95%">' . nl2br(htmlspecialchars($import->dat['header']['meta']['description'])) . '</td>
					</tr>';
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_notes', 1) . '</strong></td>
					<td width="95%">' . nl2br(htmlspecialchars($import->dat['header']['meta']['notes'])) . '</td>
					</tr>';
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_packager', 1) . '</strong></td>
					<td width="95%">' . nl2br(htmlspecialchars($import->dat['header']['meta']['packager_name'] . ' (' . $import->dat['header']['meta']['packager_username'] . ')')) . '<br/>
						' . $LANG->getLL('importdata_email', 1) . ' ' . $import->dat['header']['meta']['packager_email'] . '</td>
					</tr>';
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:67,代码来源:index.php

示例6: publishAction

 /**
  * Will publish workspace if buttons are pressed
  *
  * @return	void
  */
 function publishAction()
 {
     // If "Publish" or "Swap" buttons are pressed:
     if (t3lib_div::_POST('_publish') || t3lib_div::_POST('_swap')) {
         if ($this->table === 'pages') {
             // Making sure ->uid is a page ID!
             // Initialize workspace object and request all pending versions:
             $wslibObj = t3lib_div::makeInstance('wslib');
             $cmd = $wslibObj->getCmdArrayForPublishWS($GLOBALS['BE_USER']->workspace, t3lib_div::_POST('_swap'), $this->uid);
             // Execute the commands:
             $tce = t3lib_div::makeInstance('t3lib_TCEmain');
             $tce->stripslashes_values = 0;
             $tce->start(array(), $cmd);
             $tce->process_cmdmap();
             t3lib_BEfunc::setUpdateSignal('updatePageTree');
             return $tce->errorLog;
         }
     }
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:24,代码来源:index.php

示例7: main

    /**
     * Main function of the module.
     *
     * @return	void
     * @access public
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH;
        $this->content = '';
        // Access check! The page will show only if there is a valid page and if this page may be viewed by the user
        if (is_array($this->altRoot)) {
            $access = true;
            // get PID of altRoot Element to get pageInfoArr
            $altRootRecord = t3lib_BEfunc::getRecordWSOL($this->altRoot['table'], $this->altRoot['uid'], 'pid');
            $pageInfoArr = t3lib_BEfunc::readPageAccess($altRootRecord['pid'], $this->perms_clause);
        } else {
            $pageInfoArr = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
            $access = intval($pageInfoArr['uid'] > 0);
        }
        if ($access) {
            if (t3lib_div::_GP('ajaxUnlinkRecord')) {
                $unlinkDestinationPointer = $this->apiObj->flexform_getPointerFromString(t3lib_div::_GP('ajaxUnlinkRecord'));
                $this->apiObj->unlinkElement($unlinkDestinationPointer);
            }
            $this->calcPerms = $this->getCalcPerms($pageInfoArr['uid']);
            // Define the root element record:
            $this->rootElementTable = is_array($this->altRoot) ? $this->altRoot['table'] : 'pages';
            $this->rootElementUid = is_array($this->altRoot) ? $this->altRoot['uid'] : $this->id;
            $this->rootElementRecord = t3lib_BEfunc::getRecordWSOL($this->rootElementTable, $this->rootElementUid, '*');
            if ($this->rootElementRecord['t3ver_swapmode'] == 0 && $this->rootElementRecord['_ORIG_uid']) {
                $this->rootElementUid_pidForContent = $this->rootElementRecord['_ORIG_uid'];
            } else {
                if ($this->rootElementRecord['t3ver_swapmode'] == -1 && $this->rootElementRecord['t3ver_oid'] && $this->rootElementRecord['pid'] < 0) {
                    // typo3 lacks a proper API to properly detect Offline versions and extract Live Versions therefore this is done by hand
                    if ($this->rootElementTable == 'pages') {
                        $this->rootElementUid_pidForContent = $this->rootElementRecord['t3ver_oid'];
                    } else {
                        $liveRec = t3lib_beFunc::getLiveRecord($this->rootElementTable, $this->rootElementUid);
                        $this->rootElementUid_pidForContent = $liveRec['pid'];
                    }
                } else {
                    // If pages use current UID, otherwhise you must use the PID to define the Page ID
                    if ($this->rootElementTable == 'pages') {
                        $this->rootElementUid_pidForContent = $this->rootElementRecord['uid'];
                    } else {
                        $this->rootElementUid_pidForContent = $this->rootElementRecord['pid'];
                    }
                }
            }
            // Check if we have to update the pagetree:
            if (t3lib_div::_GP('updatePageTree')) {
                t3lib_BEfunc::setUpdateSignal('updatePageTree');
            }
            // Draw the header.
            $this->doc = t3lib_div::makeInstance('template');
            $this->doc->backPath = $BACK_PATH;
            $this->doc->setModuleTemplate('EXT:templavoila/resources/templates/mod1_default.html');
            $this->doc->docType = 'xhtml_trans';
            $this->doc->bodyTagId = 'typo3-mod-php';
            $this->doc->divClass = '';
            $this->doc->form = '<form action="' . htmlspecialchars('index.php?' . $this->link_getParameters()) . '" method="post">';
            // Add custom styles
            $styleSheetFile = t3lib_extMgm::extPath($this->extKey) . 'mod1/pagemodule_' . substr(TYPO3_version, 0, 3) . '.css';
            if (file_exists($styleSheetFile)) {
                $styleSheetFile = t3lib_extMgm::extRelPath($this->extKey) . 'mod1/pagemodule_' . substr(TYPO3_version, 0, 3) . '.css';
            } else {
                $styleSheetFile = t3lib_extMgm::extRelPath($this->extKey) . 'mod1/pagemodule.css';
            }
            if (isset($this->modTSconfig['properties']['stylesheet'])) {
                $styleSheetFile = $this->modTSconfig['properties']['stylesheet'];
            }
            $this->doc->getPageRenderer()->addCssFile($GLOBALS['BACK_PATH'] . $styleSheetFile);
            if (isset($this->modTSconfig['properties']['stylesheet.'])) {
                foreach ($this->modTSconfig['properties']['stylesheet.'] as $file) {
                    if (substr($file, 0, 4) == 'EXT:') {
                        list($extKey, $local) = explode('/', substr($file, 4), 2);
                        $filename = '';
                        if (strcmp($extKey, '') && t3lib_extMgm::isLoaded($extKey) && strcmp($local, '')) {
                            $file = t3lib_extMgm::extRelPath($extKey) . $local;
                        }
                    }
                    $this->doc->getPageRenderer()->addCssFile($GLOBALS['BACK_PATH'] . $file);
                }
            }
            // Adding classic jumpToUrl function, needed for the function menu. Also, the id in the parent frameset is configured.
            $this->doc->JScode = $this->doc->wrapScriptTags('
				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
				' . $this->doc->redirectUrls() . '
				var T3_TV_MOD1_BACKPATH = "' . $BACK_PATH . '";
				var T3_TV_MOD1_RETURNURL = "' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '";
			');
            $this->doc->getPageRenderer()->loadExtJs();
            $this->doc->JScode .= $this->doc->wrapScriptTags('
				var typo3pageModule = {
					/**
					 * Initialization
					 */
					init: function() {
						typo3pageModule.enableHighlighting();
//.........这里部分代码省略.........
开发者ID:rod86,项目名称:t3sandbox,代码行数:101,代码来源:index.php

示例8: moduleContent

    /**
     * [Describe function...]
     *
     * @param   [type]    $table: ...
     * @param   [type]    $uid: ...
     * @return  [type]    ...
     */
    function moduleContent($table, $uid)
    {
        if ($GLOBALS['TCA'][$table]) {
            $this->l10nMgrTools = GeneralUtility::makeInstance(\Localizationteam\L10nmgr\Model\Tools\Tools::class);
            $this->l10nMgrTools->verbose = false;
            // Otherwise it will show records which has fields but none editable.
            $output = '';
            if (GeneralUtility::_POST('_updateIndex')) {
                $output .= $this->l10nMgrTools->updateIndexForRecord($table, $uid);
                t3lib_BEfunc::setUpdateSignal('updatePageTree');
            }
            $inputRecord = t3lib_BEfunc::getRecord($table, $uid, 'pid');
            $pathShown = t3lib_BEfunc::getRecordPath($table == 'pages' ? $uid : $inputRecord['pid'], '', 20);
            $this->sysLanguages = $this->l10nMgrTools->t8Tools->getSystemLanguages($table == 'pages' ? $uid : $inputRecord['pid']);
            $languageListArray = explode(',', $GLOBALS['BE_USER']->groupData['allowed_languages'] ? $GLOBALS['BE_USER']->groupData['allowed_languages'] : implode(',', array_keys($this->sysLanguages)));
            $limitLanguageList = trim(GeneralUtility::_GP('languageList'));
            foreach ($languageListArray as $kkk => $val) {
                if ($limitLanguageList && !GeneralUtility::inList($limitLanguageList, $val)) {
                    unset($languageListArray[$kkk]);
                }
            }
            if (!count($languageListArray)) {
                $languageListArray[] = 0;
            }
            $languageList = implode(',', $languageListArray);
            // Fetch translation index records:
            if ($table != 'pages') {
                $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_l10nmgr_index', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'tx_l10nmgr_index') . ' AND recuid=' . (int) $uid . ' AND translation_lang IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($languageList) . ')' . ' AND workspace=' . (int) $GLOBALS['BE_USER']->workspace . ' AND (flag_new>0 OR flag_update>0 OR flag_noChange>0 OR flag_unknown>0)', '', 'translation_lang, tablename, recuid');
            } else {
                $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_l10nmgr_index', 'recpid=' . (int) $uid . ' AND translation_lang IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($languageList) . ')' . ' AND workspace=' . (int) $GLOBALS['BE_USER']->workspace . ' AND (flag_new>0 OR flag_update>0 OR flag_noChange>0 OR flag_unknown>0)', '', 'translation_lang, tablename, recuid');
            }
            #	\TYPO3\CMS\Core\Utility\GeneralUtility::debugRows($records,'Index entries for '.$table.':'.$uid);
            $tRows = array();
            $tRows[] = '<tr class="bgColor2 tableheader">
				<td colspan="2">Base element:</td>
				<td colspan="2">Translation:</td>
				<td>Action:</td>
				<td><img src="../flags_new.png" width="10" height="16" alt="New" title="New" /></td>
				<td><img src="../flags_unknown.png" width="10" height="16" alt="Unknown" title="Unknown" /></td>
				<td><img src="../flags_update.png" width="10" height="16" alt="Update" title="Update" /></td>
				<td><img src="../flags_ok.png" width="10" height="16" alt="OK" title="OK" /></td>
				<td>Diff:</td>
			</tr>';
            //\TYPO3\CMS\Core\Utility\GeneralUtility::debugRows($records);
            foreach ($records as $rec) {
                if ($rec['tablename'] == 'pages') {
                    $tRows[] = $this->makeTableRow($rec);
                }
            }
            if (count($tRows) > 1) {
                $tRows[] = '<tr><td colspan="8">&nbsp;</td></tr>';
            }
            foreach ($records as $rec) {
                if ($rec['tablename'] != 'pages') {
                    $tRows[] = $this->makeTableRow($rec);
                }
            }
            $output .= 'Path: <i>' . $pathShown . '</i><br><table border="0" cellpadding="1" cellspacing="1">' . implode('', $tRows) . '</table>';
            // Updating index
            if ($GLOBALS['BE_USER']->isAdmin()) {
                $output .= '<br><br>Functions for "' . $table . ':' . $uid . '":<br/>
					<input type="submit" name="_updateIndex" value="Update Index" /><br>
					<input type="submit" name="_" value="Flush Translations" onclick="' . htmlspecialchars('document.location="../cm3/index.php?table=' . htmlspecialchars($table) . '&id=' . (int) $uid . '&cmd=flushTranslations";return false;') . '"/><br>
					<input type="submit" name="_" value="Create priority" onclick="' . htmlspecialchars('document.location="' . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode('db_list.php?id=0&table=tx_l10nmgr_priorities') . '&edit[tx_l10nmgr_priorities][0]=new&defVals[tx_l10nmgr_priorities][element]=' . rawurlencode($table . '_' . $uid) . '";return false;') . '"/><br>
					';
            }
            return $output;
        }
    }
开发者ID:danilovq,项目名称:l10nmgr,代码行数:76,代码来源:index.php

示例9: main

    /**
     * Main function creating the content for the module.
     *
     * @return	string		HTML content for the module, actually a "section" made through the parent object in $this->pObj
     */
    function main()
    {
        global $SOBE, $LANG;
        $theCode = '';
        $m_perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(8);
        // create new pages here?
        $pRec = t3lib_BEfunc::getRecord('pages', $this->pObj->id, 'uid', ' AND ' . $m_perms_clause);
        $sys_pages = t3lib_div::makeInstance('t3lib_pageSelect');
        $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', 0);
        if (is_array($pRec)) {
            $data = t3lib_div::_GP('data');
            if (is_array($data['pages'])) {
                if (t3lib_div::_GP('createInListEnd')) {
                    $endI = end($menuItems);
                    $thePid = -intval($endI['uid']);
                    if (!$thePid) {
                        $thePid = $this->pObj->id;
                    }
                } else {
                    $thePid = $this->pObj->id;
                }
                $firstRecord = true;
                foreach ($data['pages'] as $identifier => $dat) {
                    if (!trim($dat['title'])) {
                        unset($data['pages'][$identifier]);
                    } else {
                        $data['pages'][$identifier]['hidden'] = t3lib_div::_GP('hidePages') ? 1 : 0;
                        if ($firstRecord) {
                            $firstRecord = false;
                            $data['pages'][$identifier]['pid'] = $thePid;
                        } else {
                            $data['pages'][$identifier]['pid'] = '-' . $previousIdentifier;
                        }
                        $previousIdentifier = $identifier;
                    }
                }
                if (count($data['pages'])) {
                    reset($data);
                    $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                    $tce->stripslashes_values = 0;
                    // set default TCA values specific for the user
                    $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
                    if (is_array($TCAdefaultOverride)) {
                        $tce->setDefaultsFromUserTS($TCAdefaultOverride);
                    }
                    $tce->start($data, array());
                    $tce->process_datamap();
                    t3lib_BEfunc::setUpdateSignal('updatePageTree');
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', '', $GLOBALS['LANG']->getLL('wiz_newPages_create'));
                } else {
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', '', $GLOBALS['LANG']->getLL('wiz_newPages_noCreate'), t3lib_FlashMessage::ERROR);
                }
                $theCode .= $flashMessage->render();
                // Display result:
                $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', 0);
                $lines = array();
                foreach ($menuItems as $rec) {
                    t3lib_BEfunc::workspaceOL('pages', $rec);
                    if (is_array($rec)) {
                        $lines[] = '<nobr>' . t3lib_iconWorks::getSpriteIconForRecord('pages', $rec, array('title' => t3lib_BEfunc::titleAttribForPages($rec, '', FALSE))) . htmlspecialchars(t3lib_div::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</nobr>';
                    }
                }
                $theCode .= '<h4>' . $LANG->getLL('wiz_newPages_currentMenu') . '</h4>' . implode('<br />', $lines);
            } else {
                // Create loremIpsum code:
                if (t3lib_extMgm::isLoaded('lorem_ipsum')) {
                    $loremIpsumObj = t3lib_div::getUserObj('EXT:lorem_ipsum/class.tx_loremipsum_wiz.php:tx_loremipsum_wiz');
                }
                // Display create form
                $lines = array();
                for ($a = 0; $a < 9; $a++) {
                    $lines[] = '<label for="page_new_' . $a . '"> ' . $LANG->getLL('wiz_newPages_page') . ' ' . ($a + 1) . ':&nbsp;</label><input type="text" id="page_new_' . $a . '" name="data[pages][NEW' . $a . '][title]"' . $this->pObj->doc->formWidth(35) . ' />' . (is_object($loremIpsumObj) ? '<a href="#" onclick="' . htmlspecialchars($loremIpsumObj->getHeaderTitleJS('document.forms[0][\'data[pages][NEW' . $a . '][title]\'].value', 'title')) . '">' . $loremIpsumObj->getIcon('', $this->pObj->doc->backPath) . '</a>' : '');
                }
                $theCode .= '<h4>' . $LANG->getLL('wiz_newPages') . ':</h4>' . implode('<br />', $lines) . '<br /><br />
				<input type="checkbox" name="createInListEnd" id="createInListEnd" value="1" /> <label for="createInListEnd">' . $LANG->getLL('wiz_newPages_listEnd') . '</label><br />
				<input type="checkbox" name="hidePages" id="hidePages" value="1" /> <label for="hidePages">' . $LANG->getLL('wiz_newPages_hidePages') . '</label><br /><br />
				<input type="submit" name="create" value="' . $LANG->getLL('wiz_newPages_lCreate') . '" onclick="return confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('wiz_newPages_lCreate_msg1')) . ')" />&nbsp;<input type="reset" value="' . $LANG->getLL('wiz_newPages_lReset') . '" /><br />';
            }
        } else {
            $theCode .= $GLOBALS['TBE_TEMPLATE']->rfw($LANG->getLL('wiz_newPages_errorMsg1'));
        }
        // CSH
        $theCode .= t3lib_BEfunc::cshItem('_MOD_web_func', 'tx_wizardcrpages', $GLOBALS['BACK_PATH'], '<br />|');
        $out = $this->pObj->doc->section($LANG->getLL('wiz_crMany'), $theCode, 0, 1);
        return $out;
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:91,代码来源:class.tx_wizardcrpages_webfunc_2.php

示例10: closeDocument

 /**
  * Handling the closing of a document
  *
  * @param	integer		Close code: 0/1 will redirect to $this->retUrl, 3 will clear the docHandler (thus closing all documents) and otehr values will call setDocument with ->retUrl
  * @return	void
  */
 function closeDocument($code = 0)
 {
     global $BE_USER;
     // If current document is found in docHandler,
     // then unset it, possibly unset it ALL and finally, write it to the session data
     if (isset($this->docHandler[$this->storeUrlMd5])) {
         // add the closing document to the recent documents
         $recentDocs = $BE_USER->getModuleData('opendocs::recent');
         if (!is_array($recentDocs)) {
             $recentDocs = array();
         }
         $closedDoc = $this->docHandler[$this->storeUrlMd5];
         $recentDocs = array_merge(array($this->storeUrlMd5 => $closedDoc), $recentDocs);
         if (count($recentDocs) > 8) {
             $recentDocs = array_slice($recentDocs, 0, 8);
         }
         // remove it from the list of the open documents
         unset($this->docHandler[$this->storeUrlMd5]);
         if ($code == '3') {
             $recentDocs = array_merge($this->docHandler, $recentDocs);
             $this->docHandler = array();
         }
         $BE_USER->pushModuleData('opendocs::recent', $recentDocs);
         $BE_USER->pushModuleData('alt_doc.php', array($this->docHandler, $this->docDat[1]));
         t3lib_BEfunc::setUpdateSignal('tx_opendocs::updateNumber', count($this->docHandler));
     }
     // If ->returnEditConf is set, then add the current content of editconf to the ->retUrl variable: (used by other scripts, like wizard_add, to know which records was created or so...)
     if ($this->returnEditConf && $this->retUrl != 'dummy.php') {
         $this->retUrl .= '&returnEditConf=' . rawurlencode(serialize($this->editconf));
     }
     // If code is NOT set OR set to 1, then make a header location redirect to $this->retUrl
     if (!$code || $code == 1) {
         t3lib_utility_Http::redirect($this->retUrl);
     } else {
         $this->setDocument('', $this->retUrl);
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:43,代码来源:alt_doc.php

示例11: wizard_step3

	/**
	 * Step 3: Begin template mapping
	 *
	 * @return	void
	 */
	function wizard_step3()	{

			// Save session data with filename:
		$cfg = t3lib_div::_POST('CFG');
		if (isset($cfg['sitetitle']))	{
			$this->wizardData['sitetitle'] = trim($cfg['sitetitle']);
		}
		if (isset($cfg['siteurl']))	{
			$this->wizardData['siteurl'] = trim($cfg['siteurl']);
		}
		if (isset($cfg['username']))	{
			$this->wizardData['username'] = trim($cfg['username']);
		}

			// If the create-site button WAS clicked:
		if (t3lib_div::_POST('_create_site'))	{

				// Show selected template file:
			if ($this->wizardData['file'] && $this->wizardData['sitetitle'] && $this->wizardData['username'])	{

					// DO import:
				$import = $this->getImportObj();
				if (isset($this->modTSconfig['properties']['newTvSiteFile'])) {
					$inFile = t3lib_div::getFileAbsFileName($this->modTSconfig['properties']['newTVsiteTemplate']);
				} else {
					$inFile = t3lib_extMgm::extPath('templavoila') . 'mod2/new_tv_site.xml';
				}
				if (@is_file($inFile) && $import->loadFile($inFile,1))	{

					$import->importData($this->importPageUid);

						// Update various fields (the index values, eg. the "1" in "$import->import_mapId['pages'][1]]..." are the UIDs of the original records from the import file!)
					$data = array();
					$data['pages'][t3lib_BEfunc::wsMapId('pages',$import->import_mapId['pages'][1])]['title'] = $this->wizardData['sitetitle'];
					$data['sys_template'][t3lib_BEfunc::wsMapId('sys_template',$import->import_mapId['sys_template'][1])]['title'] = $GLOBALS['LANG']->getLL('newsitewizard_maintemplate', 1) . ' ' . $this->wizardData['sitetitle'];
					$data['sys_template'][t3lib_BEfunc::wsMapId('sys_template',$import->import_mapId['sys_template'][1])]['sitetitle'] = $this->wizardData['sitetitle'];
					$data['tx_templavoila_tmplobj'][t3lib_BEfunc::wsMapId('tx_templavoila_tmplobj',$import->import_mapId['tx_templavoila_tmplobj'][1])]['fileref'] = $this->wizardData['file'];
					$data['tx_templavoila_tmplobj'][t3lib_BEfunc::wsMapId('tx_templavoila_tmplobj',$import->import_mapId['tx_templavoila_tmplobj'][1])]['templatemapping'] = serialize(
						array(
							'MappingInfo' => array(
								'ROOT' => array(
									'MAP_EL' => 'body[1]/INNER'
								)
							),
							'MappingInfo_head' => array(
								'headElementPaths' => array('link[1]','link[2]','link[3]','style[1]','style[2]','style[3]'),
								'addBodyTag' => 1
							)
						)
					);

						// Update user settings
					$newUserID = t3lib_BEfunc::wsMapId('be_users',$import->import_mapId['be_users'][2]);
					$newGroupID = t3lib_BEfunc::wsMapId('be_groups',$import->import_mapId['be_groups'][1]);

					$data['be_users'][$newUserID]['username'] = $this->wizardData['username'];
					$data['be_groups'][$newGroupID]['title'] = $this->wizardData['username'];

					foreach($import->import_mapId['pages'] as $newID)	{
						$data['pages'][$newID]['perms_userid'] = $newUserID;
						$data['pages'][$newID]['perms_groupid'] = $newGroupID;
					}

						// Set URL if applicable:
					if (strlen($this->wizardData['siteurl']))	{
						$data['sys_domain']['NEW']['pid'] = t3lib_BEfunc::wsMapId('pages',$import->import_mapId['pages'][1]);
						$data['sys_domain']['NEW']['domainName'] = $this->wizardData['siteurl'];
					}

						// Execute changes:
					$tce = t3lib_div::makeInstance('t3lib_TCEmain');
					$tce->stripslashes_values = 0;
					$tce->dontProcessTransformations = 1;
					$tce->start($data,Array());
					$tce->process_datamap();

						// Setting environment:
					$this->wizardData['rootPageId'] = $import->import_mapId['pages'][1];
					$this->wizardData['templateObjectId'] = t3lib_BEfunc::wsMapId('tx_templavoila_tmplobj',$import->import_mapId['tx_templavoila_tmplobj'][1]);
					$this->wizardData['typoScriptTemplateID'] = t3lib_BEfunc::wsMapId('sys_template',$import->import_mapId['sys_template'][1]);

					t3lib_BEfunc::setUpdateSignal('updatePageTree');

					$outputString .= $GLOBALS['LANG']->getLL('newsitewizard_maintemplate', 1) . '<hr/>';
				}
			} else {
				$outputString .= $GLOBALS['LANG']->getLL('newsitewizard_maintemplate', 1);
			}
		}

			// If a template Object id was found, continue with mapping:
		if ($this->wizardData['templateObjectId'])	{
			$url = '../cm1/index.php?table=tx_templavoila_tmplobj&uid='.$this->wizardData['templateObjectId'].'&SET[selectHeaderContent]=0&_reload_from=1&id=' . $this->id . '&returnUrl='.rawurlencode('../mod2/index.php?SET[wiz_step]=4');

			$outputString.= $GLOBALS['LANG']->getLL('newsitewizard_step3ready') . '
//.........这里部分代码省略.........
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:101,代码来源:index.php

示例12: finish

 /**
  * Redirecting the user after the processing has been done.
  * Might also display error messages directly, if any.
  *
  * @return	void
  */
 public function finish()
 {
     // Prints errors, if there are any
     $this->fileProcessor->printLogErrorMessages($this->redirect);
     t3lib_BEfunc::setUpdateSignal('updateFolderTree');
     if ($this->redirect) {
         t3lib_utility_Http::redirect($this->redirect);
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:15,代码来源:class.typo3_tcefile.php

示例13: main

 /**
  * Executing the posted actions ...
  *
  * @return	void
  */
 function main()
 {
     global $BE_USER, $TYPO3_CONF_VARS;
     // LOAD TCEmain with data and cmd arrays:
     $this->tce->start($this->data, $this->cmd);
     if (is_array($this->mirror)) {
         $this->tce->setMirror($this->mirror);
     }
     // Checking referer / executing
     $refInfo = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
     $httpHost = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
     if ($httpHost != $refInfo['host'] && $this->vC != $BE_USER->veriCode() && !$TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) {
         $this->tce->log('', 0, 0, 0, 1, 'Referer host "%s" and server host "%s" did not match and veriCode was not valid either!', 1, array($refInfo['host'], $httpHost));
     } else {
         // Register uploaded files
         $this->tce->process_uploads($_FILES);
         // Execute actions:
         $this->tce->process_datamap();
         $this->tce->process_cmdmap();
         // Clearing cache:
         $this->tce->clear_cacheCmd($this->cacheCmd);
         // Update page tree?
         if ($this->uPT && (isset($this->data['pages']) || isset($this->cmd['pages']))) {
             t3lib_BEfunc::setUpdateSignal('updatePageTree');
         }
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:32,代码来源:tce_db.php

示例14: main

    /**
     * Main function creating the content for the module.
     *
     * @return	string		HTML content for the module, actually a "section" made through the parent object in $this->pObj
     */
    function main()
    {
        global $SOBE, $LANG;
        if ($GLOBALS['BE_USER']->workspace === 0) {
            $theCode = '';
            // check if user has modify permissions to
            $sys_pages = t3lib_div::makeInstance('t3lib_pageSelect');
            $sortByField = t3lib_div::_GP('sortByField');
            if ($sortByField) {
                $menuItems = array();
                if (t3lib_div::inList('title,subtitle,crdate,tstamp', $sortByField)) {
                    $menuItems = $sys_pages->getMenu($this->pObj->id, 'uid,pid,title', $sortByField, '', 0);
                } elseif ($sortByField == 'REV') {
                    $menuItems = $sys_pages->getMenu($this->pObj->id, 'uid,pid,title', 'sorting', '', 0);
                    $menuItems = array_reverse($menuItems);
                }
                if (count($menuItems)) {
                    $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                    $tce->stripslashes_values = 0;
                    $menuItems = array_reverse($menuItems);
                    $cmd = array();
                    foreach ($menuItems as $r) {
                        $cmd['pages'][$r['uid']]['move'] = $this->pObj->id;
                    }
                    $tce->start(array(), $cmd);
                    $tce->process_cmdmap();
                    t3lib_BEfunc::setUpdateSignal('updatePageTree');
                }
            }
            //
            $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', 0);
            $lines = array();
            $lines[] = '<tr class="t3-row-header">
					<td>' . $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_title'), 'title') . '</td>
					' . (t3lib_extMgm::isLoaded('cms') ? '<td> ' . $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_subtitle'), 'subtitle') . '</td>' : '') . '
					<td>' . $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_tChange'), 'tstamp') . '</td>
					<td>' . $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_tCreate'), 'crdate') . '</td>
					</tr>';
            foreach ($menuItems as $rec) {
                $m_perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(2);
                // edit permissions for that page!
                $pRec = t3lib_BEfunc::getRecord('pages', $rec['uid'], 'uid', ' AND ' . $m_perms_clause);
                $lines[] = '<tr><td nowrap="nowrap">' . t3lib_iconWorks::getSpriteIconForRecord('pages', $rec) . (!is_array($pRec) ? $GLOBALS['TBE_TEMPLATE']->rfw('<strong>' . $LANG->getLL('wiz_W', 1) . '</strong> ') : '') . htmlspecialchars(t3lib_div::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '&nbsp;</td>
					' . (t3lib_extMgm::isLoaded('cms') ? '<td nowrap="nowrap">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($rec['subtitle'], $GLOBALS['BE_USER']->uc['titleLen'])) . '&nbsp;</td>' : '') . '
					<td nowrap="nowrap">' . t3lib_Befunc::datetime($rec['tstamp']) . '&nbsp;&nbsp;</td>
					<td nowrap="nowrap">' . t3lib_Befunc::datetime($rec['crdate']) . '&nbsp;&nbsp;</td>
					</tr>';
            }
            $theCode .= '<h4>' . $LANG->getLL('wiz_currentPageOrder', TRUE) . '</h4>
			<table border="0" cellpadding="0" cellspacing="0" class="typo3-dblist">' . implode('', $lines) . '</table><br />';
            if (count($menuItems)) {
                // Menu:
                $lines = array();
                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_title'), 'title');
                if (t3lib_extMgm::isLoaded('cms')) {
                    $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_subtitle'), 'subtitle');
                }
                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_tChange'), 'tstamp');
                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_tCreate'), 'crdate');
                $lines[] = '';
                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_REVERSE'), 'REV');
                $theCode .= '<h4>' . $LANG->getLL('wiz_changeOrder') . '</h4>' . implode('<br />', $lines);
            }
            // CSH:
            $theCode .= t3lib_BEfunc::cshItem('_MOD_web_func', 'tx_wizardsortpages', $GLOBALS['BACK_PATH'], '<br />|');
            $out = $this->pObj->doc->section($LANG->getLL('wiz_sort'), $theCode, 0, 1);
        } else {
            $out = $this->pObj->doc->section($LANG->getLL('wiz_sort'), 'Sorry, this function is not available in the current draft workspace!', 0, 1, 1);
        }
        return $out;
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:76,代码来源:class.tx_wizardsortpages_webfunc_2.php

示例15: moduleContent

 /**
  * [Describe function...]
  *
  * @param	[type]		$table: ...
  * @param	[type]		$uid: ...
  * @return	[type]		...
  */
 function moduleContent($table, $uid, $cmd)
 {
     if ($GLOBALS['TCA'][$table]) {
         $output = '';
         $this->l10nMgrTools = t3lib_div::makeInstance('tx_l10nmgr_tools');
         $this->l10nMgrTools->verbose = FALSE;
         // Otherwise it will show records which has fields but none editable.
         switch ((string) $cmd) {
             case 'updateIndex':
                 $output = $this->l10nMgrTools->updateIndexForRecord($table, $uid);
                 t3lib_BEfunc::setUpdateSignal('updatePageTree');
                 break;
             case 'flushTranslations':
                 if ($GLOBALS['BE_USER']->isAdmin()) {
                     $res = $this->l10nMgrTools->flushTranslations($table, $uid, t3lib_div::_POST('_flush') ? TRUE : FALSE);
                     if (!t3lib_div::_POST('_flush')) {
                         $output .= 'To flush the translations shown below, press the "Flush" button below:<br/><input type="submit" name="_flush" value="FLUSH" /><br/><br/>';
                     } else {
                         $output .= 'Translations below were flushed!';
                     }
                     $output .= t3lib_utility_Debug::viewArray($res[0]);
                     if (t3lib_div::_POST('_flush')) {
                         $output .= $this->l10nMgrTools->updateIndexForRecord($table, $uid);
                         t3lib_BEfunc::setUpdateSignal('updatePageTree');
                     }
                 }
                 break;
             case 'createPriority':
                 header('Location: ' . t3lib_div::locationHeaderUrl($GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode('db_list.php?id=0&table=tx_l10nmgr_priorities') . '&edit[tx_l10nmgr_priorities][0]=new&defVals[tx_l10nmgr_priorities][element]=' . rawurlencode($table . '_' . $uid)));
                 break;
             case 'managePriorities':
                 header('Location: ' . t3lib_div::locationHeaderUrl($GLOBALS['BACK_PATH'] . 'db_list.php?id=0&table=tx_l10nmgr_priorities'));
                 break;
         }
         return $output;
     }
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:44,代码来源:index.php


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