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


PHP t3lib_BEfunc::getUrlToken方法代码示例

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


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

示例1: __construct

 /**
  * constructor
  *
  * @param	TYPO3backend	TYPO3 backend object reference
  */
 public function __construct(TYPO3backend &$backendReference = null)
 {
     $this->backendReference = $backendReference;
     $this->cacheActions = array();
     $this->optionValues = array('all', 'pages');
     // Clear cache for ALL tables!
     if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.all')) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_all', true);
         $this->cacheActions[] = array('id' => 'all', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=all&ajaxCall=1' . t3lib_BEfunc::getUrlToken('tceAction'), 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-high'));
     }
     // Clear cache for either ALL pages
     if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.pages')) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_pages', true);
         $this->cacheActions[] = array('id' => 'pages', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=pages&ajaxCall=1' . t3lib_BEfunc::getUrlToken('tceAction'), 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-medium'));
     }
     // Clearing of cache-files in typo3conf/ + menu
     if ($GLOBALS['BE_USER']->isAdmin() && $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_allTypo3Conf', true);
         $this->cacheActions[] = array('id' => 'temp_CACHED', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=temp_CACHED&ajaxCall=1' . t3lib_BEfunc::getUrlToken('tceAction'), 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-low'));
     }
     // hook for manipulate cacheActions
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'] as $cacheAction) {
             $hookObject = t3lib_div::getUserObj($cacheAction);
             if (!$hookObject instanceof backend_cacheActionsHook) {
                 throw new UnexpectedValueException('$hookObject must implement interface backend_cacheActionsHook', 1228262000);
             }
             $hookObject->manipulateCacheActions($this->cacheActions, $this->optionValues);
         }
     }
     t3lib_formprotection_Factory::get()->persistTokens();
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:37,代码来源:class.clearcachemenu.php

示例2: resultRowDisplay

    /**
     * [Describe function...]
     *
     * @param	[type]		$row: ...
     * @param	[type]		$conf: ...
     * @param	[type]		$table: ...
     * @return	[type]		...
     */
    function resultRowDisplay($row, $conf, $table)
    {
        static $even = FALSE;
        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
        $SET = $GLOBALS['SOBE']->MOD_SETTINGS;
        $out = '<tr class="bgColor' . ($even ? '6' : '4') . '">';
        $even = !$even;
        foreach ($row as $fN => $fV) {
            if (t3lib_div::inList($SET['queryFields'], $fN) || !$SET['queryFields'] && $fN != 'pid' && $fN != 'deleted') {
                if ($SET['search_result_labels']) {
                    $fVnew = $this->getProcessedValueExtra($table, $fN, $fV, $conf, '<br />');
                } else {
                    $fVnew = htmlspecialchars($fV);
                }
                $out .= '<td>' . $fVnew . '</td>';
            }
        }
        $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
        $out .= '<td nowrap>';
        if (!$row['deleted']) {
            $out .= '<a href="#" onClick="top.launchView(\'' . $table . '\',' . $row['uid'] . ',\'' . $GLOBALS['BACK_PATH'] . '\');return false;">' . t3lib_iconWorks::getSpriteIcon('status-dialog-information') . '</a>';
            $out .= '<a href="#" onClick="' . t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], t3lib_div::getIndpEnv('REQUEST_URI') . t3lib_div::implodeArrayForUrl('SET', (array) t3lib_div::_POST('SET'))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
        } else {
            $out .= '<a href="' . t3lib_div::linkThisUrl($GLOBALS['BACK_PATH'] . 'tce_db.php', array('cmd[' . $table . '][' . $row['uid'] . '][undelete]' => '1', 'redirect' => t3lib_div::linkThisScript(array()))) . t3lib_BEfunc::getUrlToken('tceAction') . '">';
            $out .= t3lib_iconWorks::getSpriteIcon('actions-edit-restore', array('title' => 'undelete only')) . '</a>';
            $out .= '<a href="' . t3lib_div::linkThisUrl($GLOBALS['BACK_PATH'] . 'tce_db.php', array('cmd[' . $table . '][' . $row['uid'] . '][undelete]' => '1', 'redirect' => t3lib_div::linkThisUrl('alt_doc.php', array('edit[' . $table . '][' . $row['uid'] . ']' => 'edit', 'returnUrl' => t3lib_div::linkThisScript(array()))))) . t3lib_BEfunc::getUrlToken('tceAction') . '">';
            $out .= t3lib_iconWorks::getSpriteIcon('actions-edit-restore-edit', array('title' => 'undelete and edit')) . '</a>';
        }
        $_params = array($table => $row);
        if (is_array($this->hookArray['additionalButtons'])) {
            foreach ($this->hookArray['additionalButtons'] as $_funcRef) {
                $out .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
            }
        }
        $out .= '</td>
		</tr>
		';
        return $out;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:47,代码来源:class.t3lib_fullsearch.php

