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


PHP t3lib_BEfunc::wrapInHelp方法代码示例

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


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

示例1: getModuleContent

    /**
     * Generates the module content
     *
     * @return void
     */
    protected function getModuleContent()
    {
        //// TEMPORARY
        // TODO add a "discover/update Solr connections button to the global section"
        $content = '
			<input type="hidden" id="solraction" name="solraction" value="" />
			';
        $content .= '<fieldset><legend>Site Actions</legend>';
        $content .= $this->renderIndexQueueInitializationSelector();
        $content .= '
				<input type="submit" value="Initialize Index Queue" name="s_initializeIndexQueue" onclick="document.forms[0].solraction.value=\'initializeIndexQueue\';" /> ';
        $content .= t3lib_BEfunc::wrapInHelp('', '', '', array('title' => 'Index Queue Initialization', 'description' => 'Initializing the Index Queue is the most complete way to force reindexing, or to build the Index Queue for
							 the first time. The Index Queue Worker scheduler task will then index the items listed in the Index Queue.
							 Initializing the Index Queue without selecting specific indexing configurations will behave like selecting all.'));
        $content .= '
				<br /><br /><hr /><br />
				<input type="submit" value="Clean up Site Index" name="s_cleanupSiteCores" onclick="document.forms[0].solraction.value=\'cleanupSiteCores\';" />';
        $content .= '
				<br /><br />
				<input type="submit" value="Empty Site Index" name="s_deleteSiteDocuments" onclick="Check = confirm(\'This will commit documents which may be pending, delete documents belonging to the currently selected site and commit again afterwards. Are you sure you want to delete the site\\\'s documents?\'); if (Check == true) document.forms[0].solraction.value=\'deleteSiteDocuments\';" />
			';
        $content .= '
				<br /><br />
				<input type="submit" value="Reload Index Configuration" name="s_reloadCore" onclick="document.forms[0].solraction.value=\'reloadSiteCores\';" />';
        $content .= '
			<br /><br /><hr /><br />
			<p>
				Delete document(s) from site index<br /><br />
			</p>
			<label for="delete_uid" style="display:block;width:60px;float:left">Item uid</label>
			<input id="delete_uid" type="text" name="delete_uid" value="" /> (also accepts comma separated lists of uids)<br /><br />
			<label for="delete_type" style="display:block;width:60px;float:left;">Item type</label>
			<input id="delete_type" type="text" name="delete_type" value="" /> (table name)<br /><br />
			<input type="submit" value="Delete Document(s)"name="s_deleteDocument" onclick="document.forms[0].solraction.value=\'deleteDocument\';" /><br /><br />
			';
        $content .= '</fieldset>';
        $content .= '
			<fieldset>
				<legend>Global Actions (affecting all sites and indexes)</legend>
				<input type="submit" value="Empty Index" name="s_emptyIndex" onclick="Check = confirm(\'This will commit documents which may be pending, clear the index and commit again afterwards. Are you sure you want to empty the index?\'); if (Check == true) document.forms[0].solraction.value=\'emptyIndex\';" /><br /><br />
			</fieldset>';
        $content .= '
			<hr class="double" />
			API Key: ' . Tx_Solr_Api::getApiKey();
        // TODO add a checkbox to the delete documents fields to also remove from Index Queue
        switch ($_POST['solraction']) {
            case 'initializeIndexQueue':
                $this->initializeIndexQueue();
                break;
            case 'cleanupSiteCores':
                $this->cleanupSiteIndex();
                break;
            case 'deleteSiteDocuments':
                $this->deleteSiteDocuments();
                break;
            case 'reloadSiteCores':
                $this->reloadSiteCores();
                break;
            case 'emptyIndex':
                $this->emptyIndex();
                break;
            case 'deleteDocument':
                $this->deleteDocument();
                break;
            default:
        }
        $this->content .= $this->doc->section('Apache Solr for TYPO3', $content, FALSE, TRUE);
    }
开发者ID:punktDe,项目名称:solr,代码行数:73,代码来源:index.php

示例2: getCSH

 /**
  * Returns the CSH Icon for given string
  *
  * @param	string		Locallang key
  * @param	string		The label to be used, that should be wrapped in help
  * @return	string		HTML output.
  */
 protected function getCSH($str, $label)
 {
     $context = '_MOD_user_setup';
     $field = $str;
     $strParts = explode(':', $str);
     if (count($strParts) > 1) {
         // Setting comes from another extension
         $context = $strParts[0];
         $field = $strParts[1];
     } else {
         if (!t3lib_div::inList('language,simuser', $str)) {
             $field = 'option_' . $str;
         }
     }
     return t3lib_BEfunc::wrapInHelp($context, $field, $label);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:23,代码来源:index.php

示例3: regularNew

    /**
     * Create a regular new element (pages and records)
     *
     * @return	void
     */
    function regularNew()
    {
        $doNotShowFullDescr = false;
        // Initialize array for accumulating table rows:
        $this->tRows = array();
        // tree images
        $halfLine = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/halfline.gif', 'width="18" height="8"') . ' alt="" />';
        $firstLevel = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/join.gif', 'width="18" height="16"') . ' alt="" />';
        $secondLevel = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
						<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/join.gif', 'width="18" height="16"') . ' alt="" />';
        $secondLevelLast = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
						<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"') . ' alt="" />';
        // Slight spacer from header:
        $this->code .= $halfLine;
        // New Page
        $table = 'pages';
        $v = $GLOBALS['TCA'][$table];
        $pageIcon = t3lib_iconWorks::getSpriteIconForRecord($table, array());
        $newPageIcon = t3lib_iconWorks::getSpriteIcon('actions-page-new');
        $rowContent = $firstLevel . $newPageIcon . '&nbsp;<strong>' . $GLOBALS['LANG']->getLL('createNewPage') . '</strong>';
        // New pages INSIDE this pages
        if ($this->newPagesInto && $this->isTableAllowedForThisPage($this->pageinfo, 'pages') && $GLOBALS['BE_USER']->check('tables_modify', 'pages') && $GLOBALS['BE_USER']->workspaceCreateNewRecord($this->pageinfo['_ORIG_uid'] ? $this->pageinfo['_ORIG_uid'] : $this->id, 'pages')) {
            // Create link to new page inside:
            $rowContent .= '<br />' . $secondLevel . $this->linkWrap(t3lib_iconWorks::getSpriteIconForRecord($table, array()) . $GLOBALS['LANG']->sL($v['ctrl']['title'], 1) . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.inside', 1) . ')', $table, $this->id);
        }
        // New pages AFTER this pages
        if ($this->newPagesAfter && $this->isTableAllowedForThisPage($this->pidInfo, 'pages') && $GLOBALS['BE_USER']->check('tables_modify', 'pages') && $GLOBALS['BE_USER']->workspaceCreateNewRecord($this->pidInfo['uid'], 'pages')) {
            $rowContent .= '<br />' . $secondLevel . $this->linkWrap($pageIcon . $GLOBALS['LANG']->sL($v['ctrl']['title'], 1) . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.after', 1) . ')', 'pages', -$this->id);
        }
        // Link to page-wizard:
        $rowContent .= '<br />' . $secondLevelLast . '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('pagesOnly' => 1))) . '">' . $pageIcon . htmlspecialchars($GLOBALS['LANG']->getLL('pageSelectPosition')) . '</a>';
        // Half-line:
        $rowContent .= '<br />' . $halfLine;
        // Compile table row to show the icon for "new page (select position)"
        $startRows = array();
        if ($this->showNewRecLink('pages')) {
            $startRows[] = '
				<tr>
					<td nowrap="nowrap">' . $rowContent . '</td>
					<td>' . t3lib_BEfunc::wrapInHelp($table, '') . '</td>
				</tr>
			';
        }
        // New tables (but not pages) INSIDE this pages
        $isAdmin = $GLOBALS['BE_USER']->isAdmin();
        $newContentIcon = t3lib_iconWorks::getSpriteIcon('actions-document-new');
        if ($this->newContentInto) {
            if (is_array($GLOBALS['TCA'])) {
                $groupName = '';
                foreach ($GLOBALS['TCA'] as $table => $v) {
                    $count = count($GLOBALS['TCA'][$table]);
                    $counter = 1;
                    if ($table != 'pages' && $this->showNewRecLink($table) && $this->isTableAllowedForThisPage($this->pageinfo, $table) && $GLOBALS['BE_USER']->check('tables_modify', $table) && (($v['ctrl']['rootLevel'] xor $this->id) || $v['ctrl']['rootLevel'] == -1) && $GLOBALS['BE_USER']->workspaceCreateNewRecord($this->pageinfo['_ORIG_uid'] ? $this->pageinfo['_ORIG_uid'] : $this->id, $table)) {
                        $newRecordIcon = t3lib_iconWorks::getSpriteIconForRecord($table, array());
                        $rowContent = '';
                        // Create new link for record:
                        $newLink = $this->linkWrap($newRecordIcon . $GLOBALS['LANG']->sL($v['ctrl']['title'], 1), $table, $this->id);
                        // If the table is 'tt_content' (from "cms" extension), create link to wizard
                        if ($table == 'tt_content') {
                            $groupName = $GLOBALS['LANG']->getLL('createNewContent');
                            $rowContent = $firstLevel . $newContentIcon . '&nbsp;<strong>' . $GLOBALS['LANG']->getLL('createNewContent') . '</strong>';
                            // If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's wizard instead:
                            $overrideExt = $this->web_list_modTSconfig['properties']['newContentWiz.']['overrideWithExtension'];
                            $pathToWizard = t3lib_extMgm::isLoaded($overrideExt) ? t3lib_extMgm::extRelPath($overrideExt) . 'mod1/db_new_content_el.php' : 'sysext/cms/layout/db_new_content_el.php';
                            $href = $pathToWizard . '?id=' . $this->id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
                            $rowContent .= '<br />' . $secondLevel . $newLink . '<br />' . $secondLevelLast . '<a href="' . htmlspecialchars($href) . '">' . $newContentIcon . htmlspecialchars($GLOBALS['LANG']->getLL('clickForWizard')) . '</a>';
                            // Half-line added:
                            $rowContent .= '<br />' . $halfLine;
                        } else {
                            // get the title
                            if ($v['ctrl']['readOnly'] || $v['ctrl']['hideTable'] || $v['ctrl']['is_static']) {
                                continue;
                            }
                            if ($v['ctrl']['adminOnly'] && !$isAdmin) {
                                continue;
                            }
                            $nameParts = explode('_', $table);
                            $thisTitle = '';
                            if ($nameParts[0] == 'tx' || $nameParts[0] == 'tt') {
                                // try to extract extension name
                                if (substr($v['ctrl']['title'], 0, 8) == 'LLL:EXT:') {
                                    $_EXTKEY = substr($v['ctrl']['title'], 8);
                                    $_EXTKEY = substr($_EXTKEY, 0, strpos($_EXTKEY, '/'));
                                    if ($_EXTKEY != '') {
                                        // first try to get localisation of extension title
                                        $temp = explode(':', substr($v['ctrl']['title'], 9 + strlen($_EXTKEY)));
                                        $langFile = $temp[0];
                                        $thisTitle = $GLOBALS['LANG']->sL('LLL:EXT:' . $_EXTKEY . '/' . $langFile . ':extension.title');
                                        // if no localisation available, read title from ext_emconf.php
                                        if (!$thisTitle && is_file(t3lib_extMgm::extPath($_EXTKEY) . 'ext_emconf.php')) {
                                            include t3lib_extMgm::extPath($_EXTKEY) . 'ext_emconf.php';
                                            $thisTitle = $EM_CONF[$_EXTKEY]['title'];
                                        }
                                        $iconFile[$_EXTKEY] = '<img src="' . t3lib_extMgm::extRelPath($_EXTKEY) . 'ext_icon.gif" />';
                                    } else {
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:db_new.php

示例4: main


//.........这里部分代码省略.........
					window.location.href = URL+(T3_RETURN_URL?"&returnUrl="+T3_RETURN_URL:"");
					return false;
				}

				function setHighlight(id)	{	//
					top.fsMod.recentIds["web"]=id;
					top.fsMod.navFrameHighlightedID["web"]="pages"+id+"_"+top.fsMod.currentBank;	// For highlighting

					if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)	{
						top.content.nav_frame.refresh_nav();
					}
				}
				' . $this->doc->redirectUrls($listUrl) . '
				' . $dblist->CBfunctions() . '
				function editRecords(table,idList,addParams,CBflag)	{	//
					window.location.href="' . $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&edit["+table+"]["+idList+"]=edit"+addParams;
				}
				function editList(table,idList)	{	//
					var list="";

						// Checking how many is checked, how many is not
					var pointer=0;
					var pos = idList.indexOf(",");
					while (pos!=-1)	{
						if (cbValue(table+"|"+idList.substr(pointer,pos-pointer))) {
							list+=idList.substr(pointer,pos-pointer)+",";
						}
						pointer=pos+1;
						pos = idList.indexOf(",",pointer);
					}
					if (cbValue(table+"|"+idList.substr(pointer))) {
						list+=idList.substr(pointer)+",";
					}

					return list ? list : idList;
				}

				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
			');
            // Setting up the context sensitive menu:
            $this->doc->getContextMenuCode();
        }
        // access
        // Begin to compile the whole page, starting out with page header:
        $this->body = '';
        $this->body .= '<form action="' . htmlspecialchars($dblist->listURL()) . '" method="post" name="dblistForm">';
        $this->body .= $dblist->HTMLcode;
        $this->body .= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
        // If a listing was produced, create the page footer with search form etc:
        if ($dblist->HTMLcode) {
            // Making field select box (when extended view for a single table is enabled):
            if ($dblist->table) {
                $this->body .= $dblist->fieldSelectBox($dblist->table);
            }
            // Adding checkbox options for extended listing and clipboard display:
            $this->body .= '

					<!--
						Listing options for extended view, clipboard and localization view
					-->
					<div id="typo3-listOptions">
						<form action="" method="post">';
            // Add "display bigControlPanel" checkbox:
            if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'selectable') {
                $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLargeControl"');
                $this->body .= '<label for="checkLargeControl">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('largeControl', TRUE)) . '</label><br />';
            }
            // Add "clipboard" checkbox:
            if ($this->modTSconfig['properties']['enableClipBoard'] === 'selectable') {
                if ($dblist->showClipboard) {
                    $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', $this->table ? '&table=' . $this->table : '', 'id="checkShowClipBoard"');
                    $this->body .= '<label for="checkShowClipBoard">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('showClipBoard', TRUE)) . '</label><br />';
                }
            }
            // Add "localization view" checkbox:
            if ($this->modTSconfig['properties']['enableLocalizationView'] === 'selectable') {
                $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLocalization"');
                $this->body .= '<label for="checkLocalization">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('localization', TRUE)) . '</label><br />';
            }
            $this->body .= '
						</form>
					</div>';
            // Printing clipboard if enabled:
            if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard) {
                $this->body .= $dblist->clipObj->printClipboard();
            }
            // Search box:
            $sectionTitle = t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_searchbox', $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.search', TRUE));
            $this->body .= $this->doc->section($sectionTitle, $dblist->getSearchBox(), FALSE, TRUE, FALSE, TRUE);
            // Display sys-notes, if any are found:
            $this->body .= $dblist->showSysNotesForPage();
        }
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $dblist->getButtons();
        $markers = array('CSH' => $docHeaderButtons['csh'], 'CONTENT' => $this->body);
        // Build the <body> for the module
        $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        // Renders the module page
        $this->content = $this->doc->render('DB list', $this->content);
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例5: printClipboard

    /**
     * Prints the clipboard
     *
     * @return	string		HTML output
     */
    function printClipboard()
    {
        global $TBE_TEMPLATE, $LANG;
        $out = array();
        $elCount = count($this->elFromTable($this->fileMode ? '_FILE' : ''));
        // Upper header
        $out[] = '
			<tr class="t3-row-header">
				<td colspan="3">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_clipboard', $this->clLabel('clipboard', 'buttons')) . '</td>
			</tr>';
        // Button/menu header:
        $thumb_url = t3lib_div::linkThisScript(array('CB' => array('setThumb' => $this->clipData['_setThumb'] ? 0 : 1)));
        $rmall_url = t3lib_div::linkThisScript(array('CB' => array('removeAll' => $this->current)));
        // Copymode Selector menu
        $copymode_url = t3lib_div::linkThisScript();
        $moveLabel = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.php:moveElements'));
        $copyLabel = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.php:copyElements'));
        $opt = array();
        $opt[] = '<option style="padding-left: 20px; background-image: url(\'' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/clip_cut.gif', '', 1) . '\'); background-repeat: no-repeat;" value="" ' . ($this->currentMode() == 'copy' ? '' : 'selected="selected"') . '>' . $moveLabel . '</option>';
        $opt[] = '<option style="padding-left: 20px; background-image: url(\'' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/clip_copy.gif', '', 1) . '\'); background-repeat: no-repeat;" value="1" ' . ($this->currentMode() == 'copy' ? 'selected="selected"' : '') . '>' . $copyLabel . '</option>';
        $copymode_selector = ' <select name="CB[setCopyMode]" onchange="this.form.method=\'POST\'; this.form.action=\'' . htmlspecialchars($copymode_url . '&CB[setCopyMode]=') . '\'+(this.options[this.selectedIndex].value); this.form.submit(); return true;" >' . implode('', $opt) . '</select>';
        // Selector menu + clear button
        $opt = array();
        $opt[] = '<option value="" selected="selected">' . $this->clLabel('menu', 'rm') . '</option>';
        // Import / Export link:
        if ($elCount && t3lib_extMgm::isLoaded('impexp')) {
            $opt[] = '<option value="' . htmlspecialchars("window.location.href='" . $this->backPath . t3lib_extMgm::extRelPath('impexp') . 'app/index.php' . $this->exportClipElementParameters() . '\';') . '">' . $this->clLabel('export', 'rm') . '</option>';
        }
        // Edit:
        if (!$this->fileMode && $elCount) {
            $opt[] = '<option value="' . htmlspecialchars("window.location.href='" . $this->editUrl() . "&returnUrl='+top.rawurlencode(window.location.href);") . '">' . $this->clLabel('edit', 'rm') . '</option>';
        }
        // Delete:
        if ($elCount) {
            if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
                $js = "\n\t\t\tif(confirm(" . $GLOBALS['LANG']->JScharCode(sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'), $elCount)) . ")){\n\t\t\t\twindow.location.href='" . $this->deleteUrl(0, $this->fileMode ? 1 : 0) . "&redirect='+top.rawurlencode(window.location.href);\n\t\t\t}\n\t\t\t\t\t";
            } else {
                $js = " window.location.href='" . $this->deleteUrl(0, $this->fileMode ? 1 : 0) . "&redirect='+top.rawurlencode(window.location.href); ";
            }
            $opt[] = '<option value="' . htmlspecialchars($js) . '">' . $this->clLabel('delete', 'rm') . '</option>';
        }
        $selector_menu = '<select name="_clipMenu" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">' . implode('', $opt) . '</select>';
        $out[] = '
			<tr class="typo3-clipboard-head">
				<td nowrap="nowrap">' . '<a href="' . htmlspecialchars($thumb_url) . '#clip_head">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/thumb_' . ($this->clipData['_setThumb'] ? 's' : 'n') . '.gif', 'width="21" height="16"') . ' vspace="2" border="0" title="' . $this->clLabel('thumbmode_clip') . '" alt="" />' . '</a>' . '</td>
				<td width="95%" nowrap="nowrap">' . $copymode_selector . ' ' . $selector_menu . '</td>
				<td>' . '<a href="' . htmlspecialchars($rmall_url) . '#clip_head">' . t3lib_iconWorks::getSpriteIcon('actions-document-close', array('title' => $LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear', TRUE))) . '</a></td>
			</tr>';
        // Print header and content for the NORMAL tab:
        $out[] = '
			<tr class="bgColor5">
				<td colspan="3"><a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('CB' => array('setP' => 'normal')))) . '#clip_head">' . t3lib_iconWorks::getSpriteIcon('actions-view-table-' . ($this->current == 'normal' ? 'collapse' : 'expand')) . $this->padTitleWrap('Normal', 'normal') . '</a></td>
			</tr>';
        if ($this->current == 'normal') {
            $out = array_merge($out, $this->printContentFromTab('normal'));
        }
        // Print header and content for the NUMERIC tabs:
        for ($a = 1; $a <= $this->numberTabs; $a++) {
            $out[] = '
				<tr class="bgColor5">
					<td colspan="3"><a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('CB' => array('setP' => 'tab_' . $a)))) . '#clip_head">' . t3lib_iconWorks::getSpriteIcon('actions-view-table-' . ($this->current == 'tab_' . $a ? 'collapse' : 'expand')) . $this->padTitleWrap($this->clLabel('cliptabs') . $a, 'tab_' . $a) . '</a></td>
				</tr>';
            if ($this->current == 'tab_' . $a) {
                $out = array_merge($out, $this->printContentFromTab('tab_' . $a));
            }
        }
        // Wrap accumulated rows in a table:
        $output = '<a name="clip_head"></a>

			<!--
				TYPO3 Clipboard:
			-->
			<table cellpadding="0" cellspacing="1" border="0" width="290" id="typo3-clipboard">
				' . implode('', $out) . '
			</table>';
        // Wrap in form tag:
        $output = '<form action="">' . $output . '</form>';
        // Return the accumulated content:
        return $output;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:85,代码来源:class.t3lib_clipboard.php

