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


PHP t3lib_BEfunc::readPageAccess方法代码示例

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


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

示例1: init

 /**
  * Initialize internal variables.
  *
  * @return	void
  */
 function init()
 {
     global $BE_USER, $BACK_PATH, $TBE_MODULES_EXT;
     // Setting class files to include:
     if (is_array($TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'])) {
         $this->include_once = array_merge($this->include_once, $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']);
     }
     // Setting internal vars:
     $this->id = intval(t3lib_div::GPvar('id'));
     $this->parentRecord = t3lib_div::GPvar('parentRecord');
     $this->altRoot = t3lib_div::GPvar('altRoot');
     $this->defVals = t3lib_div::GPvar('defVals');
     // Starting the document template object:
     $this->doc = t3lib_div::makeInstance('mediumDoc');
     $this->doc->docType = 'xhtml_trans';
     $this->doc->backPath = $BACK_PATH;
     $this->doc->JScode = '';
     #
     ### Mansoor Ahmad - Dont know why it used
     #
     //$this->doc->form='<form action="" name="editForm">';
     // Getting the current page and receiving access information (used in main())
     $perms_clause = $BE_USER->getPagePermsClause(1);
     $pageinfo = t3lib_BEfunc::readPageAccess($this->id, $perms_clause);
     $this->access = is_array($pageinfo) ? 1 : 0;
     $this->apiObj = t3lib_div::makeInstance('tx_templavoila_api');
     // If no parent record was specified, find one:
     if (!$this->parentRecord) {
         $mainContentAreaFieldName = $this->apiObj->ds_getFieldNameByColumnPosition($this->id, 0);
         if ($mainContentAreaFieldName != FALSE) {
             $this->parentRecord = 'pages:' . $this->id . ':sDEF:lDEF:' . $mainContentAreaFieldName . ':vDEF:0';
         }
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:39,代码来源:ux_db_new_content_el.php

示例2: render

 /**
  * Renders a record list as known from the TYPO3 list module
  * Note: This feature is experimental!
  *
  * @param string $tableName name of the database table
  * @param array $fieldList list of fields to be displayed. If empty, only the title column (configured in $TCA[$tableName]['ctrl']['title']) is shown
  * @param integer $storagePid by default, records are fetched from the storage PID configured in persistence.storagePid. With this argument, the storage PID can be overwritten
  * @param integer $levels corresponds to the level selector of the TYPO3 list module. By default only records from the current storagePid are fetched
  * @param string $filter corresponds to the "Search String" textbox of the TYPO3 list module. If not empty, only records matching the string will be fetched
  * @param integer $recordsPerPage amount of records to be displayed at once. Defaults to $TCA[$tableName]['interface']['maxSingleDBListItems'] or (if that's not set) to 100
  * @param string $sortField table field to sort the results by
  * @param boolean $sortDescending if TRUE records will be sorted in descending order
  * @param boolean $readOnly if TRUE, the edit icons won't be shown. Otherwise edit icons will be shown, if the current BE user has edit rights for the specified table!
  * @param boolean $enableClickMenu enables context menu
  * @param string $clickTitleMode one of "edit", "show" (only pages, tt_content), "info"
  * @param boolean $alternateBackgroundColors if set, rows will have alternate background colors
  * @return string the rendered record list
  * @see localRecordList
  */
 public function render($tableName, array $fieldList = array(), $storagePid = NULL, $levels = 0, $filter = '', $recordsPerPage = 0, $sortField = '', $sortDescending = FALSE, $readOnly = FALSE, $enableClickMenu = TRUE, $clickTitleMode = NULL, $alternateBackgroundColors = FALSE)
 {
     $pageinfo = t3lib_BEfunc::readPageAccess(t3lib_div::_GP('id'), $GLOBALS['BE_USER']->getPagePermsClause(1));
     $dblist = t3lib_div::makeInstance('localRecordList');
     $dblist->backPath = $GLOBALS['BACK_PATH'];
     $dblist->pageRow = $pageinfo;
     if ($readOnly === FALSE) {
         $dblist->calcPerms = $GLOBALS['BE_USER']->calcPerms($pageinfo);
     }
     $dblist->showClipboard = FALSE;
     $dblist->disableSingleTableView = TRUE;
     $dblist->clickTitleMode = $clickTitleMode;
     $dblist->alternateBgColors = $alternateBackgroundColors;
     $dblist->clickMenuEnabled = $enableClickMenu;
     if ($storagePid === NULL) {
         $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         $storagePid = $frameworkConfiguration['persistence']['storagePid'];
     }
     $dblist->start($storagePid, $tableName, (int) t3lib_div::_GP('pointer'), $filter, $levels, $recordsPerPage);
     $dblist->allFields = TRUE;
     $dblist->dontShowClipControlPanels = TRUE;
     $dblist->displayFields = FALSE;
     $dblist->setFields = array($tableName => $fieldList);
     $dblist->noControlPanels = TRUE;
     $dblist->sortField = $sortField;
     $dblist->sortRev = $sortDescending;
     $dblist->script = $_SERVER['REQUEST_URI'];
     $dblist->generateList();
     return $dblist->HTMLcode;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:49,代码来源:TableListViewHelper.php

示例3: render

 /**
  * Render javascript in header
  *
  * @return string the rendered page info icon
  * @see template::getPageInfo() Note: can't call this method as it's protected!
  */
 public function render()
 {
     $doc = $this->getDocInstance();
     $id = t3lib_div::_GP('id');
     $pageRecord = t3lib_BEfunc::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
     // Add icon with clickmenu, etc:
     if ($pageRecord['uid']) {
         // If there IS a real page
         $alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
         $iconImg = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
         // Make Icon:
         $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
     } else {
         // On root-level of page tree
         // Make Icon
         $iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />';
         if ($BE_USER->user['admin']) {
             $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
         } else {
             $theIcon = $iconImg;
         }
     }
     // Setting icon with clickmenu + uid
     $pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
     return $pageInfo;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:32,代码来源:PageInfoViewHelper.php

示例4: initialize

 /**
  * Initializes the Module
  *
  * @return	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = t3lib_div::makeInstance('template');
     $this->doc->setModuleTemplate(t3lib_extMgm::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = t3lib_extMgm::extRelPath('recycler');
     $this->pageRecord = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
     $this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
     //don't access in workspace
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         $this->isAccessibleForCurrentUser = false;
     }
     //read configuration
     $modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
     if ($this->isCurrentUserAdmin()) {
         $this->allowDelete = true;
     } else {
         $this->allowDelete = $modTS['properties']['allowDelete'] == '1';
     }
     if (isset($modTS['properties']['recordsPageLimit']) && intval($modTS['properties']['recordsPageLimit']) > 0) {
         $this->recordsPageLimit = intval($modTS['properties']['recordsPageLimit']);
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:index.php

示例5: main

    /**
     * Initialize module header etc and call extObjContent function
     *
     * @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
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        // Template markers
        $markers = array('CSH' => '', 'FUNC_MENU' => '', 'CONTENT' => '');
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->setModuleTemplate('templates/func.html');
        // **************************
        // Main
        // **************************
        if ($this->id && $access) {
            // JavaScript
            $this->doc->JScode = $this->doc->wrapScriptTags('
				script_ended = 0;
				function jumpToUrl(URL)	{	//
					window.location.href = URL;
				}
			');
            $this->doc->postCode = $this->doc->wrapScriptTags('
				script_ended = 1;
				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
			');
            // Setting up the context sensitive menu:
            $this->doc->getContextMenuCode();
            $this->doc->form = '<form action="index.php" method="post"><input type="hidden" name="id" value="' . $this->id . '" />';
            $vContent = $this->doc->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->doc->section('', $vContent);
            }
            $this->extObjContent();
            // Setting up the buttons and markers for docheader
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $docHeaderButtons['csh'];
            $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
            $markers['CONTENT'] = $this->content;
        } else {
            // If no access or if ID == zero
            $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('clickAPage_content'), $LANG->getLL('title'), t3lib_FlashMessage::INFO);
            $this->content = $flashMessage->render();
            // Setting up the buttons and markers for docheader
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $docHeaderButtons['csh'];
            $markers['CONTENT'] = $this->content;
        }
        // Build the <body> for the module
        $this->content = $this->doc->startPage($LANG->getLL('title'));
        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        $this->content .= $this->doc->endPage();
        $this->content = $this->doc->insertStylesAndJS($this->content);
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:60,代码来源:index.php

示例6: main

    /**
    * Main function of the module. Write the content to $this->content
    * If you chose "web" as main module, you will need to consider the 
        # $this->id parameter which will contain the uid-number of the page 
        # clicked in the page tree
    *
    * @return	[type]		...
    */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
        // Access check!
        // The page will show only if there is a valid page and if this
        // page may be viewed by the user
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access || $BE_USER->user["admin"] && !$this->id) {
            // Draw the header.
            $this->doc = t3lib_div::makeInstance("mediumDoc");
            $this->doc->backPath = $BACK_PATH;
            $this->doc->form = '<form action="" method="POST">';
            // JavaScript
            $this->doc->JScode = '
				<script language="javascript" type="text/javascript">
					script_ended = 0;
					function jumpToUrl(URL)	{
						document.location = URL;
					}
				</script>
			';
            $this->doc->postCode = '
				<script language="javascript" type="text/javascript">
					script_ended = 1;
					if (top.fsMod) top.fsMod.recentIds["web"] = 0;
				</script>
			';
            $headerSection = $this->doc->getHeader("pages", $this->pageinfo, $this->pageinfo["_thePath"]) . "<br />" . $LANG->sL("LLL:EXT:lang/locallang_core.xml:labels.path") . ": " . t3lib_div::fixed_lgd_pre($this->pageinfo["_thePath"], 50);
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->content .= $this->doc->header($LANG->getLL("title"));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section("", $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, "SET[function]", $this->MOD_SETTINGS["function"], $this->MOD_MENU["function"])));
            $this->content .= $this->doc->divider(5);
            // Render content:
            $this->moduleContent();
            // Backlink
            $this->content .= $this->doc->spacer(10) . $this->doc->section("", "<a href='index.php' title='Back'>Back</a>");
            // ShortCut
            if ($BE_USER->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section("", $this->doc->makeShortcutIcon("id", implode(",", array_keys($this->MOD_MENU)), $this->MCONF["name"]));
            }
            $this->content .= $this->doc->spacer(10);
        } else {
            // If no access or if ID == zero
            $this->doc = t3lib_div::makeInstance("mediumDoc");
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->content .= $this->doc->header($LANG->getLL("title"));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
开发者ID:aowi,项目名称:FDF-Activity-DB,代码行数:61,代码来源:index.php

示例7: main

 /**
  * Main function of the module. Write the content to $this->content
  * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
  *
  * @return void
  */
 public function main()
 {
     // Access check!
     // The page will show only if there is a valid page and if this page may be viewed by the user
     $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
     $access = is_array($this->pageinfo) ? 1 : 0;
     if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
         // Draw the header.
         $this->doc = t3lib_div::makeInstance('bigDoc');
         $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools') . 'res/css/bemodul.css');
         $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools') . 'res/bootstrap/css/bootstrap.min.css');
         $this->doc->backPath = $GLOBALS['BACK_PATH'];
         $this->doc->form = '<form action="" method="post" enctype="multipart/form-data">';
         // JavaScript
         $this->doc->JScode = '
             <script src="../typo3conf/ext/medbootstraptools/res/js/jquery-1.8.3.min.js"></script>
             <script src="../typo3conf/ext/medbootstraptools/res/js/functions.js"></script>
             <script language="javascript" type="text/javascript">
                 script_ended = 0;
                 function jumpToUrl(URL)    {
                     document.location = URL;
                 }
             </script>
         ';
         $this->doc->postCode = '
             <script language="javascript" type="text/javascript">
                 script_ended = 1;
                 if (top.fsMod) top.fsMod.recentIds["web"] = 0;
             </script>
         ';
         $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);
         $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
         //$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
         //$this->content .= $this->doc->spacer(5);
         //$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
         //$this->content .= $this->doc->divider(5);
         // Render content:
         $this->moduleContent();
         // Shortcut
         if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
             $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
         }
         $this->content .= $this->doc->spacer(10);
     } else {
         // If no access or if ID == zero
         $this->doc = t3lib_div::makeInstance('bigDoc');
         $this->doc->backPath = $GLOBALS['BACK_PATH'];
         $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
         $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
         $this->content .= $this->doc->spacer(5);
         $this->content .= $this->doc->spacer(10);
     }
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:59,代码来源:index.php

示例8: main

    /**
     * Main function of the module. Write the content to $this->content
     * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
     *
     * @return	[type]		...
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
        // Access check!
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access || $BE_USER->user['admin'] && !$this->id) {
            // Draw the header.
            $this->doc = t3lib_div::makeInstance('mediumDoc');
            $this->doc->backPath = $BACK_PATH;
            $this->doc->form = '<form action="" method="post" enctype="multipart/form-data">';
            // JavaScript
            $this->doc->JScode = '
					<script language="javascript" type="text/javascript">
						script_ended = 0;
						function jumpToUrl(URL)	{
							document.location = URL;
						}
					</script>
				';
            $this->doc->postCode = '
					<script language="javascript" type="text/javascript">
						script_ended = 1;
						if (top.fsMod) top.fsMod.recentIds["web"] = 0;
					</script>
				';
            $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
            $this->content .= $this->doc->divider(5);
            // Render content:
            $this->moduleContent();
            // ShortCut
            if ($BE_USER->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
            }
            $this->content .= $this->doc->spacer(10);
        } else {
            // If no access or if ID == zero
            $this->doc = t3lib_div::makeInstance('mediumDoc');
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
开发者ID:sjakk,项目名称:betatext,代码行数:56,代码来源:index.php

示例9: main

    /**
     * Main function of the module
     *
     * Write the content to $this->content
     * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
     */
    public function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
        // Access check!
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access || $BE_USER->user['admin'] && !$this->id) {
            // Page template
            $this->doc = t3lib_div::makeInstance('template');
            $this->doc->setModuleTemplate(t3lib_extMgm::extPath('tq_seo') . 'res/backend/template/' . $this->_docTemplate . '.html');
            $this->doc->backPath = $BACK_PATH;
            $this->pageRenderer = $this->doc->getPageRenderer();
            // ExtJS
            $this->pageRenderer->loadExtJS();
            $this->pageRenderer->enableExtJSQuickTips();
            $this->pageRenderer->addJsFile($BACK_PATH . t3lib_extMgm::extRelPath('tq_seo') . 'res/backend/js/Ext.ux.plugin.FitToParent.js');
            // ExtJS Debug
            //$this->pageRenderer->enableExtJsDebug();
            // Std javascript
            $this->pageRenderer->addJsFile($BACK_PATH . t3lib_extMgm::extRelPath('tq_seo') . 'res/backend/js/TQSeo.js');
            // CSS
            $this->pageRenderer->addCssFile($BACK_PATH . t3lib_extMgm::extRelPath('tq_seo') . 'res/backend/css/tqseo_backend.css');
            // Set the form
            $this->doc->form = '<form name="tx_seo_form" id="tx_seo_form" method="post" action="">';
            // JavaScript for main function menu
            $this->doc->JScode = '
				<script language="javascript" type="text/javascript">
					script_ended = 0;
					function jumpToUrl(URL) {
						document.location = URL;
					}
				</script>
			';
            $this->moduleContent();
            $content = $this->doc->moduleBody(array(), $this->getDocHeaderButtons(), $this->getTemplateMarkers());
            // Renders the module page
            $this->content = $this->doc->render($LANG->getLL('title'), $content);
        } else {
            // If no access or if ID == zero
            $this->doc = t3lib_div::makeInstance('mediumDoc');
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
开发者ID:paddyez,项目名称:tq_seo,代码行数:54,代码来源:class.standalone.php

示例10: init

 /**
  * Initializes sidebar object. Checks if there any tables to display and
  * adds sidebar item if there are any.
  *
  * @param	object		$pObj	Parent object
  * @return	void
  */
 function init(&$pObj)
 {
     $this->pObj =& $pObj;
     $this->tables = t3lib_div::trimExplode(',', $this->pObj->modTSconfig['properties']['recordDisplay_tables'], true);
     if ($this->tables) {
         // Get permissions
         $this->calcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::readPageAccess($this->pObj->id, $this->pObj->perms_clause));
         foreach ($this->tables as $table) {
             if ($this->canDisplayTable($table)) {
                 // At least one displayable table found!
                 $this->pObj->sideBarObj->addItem('records', $this, 'sidebar_renderRecords', $GLOBALS['LANG']->getLL('records'), 25);
                 break;
             }
         }
     }
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:23,代码来源:class.tx_templavoila_mod1_records.php

示例11: main

 /**
  * Main function of the module. Write the content to $this->content
  *
  * @return   the wizard
  */
 function main()
 {
     global $BE_USER, $BACK_PATH;
     // Draw the header.
     $this->doc = t3lib_div::makeInstance('mediumDoc');
     $this->doc->backPath = $BACK_PATH;
     // GPvars:
     $this->P = t3lib_div::_GP('P');
     $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
     $access = is_array($this->pageinfo) ? 1 : 0;
     if ($this->id && $access || $BE_USER->user['admin'] && !$this->id || $BE_USER->user['uid'] && !$this->id) {
         if ($BE_USER->user['admin'] && !$this->id || $BE_USER->user['uid'] && !$this->id) {
             $this->moduleContent();
         }
     }
 }
开发者ID:fabianlipp,项目名称:ods_osm,代码行数:21,代码来源:index.php

示例12: main

    /**
     * Main function of the module. Write the content to $this->content
     */
    function main()
    {
        global $AB, $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $HTTP_GET_VARS, $HTTP_POST_VARS, $CLIENT, $TYPO3_CONF_VARS;
        // Draw the header.
        $this->doc = t3lib_div::makeInstance("mediumDoc");
        $this->doc->backPath = $BACK_PATH;
        $this->doc->form = '<form action="" method="POST">';
        // JavaScript
        $this->doc->JScode = '
			<script language="javascript">
				script_ended = 0;
				function jumpToUrl(URL)	{
					document.location = URL;
				}
			</script>
		';
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access || $BE_USER->user["admin"] && !$this->id) {
            if ($BE_USER->user["admin"] && !$this->id) {
                $this->pageinfo = array("title" => "[root-level]", "uid" => 0, "pid" => 0);
            }
            $headerSection = $this->doc->getHeader("pages", $this->pageinfo, $this->pageinfo["_thePath"]) . "<br>" . $LANG->php3Lang["labels"]["path"] . ": " . t3lib_div::fixed_lgd_pre($this->pageinfo["_thePath"], 50);
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->content .= $this->doc->header($LANG->getLL("title"));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section("", $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, "SET[function]", $this->MOD_SETTINGS["function"], $this->MOD_MENU["function"])));
            $this->content .= $this->doc->divider(5);
            // Render content:
            $this->moduleContent();
            // ShortCut
            if ($BE_USER->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section("", $this->doc->makeShortcutIcon("id", implode(",", array_keys($this->MOD_MENU)), $this->MCONF["name"]));
            }
        }
        $this->content .= $this->doc->spacer(10);
    }