示例3: getDocHeaderButtons

 /**
  * Create the panel of buttons for submitting the form or otherwise perform operations.
  *
  * @param	string	Identifier for function of module
  * @return	array	all available buttons as an assoc. array
  */
 protected function getDocHeaderButtons()
 {
     global $TCA, $LANG, $BACK_PATH, $BE_USER;
     $buttons = array('csh' => '', 'view' => '', 'history_page' => '', 'move_page' => '', 'move_record' => '', 'new_page' => '', 'edit_page' => '', 'record_list' => '', 'shortcut' => '', 'cache' => '');
     // View page
     $viewAddGetVars = $this->currentLanguageUid ? '&L=' . $this->currentLanguageUid : '';
     $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->id), '', '', $viewAddGetVars)) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-view', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1))) . '</a>';
     // Shortcut
     if ($BE_USER->mayMakeShortcut()) {
         $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
     }
     // If access to Web>List for user, then link to that module.
     if ($BE_USER->check('modules', 'web_list')) {
         if (tx_templavoila_div::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
             $href = $GLOBALS['BACK_PATH'] . 'db_list.php?id=' . $this->id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
         } else {
             $href = t3lib_BEfunc::getModuleUrl('web_list', array('id' => $this->id, 'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI')));
         }
         $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' . t3lib_iconWorks::getSpriteIcon('actions-system-list-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1))) . '</a>';
     }
     if (!$this->modTSconfig['properties']['disableIconToolbar']) {
         // Page history
         $buttons['history_page'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode('pages:' . $this->id) . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '#latest\');return false;') . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-history-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:recordHistory', 1))) . '</a>';
         if (!$this->translatorMode && $GLOBALS['BE_USER']->isPSet($this->calcPerms, 'pages', 'new')) {
             // Create new page (wizard)
             $buttons['new_page'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'db_new.php?id=' . $this->id . '&pagesOnly=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI') . '&updatePageTree=true') . '\');return false;') . '">' . t3lib_iconWorks::getSpriteIcon('actions-page-new', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:newPage', 1))) . '</a>';
         }
         if (!$this->translatorMode && $GLOBALS['BE_USER']->isPSet($this->calcPerms, 'pages', 'edit')) {
             // Edit page properties
             $params = '&edit[pages][' . $this->id . ']=edit';
             $buttons['edit_page'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $BACK_PATH)) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:editPageProperties', 1))) . '</a>';
             // Move page
             $buttons['move_page'] = '<a href="' . htmlspecialchars($BACK_PATH . 'move_el.php?table=pages&uid=' . $this->id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-page-move', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:move_page', 1))) . '</a>';
         }
         $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txtemplavoilaM1', 'pagemodule', $BACK_PATH);
         if ($this->id) {
             $cacheUrl = $GLOBALS['BACK_PATH'] . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '&redirect=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&cacheCmd=' . $this->id;
             $buttons['cache'] = '<a href="' . $cacheUrl . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear') . '</a>';
         }
     }
     return $buttons;
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:48,代码来源:index.php