示例6: getAdditionalFields

 /**
  * Render additional information fields within the scheduler backend.
  *
  * @param	array		$taksInfo: array information of task to return
  * @param	task		$task: task object
  * @param	tx_scheduler_Module		$schedulerModule: reference to the calling object (BE module of the Scheduler)
  * @return	array		additional fields
  * @see interfaces/tx_scheduler_AdditionalFieldProvider#getAdditionalFields($taskInfo, $task, $schedulerModule)
  */
 public function getAdditionalFields(array &$taskInfo, $task, tx_scheduler_Module $schedulerModule)
 {
     $additionalFields = array();
     if (empty($taskInfo['configuration'])) {
         if ($schedulerModule->CMD == 'add') {
             $taskInfo['configuration'] = '';
         } elseif ($schedulerModule->CMD == 'edit') {
             $taskInfo['configuration'] = $task->getConfiguration();
         } else {
             $taskInfo['configuration'] = $task->getConfiguration();
         }
     }
     if (empty($taskInfo['depth'])) {
         if ($schedulerModule->CMD == 'add') {
             $taskInfo['depth'] = array();
         } elseif ($schedulerModule->CMD == 'edit') {
             $taskInfo['depth'] = $task->getDepth();
         } else {
             $taskInfo['depth'] = $task->getDepth();
         }
     }
     if (empty($taskInfo['page'])) {
         if ($schedulerModule->CMD == 'add') {
             $taskInfo['page'] = '';
         } elseif ($schedulerModule->CMD == 'edit') {
             $taskInfo['page'] = $task->getPage();
         } else {
             $taskInfo['page'] = $task->getPage();
         }
     }
     if (empty($taskInfo['email'])) {
         if ($schedulerModule->CMD == 'add') {
             $taskInfo['email'] = '';
         } elseif ($schedulerModule->CMD == 'edit') {
             $taskInfo['email'] = $task->getEmail();
         } else {
             $taskInfo['email'] = $task->getEmail();
         }
     }
     if (empty($taskInfo['emailOnBrokenLinkOnly'])) {
         if ($schedulerModule->CMD == 'add') {
             $taskInfo['emailOnBrokenLinkOnly'] = 1;
         } elseif ($schedulerModule->CMD == 'edit') {
             $taskInfo['emailOnBrokenLinkOnly'] = $task->getEmailOnBrokenLinkOnly();
         } else {
             $taskInfo['emailOnBrokenLinkOnly'] = $task->getEmailOnBrokenLinkOnly();
         }
     }
     if (empty($taskInfo['emailTemplateFile'])) {
         if ($schedulerModule->CMD == 'add') {
             $taskInfo['emailTemplateFile'] = 'EXT:linkvalidator/res/mailtemplate.html';
         } elseif ($schedulerModule->CMD == 'edit') {
             $taskInfo['emailTemplateFile'] = $task->getEmailTemplateFile();
         } else {
             $taskInfo['emailTemplateFile'] = $task->getEmailTemplateFile();
         }
     }
     $fieldID = 'task_page';
     $fieldCode = '<input type="text" name="tx_scheduler[linkvalidator][page]"  id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['page']) . '"/>';
     $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.validate.page');
     $label = t3lib_BEfunc::wrapInHelp('linkvalidator', $fieldID, $label);
     $additionalFields[$fieldID] = array('code' => $fieldCode, 'label' => $label);
     // input for depth
     $fieldID = 'task_depth';
     $fieldValueArray = array('0' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'), '1' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'), '2' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'), '3' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'), '4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_4'), '999' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi'));
     $fieldCode = '<select name="tx_scheduler[linkvalidator][depth]" id="' . $fieldID . '">';
     foreach ($fieldValueArray as $depth => $label) {
         $fieldCode .= "\t" . '<option value="' . htmlspecialchars($depth) . '"' . ($depth == $taskInfo['depth'] ? ' selected="selected"' : '') . '>' . $label . '</option>';
     }
     $fieldCode .= '</select>';
     $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.validate.depth');
     $label = t3lib_BEfunc::wrapInHelp('linkvalidator', $fieldID, $label);
     $additionalFields[$fieldID] = array('code' => $fieldCode, 'label' => $label);
     $fieldID = 'task_configuration';
     $fieldCode = '<textarea  name="tx_scheduler[linkvalidator][configuration]" id="' . $fieldID . '" >' . htmlspecialchars($taskInfo['configuration']) . '</textarea>';
     $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.validate.conf');
     $label = t3lib_BEfunc::wrapInHelp('linkvalidator', $fieldID, $label);
     $additionalFields[$fieldID] = array('code' => $fieldCode, 'label' => $label);
     $fieldID = 'task_email';
     $fieldCode = '<input type="text"  name="tx_scheduler[linkvalidator][email]" id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['email']) . '" />';
     $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.validate.email');
     $label = t3lib_BEfunc::wrapInHelp('linkvalidator', $fieldID, $label);
     $additionalFields[$fieldID] = array('code' => $fieldCode, 'label' => $label);
     $fieldID = 'task_emailOnBrokenLinkOnly';
     $fieldCode = '<input type="checkbox"  name="tx_scheduler[linkvalidator][emailOnBrokenLinkOnly]" id="' . $fieldID . '" ' . (htmlspecialchars($taskInfo['emailOnBrokenLinkOnly']) ? 'checked="checked"' : '') . ' />';
     $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.validate.emailOnBrokenLinkOnly');
     $label = t3lib_BEfunc::wrapInHelp('linkvalidator', $fieldID, $label);
     $additionalFields[$fieldID] = array('code' => $fieldCode, 'label' => $label);
     $fieldID = 'task_emailTemplateFile';
     $fieldCode = '<input type="text"  name="tx_scheduler[linkvalidator][emailTemplateFile]" id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['emailTemplateFile']) . '" />';
     $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.validate.emailTemplateFile');
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_linkvalidator_tasks_validatoradditionalfieldprovider.php

