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 unset($MCONF);
00052 require('conf.php');
00053 require($BACK_PATH.'init.php');
00054 require($BACK_PATH.'template.php');
00055 $LANG->includeLLFile('EXT:lang/locallang_mod_web_info.xml');
00056 require_once (PATH_t3lib.'class.t3lib_scbase.php');
00057 require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
00058
00059 $BE_USER->modAccess($MCONF,1);
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 class SC_mod_web_info_index extends t3lib_SCbase {
00072
00073
00074 var $be_user_Array;
00075 var $CALC_PERMS;
00076 var $pageinfo;
00077
00078
00079
00080
00081
00082
00083 var $doc;
00084
00085
00086
00087
00088
00089
00090 function main() {
00091 global $BE_USER,$LANG,$BACK_PATH;
00092
00093
00094
00095 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
00096 $access = is_array($this->pageinfo) ? 1 : 0;
00097
00098 if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id)) {
00099 $this->CALC_PERMS = $BE_USER->calcPerms($this->pageinfo);
00100 if ($BE_USER->user['admin'] && !$this->id) {
00101 $this->pageinfo=array('title' => '[root-level]','uid'=>0,'pid'=>0);
00102 }
00103
00104 $this->doc = t3lib_div::makeInstance('template');
00105 $this->doc->backPath = $BACK_PATH;
00106 $this->doc->setModuleTemplate('templates/info.html');
00107 $this->doc->tableLayout = Array (
00108 '0' => Array (
00109 '0' => Array('<td valign="top"><b>','</b></td>'),
00110 "defCol" => Array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><b>','</b></td>')
00111 ),
00112 "defRow" => Array (
00113 "0" => Array('<td valign="top">','</td>'),
00114 "defCol" => Array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top">','</td>')
00115 )
00116 );
00117
00118
00119 $this->doc->JScode = $this->doc->wrapScriptTags('
00120 script_ended = 0;
00121 function jumpToUrl(URL) {
00122 window.location.href = URL;
00123 }
00124 ');
00125 $this->doc->postCode = $this->doc->wrapScriptTags('
00126 script_ended = 1;
00127 if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
00128 ');
00129
00130
00131 $this->doc->getContextMenuCode();
00132 $this->doc->form = '<form action="index.php" method="post" name="webinfoForm">';
00133
00134 $vContent = $this->doc->getVersionSelector($this->id,1);
00135 if ($vContent) {
00136 $this->content.=$this->doc->section('',$vContent);
00137 }
00138
00139 $this->extObjContent();
00140
00141
00142 $docHeaderButtons = $this->getButtons();
00143 $markers = array(
00144 'CSH' => $docHeaderButtons['csh'],
00145 'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
00146 'CONTENT' => $this->content
00147 );
00148
00149
00150 $this->content = $this->doc->startPage($LANG->getLL('title'));
00151 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
00152 $this->content.= $this->doc->endPage();
00153 $this->content = $this->doc->insertStylesAndJS($this->content);
00154 } else {
00155
00156 $this->doc = t3lib_div::makeInstance('mediumDoc');
00157 $this->doc->backPath = $BACK_PATH;
00158
00159 $this->content.=$this->doc->startPage($LANG->getLL('title'));
00160 $this->content.=$this->doc->header($LANG->getLL('title'));
00161 $this->content.=$this->doc->spacer(5);
00162 $this->content.=$this->doc->spacer(10);
00163 $this->content.= $this->doc->endPage();
00164 $this->content = $this->doc->insertStylesAndJS($this->content);
00165 }
00166 }
00167
00168
00169
00170
00171
00172
00173 function printContent() {
00174 $this->content = $this->doc->insertStylesAndJS($this->content);
00175 echo $this->content;
00176 }
00177
00178
00179
00180
00181
00182
00183 protected function getButtons() {
00184 global $TCA, $LANG, $BACK_PATH, $BE_USER;
00185
00186 $buttons = array(
00187 'csh' => '',
00188 'view' => '',
00189 'record_list' => '',
00190 'shortcut' => '',
00191 );
00192
00193 $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH'], '', TRUE);
00194
00195
00196 $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
00197 '<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="" />' .
00198 '</a>';
00199
00200
00201 if ($BE_USER->mayMakeShortcut()) {
00202 $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']);
00203 }
00204
00205
00206 if ($BE_USER->check('modules','web_list')) {
00207 $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
00208 $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
00209 '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
00210 '</a>';
00211 }
00212 return $buttons;
00213 }
00214
00215 }
00216
00217 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php']) {
00218 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php']);
00219 }
00220
00221
00222
00223
00224 $SOBE = t3lib_div::makeInstance('SC_mod_web_info_index');
00225 $SOBE->init();
00226
00227
00228 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
00229 $SOBE->checkExtObj();
00230
00231
00232 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
00233 $SOBE->checkSubExtObj();
00234
00235 $SOBE->main();
00236 $SOBE->printContent();
00237
00238 ?>