示例4: localizationRedirect

 /**
  * Redirects to alt_doc with new parameters to edit a just created localized record
  *
  * @param	string		String passed by GET &justLocalized=
  * @return	void
  */
 function localizationRedirect($justLocalized)
 {
     global $TCA;
     list($table, $orig_uid, $language) = explode(':', $justLocalized);
     if ($TCA[$table] && $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField']) {
         $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', $table, $TCA[$table]['ctrl']['languageField'] . '=' . intval($language) . ' AND ' . $TCA[$table]['ctrl']['transOrigPointerField'] . '=' . intval($orig_uid) . t3lib_BEfunc::deleteClause($table) . t3lib_BEfunc::versioningPlaceholderClause($table));
         if (is_array($localizedRecord)) {
             // Create parameters and finally run the classic page module for creating a new page translation
             $params = '&edit[' . $table . '][' . $localizedRecord['uid'] . ']=edit';
             $returnUrl = '&returnUrl=' . rawurlencode(t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl')));
             $location = $GLOBALS['BACK_PATH'] . 'alt_doc.php?' . $params . $returnUrl . t3lib_BEfunc::getUrlToken('editRecord');
             t3lib_utility_Http::redirect($location);
         }
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:21,代码来源:alt_doc.php

示例5: issueCommand

 /**
  * [Describe function...]
  *
  * @param	[type]		$params: ...
  * @param	[type]		$rUrl: ...
  * @return	[type]		...
  */
 function issueCommand($params, $rUrl = '')
 {
     $rUrl = $rUrl ? $rUrl : t3lib_div::getIndpEnv('REQUEST_URI');
     return $this->backPath . 'tce_db.php?' . $params . '&redirect=' . ($rUrl == -1 ? "'+T3_THIS_LOCATION+'" : rawurlencode($rUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . '&prErr=1&uPT=1' . t3lib_BEfunc::getUrlToken('tceAction');
 }
开发者ID:ghanshyamgohel,项目名称:tt_news,代码行数:12,代码来源:index.php

示例6: foreach

        if ($this->redirect && !$this->tce->debug) {
            t3lib_utility_Http::redirect($this->redirect);
        }
    }
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/tce_db.php'])) {
    include_once $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/tce_db.php'];
}
// Make instance:
$SOBE = t3lib_div::makeInstance('SC_tce_db');
$SOBE->init();
// Include files?
foreach ($SOBE->include_once as $INC_FILE) {
    include_once $INC_FILE;
}
$formprotection = t3lib_formprotection_Factory::get();
if ($formprotection->validateToken(t3lib_div::_GP('formToken'), 'tceAction')) {
    $SOBE->initClipboard();
    $SOBE->main();
    // This is done for the clear cache menu, so that it gets a new token
    // making it possible to clear cache several times.
    if (t3lib_div::_GP('ajaxCall')) {
        $token = array();
        $token['value'] = $formprotection->generateToken('tceAction');
        $token['name'] = 'formToken';
        // This will be used by clearcachemenu.js to replace the token for the next call
        echo t3lib_BEfunc::getUrlToken('tceAction');
    }
}
$formprotection->persistTokens();
$SOBE->finish();
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:tce_db.php

示例7: deleteUrl

 /**
  * deleteUrl for current pad
  *
  * @param	boolean		If set, then the redirect URL will point back to the current script, but with CB reset.
  * @param	boolean		If set, then the URL will link to the tce_file.php script in the typo3/ dir.
  * @return	string
  */
 function deleteUrl($setRedirect = 1, $file = 0)
 {
     $rU = $this->backPath . ($file ? 'tce_file.php' : 'tce_db.php') . '?' . ($setRedirect ? 'redirect=' . rawurlencode(t3lib_div::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[delete]=1' . '&CB[pad]=' . $this->current . t3lib_BEfunc::getUrlToken('tceAction');
     return $rU;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:12,代码来源:class.t3lib_clipboard.php

示例8: clearCacheMenu

    /**
     * Creates a selector box with clear-cache items.
     * Rather specialized functions - at least don't use it with $addSaveOptions unless you know what you do...
     *
     * @param	integer		The page uid of the "current page" - the one that will be cleared as "clear cache for this page".
     * @param	boolean		If $addSaveOptions is set, then also the array of save-options for TCE_FORMS will appear.
     * @return	string		<select> tag with content - a selector box for clearing the cache
     */
    function clearCacheMenu($id, $addSaveOptions = 0)
    {
        global $BE_USER;
        $opt = array();
        if ($addSaveOptions) {
            $opt[] = '<option value="">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.menu', 1) . '</option>';
            $opt[] = '<option value="TBE_EDITOR.checkAndDoSubmit(1);">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '</option>';
            $opt[] = '<option value="document.editform.closeDoc.value=-2; TBE_EDITOR.checkAndDoSubmit(1);">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', 1) . '</option>';
            if ($BE_USER->uc['allSaveFunctions']) {
                $opt[] = '<option value="document.editform.closeDoc.value=-3; TBE_EDITOR.checkAndDoSubmit(1);">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseAllDocs', 1) . '</option>';
            }
            $opt[] = '<option value="document.editform.closeDoc.value=2; document.editform.submit();">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '</option>';
            $opt[] = '<option value="document.editform.closeDoc.value=3; document.editform.submit();">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeAllDocs', 1) . '</option>';
            $opt[] = '<option value=""></option>';
        }
        $opt[] = '<option value="">[ ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_clearCache', 1) . ' ]</option>';
        if ($id) {
            $opt[] = '<option value="' . $id . '">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_thisPage', 1) . '</option>';
        }
        if ($BE_USER->isAdmin() || $BE_USER->getTSConfigVal('options.clearCache.pages')) {
            $opt[] = '<option value="pages">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_pages', 1) . '</option>';
        }
        if ($BE_USER->isAdmin() || $BE_USER->getTSConfigVal('options.clearCache.all')) {
            $opt[] = '<option value="all">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_all', 1) . '</option>';
        }
        $onChange = 'if (!this.options[this.selectedIndex].value) {
				this.selectedIndex=0;
			} else if (this.options[this.selectedIndex].value.indexOf(\';\')!=-1) {
				eval(this.options[this.selectedIndex].value);
			} else {
				window.location.href=\'' . $this->backPath . 'tce_db.php?vC=' . $BE_USER->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '&redirect=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&cacheCmd=\'+this.options[this.selectedIndex].value;
			}';
        $af_content = '<select name="cacheCmd" onchange="' . htmlspecialchars($onChange) . '">' . implode('', $opt) . '</select>';
        if (count($opt) > 1) {
            return $af_content;
        }
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:45,代码来源:template.php

示例9: onClickInsertRecord

 /**
  * Create on-click event value.
  *
  * @param	array		The record.
  * @param	string		Column position value.
  * @param	integer		Move uid
  * @param	integer		PID value.
  * @param	integer		System language (not used currently)
  * @return	string
  */
 function onClickInsertRecord($row, $vv, $moveUid, $pid, $sys_lang = 0)
 {
     $table = 'tt_content';
     if (is_array($row)) {
         $location = 'tce_db.php?cmd[' . $table . '][' . $moveUid . '][' . $this->moveOrCopy . ']=-' . $row['uid'] . '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction');
     } else {
         $location = 'tce_db.php?cmd[' . $table . '][' . $moveUid . '][' . $this->moveOrCopy . ']=' . $pid . '&data[' . $table . '][' . $moveUid . '][colPos]=' . $vv . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction');
     }
     //		$location.='&redirect='.rawurlencode($this->R_URI);		// returns to prev. page
     $location .= '&uPT=1&redirect=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
     // This redraws screen
     return 'window.location.href=\'' . $location . '\';return false;';
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:23,代码来源:class.t3lib_positionmap.php

示例10: reportingMarketingBeAction

	/**
	 * Reporting Marketing
	 *
	 * @return void
	 */
	public function reportingMarketingBeAction() {
		$mails = $this->mailsRepository->findAllInPid(t3lib_div::_GP('id'), $this->settings, $this->piVars);
		$firstMail = $this->mailsRepository->findFirstInPid(t3lib_div::_GP('id'));
		$groupedMarketingStuff = Tx_Powermail_Utility_Div::getGroupedMarketingStuff($mails);

		$this->view->assign('groupedMarketingStuff', $groupedMarketingStuff);
		$this->view->assign('mails', $mails);
		$this->view->assign('firstMail', $firstMail);
		$this->view->assign('piVars', $this->piVars);
		$this->view->assign('pid', t3lib_div::_GP('id'));
		$this->view->assign('token', t3lib_BEfunc::getUrlToken('tceAction'));
		$this->view->assign('perPage', ($this->settings['perPage'] ? $this->settings['perPage'] : 10));
	}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:18,代码来源:ModuleController.php

示例11: dragDrop_copymovepage

 /**
  * Adding CM element for Copying/Moving a Page Into/After from a drag & drop action
  *
  * @param	integer		source UID code for the record to modify
  * @param	integer		destination UID code for the record to modify
  * @param	string		Action code: either "move" or "copy"
  * @param	string		Parameter code: either "into" or "after"
  * @return	array		Item array, element in $menuItems
  * @internal
  */
 function dragDrop_copymovepage($srcUid, $dstUid, $action, $into)
 {
     $negativeSign = $into == 'into' ? '' : '-';
     $editOnClick = '';
     $loc = 'top.content.list_frame';
     $editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode(' . $this->frameLocation($loc . '.document') . ')+"' . '&cmd[pages][' . $srcUid . '][' . $action . ']=' . $negativeSign . $dstUid . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '";}hideCM();top.nav.refresh();';
     return $this->linkItem($this->label($action . 'Page_' . $into), $this->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-paste-' . $into)), $editOnClick . 'return false;', 0);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:18,代码来源:alt_clickmenu.php

示例12: main

    /**
     * Main function.
     * Creates some general objects and calls other functions for the main rendering of module content.
     *
     * @return	void
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH;
        // Access check...
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access) {
            // Initialize permission settings:
            $this->CALC_PERMS = $BE_USER->calcPerms($this->pageinfo);
            $this->EDIT_CONTENT = $this->CALC_PERMS & 16 ? 1 : 0;
            // Start document template object:
            $this->doc = t3lib_div::makeInstance('template');
            $this->doc->backPath = $BACK_PATH;
            $this->doc->setModuleTemplate('templates/db_layout.html');
            // JavaScript:
            $this->doc->JScode = '<script type="text/javascript" ' . 'src="' . t3lib_div::createVersionNumberedFilename($BACK_PATH . '../t3lib/jsfunc.updateform.js') . '">' . '</script>';
            $this->doc->JScode .= $this->doc->wrapScriptTags('
				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
				if (top.fsMod) top.fsMod.navFrameHighlightedID["web"] = "pages' . intval($this->id) . '_"+top.fsMod.currentBank; ' . intval($this->id) . ';
				function jumpToUrl(URL,formEl)	{	//
					if (document.editform && TBE_EDITOR.isFormChanged)	{	// Check if the function exists... (works in all browsers?)
						if (!TBE_EDITOR.isFormChanged())	{	//
							window.location.href = URL;
						} else if (formEl) {
							if (formEl.type=="checkbox") formEl.checked = formEl.checked ? 0 : 1;
						}
					} else window.location.href = URL;
				}
			' . ($this->popView ? t3lib_BEfunc::viewOnClick($this->id, $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->id)) : '') . '

				function deleteRecord(table,id,url)	{	//
					if (confirm(' . $LANG->JScharCode($LANG->getLL('deleteWarning')) . '))	{
						window.location.href = "' . $BACK_PATH . 'tce_db.php?cmd["+table+"]["+id+"][delete]=1&redirect="+escape(url)+"&vC=' . $BE_USER->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '&prErr=1&uPT=1";
					}
					return false;
				}
			');
            $this->doc->JScode .= $this->doc->wrapScriptTags('
				var DTM_array = new Array();
				var DTM_origClass = new String();

					// if tabs are used in a popup window the array might not exists
				if(!top.DTM_currentTabs) {
					top.DTM_currentTabs = new Array();
				}

				function DTM_activate(idBase,index,doToogle)	{	//
						// Hiding all:
					if (DTM_array[idBase])	{
						for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++)	{
							if (DTM_array[idBase][cnt] != idBase+"-"+index)	{
								document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none";
								document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
							}
						}
					}

						// Showing one:
					if (document.getElementById(idBase+"-"+index+"-DIV"))	{
						if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")	{
							document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
							if(DTM_origClass=="") {
								document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
							} else {
								DTM_origClass = "tab";
							}
							top.DTM_currentTabs[idBase] = -1;
						} else {
							document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
							if(DTM_origClass=="") {
								document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
							} else {
								DTM_origClass = "tabact";
							}
							top.DTM_currentTabs[idBase] = index;
						}
					}
				}
				function DTM_toggle(idBase,index,isInit)	{	//
						// Showing one:
					if (document.getElementById(idBase+"-"+index+"-DIV"))	{
						if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")	{
							document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
							if(isInit) {
								document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
							} else {
								DTM_origClass = "tab";
							}
							top.DTM_currentTabs[idBase+"-"+index] = 0;
						} else {
							document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
							if(isInit) {
								document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
							} else {
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:db_layout.php

示例13: DB_delete

 /**
  * Adding CM element for Delete
  *
  * @param	string		Table name
  * @param	integer		UID for the current record.
  * @param	array		Label for including in the confirmation message, EXT:lang/locallang_core.php:mess.delete
  * @return	array		Item array, element in $menuItems
  * @internal
  */
 function DB_delete($table, $uid, $elInfo)
 {
     $loc = 'top.content.list_frame';
     if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
         $conf = "confirm(" . $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.delete'), $elInfo[0]) . t3lib_BEfunc::referenceCount($table, $uid, ' (There are %s reference(s) to this record!)')) . ")";
     } else {
         $conf = '1==1';
     }
     $editOnClick = 'if(' . $loc . " && " . $conf . " ){" . $loc . ".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(" . $this->backRef->frameLocation($loc . '.document') . ")+'" . "&cmd[" . $table . '][' . $uid . '][DDdelete]=1&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . "';hideCM();}";
     return $this->backRef->linkItem($GLOBALS['LANG']->getLLL('delete', $this->LL), $this->backRef->excludeIcon('<img' . t3lib_iconWorks::skinImg($this->backRef->PH_backPath, 'gfx/garbage.gif', 'width="11" height="12"') . ' alt="" />'), $editOnClick . 'return false;');
 }