示例7: getSingleField_typeFlex_draw


//.........这里部分代码省略.........
									<td align="right">' . ($mayRestructureFlexforms ? t3lib_iconWorks::getSpriteIcon('actions-move-move', array('title' => 'Drag to Move')) : '') . ($mayRestructureFlexforms ? '<a href="#" onclick="' . htmlspecialchars($onClickRemove) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-delete', array('title' => 'Delete')) : '') . '</td>
									</tr>
								</table>';
                            $s = t3lib_div::revExplode('[]', $formPrefix, 2);
                            $actionFieldName = '_ACTION_FLEX_FORM' . $PA['itemFormElName'] . $s[0] . '][_ACTION][' . $s[1];
                            // Push the container to DynNestedStack as it may be toggled
                            $this->pushToDynNestedStack('flex', $idTagPrefix);
                            // Putting together the container:
                            $this->additionalJS_delete = array();
                            $output .= '
								<div id="' . $idTagPrefix . '" class="t3-form-field-container-flexsections">
									<input id="' . $idTagPrefix . '-action" type="hidden" name="' . htmlspecialchars($actionFieldName) . '" value=""/>

									' . $ctrlHeader . '
									<div class="t3-form-field-record-flexsection" id="' . $idTagPrefix . '-content"' . ($toggleClosed ? ' style="display:none;"' : '') . '>' . $this->getSingleField_typeFlex_draw($value['el'], $editData[$key]['el'], $table, $field, $row, $PA, $formPrefix . '[' . $key . '][el]', $level + 1, $idTagPrefix) . '
									</div>
									<input id="' . $idTagPrefix . '-toggleClosed" type="hidden" name="' . htmlspecialchars('data[' . $table . '][' . $row['uid'] . '][' . $field . ']' . $formPrefix . '[_TOGGLE]') . '" value="' . ($toggleClosed ? 1 : 0) . '" />
								</div>';
                            $output = str_replace('/*###REMOVE###*/', t3lib_div::slashJS(htmlspecialchars(implode('', $this->additionalJS_delete))), $output);
                            // NOTICE: We are saving the toggle-state directly in the flexForm XML and "unauthorized" according to the data structure. It means that flexform XML will report unclean and a cleaning operation will remove the recorded togglestates. This is not a fatal problem. Ideally we should save the toggle states in meta-data but it is much harder to do that. And this implementation was easy to make and with no really harmful impact.
                            // Pop the container from DynNestedStack
                            $this->popFromDynNestedStack('flex', $idTagPrefix);
                        }
                        // If it's a "single form element":
                    } elseif (is_array($value['TCEforms']['config'])) {
                        // Rendering a single form element:
                        if (is_array($PA['_valLang'])) {
                            $rotateLang = $PA['_valLang'];
                        } else {
                            $rotateLang = array($PA['_valLang']);
                        }
                        $conditionData = is_array($editData) ? $editData : array();
                        // add current $row to data processed by isDisplayCondition()
                        $conditionData['parentRec'] = $row;
                        $tRows = array();
                        foreach ($rotateLang as $vDEFkey) {
                            $vDEFkey = 'v' . $vDEFkey;
                            if (!$value['TCEforms']['displayCond'] || $this->isDisplayCondition($value['TCEforms']['displayCond'], $conditionData, $vDEFkey)) {
                                $fakePA = array();
                                $fakePA['fieldConf'] = array('label' => $this->sL(trim($value['TCEforms']['label'])), 'config' => $value['TCEforms']['config'], 'defaultExtras' => $value['TCEforms']['defaultExtras'], 'onChange' => $value['TCEforms']['onChange']);
                                if ($PA['_noEditDEF'] && $PA['_lang'] === 'lDEF') {
                                    $fakePA['fieldConf']['config'] = array('type' => 'none', 'rows' => 2);
                                }
                                if ($fakePA['fieldConf']['onChange'] == 'reload' || $GLOBALS['TCA'][$table]['ctrl']['type'] && !strcmp($key, $GLOBALS['TCA'][$table]['ctrl']['type']) || $GLOBALS['TCA'][$table]['ctrl']['requestUpdate'] && t3lib_div::inList($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'], $key)) {
                                    if ($GLOBALS['BE_USER']->jsConfirmation(1)) {
                                        $alertMsgOnChange = 'if (confirm(TBE_EDITOR.labels.onChangeAlert) && TBE_EDITOR.checkSubmit(-1)){ TBE_EDITOR.submitForm() };';
                                    } else {
                                        $alertMsgOnChange = 'if(TBE_EDITOR.checkSubmit(-1)){ TBE_EDITOR.submitForm();}';
                                    }
                                } else {
                                    $alertMsgOnChange = '';
                                }
                                $fakePA['fieldChangeFunc'] = $PA['fieldChangeFunc'];
                                if (strlen($alertMsgOnChange)) {
                                    $fakePA['fieldChangeFunc']['alert'] = $alertMsgOnChange;
                                }
                                $fakePA['onFocus'] = $PA['onFocus'];
                                $fakePA['label'] = $PA['label'];
                                $fakePA['itemFormElName'] = $PA['itemFormElName'] . $formPrefix . '[' . $key . '][' . $vDEFkey . ']';
                                $fakePA['itemFormElName_file'] = $PA['itemFormElName_file'] . $formPrefix . '[' . $key . '][' . $vDEFkey . ']';
                                $fakePA['itemFormElID'] = $fakePA['itemFormElName'];
                                if (isset($editData[$key][$vDEFkey])) {
                                    $fakePA['itemFormElValue'] = $editData[$key][$vDEFkey];
                                } else {
                                    $fakePA['itemFormElValue'] = $fakePA['fieldConf']['config']['default'];
                                }
                                $theFormEl = $this->getSingleField_SW($table, $field, $row, $fakePA);
                                $theTitle = htmlspecialchars($fakePA['fieldConf']['label']);
                                if (!in_array('DEF', $rotateLang)) {
                                    $defInfo = '<div class="typo3-TCEforms-originalLanguageValue">' . $this->getLanguageIcon($table, $row, 0) . $this->previewFieldValue($editData[$key]['vDEF'], $fakePA['fieldConf'], $field) . '&nbsp;</div>';
                                } else {
                                    $defInfo = '';
                                }
                                if (!$PA['_noEditDEF']) {
                                    $prLang = $this->getAdditionalPreviewLanguages();
                                    foreach ($prLang as $prL) {
                                        $defInfo .= '<div class="typo3-TCEforms-originalLanguageValue">' . $this->getLanguageIcon($table, $row, 'v' . $prL['ISOcode']) . $this->previewFieldValue($editData[$key]['v' . $prL['ISOcode']], $fakePA['fieldConf'], $field) . '&nbsp;</div>';
                                    }
                                }
                                $languageIcon = '';
                                if ($vDEFkey != 'vDEF') {
                                    $languageIcon = $this->getLanguageIcon($table, $row, $vDEFkey);
                                }
                                // Put row together
                                // possible linebreaks in the label through xml: \n => <br/>, usage of nl2br() not possible, so it's done through str_replace
                                $processedTitle = str_replace('\\n', '<br />', $theTitle);
                                $tRows[] = '<div class="t3-form-field-container t3-form-field-container-flex">' . '<div class="t3-form-field-label t3-form-field-label-flex">' . $languageIcon . t3lib_BEfunc::wrapInHelp($PA['_cshKey'], $key, $processedTitle) . '</div>
									<div class="t3-form-field t3-form-field-flex">' . $theFormEl . $defInfo . $this->renderVDEFDiff($editData[$key], $vDEFkey) . '</div>
								</div>';
                            }
                        }
                        if (count($tRows)) {
                            $output .= implode('', $tRows);
                        }
                    }
                }
            }
        }
        return $output;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.t3lib_tceforms.php

