<?php

if ( ! @include_once( './mainfile.php' ) ) { exit( '!! INCLUDE ERROR. ACCESS DENIED !!' ); }
error_reporting( _E_VALUE );

/* vim: set expandtab tabstop=4 shiftwidth=4: */

// ***** BEGIN LICENSE BLOCK ( DO NOT REMOVE ) *****

// +----------------------------------------------------------------------+
// | Nested Page Project (NPP) For MPN 188_8                              |
// | -> Open Directory Project Web Interface                              |
// +----------------------------------------------------------------------+
// | VERSION: 0.1 Alpha                                                   |
// +----------------------------------------------------------------------+
// | LICENSE: GPL 2.0 (see docs/LICENSE_GPL)                              |
// |                                                                      |
// | This file is part of The Nested Page Project For MPN 188_8.          |
// |                                                                      |
// | The Nested Page Project For MPN 188_8 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.                                                       |
// |                                                                      |
// | The Nested Page Project For MPN 188_8 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 The Nested Page Project For MPN 188_8; if not, write to   |
// | the                                                                  |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place, Suite 330                                           |
// | Boston, MA 02111-1307  USA                                           |
// +----------------------------------------------------------------------+
// | AUTHOR(s):                                                           |
// |                                                                      |
// | The Original Code is The Nested Page Project For MPN 188_8.          |
// | The Initial Developer of the Original Code is Eric Haddix.           |
// |                                                                      |
// | Portions created by Eric Haddix or Kiril Threndor                    |
// | <support@mpn.illearth.net> are                                       |
// | Copyright (C) 2003 Eric Haddix.  All Rights Reserved.                |
// +----------------------------------------------------------------------+
// | CONTRIBUTOR(s):                                                      |
// |                                                                      |
// |                                                                      |
// +----------------------------------------------------------------------+
// | MODIFICATIONS:                                                       |
// |                                                                      |
// |                                                                      |
// +----------------------------------------------------------------------+
// | NOTES:                                                               |
// |   This IS alpha code, so code may or may not change at any time      |
// |   I recommend you don't spend alot of time working with this class   |
// |   unless you want to do it again.  This is WORK IN PROGRESS !!       |
// |   Complete Code comments and a readme will be completed for          |
// |   the first full release.                                            |
// |                                                                      |
// +----------------------------------------------------------------------+
// | Required Files:                                                      |
// |   -> core_Snoopy.class.php vs. 1.01a ( Modified For N_P_P )          |
// |      * Snoopy vs. 1.01 ( http://sourceforge.net/projects/snoopy/ )   |
// |   -> core_Sanitize.class.php                                         |
// |   -> core_Sanitize.param.php                                         |
// |   -> core_SSP_DefaultFormat.param.php                                |
// |   -> your custom child class(es) and supporting files                |
// +----------------------------------------------------------------------+
// | SUPPORT:                                                             |
// |   WEB:   http://myphpnuke.com/                                       |
// |   EMAIL: support@mpn.illearth.net                                    |
// +----------------------------------------------------------------------+

/**
 * MPN_188_8_Modules
 *
 * @package MPN_188_8_Modules
 * @subpackage Nested Page Project
 * @version $Id: npp_ODP.php,v 1.4.2.2 2004/03/28 13:41:03 kirilt Exp $
 *
 * @author Kiril Threndor <support@mpn.illearth.net>
 * @copyright Copyright (C) 2003 Eric Haddix
 * @license http://www.gnu.org/licenses/gpl.html GPL 2.0
 * @support http://myphpnuke.com/
 * @todo commenting
 * @todo add code for NPP Partner
 * @todo get alpha 2 together
 *
 * @tutorial
 * @filesource
 */

// ***** END LICENSE BLOCK ( DO NOT REMOVE ) *****

if ( empty( $_SERVER['NPP'] ) || ! is_object( $_SERVER['NPP'] ) || $_REQUEST['enpp'] !== 'odp' )
{
    goBack( translate( 'Access Method Violation' ) );
    exit;
}

$extStyle = $_SERVER['NPP'] -> link_css;

$odp_content = $_SERVER['NPP'] -> getODPContent();

if ( 0 === strpos( $odp_content, '<div class="errmsg">' ) )
{
    goBack( $odp_content );
    exit;
}

include './header.php';

    echo $odp_content;

include './footer.php';

?>