开发者ID:ghanshyamgohel,项目名称:tt_news,代码行数:20,代码来源:class.tx_ttnewscatmanager_cm1.php

示例14: onClickEvent

 /**
  * Creates the onclick event for the insert-icons.
  *
  * @param	integer		The pid.
  * @param	integer		New page id.
  * @return	string		Onclick attribute content
  */
 function onClickEvent($pid, $newPagePID)
 {
     return 'window.location.href=\'tce_db.php?cmd[pages][' . $GLOBALS['SOBE']->moveUid . '][' . $this->moveOrCopy . ']=' . $pid . '&redirect=' . rawurlencode($this->R_URI) . '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '\';return false;';
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:11,代码来源:move_el.php

示例15: DAMcatDelete

 /**
  * Returns the menu-item for deleting an item
  *
  * @param $table	always tx_dam_cat
  * @param $uid		uid of the specified tx_dam_cat item
  * @return 			clickMenu-object menu-item, ready for output
  */
 function DAMcatDelete($table, $uid, $elInfo)
 {
     $editOnClick = '';
     $loc = 'top.nav';
     $frameLocation = $loc . '.iframe';
     $editOnClick = 'if(' . $loc . ' && confirm(' . $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.delete'), $elInfo[0])) . ')){this.location=' . $loc . '.setUrl(\'tce_db.php?' . 'redirect=\'+top.rawurlencode(' . $this->backRef->frameLocation($frameLocation) . ')+\'' . '&cmd[' . $table . '][' . $uid . '][delete]=1&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '\');};';
     return $this->backRef->linkItem($this->backRef->label('delete'), $this->backRef->excludeIcon('<img' . t3lib_iconWorks::skinImg($this->backRef->PH_backPath, 'gfx/garbage.gif', 'width="11" height="12"') . ' alt="" />'), $editOnClick . 'return false;');
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:15,代码来源:class.tx_damcatedit_cm.php


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