[ Index ]
 

Code source de CMS made simple 1.0.5

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

title

Body

[fermer]

/admin/ -> moduleinterface.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 WARRANthe TY; 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: moduleinterface.php 3820 2007-03-06 23:14:27Z wishy $
  20  
  21  $CMS_ADMIN_PAGE=1;
  22  
  23  require_once ("../include.php");
  24  
  25  check_login();
  26  
  27  $id = '';
  28  $module = '';
  29  $action = 'defaultadmin';
  30  $suppressOutput = false;
  31  if (isset($_REQUEST['module'])) $module = $_REQUEST['module'];
  32  if (isset($_REQUEST['action'])) $action = $_REQUEST['action'];
  33  if (isset($_REQUEST['id']))
  34  {
  35      $id = $_REQUEST['id'];
  36  }
  37  elseif (isset($_REQUEST['mact']))
  38  {
  39      $ary = explode(',', $_REQUEST['mact'], 4);
  40      $module = (isset($ary[0])?$ary[0]:'');
  41      $id = (isset($ary[1])?$ary[1]:'');
  42      $action = (isset($ary[2])?$ary[2]:'');
  43  }
  44  
  45  if (isset($gCms->modules[$module]) && $gCms->modules[$module]['object']->IsWYSIWYG())
  46  {
  47      $userid = get_userid();
  48      if (get_preference($userid, 'use_wysiwyg') == "1")
  49      {
  50          $htmlarea_flag = "true";
  51          $htmlarea_replaceall = true;
  52      }
  53  }
  54  
  55  $USE_OUTPUT_BUFFERING = true;
  56  if (isset($gCms->modules[$module]['object']) && $gCms->modules[$module]['object']->HasAdminBuffering() == false)
  57  {
  58      $USE_OUTPUT_BUFFERING = false;
  59  }
  60  else if (isset($_REQUEST[$id . 'disable_buffer']))
  61  {
  62      $USE_OUTPUT_BUFFERING = false;
  63  }
  64  else if (isset($_REQUEST['disable_buffer']))
  65  {
  66      $USE_OUTPUT_BUFFERING = false;
  67  }
  68  
  69  $USE_THEME = true;
  70  if( isset( $_REQUEST[$id . 'disable_theme'] ))
  71  {
  72      $USE_THEME = false;
  73  }
  74  else if( isset( $_REQUEST['disable_theme'] ))
  75  {
  76      $USE_THEME = false;
  77  }
  78  if (isset($gCms->modules[$module]['object']) && $gCms->modules[$module]['object']->GetHeaderHTML() != false)
  79    {
  80      $headtext =  $gCms->modules[$module]['object']->GetHeaderHTML();
  81    }
  82   else
  83     {
  84       $headtext = '';
  85     }
  86  
  87  if (isset($gCms->modules[$module]['object']) && $gCms->modules[$module]['object']->SuppressAdminOutput($_REQUEST) != false)
  88      {
  89      $suppressOutput = true;
  90      }
  91  else
  92      {
  93      include_once ("header.php");
  94       }
  95  
  96  if (count($gCms->modules) > 0)
  97  {
  98      if (isset($USE_THEME) && $USE_THEME == false)
  99      {
 100          echo '';
 101      }
 102      else
 103      {
 104          $params = GetModuleParameters($id);
 105          if (FALSE == empty($params['module_message']))
 106            {
 107              echo $themeObject->ShowMessage($params['module_message']);
 108            }
 109          if (FALSE == empty($params['module_error']))
 110            {
 111              echo $themeObject->ShowErrors($params['module_error']);
 112            }
 113          if (!$suppressOutput)
 114              {
 115              echo '<div class="pagecontainer">';
 116              echo '<div class="pageoverflow">';
 117              echo $themeObject->ShowHeader($gCms->modules[$module]['object']->GetFriendlyName(), '', '', 'both').'</div>';
 118              }
 119      }
 120  
 121      if (isset($gCms->modules[$module]))
 122      {
 123          if (!(isset($USE_OUTPUT_BUFFERING) && $USE_OUTPUT_BUFFERING == false))
 124          {
 125              @ob_start();
 126          }
 127          $id = 'm1_';
 128          $params = GetModuleParameters($id);
 129          echo $gCms->modules[$module]['object']->DoActionBase($action, $id, $params);
 130          if (!(isset($USE_OUTPUT_BUFFERING) && $USE_OUTPUT_BUFFERING == false))
 131          {
 132              $content = @ob_get_contents();
 133              @ob_end_clean();
 134              echo $content;
 135          }
 136          if (!$suppressOutput)
 137              {
 138              echo '</div>';
 139              }
 140      }
 141      else
 142      {
 143          redirect("index.php");
 144      }
 145  }
 146  
 147  if (isset($USE_THEME) && $USE_THEME == false)
 148  {
 149      echo '';
 150  }
 151  elseif (!$suppressOutput)
 152  {
 153      echo '<p class="pageback"><a class="pageback" href="'.$themeObject->BackUrl().'">&#171; '.lang('back').'</a></p>';
 154  }
 155  if (!$suppressOutput)
 156      {
 157      include_once ("footer.php");
 158       }
 159  # vim:ts=4 sw=4 noet
 160  ?>


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