WiClear PHP Cross Reference Collaborative Wikis

Source: /admin/index.php - 58 lines - 1789 bytes - Text - Print

   1  <?php
   2  # ***** BEGIN LICENSE BLOCK *****
   3  # This file is part of WiClear.
   4  # Copyright (c) 2004-2007 David Jobet. All rights
   5  # reserved.
   6  #
   7  # WiClear is free software; you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation; either version 2 of the License, or
  10  # (at your option) any later version.
  11  #
  12  # WiClear is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  #
  17  # You should have received a copy of the GNU General Public License
  18  # along with DotClear; if not, write to the Free Software
  19  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
  20  #
  21  # ***** END LICENSE BLOCK *****
  22  #
  23  # This file is heavily based on index.php of the dotclear project
  24  
  25  error_reporting(E_ALL);
  26  
  27  $file_path = __FILE__;
  28  $path      = dirname(__FILE__).'/../';
  29  // let's use a constant instead of a variable so that hacker can't use it to inject something using a require
  30  // on an unprotected directory
  31  define('wc_inc_path', $path);
  32  unset($path);
  33  
  34  require wc_inc_path.'/inc/classes/util.class.php';
  35  util::sessionWorkaround(wc_inc_path);
  36  
  37  require wc_inc_path.'admin/inc/prepend.inc.php';
  38  
  39  // Send HTTP headers
  40  $accept_xml =
  41          isset($_SERVER['HTTP_ACCEPT']) &&
  42          strpos($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml') !== false;
  43  
  44  if ($accept_xml)
  45  {
  46    header('Content-Type: application/xhtml+xml');
  47  }
  48  else
  49  {
  50    header('Content-Type: text/html; charset='.wc_charset);
  51  }
  52  
  53  echo '<?xml version="1.0" encoding="'.wc_charset.'"?>';
  54  
  55  require wc_inc_path.'admin/inc/template.inc.php';
  56  
  57  require wc_inc_path.'admin/inc/append.inc.php';
  58  ?>

title

Description

title

Description

title

Description

title

title

Body