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
00036 unset($MCONF);
00037 require ("conf.php");
00038 require ($BACK_PATH."init.php");
00039
00040 require_once (PATH_t3lib."class.t3lib_page.php");
00041 $BE_USER->modAccess($MCONF,1);
00042
00043
00044
00045
00046
00047
00048 class SC_mod_web_view_index {
00049 var $MCONF=array();
00050 var $MOD_MENU=array();
00051 var $MOD_SETTINGS=array();
00052
00053 var $perms_clause;
00054 var $modTSconfig;
00055 var $type;
00056 var $pageinfo;
00057 var $url;
00058 var $id;
00059
00060 function init() {
00061 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
00062 $this->MCONF = $GLOBALS["MCONF"];
00063 $this->id = intval(t3lib_div::_GP("id"));
00064
00065 $this->perms_clause = $BE_USER->getPagePermsClause(1);
00066
00067
00068 $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,"mod.".$this->MCONF["name"]);
00069 $this->type = intval($this->modTSconfig["properties"]["type"]);
00070 }
00071 function main() {
00072 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
00073
00074
00075 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
00076 $access = is_array($this->pageinfo) ? 1 : 0;
00077 $addCmd="";
00078 if ($this->id && $access) {
00079 $addCmd = "&ADMCMD_view=1&ADMCMD_editIcons=1".t3lib_BEfunc::ADMCMD_previewCmds($this->pageinfo);
00080 }
00081
00082 $parts = parse_url(t3lib_div::getIndpEnv("TYPO3_SITE_URL"));
00083 $dName = t3lib_BEfunc::getDomainStartPage($parts["host"],$parts["path"]) ?
00084 t3lib_BEfunc::firstDomainRecord(t3lib_BEfunc::BEgetRootLine($this->id)):
00085 "";
00086
00087 $this->url.= ($dName?"http://".$dName:$BACK_PATH."..")."/index.php?id=".$this->id.($this->type?"&type=".$this->type:"").$addCmd;
00088
00089 }
00090 function printContent() {
00091 Header("Location: ".t3lib_div::locationHeaderUrl($this->url));
00092 }
00093 }
00094
00095
00096 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/viewpage/view/index.php"]) {
00097 include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/viewpage/view/index.php"]);
00098 }
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 $SOBE = t3lib_div::makeInstance("SC_mod_web_view_index");
00113 $SOBE->init();
00114 $SOBE->main();
00115 $SOBE->printContent();
00116 ?>