本文整理汇总了PHP中t3lib_BEfunc::getModuleUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::getModuleUrl方法的具体用法?PHP t3lib_BEfunc::getModuleUrl怎么用?PHP t3lib_BEfunc::getModuleUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_BEfunc
的用法示例。
在下文中一共展示了t3lib_BEfunc::getModuleUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderDoktype_254
/**
* Displays the edit page screen if the currently selected page is of the doktype "Sysfolder"
*
* @param array $pageRecord: The current page record
* @return mixed HTML output from this submodule or FALSE if this submodule doesn't feel responsible
* @access public
*/
function renderDoktype_254($pageRecord)
{
global $LANG, $BE_USER, $TYPO3_CONF_VARS;
// Prepare the record icon including a content sensitive menu link wrapped around it:
$pageTitle = htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle('pages', $pageRecord), 50));
$recordIcon = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord);
$iconEdit = t3lib_iconWorks::getSpriteIcon('actions-document-open', array('title' => htmlspecialchars($LANG->sL('LLL:EXT:lang/locallang_mod_web_list.xml:editPage'))));
$editButton = $this->pObj->link_edit($iconEdit, 'pages', $pageRecord['uid']);
if ($this->userHasAccessToListModule()) {
if (tx_templavoila_div::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
$listModuleURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'db_list.php?id=' . intval($this->pObj->id);
} else {
$listModuleURL = t3lib_BEfunc::getModuleUrl('web_list', array('id' => intval($this->pObj->id)), '');
}
$onClick = "top.nextLoadModuleUrl='" . $listModuleURL . "';top.fsMod.recentIds['web']=" . intval($this->pObj->id) . ";top.goToModule('web_list',1);";
$listModuleLink = '<br /><br />' . t3lib_iconWorks::getSpriteIcon('actions-system-list-open') . '<strong><a href="#" onClick="' . $onClick . '">' . $LANG->getLL('editpage_sysfolder_switchtolistview', '', 1) . '</a></strong>
';
} else {
$listModuleLink = $LANG->getLL('editpage_sysfolder_listview_noaccess', '', 1);
}
$flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('editpage_sysfolder_intro', '', 1), '', t3lib_FlashMessage::INFO);
$content = $flashMessage->render() . $listModuleLink;
return $content;
}
示例2: renderTableMenu
/**
* Rendering the table select menu:
*
* @return string HTML
*/
function renderTableMenu()
{
// Create menu options:
$opt = array();
$opt[] = '
<option value=""></option>';
foreach ($GLOBALS['TCA'] as $tableName => $cfg) {
$opt[] = '
<option value="' . htmlspecialchars($tableName) . '"' . ($this->tableName == $tableName ? ' selected="selected"' : '') . '>' . htmlspecialchars($GLOBALS['LANG']->sL($cfg['ctrl']['title'])) . '</option>';
}
// Compile selector box menu:
$content = '
<p><strong>Select table:</strong></p>
<select onchange="' . htmlspecialchars('document.location = \'' . t3lib_BEfunc::getModuleUrl('tools_txextdevevalM1') . '&tableName=\'+this.options[this.selectedIndex].value') . '">
' . implode('', $opt) . '
</select>
<hr />
';
// Return selector box menu:
return $content;
}
示例3: getDocHeaderButtons
/**
* Create the panel of buttons for submitting the form or otherwise perform operations.
*
* @param string Identifier for function of module
* @return array all available buttons as an assoc. array
*/
protected function getDocHeaderButtons()
{
global $TCA, $LANG, $BACK_PATH, $BE_USER;
$buttons = array('csh' => '', 'view' => '', 'history_page' => '', 'move_page' => '', 'move_record' => '', 'new_page' => '', 'edit_page' => '', 'record_list' => '', 'shortcut' => '', 'cache' => '');
// View page
$viewAddGetVars = $this->currentLanguageUid ? '&L=' . $this->currentLanguageUid : '';
$buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->id), '', '', $viewAddGetVars)) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-view', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1))) . '</a>';
// Shortcut
if ($BE_USER->mayMakeShortcut()) {
$buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
}
// If access to Web>List for user, then link to that module.
if ($BE_USER->check('modules', 'web_list')) {
if (tx_templavoila_div::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
$href = $GLOBALS['BACK_PATH'] . 'db_list.php?id=' . $this->id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
} else {
$href = t3lib_BEfunc::getModuleUrl('web_list', array('id' => $this->id, 'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI')));
}
$buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' . t3lib_iconWorks::getSpriteIcon('actions-system-list-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1))) . '</a>';
}
if (!$this->modTSconfig['properties']['disableIconToolbar']) {
// Page history
$buttons['history_page'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode('pages:' . $this->id) . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '#latest\');return false;') . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-history-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:recordHistory', 1))) . '</a>';
if (!$this->translatorMode && $GLOBALS['BE_USER']->isPSet($this->calcPerms, 'pages', 'new')) {
// Create new page (wizard)
$buttons['new_page'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'db_new.php?id=' . $this->id . '&pagesOnly=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI') . '&updatePageTree=true') . '\');return false;') . '">' . t3lib_iconWorks::getSpriteIcon('actions-page-new', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:newPage', 1))) . '</a>';
}
if (!$this->translatorMode && $GLOBALS['BE_USER']->isPSet($this->calcPerms, 'pages', 'edit')) {
// Edit page properties
$params = '&edit[pages][' . $this->id . ']=edit';
$buttons['edit_page'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $BACK_PATH)) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:editPageProperties', 1))) . '</a>';
// Move page
$buttons['move_page'] = '<a href="' . htmlspecialchars($BACK_PATH . 'move_el.php?table=pages&uid=' . $this->id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-page-move', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:move_page', 1))) . '</a>';
}
$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txtemplavoilaM1', 'pagemodule', $BACK_PATH);
if ($this->id) {
$cacheUrl = $GLOBALS['BACK_PATH'] . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . t3lib_BEfunc::getUrlToken('tceAction') . '&redirect=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&cacheCmd=' . $this->id;
$buttons['cache'] = '<a href="' . $cacheUrl . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear') . '</a>';
}
}
return $buttons;
}
示例4: createEventRegistrationsLink
/**
* Creates a link to the registrations page, showing the attendees for the
* given event UID.
*
* @param tx_seminars_seminar $event
* the event to show the registrations for, must be >= 0
*
* @return string the URL to the registrations tab with the registration for
* the current event, will not be empty
*/
private function createEventRegistrationsLink(tx_seminars_seminar $event)
{
$pageData = $this->page->getPageData();
$url = t3lib_BEfunc::getModuleUrl(self::MODULE_NAME, array('id' => $pageData['uid'], 'subModule' => '2', 'eventUid' => $event->getUid()));
return '<a href="' . htmlspecialchars($url) . '">' . $GLOBALS['LANG']->getLL('label_show_event_registrations') . '</a>';
}
示例5: 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;
// Apply predefined values for hidden checkboxes
// Set predefined value for DisplayBigControlPanel:
if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'activated') {
$this->MOD_SETTINGS['bigControlPanel'] = TRUE;
} elseif ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'deactivated') {
$this->MOD_SETTINGS['bigControlPanel'] = FALSE;
}
// Set predefined value for Clipboard:
if ($this->modTSconfig['properties']['enableClipBoard'] === 'activated') {
$this->MOD_SETTINGS['clipBoard'] = TRUE;
} elseif ($this->modTSconfig['properties']['enableClipBoard'] === 'deactivated') {
$this->MOD_SETTINGS['clipBoard'] = FALSE;
}
// Set predefined value for LocalizationView:
if ($this->modTSconfig['properties']['enableLocalizationView'] === 'activated') {
$this->MOD_SETTINGS['localization'] = TRUE;
} elseif ($this->modTSconfig['properties']['enableLocalizationView'] === 'deactivated') {
$this->MOD_SETTINGS['localization'] = FALSE;
}
// Initialize the dblist object:
$dblist = t3lib_div::makeInstance('localRecordList');
$dblist->backPath = $BACK_PATH;
$dblist->script = t3lib_BEfunc::getModuleUrl('web_list', array(), '');
$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'])) {
//.........这里部分代码省略.........
示例6: linkItemText
/**
* Wraps the title of the items listed in link-tags. The items will link to the page/folder where they originate from
*
* @param string Title of element - must be htmlspecialchar'ed on beforehand.
* @param mixed If array, a record is expected. If string, its a path
* @param string Table name
* @return string
*/
function linkItemText($str, $rec, $table = '')
{
if (is_array($rec) && $table) {
if ($this->fileMode) {
$str = $GLOBALS['TBE_TEMPLATE']->dfw($str);
} else {
if (t3lib_extMgm::isLoaded('recordlist')) {
$str = '<a href="' . htmlspecialchars(t3lib_BEfunc::getModuleUrl('web_list', array('id' => $rec['pid']), $this->backPath)) . '">' . $str . '</a>';
}
}
} elseif (file_exists($rec)) {
if (!$this->fileMode) {
$str = $GLOBALS['TBE_TEMPLATE']->dfw($str);
} else {
if (t3lib_extMgm::isLoaded('filelist')) {
$str = '<a href="' . htmlspecialchars($this->backPath . t3lib_extMgm::extRelPath('filelist') . 'mod1/file_list.php?id=' . dirname($rec)) . '">' . $str . '</a>';
}
}
}
return $str;
}
示例7: wrapTitle
/**
* wraps the record titles in the tree with links or not depending on if they are in the TCEforms_nonSelectableItemsArray.
*
* @param string $title: the title
* @param array $v: an array with uid and title of the current item.
* @return string the wrapped title
*/
function wrapTitle($title, $v)
{
// TODO: language overlay
if ($v['uid'] > 0) {
$hrefTitle = htmlentities('[id=' . $v['uid'] . '] ' . $v['description']);
$js = htmlspecialchars('txttnewsM1js.loadList(\'' . $v['uid'] . '\', $(\'ttnewslist\'), \'' . intval($this->pageID) . '\');');
$out = '<a href="#" onclick="' . $js . '" title="' . $hrefTitle . '">' . $title . '</a>';
// Wrap title in a drag/drop span.
$out = '<span class="dragTitle" id="dragTitleID_' . $v['uid'] . '">' . $out . '</span>';
if ($this->showEditIcons) {
$out .= $this->makeControl('tt_news_cat', $v);
}
} else {
$grsp = '';
if ($this->storagePid != $this->pageID) {
$grsp = ' GRSP';
}
if ($this->useStoragePid) {
$pidLbl = sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang_tca.xml:tt_news.treeSelect.pageTitleSuffix'), $this->storagePid . $grsp);
} else {
$pidLbl = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang_tca.xml:tt_news.treeSelect.pageTitleSuffixNoGrsp');
}
$pidLbl = ' <span class="typo3-dimmed"><em>' . $pidLbl . '</em></span>';
$hrefTitle = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/mod1/locallang.xml:showAllResetSel');
$out = '<span class="dragTitle" id="dragTitleID_0">
<a href="' . t3lib_BEfunc::getModuleUrl('web_txttnewsM1') . '&id=' . $this->pageID . '" title="' . $hrefTitle . '">' . $title . '</a>
</span>' . $pidLbl;
}
return $out;
}
示例8: redirectToListView
/**
* Redirects to the list view.
*
* @return void
*/
private function redirectToListView()
{
$url = t3lib_BEfunc::getModuleUrl(self::MODULE_NAME, array('id' => tx_oelib_PageFinder::getInstance()->getPageUid()), FALSE, TRUE);
tx_oelib_headerProxyFactory::getInstance()->getHeaderProxy()->addHeader('Location: ' . $url);
}
示例9: main
//.........这里部分代码省略.........
// Fallback label
}
if ($sc_group >= 0) {
$onC = 'if (confirm(' . $GLOBALS['LANG']->JScharCode($LANG->getLL('bookmark_delAllInCat')) . ')){window.location.href=\'alt_shortcut.php?deleteCategory=' . $sc_group . '\';}return false;';
$this->linesPre[] = '<td> </td><td class="bgColor5"><a href="#" onclick="' . htmlspecialchars($onC) . '" title="' . $LANG->getLL('bookmark_delAllInCat', 1) . '">' . $label . '</a></td>';
} else {
$label = $LANG->getLL('bookmark_global', 1) . ': ' . ($label ? $label : abs($sc_group));
// Fallback label
$this->lines[] = '<td> </td><td class="bgColor5">' . $label . '</td>';
}
unset($label);
}
}
$bgColorClass = $row['uid'] == $this->editSC ? 'bgColor5' : ($row['sc_group'] < 0 ? 'bgColor6' : 'bgColor4');
if ($row['description'] && $row['uid'] != $this->editSC) {
$label = $row['description'];
} else {
$label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']), 150);
}
$titleA = $this->itemLabel($label, $row['module_name'], $row['M_module_name']);
$editSH = $row['sc_group'] >= 0 || $BE_USER->isAdmin() ? 'editSh(' . intval($row['uid']) . ');' : "alert('" . $LANG->getLL('bookmark_onlyAdmin') . "')";
$jumpSC = 'jump(unescape(\'' . rawurlencode($row['url']) . '\'),\'' . implode('_', $mParts) . '\',\'' . $mParts[0] . '\');';
$onC = 'if (document.shForm.editShortcut_check && document.shForm.editShortcut_check.checked){' . $editSH . '}else{' . $jumpSC . '}return false;';
if ($sc_group >= 0) {
// user defined groups show up first
$this->linesPre[] = '<td class="' . $bgColorClass . '"><a href="#" onclick="' . htmlspecialchars($onC) . '"><img src="' . $this->getIcon($row['module_name']) . '" title="' . htmlspecialchars($titleA) . '" alt="" /></a></td>';
} else {
$this->lines[] = '<td class="' . $bgColorClass . '"><a href="#" onclick="' . htmlspecialchars($onC) . '"><img src="' . $this->getIcon($row['module_name']) . '" title="' . htmlspecialchars($titleA) . '" alt="" /></a></td>';
}
if (trim($row['description'])) {
$kkey = strtolower(substr($row['description'], 0, 20)) . '_' . $row['uid'];
$this->selOpt[$kkey] = '<option value="' . htmlspecialchars($jumpSC) . '">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['description'], 50)) . '</option>';
}
$formerGr = $row['sc_group'];
}
ksort($this->selOpt);
array_unshift($this->selOpt, '<option>[' . $LANG->getLL('bookmark_selSC', 1) . ']</option>');
$this->editLoadedFunc();
$this->editPageIdFunc();
if (!$this->editLoaded && t3lib_extMgm::isLoaded('cms')) {
$editIdCode = '<td nowrap="nowrap">' . $LANG->getLL('bookmark_editID', 1) . ': <input type="text" value="' . ($this->editError ? htmlspecialchars($this->editPage) : '') . '" name="editPage"' . $this->doc->formWidth(15) . ' onchange="submitEditPage(this.value);" />' . ($this->editError ? ' <strong><span class="typo3-red">' . htmlspecialchars($this->editError) . '</span></strong>' : '') . (is_array($this->theEditRec) ? ' <strong>' . $LANG->getLL('bookmark_loadEdit', 1) . ' \'' . t3lib_BEfunc::getRecordTitle('pages', $this->theEditRec, TRUE) . '\'</strong> (' . htmlspecialchars($this->editPath) . ')' : '') . ($this->searchFor ? ' ' . $LANG->getLL('bookmark_searchFor', 1) . ' <strong>\'' . htmlspecialchars($this->searchFor) . '\'</strong>' : '') . '</td>';
} else {
$editIdCode = '';
}
// Adding CSH:
$editIdCode .= '<td> ' . t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'bookmarks', $GLOBALS['BACK_PATH'], '', TRUE) . '</td>';
// Compile it all:
$this->content .= '
<table border="0" cellpadding="0" cellspacing="0" width="99%">
<tr>
<td>
<!--
Shortcut Display Table:
-->
<table border="0" cellpadding="0" cellspacing="2" id="typo3-shortcuts">
<tr>
';
// "Shortcuts" have been renamed to "Bookmarks"
// @deprecated remove shortcuts code in TYPO3 4.7
$useShortcuts = $GLOBALS['BE_USER']->getTSConfigVal('options.enableShortcuts');
$useBookmarks = $GLOBALS['BE_USER']->getTSConfigVal('options.enableBookmarks');
if ($useShortcuts || $useBookmarks) {
$this->content .= implode('
', $this->lines);
if ($useShortcuts) {
t3lib_div::deprecationLog('options.enableShortcuts - since TYPO3 4.5, will be removed in TYPO3 4.7 - use options.enableBookmarks instead');
}
}
$this->content .= $editIdCode . '
</tr>
</table>
</td>
<td align="right">';
if ($this->hasWorkspaceAccess()) {
$this->content .= $this->workspaceSelector() . t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'workspaceSelector', $GLOBALS['BACK_PATH'], '', TRUE);
}
$this->content .= '
</td>
</tr>
</table>
';
// Launch Edit page:
if ($this->theEditRec['uid']) {
$this->content .= $this->doc->wrapScriptTags('top.loadEditId(' . $this->theEditRec['uid'] . ');');
}
// Load alternative table/uid into editing form.
if (count($this->alternativeTableUid) == 2 && isset($TCA[$this->alternativeTableUid[0]]) && t3lib_div::testInt($this->alternativeTableUid[1])) {
$JSaction = t3lib_BEfunc::editOnClick('&edit[' . $this->alternativeTableUid[0] . '][' . $this->alternativeTableUid[1] . ']=edit', '', 'dummy.php');
$this->content .= $this->doc->wrapScriptTags('function editArbitraryElement() { top.content.' . $JSaction . '; } editArbitraryElement();');
}
// Load search for something.
if ($this->searchFor) {
$urlParameters = array();
$urlParameters['id'] = intval($GLOBALS['WEBMOUNTS'][0]);
$urlParameters['search_field'] = $this->searchFor;
$urlParameters['search_levels'] = 4;
$this->content .= $this->doc->wrapScriptTags('jump(unescape("' . rawurlencode(t3lib_BEfunc::getModuleUrl('web_list', $urlParameters, '')) . '"), "web_list", "web");');
}
}
示例10: listURL
/**
* Creates the URL to this script, including all relevant GPvars
* Fixed GPvars are id, table, imagemode, returlUrl, search_field, search_levels and showLimit
* The GPvars "sortField" and "sortRev" are also included UNLESS they are found in the $exclList variable.
*
* @param string Alternative id value. Enter blank string for the current id ($this->id)
* @param string Tablename to display. Enter "-1" for the current table.
* @param string Commalist of fields NOT to include ("sortField" or "sortRev")
* @return string URL
*/
function listURL($altId = '', $table = '', $exclList = '')
{
return t3lib_BEfunc::getModuleUrl('web_txttnewsM1') . '&id=' . (strcmp($altId, '') ? $altId : $this->id) . ($this->thumbs ? '&showThumbs=' . $this->thumbs : '') . ($this->searchString ? '&search_field=' . rawurlencode($this->searchString) : '') . ($this->searchLevels ? '&searchLevels=' . rawurlencode($this->searchLevels) : '') . ($this->showLimit ? '&showLimit=' . rawurlencode($this->showLimit) : '') . ($this->firstElementNumber ? '&pointer=' . rawurlencode($this->firstElementNumber) : '') . ((!$exclList || !t3lib_div::inList($exclList, 'sortField')) && $this->sortField ? '&sortField=' . rawurlencode($this->sortField) : '') . ((!$exclList || !t3lib_div::inList($exclList, 'sortRev')) && $this->sortRev ? '&sortRev=' . rawurlencode($this->sortRev) : '') . ($this->category ? '&category=' . $this->category : '');
}
示例11: main
/**
* Main function
* Will issue a location-header, redirecting either BACK or to a new alt_doc.php instance...
*
* @return void
*/
function main()
{
// Get this record
$origRow = t3lib_BEfunc::getRecord($this->P['table'], $this->P['uid']);
// Get TSconfig for it.
$TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($this->table, is_array($origRow) ? $origRow : array('pid' => $this->P['pid']));
// Set [params][pid]
if (substr($this->P['params']['pid'], 0, 3) == '###' && substr($this->P['params']['pid'], -3) == '###') {
$this->pid = intval($TSconfig['_' . substr($this->P['params']['pid'], 3, -3)]);
} else {
$this->pid = intval($this->P['params']['pid']);
}
// Make redirect:
if (!strcmp($this->pid, '') || strcmp($this->id, '')) {
// If pid is blank OR if id is set, then return...
$redirectUrl = t3lib_div::sanitizeLocalUrl($this->P['returnUrl']);
} else {
// Otherwise, show the list:
$urlParameters = array();
$urlParameters['id'] = $this->pid;
$urlParameters['table'] = $this->P['params']['table'];
$urlParameters['returnUrl'] = t3lib_div::getIndpEnv('REQUEST_URI');
$redirectUrl = t3lib_BEfunc::getModuleUrl('web_list', $urlParameters);
}
t3lib_utility_Http::redirect($redirectUrl);
}
示例12: getCsvIcon
/**
* Returns a "CSV export" image tag that is linked to the CSV export,
* corresponding to the list that is visible in the BE.
*
* This icon is intended to be used next to the "create new record" icon.
*
* @return string the HTML source code of the linked CSV icon
*/
protected function getCsvIcon()
{
$pageData = $this->page->getPageData();
$langCsv = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.csv', 1);
$csvUrl = t3lib_BEfunc::getModuleUrl(self::MODULE_NAME, array('id' => $pageData['uid'], 'csv' => '1', 'tx_seminars_pi2[table]' => $this->tableName));
$result = TAB . TAB . '<div id="typo3-csvLink">' . LF . TAB . TAB . TAB . '<a href="' . htmlspecialchars($csvUrl) . $this->getAdditionalCsvParameters() . '">' . LF . TAB . TAB . TAB . TAB . '<img src="/' . t3lib_extMgm::siteRelPath('seminars') . 'Resources/Public/Icons/Csv.gif" title="' . $langCsv . '" alt="" class="icon" />' . TAB . TAB . TAB . TAB . $langCsv . LF . TAB . TAB . TAB . '</a>' . LF . TAB . TAB . '</div>' . LF;
return $result;
}
示例13: DB_db_list
/**
* Adding CM element for DBlist
*
* @param string Table name
* @param integer UID for the current record.
* @param array Record of the element (needs "pid" field if not pages-record)
* @return array Item array, element in $menuItems
* @internal
*/
function DB_db_list($table, $uid, $rec)
{
$urlParams = array();
$urlParams['id'] = $table == 'pages' ? $uid : $rec['pid'];
$urlParams['table'] = $table == 'pages' ? '' : $table;
$url = t3lib_BEfunc::getModuleUrl('web_list', $urlParams, '', TRUE);
return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')), $this->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-system-list-open')), "top.nextLoadModuleUrl='" . $url . "';top.goToModule('web_list',1);", 0);
}
示例14: linkLogRun
/**
* Assemble the link to select a single log run
*
* @param string $str Link text
* @param integer $logRun Id of the log run (microtime)
* @return string
*/
function linkLogRun($str, $logRun)
{
$url = t3lib_BEfunc::getModuleUrl($GLOBALS['MCONF']['name'], array('SET' => array('logrun' => $logRun)));
$content = '<a href="' . $url . '">' . $str . '</a>';
return $content;
}
示例15: array
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* This is a wrapper file for direct calls to list module.
* It's deprecated since 4.5, use proper link generation.
*
* @author Steffen Kamper <steffen@typo3.com>
* @deprecated
*
*/
require 'init.php';
$query = t3lib_div::getIndpEnv('QUERY_STRING');
t3lib_div::deprecationLog('The list module is a system extension now, do not link to this file.' . LF . 'Referer: ' . t3lib_div::getIndpEnv('HTTP_REFERER'));
if (t3lib_extMgm::isLoaded('recordlist')) {
t3lib_utility_Http::redirect(t3lib_BEfunc::getModuleUrl('web_list', array(), '', TRUE) . '&' . $query);
} else {
$title = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:extension.not.installed'), 'list');
$message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:link.to.dblist.correctly');
throw new RuntimeException($title . ': ' . $message);
}