<?php

/* Reminder: always indent with 4 spaces (no tabs). */
// +-------------------------------------------------------------------------+
// | Forum Plugin for Geeklog - The Ultimate Weblog                          |
// | Date: Nov, 2006                                                         |
// +-------------------------------------------------------------------------+
// | debug.php - common debug routine to view POST AND GET VARS              |
// +-------------------------------------------------------------------------+
// | Copyright (C) 2003 by the following authors:                            |
// |                                                                         |
// | Author:                                                                 |
// | Blaine Lang                 -    blaine@portalparts.com                 |
// +-------------------------------------------------------------------------+
// |                                                                         |
// | This program is free software; you can redistribute it and/or           |
// | modify it under the terms of the GNU General Public License             |
// | as published by the Free Software Foundation; either version 2          |
// | of the License, or (at your option) any later version.                  |
// |                                                                         |
// | This program is distributed in the hope that it will be useful,         |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    |
// | See the GNU General Public License for more details.                    |
// |                                                                         |
// | You should have received a copy of the GNU General Public License       |
// | along with this program; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.         |
// |                                                                         |
// +-------------------------------------------------------------------------+
//

if (strpos(strtolower($_SERVER['PHP_SELF']), 'debug.php') !== false) {
    die('This file can not be used on its own.');
}

// Debug Code to show variables
if ($CONF_FORUM['debug']) {
    if (!empty($_POST)) {
        echo COM_startBlock("_POST");
        var_dump($_POST);
        echo COM_endBlock();
    }
    if (!empty($_GET)) {
        echo COM_startBlock("_GET");
        var_dump($_GET);
        echo COM_endBlock();
    }

    if (!empty($_FILES)) {
        echo COM_startBlock("_FILES");
        var_dump($_FILES);
        echo COM_endBlock();
    }
}

?>