Documentation TYPO3 par Ameos

wizard_list.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2004 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 ***************************************************************/
00052 $BACK_PATH='';
00053 require ('init.php');
00054 require ('template.php');
00055 $LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00074 class SC_wizard_list {
00075 
00076                 // Internal, static:
00077         var $pid;                                       // PID
00078 
00079                 // Internal, static: GPvars
00080         var $P;                                         // Wizard parameters, coming from TCEforms linking to the wizard.
00081         var $table;                                     // Table to show, if none, then all tables are listed in list module.
00082         var $id;                                        // Page id to list.
00083 
00084 
00085 
00086 
00087 
00093         function init() {
00094                 $this->P = t3lib_div::_GP('P');
00095                 $this->table = t3lib_div::_GP('table');
00096                 $this->id = t3lib_div::_GP('id');
00097         }
00098 
00105         function main() {
00106 
00107                         // Get this record
00108                 $origRow = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
00109 
00110                         // Get TSconfig for it.
00111                 $TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($this->table,is_array($origRow)?$origRow:array('pid'=>$this->P['pid']));
00112 
00113                         // Set [params][pid]
00114                 if (substr($this->P['params']['pid'],0,3)=='###' && substr($this->P['params']['pid'],-3)=='###')        {
00115                         $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'],3,-3)]);
00116                 } else $this->pid = intval($this->P['params']['pid']);
00117 
00118                         // Make redirect:
00119                 if (!strcmp($this->pid,'') || strcmp($this->id,''))     {       // If pid is blank OR if id is set, then return...
00120                         header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl']));
00121                 } else {        // Otherwise, show the list:
00122                         header('Location: '.t3lib_div::locationHeaderUrl('db_list.php?id='.$this->pid.'&table='.$this->P['params']['table'].'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))));
00123                 }
00124         }
00125 }
00126 
00127 // Include extension?
00128 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_list.php'])   {
00129         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_list.php']);
00130 }
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 // Make instance:
00144 $SOBE = t3lib_div::makeInstance('SC_wizard_list');
00145 $SOBE->init();
00146 $SOBE->main();
00147 $SOBE->printContent();
00148 ?>


Généré par Les experts TYPO3 avec  doxygen 1.4.6