开发者ID:BackupTheBerlios,项目名称:stypo3dext,代码行数:40,代码来源:index.php

示例13: render

 /**
  * Renders the current page path
  *
  * @return string the rendered page path
  * @see template::getPagePath() Note: can't call this method as it's protected!
  */
 public function render()
 {
     $doc = $this->getDocInstance();
     $id = t3lib_div::_GP('id');
     $pageRecord = t3lib_BEfunc::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
     // Is this a real page
     if ($pageRecord['uid']) {
         $title = $pageRecord['_thePathFull'];
     } else {
         $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
     }
     // Setting the path of the page
     $pagePath = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': <span class="typo3-docheader-pagePath">';
     // crop the title to title limit (or 50, if not defined)
     $cropLength = empty($GLOBALS['BE_USER']->uc['titleLen']) ? 50 : $GLOBALS['BE_USER']->uc['titleLen'];
     $croppedTitle = t3lib_div::fixed_lgd_cs($title, -$cropLength);
     if ($croppedTitle !== $title) {
         $pagePath .= '<abbr title="' . htmlspecialchars($title) . '">' . htmlspecialchars($croppedTitle) . '</abbr>';
     } else {
         $pagePath .= htmlspecialchars($title);
     }
     $pagePath .= '</span>';
     return $pagePath;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:30,代码来源:PagePathViewHelper.php

示例14: main

    /**
     * Main function of the module. Write the content to $this->content
     *
     * @return void
     */
    public function main()
    {
        // Draw the header.
        $this->doc = t3lib_div::makeInstance('mediumDoc');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->form = '<form action="" method="post">';
        // JavaScript
        $this->doc->JScode = '
			<script language="javascript" type="text/javascript">
				script_ended = 0;
				function jumpToUrl(URL)	{
					document.location = URL;
				}
			</script>
		';
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
            if ($GLOBALS['BE_USER']->user['admin'] && !$this->id) {
                $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
            }
            $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);
            $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
            $this->content .= $this->doc->divider(5);
            // Render content
            $this->moduleContent();
            // Shortcut
            if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
            }
        }
        $this->content .= $this->doc->spacer(10);
    }
开发者ID:snoblucha,项目名称:typo3_listfeusers,代码行数:41,代码来源:index.php

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


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