00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 unset($MCONF);
00053 require('conf.php');
00054 require($BACK_PATH.'init.php');
00055 require($BACK_PATH.'template.php');
00056 $LANG->includeLLFile('EXT:lang/locallang_mod_web_func.xml');
00057 require_once(PATH_t3lib.'class.t3lib_scbase.php');
00058 require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
00059
00060 $BE_USER->modAccess($MCONF,1);
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 class SC_mod_web_func_index extends t3lib_SCbase {
00073
00074
00075 var $pageinfo;
00076 var $fileProcessor;
00077
00078
00079
00080
00081
00082
00083 var $doc;
00084
00085
00086
00087
00088
00089
00090
00091
00092 function main() {
00093 global $BE_USER,$LANG,$BACK_PATH;
00094
00095
00096
00097 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
00098 $access = is_array($this->pageinfo) ? 1 : 0;
00099
00100
00101 $markers = array(
00102 'CSH' => '',
00103 'FUNC_MENU' => '',
00104 'CONTENT' => ''
00105 );
00106
00107 $this->doc = t3lib_div::makeInstance('template');
00108 $this->doc->backPath = $BACK_PATH;
00109 $this->doc->setModuleTemplate('templates/func.html');
00110
00111
00112
00113
00114 if ($this->id && $access) {
00115
00116 $this->doc->JScode = $this->doc->wrapScriptTags('
00117 script_ended = 0;
00118 function jumpToUrl(URL) {
00119 window.location.href = URL;
00120 }
00121 ');
00122 $this->doc->postCode=$this->doc->wrapScriptTags('
00123 script_ended = 1;
00124 if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
00125 ');
00126
00127
00128
00129 $this->doc->getContextMenuCode();
00130
00131 $this->doc->form='<form action="index.php" method="post"><input type="hidden" name="id" value="'.$this->id.'" />';
00132
00133 $vContent = $this->doc->getVersionSelector($this->id,1);
00134 if ($vContent) {
00135 $this->content.=$this->doc->section('',$vContent);
00136 }
00137
00138
00139 $this->extObjContent();
00140
00141
00142 $docHeaderButtons = $this->getButtons();
00143 $markers['CSH'] = $docHeaderButtons['csh'];
00144 $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
00145 $markers['CONTENT'] = $this->content;
00146 } else {
00147
00148 $this->content = $this->doc->section($LANG->getLL('title'), $LANG->getLL('clickAPage_content'), 0, 1);
00149
00150
00151 $docHeaderButtons = $this->getButtons();
00152 $markers['CSH'] = $docHeaderButtons['csh'];
00153 $markers['CONTENT'] = $this->content;
00154 }
00155
00156 $this->content = $this->doc->startPage($LANG->getLL('title'));
00157 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
00158 $this->content.= $this->doc->endPage();
00159 $this->content = $this->doc->insertStylesAndJS($this->content);
00160 }
00161
00162
00163
00164
00165
00166
00167 function printContent() {
00168 echo $this->content;
00169 }
00170
00171
00172
00173
00174
00175
00176 protected function getButtons() {
00177 global $TCA, $LANG, $BACK_PATH, $BE_USER;
00178
00179 $buttons = array(
00180 'csh' => '',
00181 'view' => '',
00182 'record_list' => '',
00183 'shortcut' => '',
00184 );
00185
00186 $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'], '', TRUE);
00187
00188 if($this->id && is_array($this->pageinfo)) {
00189
00190
00191 $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
00192 '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
00193 '</a>';
00194
00195
00196 if ($BE_USER->mayMakeShortcut()) {
00197 $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']);
00198 }
00199
00200
00201 if ($BE_USER->check('modules','web_list')) {
00202 $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
00203 $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
00204 '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
00205 '</a>';
00206 }
00207 }
00208
00209 return $buttons;
00210 }
00211 }
00212
00213
00214 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/func/index.php']) {
00215 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/func/index.php']);
00216 }
00217
00218
00219
00220
00221 $SOBE = t3lib_div::makeInstance('SC_mod_web_func_index');
00222 $SOBE->init();
00223
00224
00225 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
00226 $SOBE->checkExtObj();
00227
00228
00229 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
00230 $SOBE->checkSubExtObj();
00231
00232 $SOBE->main();
00233 $SOBE->printContent();
00234
00235 ?>