示例8: headerCol

 /**
  * Returns the header column (for the extension details item), and applies help text if available
  *
  * @param	string	field key
  * @return	string	HTML ready to go
  */
 function headerCol($key)
 {
     $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_' . $key);
     return t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_' . $key, $headerCol);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:11,代码来源:class.tx_em_extensions_details.php

示例9: showExtDetails


//.........这里部分代码省略.........
                    die(sprintf($GLOBALS['LANG']->getLL('ext_details_fatal_edit_error'), htmlspecialchars($editFile)));
                }
            } else {
                // MAIN:
                switch ((string) $this->MOD_SETTINGS['singleDetails']) {
                    case 'info':
                        // Loaded / Not loaded:
                        if (!in_array($extKey, $this->requiredExt)) {
                            if ($TYPO3_LOADED_EXT[$extKey]) {
                                $content = '<strong>' . $GLOBALS['LANG']->getLL('ext_details_loaded_and_running') . '</strong><br />' . '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('CMD[showExt]' => $extKey, 'CMD[remove]' => 1))) . '">' . $GLOBALS['LANG']->getLL('ext_details_remove_button') . ' ' . tx_em_Tools::removeButton() . '</a>';
                            } else {
                                $content = $GLOBALS['LANG']->getLL('ext_details_not_loaded') . '<br />' . '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('CMD[showExt]' => $extKey, 'CMD[load]' => 1))) . '">' . $GLOBALS['LANG']->getLL('ext_details_install_button') . ' ' . tx_em_Tools::installButton() . '</a>';
                            }
                        } else {
                            $content = $GLOBALS['LANG']->getLL('ext_details_always_loaded');
                        }
                        $this->content .= $this->doc->spacer(10);
                        $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('ext_details_current_status'), $content, 0, 1);
                        if (t3lib_extMgm::isLoaded($extKey)) {
                            $updates = $this->install->updatesForm($extKey, $list[$extKey]);
                            if ($updates) {
                                $this->content .= $this->doc->spacer(10);
                                $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('ext_details_update_needed'), $updates . '<br /><br />' . $GLOBALS['LANG']->getLL('ext_details_notice_static_data'), 0, 1);
                            }
                        }
                        // Config:
                        if (@is_file($absPath . 'ext_conf_template.txt')) {
                            $this->content .= $this->doc->spacer(10);
                            $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('ext_details_configuration'), $GLOBALS['LANG']->getLL('ext_details_notice_clear_cache') . '<br /><br />', 0, 1);
                            $this->content .= $this->install->tsStyleConfigForm($extKey, $list[$extKey]);
                        }
                        // Show details:
                        $headline = $GLOBALS['LANG']->getLL('ext_details_details');
                        $headline = t3lib_BEfunc::wrapInHelp('_MOD_tools_em', 'info', $headline);
                        $content = $this->extensionDetails->extInformationarray($extKey, $list[$extKey]);
                        $this->content .= $this->doc->spacer(10);
                        $this->content .= $this->doc->section($headline, $content, FALSE, TRUE, FALSE, TRUE);
                        break;
                    case 'upload':
                        $em = t3lib_div::_POST('em');
                        if ($em['action'] == 'doUpload') {
                            $em['extKey'] = $extKey;
                            $em['extInfo'] = $list[$extKey];
                            $content = $this->extensionDetails->uploadExtensionToTER($em);
                            $content .= $this->doc->spacer(10);
                            // Must reload this, because EM_CONF information has been updated!
                            list($list, ) = $this->extensionList->getInstalledExtensions();
                        } else {
                            // headline and CSH
                            $headline = $GLOBALS['LANG']->getLL('ext_details_upload_to_ter');
                            $headline = t3lib_BEfunc::wrapInHelp('_MOD_tools_em', 'upload', $headline);
                            // Upload:
                            if (substr($extKey, 0, 5) != 'user_') {
                                $content = $this->getRepositoryUploadForm($extKey, $list[$extKey]);
                                $eC = 0;
                            } else {
                                $content = $GLOBALS['LANG']->getLL('ext_details_no_unique_ext');
                                $eC = 2;
                            }
                            if (!$this->fe_user['username']) {
                                $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', sprintf($GLOBALS['LANG']->getLL('ext_details_no_username'), '<a href="' . t3lib_div::linkThisScript(array('SET[function]' => 3)) . '">', '</a>'), '', t3lib_FlashMessage::INFO);
                                $content .= '<br />' . $flashMessage->render();
                            }
                        }
                        $this->content .= $this->doc->section($headline, $content, 0, 1, $eC, TRUE);
                        break;
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:67,代码来源:index.php

