[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 # CMS - CMS Made Simple 3 # (c)2004-6 by Ted Kulp (ted@cmsmadesimple.org) 4 # This project's homepage is: http://cmsmadesimple.org 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; either version 2 of the License, or 9 # (at your option) any later version. 10 # 11 # This program is distributed in the hope that it will be useful, 12 # BUT withOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # GNU General Public License for more details. 15 # You should have received a copy of the GNU General Public License 16 # along with this program; if not, write to the Free Software 17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 # 19 #$Id$ 20 21 /** 22 * Methods for modules to do redirection related functions 23 * 24 * @since 1.0 25 * @package CMS 26 */ 27 28 function cms_module_Redirect(&$modinstance, $id, $action, $returnid='', $params=array(), $inline=false) 29 { 30 global $gCms; 31 $config = $gCms->config; 32 33 $name = $modinstance->GetName(); 34 35 #Suggestion by Calguy to make sure 2 actions don't get sent 36 if (isset($params['action'])) 37 { 38 unset($params['action']); 39 } 40 if (isset($params['id'])) 41 { 42 unset($params['id']); 43 } 44 if (isset($params['module'])) 45 { 46 unset($params['module']); 47 } 48 49 if (!$inline && $returnid != '') 50 $id = 'cntnt01'; 51 52 $text = ''; 53 if ($returnid != '') 54 { 55 $text .= 'index.php'; 56 } 57 else 58 { 59 $text .= 'moduleinterface.php'; 60 } 61 #$text .= '?module='.$name.'&'.$id.'action='.$action.'&id='.$id; 62 $text .= '?mact='.$name.','.$id.','.$action.','.($inline == true?1:0); 63 if ($returnid != '') 64 { 65 $text .= '&'.$id.'returnid='.$returnid; 66 } 67 foreach ($params as $key=>$value) 68 { 69 $text .= '&'.$id.$key.'='.rawurlencode($value); 70 } 71 #var_dump($text); 72 redirect($text); 73 } 74 75 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |