"TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/viewpage/view/index.php Source File", "datetime" => "Sat Dec 2 19:22:17 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>

index.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00049 unset($MCONF);
00050 require ('conf.php');
00051 require ($BACK_PATH.'init.php');
00052 //require ($BACK_PATH.'template.php');
00053 require_once (PATH_t3lib.'class.t3lib_page.php');
00054 $BE_USER->modAccess($MCONF,1);
00055 
00056 
00057 
00065 class SC_mod_web_view_index {
00066         var $MCONF=array();
00067         var $MOD_MENU=array();
00068         var $MOD_SETTINGS=array();
00069 
00070         var $perms_clause;
00071         var $modTSconfig;
00072         var $type;
00073         var $pageinfo;
00074         var $url;
00075         var $id;
00076         var $wsInstruction='';
00077 
00083         function init() {
00084                 global $BE_USER;
00085 
00086                 $this->MCONF = $GLOBALS['MCONF'];
00087                 $this->id = intval(t3lib_div::_GP('id'));
00088 
00089                 $this->perms_clause = $BE_USER->getPagePermsClause(1);
00090 
00091                         // page/be_user TSconfig settings and blinding of menu-items
00092                 $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,'mod.'.$this->MCONF['name']);
00093                 $this->type = intval($this->modTSconfig['properties']['type']);
00094         }
00095 
00101         function main() {
00102                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
00103 
00104                         // Access check...
00105                         // The page will show only if there is a valid page and if this page may be viewed by the user
00106                 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
00107                 $access = is_array($this->pageinfo) ? 1 : 0;
00108                 $addCmd='';
00109                 if ($this->id && $access)       {
00110                         $addCmd = '&ADMCMD_view=1&ADMCMD_editIcons=1'.t3lib_BEfunc::ADMCMD_previewCmds($this->pageinfo);
00111                 }
00112 
00113                 $parts = parse_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
00114                 $dName = t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path']) ?
00115                                                 t3lib_BEfunc::firstDomainRecord(t3lib_BEfunc::BEgetRootLine($this->id)):
00116                                                 '';
00117 
00118                 $this->url.= ($dName?(t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$dName:$BACK_PATH.'..').'/index.php?id='.$this->id.($this->type?'&type='.$this->type:'').$addCmd;
00119                 //debug($this->url);
00120         }
00121 
00127         function printContent() {
00128                 Header('Location: '.t3lib_div::locationHeaderUrl($this->url));
00129         }
00130 }
00131 
00132 // Include extension?
00133 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/viewpage/view/index.php'])     {
00134         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/viewpage/view/index.php']);
00135 }
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 
00148 // Make instance:
00149 $SOBE = t3lib_div::makeInstance('SC_mod_web_view_index');
00150 $SOBE->init();
00151 $SOBE->main();
00152 $SOBE->printContent();
00153 ?>