示例10: renderListContent


//.........这里部分代码省略.........
                     if ($this->MOD_SETTINGS['function'] == 4) {
                         // grid view
                         $dblist->tt_contentConfig['showAsGrid'] = 1;
                     }
                     // Setting up the tt_content columns to show:
                     if (is_array($TCA['tt_content']['columns']['colPos']['config']['items'])) {
                         $colList = array();
                         $tcaItems = t3lib_div::callUserFunction('EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getColPosListItemsParsed', $this->id, $this);
                         foreach ($tcaItems as $temp) {
                             $colList[] = $temp[1];
                         }
                     } else {
                         // ... should be impossible that colPos has no array. But this is the fallback should it make any sense:
                         $colList = array('1', '0', '2', '3');
                     }
                     if (strcmp($this->colPosList, '')) {
                         $colList = array_intersect(t3lib_div::intExplode(',', $this->colPosList), $colList);
                     }
                     // If only one column found, display the single-column view.
                     if (count($colList) === 1 && !$this->MOD_SETTINGS['function'] === 4) {
                         $dblist->tt_contentConfig['single'] = 1;
                         // Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown in the total width of the page
                         $dblist->tt_contentConfig['showSingleCol'] = current($colList);
                         // The column(s) to show if single mode (under each other)
                     }
                     $dblist->tt_contentConfig['cols'] = implode(',', $colList);
                     // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
                     $dblist->tt_contentConfig['showHidden'] = $this->MOD_SETTINGS['tt_content_showHidden'];
                     $dblist->tt_contentConfig['sys_language_uid'] = intval($this->current_sys_language);
                     // If the function menu is set to "Language":
                     if ($this->MOD_SETTINGS['function'] == 2) {
                         $dblist->tt_contentConfig['single'] = 0;
                         $dblist->tt_contentConfig['languageMode'] = 1;
                         $dblist->tt_contentConfig['languageCols'] = $this->MOD_MENU['language'];
                         $dblist->tt_contentConfig['languageColsPointer'] = $this->current_sys_language;
                     }
                     break;
             }
         } else {
             if (isset($this->MOD_SETTINGS) && isset($this->MOD_MENU)) {
                 $h_func = t3lib_BEfunc::getFuncMenu($this->id, 'SET[' . $table . ']', $this->MOD_SETTINGS[$table], $this->MOD_MENU[$table], 'db_layout.php', '');
             } else {
                 $h_func = '';
             }
         }
         // Start the dblist object:
         $dblist->itemsLimitSingleTable = 1000;
         $dblist->start($this->id, $table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
         $dblist->counter = $CMcounter;
         $dblist->ext_function = $this->MOD_SETTINGS['function'];
         // Render versioning selector:
         $dblist->HTMLcode .= $this->doc->getVersionSelector($this->id);
         // Generate the list of elements here:
         $dblist->generateList();
         // Adding the list content to the tableOutput variable:
         $tableOutput[$table] = ($h_func ? $h_func . '<br /><img src="clear.gif" width="1" height="4" alt="" /><br />' : '') . $dblist->HTMLcode . ($h_func_b ? '<img src="clear.gif" width="1" height="10" alt="" /><br />' . $h_func_b : '');
         // ... and any accumulated JavaScript goes the same way!
         $tableJSOutput[$table] = $dblist->JScode;
         // Increase global counter:
         $CMcounter += $dblist->counter;
         // Reset variables after operation:
         $dblist->HTMLcode = '';
         $dblist->JScode = '';
         $h_func = '';
         $h_func_b = '';
     }
     // END: traverse tables
     // For Context Sensitive Menus:
     $this->doc->getContextMenuCode();
     // Now, create listing based on which element is selected in the function menu:
     if ($this->MOD_SETTINGS['function'] == 3) {
         // Making page info:
         $content .= $this->doc->spacer(10);
         $content .= $this->doc->section($LANG->getLL('pageInformation'), $dblist->getPageInfoBox($this->pageinfo, $this->CALC_PERMS & 2), 0, 1);
     } else {
         // Add the content for each table we have rendered (traversing $tableOutput variable)
         foreach ($tableOutput as $table => $output) {
             $content .= $this->doc->section('<a name="' . $table . '"></a>' . $dblist->activeTables[$table], $output, TRUE, TRUE, 0, TRUE);
             $content .= $this->doc->spacer(15);
             $content .= $this->doc->sectionEnd();
         }
         // Making search form:
         if (!$this->modTSconfig['properties']['disableSearchBox'] && count($tableOutput)) {
             $sectionTitle = t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_searchbox', $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.search', TRUE));
             $content .= $this->doc->section($sectionTitle, $dblist->getSearchBox(0), FALSE, TRUE, FALSE, TRUE);
         }
         // Making display of Sys-notes (from extension "sys_note")
         $dblist->id = $this->id;
         $sysNotes = $dblist->showSysNotesForPage();
         if ($sysNotes) {
             $content .= $this->doc->spacer(10);
             $content .= $this->doc->section($LANG->getLL('internalNotes'), $sysNotes, 0, 1);
         }
         // Add spacer in bottom of page:
         $content .= $this->doc->spacer(10);
     }
     // Ending page:
     $content .= $this->doc->spacer(10);
     return $content;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:db_layout.php

