[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/ -> preview.php (source)

   1  <?php
   2  #CMS - CMS Made Simple
   3  #(c)2004 by Ted Kulp (wishy@users.sf.net)
   4  #This project's homepage is: http://cmsmadesimple.sf.net
   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: preview.php 3729 2007-01-05 03:59:25Z wishy $
  20  
  21  require_once(dirname(__FILE__)."/include.php");
  22  #require_once(dirname(__FILE__)."/lib/preview.functions.php");
  23  
  24  #$smarty = new Smarty_Preview($config);
  25  #$gCms->smarty = &$smarty;
  26  
  27  #$smarty = new Smarty_CMS($config);
  28  #$gCms->smarty = &$smarty;
  29  
  30  $page = "";
  31  
  32  if (isset($_GET["tmpfile"]) && $_GET["tmpfile"] != "")
  33  {
  34      $page = $_GET["tmpfile"];
  35      $page = str_replace("..", "", $page);
  36      $page = str_replace("\\", "", $page);
  37      $page = str_replace("/", "", $page);
  38      
  39      $page = htmlentities($page);
  40  
  41      #header("Content-Language: " . $current_language);
  42      #header("Content-Type: text/html; charset=" . get_encoding());
  43  
  44      $html = $smarty->fetch('preview:'.$page);
  45  
  46      #Perform the content postrender callback
  47      reset($gCms->modules);
  48      while (list($key) = each($gCms->modules))
  49      {
  50          $value =& $gCms->modules[$key];
  51          if ($gCms->modules[$key]['installed'] == true &&
  52              $gCms->modules[$key]['active'] == true)
  53          {
  54              $gCms->modules[$key]['object']->ContentPostRender($html);
  55          }
  56      }
  57      
  58      Events::SendEvent('Core', 'ContentPostRender', array('content' => &$html));
  59  
  60      echo $html;
  61  }
  62  
  63  # vim:ts=4 sw=4 noet
  64  ?>


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7