示例11: translationHandling

    /**
     * Renders translation module
     *
     * @return string or direct output
     */
    public function translationHandling()
    {
        global $LANG, $TYPO3_LOADED_EXT;
        $LANG->includeLLFile('EXT:setup/mod/locallang.xml');
        //prepare docheader
        $docHeaderButtons = $this->parentObject->getButtons();
        $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => $this->parentObject->getFuncMenu());
        $content = '';
        $incoming = t3lib_div::_POST('SET');
        if (isset($incoming['selectedLanguages']) && is_array($incoming['selectedLanguages'])) {
            t3lib_BEfunc::getModuleData($this->parentObject->MOD_MENU, array('selectedLanguages' => serialize($incoming['selectedLanguages'])), $this->parentObject->MCONF['name'], '', 'selectedLanguages');
            $this->parentObject->MOD_SETTINGS['selectedLanguages'] = serialize($incoming['selectedLanguages']);
        }
        $selectedLanguages = unserialize($this->parentObject->MOD_SETTINGS['selectedLanguages']);
        if (count($selectedLanguages) == 1 && empty($selectedLanguages[0])) {
            $selectedLanguages = array();
        }
        $theLanguages = t3lib_div::trimExplode('|', TYPO3_languages);
        foreach ($theLanguages as $val) {
            if ($val != 'default') {
                $localLabel = '  -  [' . htmlspecialchars($GLOBALS['LOCAL_LANG']['default']['lang_' . $val]) . ']';
                $selected = is_array($selectedLanguages) && in_array($val, $selectedLanguages) ? ' selected="selected"' : '';
                $opt[$GLOBALS['LANG']->getLL('lang_' . $val, 1) . '--' . $val] = '
			 <option value="' . $val . '"' . $selected . '>' . $LANG->getLL('lang_' . $val, 1) . $localLabel . '</option>';
            }
        }
        ksort($opt);
        $headline = $GLOBALS['LANG']->getLL('translation_settings');
        $headline = t3lib_BEfunc::wrapInHelp('_MOD_tools_em', 'translation', $headline);
        // Prepare the HTML output:
        $content .= '
			<form action="' . $this->parentObject->script . '" method="post" name="translationform">
			<fieldset><legend>' . $GLOBALS['LANG']->getLL('translation_settings') . '</legend>
			<table border="0" cellpadding="2" cellspacing="2">
				<tr class="bgColor4">
					<td>' . $GLOBALS['LANG']->getLL('languages_to_fetch') . '</td>
					<td>
					  <select name="SET[selectedLanguages][]" multiple="multiple" size="10">
					  <option>&nbsp;</option>' . implode('', $opt) . '
			</select>
		  </td>
				</tr>
			</table>
			<br />
			<p>' . $GLOBALS['LANG']->getLL('translation_info') . '<br />
			<br />' . $GLOBALS['LANG']->getLL('translation_loaded_exts') . '</p>
			</fieldset>
			<br />
			<input type="submit" value="' . $GLOBALS['LANG']->getLL('translation_save_selection') . '" />
			<br />
			</form>';
        $this->parentObject->content .= $this->parentObject->doc->section($headline, $content, FALSE, TRUE, FALSE, TRUE);
        if (count($selectedLanguages) > 0) {
            $mirrorURL = $this->parentObject->getMirrorURL();
            $content = '<input type="button" value="' . $GLOBALS['LANG']->getLL('translation_check_status_button') . '" onclick="document.location.href=\'' . htmlspecialchars(t3lib_div::linkThisScript(array('l10n' => 'check'))) . '\'" />&nbsp;<input type="button" value="' . $GLOBALS['LANG']->getLL('translation_update_button') . '" onclick="document.location.href=\'' . htmlspecialchars(t3lib_div::linkThisScript(array('l10n' => 'update'))) . '\'" />';
            // as this page loads dynamically, quit output buffering caused by ob_gzhandler
            t3lib_div::cleanOutputBuffers();
            if (t3lib_div::_GET('l10n') == 'check') {
                $loadedExtensions = array_keys($TYPO3_LOADED_EXT);
                $loadedExtensions = array_diff($loadedExtensions, array('_CACHEFILE'));
                // Override content output - we now do that ourselves:
                $this->parentObject->content .= $this->parentObject->doc->section($GLOBALS['LANG']->getLL('translation_status'), $content, 0, 1);
                // Setting up the buttons and markers for docheader
                $content = $this->parentObject->doc->startPage('Extension Manager');
                $content .= $this->parentObject->doc->moduleBody($this->parentObject->pageinfo, $docHeaderButtons, $markers);
                $contentParts = explode('###CONTENT###', $content);
                echo $contentParts[0] . $this->parentObject->content;
                $this->parentObject->doPrintContent = FALSE;
                flush();
                echo '
				<br />
				<br />
				<p id="progress-message">
					' . $GLOBALS['LANG']->getLL('translation_check_status') . '
				</p>
				<br />
				<div style="width:100%; height:20px; border: 1px solid black;">
					<div id="progress-bar" style="float: left; width: 0%; height: 20px; background-color:green;">&nbsp;</div>
					<div id="transparent-bar" style="float: left; width: 100%; height: 20px; background-color:' . $this->parentObject->doc->bgColor2 . ';">&nbsp;</div>
				</div>
				<br />
				<br /><p>' . $GLOBALS['LANG']->getLL('translation_table_check') . '</p><br />
				<table border="0" cellpadding="2" cellspacing="2">
					<tr class="t3-row-header"><td>' . $GLOBALS['LANG']->getLL('translation_extension_key') . '</td>
				';
                foreach ($selectedLanguages as $lang) {
                    echo '<td>' . $LANG->getLL('lang_' . $lang, 1) . '</td>';
                }
                echo '</tr>';
                $counter = 1;
                foreach ($loadedExtensions as $extKey) {
                    $percentDone = intval($counter / count($loadedExtensions) * 100);
                    echo '
					<script type="text/javascript">
						document.getElementById("progress-bar").style.width = "' . $percentDone . '%";
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_em_translations.php

示例12: getTemplateMarkers

 /**
  * Gets the filled markers that are used in the HTML template.
  *
  * @return	array		The filled marker array
  */
 protected function getTemplateMarkers()
 {
     $markers = array('CSH' => t3lib_BEfunc::wrapInHelp('_MOD_tools_txschedulerM1', ''), 'FUNC_MENU' => $this->getFunctionMenu(), 'CONTENT' => $this->content, 'TITLE' => $GLOBALS['LANG']->getLL('title'));
     return $markers;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:10,代码来源:index.php

示例13: getCheckOptions

 /**
  * Builds the checkboxes out of the hooks array.
  *
  * @param array $brokenLinkOverView array of broken links information
  * @return string code content
  */
 protected function getCheckOptions(array $brokenLinkOverView, $prefix = '')
 {
     $markerArray = array();
     $additionalAttr = '';
     if (!empty($prefix)) {
         $additionalAttr = ' onclick="toggleActionButton(\'' . $prefix . '\');" class="' . $prefix . '" ';
     } else {
         $additionalAttr = ' onclick="toggleActionButton(\'refresh\');" class="refresh" ';
     }
     $checkOptionsTemplate = t3lib_parsehtml::getSubpart($this->doc->moduleTemplate, '###CHECKOPTIONS_SECTION###');
     $hookSectionContent = '';
     $hookSectionTemplate = t3lib_parsehtml::getSubpart($checkOptionsTemplate, '###HOOK_SECTION###');
     $markerArray['statistics_header'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('report.statistics.header'));
     $totalCountLabel = $GLOBALS['LANG']->getLL('overviews.nbtotal');
     $totalCountLabel = t3lib_BEfunc::wrapInHelp('linkvalidator', 'checkboxes', $totalCountLabel);
     $markerArray['total_count_label'] = $totalCountLabel;
     if (empty($brokenLinkOverView['brokenlinkCount'])) {
         $markerArray['total_count'] = '0';
     } else {
         $markerArray['total_count'] = $brokenLinkOverView['brokenlinkCount'];
     }
     $linktypes = t3lib_div::trimExplode(',', $this->modTS['linktypes'], 1);
     $hookSectionContent = '';
     if (is_array($linktypes)) {
         if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks']) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
             foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $type => $value) {
                 if (in_array($type, $linktypes)) {
                     $hookSectionMarker = array();
                     if (empty($brokenLinkOverView[$type])) {
                         $hookSectionMarker['count'] = '0';
                     } else {
                         $hookSectionMarker['count'] = $brokenLinkOverView[$type];
                     }
                     $translation = $GLOBALS['LANG']->getLL('hooks.' . $type);
                     $translation = $translation ? $translation : $type;
                     $option = '<input type="checkbox" ' . $additionalAttr . '  id="' . $prefix . 'SET_' . $type . '" name="' . $prefix . 'SET[' . $type . ']" value="1"' . ($this->pObj->MOD_SETTINGS[$type] ? ' checked="checked"' : '') . '/>' . '<label for="' . $prefix . 'SET[' . $type . ']">' . htmlspecialchars($translation) . '</label>';
                     $hookSectionMarker['option'] = $option;
                     $hookSectionContent .= t3lib_parsehtml::substituteMarkerArray($hookSectionTemplate, $hookSectionMarker, '###|###', TRUE, TRUE);
                 }
             }
         }
     }
     $checkOptionsTemplate = t3lib_parsehtml::substituteSubpart($checkOptionsTemplate, '###HOOK_SECTION###', $hookSectionContent);
     return t3lib_parsehtml::substituteMarkerArray($checkOptionsTemplate, $markerArray, '###|###', TRUE, TRUE);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:51,代码来源:class.tx_linkvalidator_modfuncreport.php


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