<?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 ) *****

// +----------------------------------------------------------------------+
// | MPN 189 Admin Entry Conversion For 188_8                             |
// |                                                                      |
// | -> Old Nuke Op Switch                                                |
// +----------------------------------------------------------------------+
// | VERSION: 0.1 Alpha                                                   |
// +----------------------------------------------------------------------+
// | LICENSE: GPL 2.0 (see docs/LICENSE_GPL)                              |
// |                                                                      |
// | This file is part of MPN Admin Entry For MPN 188_8.                  |
// |                                                                      |
// | MPN Admin Entry 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.                                                       |
// |                                                                      |
// | MPN Admin Entry 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 MPN Admin Entry 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 MPN Admin Entry 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.                |
// |                                                                      |
// | Portions created by Francisco Burzi                                  |
// | are Copyright (C) 2001 Francisco Burzi.  All Rights Reserved.        |
// +----------------------------------------------------------------------+
// | CONTRIBUTOR(s):                                                      |
// |                                                                      |
// |                                                                      |
// +----------------------------------------------------------------------+
// | MODIFICATIONS:                                                       |
// |                                                                      |
// |                                                                      |
// +----------------------------------------------------------------------+
// | NOTES:                                                               |
// +----------------------------------------------------------------------+
// | SUPPORT:                                                             |
// |   WEB:   http://myphpnuke.com/                                       |
// |   EMAIL: support@mpn.illearth.net                                    |
// +----------------------------------------------------------------------+

/**
 * MPN_188_8_Modules
 *
 * @package MPN_188_8_Administration
 * @subpackage interface
 * @version $Id: nuke_switch.php,v 1.1.2.4 2004/04/18 12:47:12 ajvwaay 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 finish CSS & XHTML conversion
 * @todo reformat old style formatted code to new coding style
 * @todo finish and check function comments
 *
 * @tutorial
 * @filesource
 */

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

if ( !_MPN_ADMIN ) { adminLoginForm(); }

if ( ! isset( $_REQUEST['op'] ) )
{
    $_REQUEST['op'] = NULL;
}

switch( $_REQUEST['op'] )
{
    case "adminMain":
        @( include_once _DP_ADMIN_ . 'original/main.php' )
          OR goBack( translate( 'Include Error' ) );
    break;

    case "YesDelCategory":
    include("admin/stories.php");
    break;

    case "DelCategory":
    include("admin/stories.php");
    break;

    case "NoMoveCategory":
    include("admin/stories.php");
    break;

    case "EditCategory":
    include("admin/stories.php");
    break;

    case "SaveEditCategory":
    include("admin/stories.php");
    break;

    case "AddCategory":
    include("admin/stories.php");
    break;

    case "SaveCategory":
    include("admin/stories.php");
    break;

    case "reviews":
    include("admin/reviews.php");
    break;

    case "mod_main":
    include("admin/reviews.php");
    break;

    case "add_review":
    include("admin/reviews.php");
    break;

    case "deleteNotice":
    deleteNotice($id, $table_name, $op_back);
    break;

    case "SmilesAdmin":
    include("admin/smilies.php");
    SmilesAdmin();
    break;

    case "SmilesAdd":
    include("admin/smilies.php");
    SmilesAdd($code,$smile_url,$emotion);
    break;

    case "SmilesEdit":
    include("admin/smilies.php");
    SmilesEdit($id);
    break;

    case "SmilesSave":
    include("admin/smilies.php");
    SmilesSave($id,$code,$smile_url,$emotion);
    break;

    case "SmilesDel":
    include("admin/smilies.php");
    SmilesDel($id, $ok);
    break;

    case "AccessForumAdmin":
    include ("admin/phpbbaccess.php");
    AccessForumAdmin();
    break;

    case "AccessForumEdit":
    include ("admin/phpbbaccess.php");
    AccessForumEdit($access_id);
    break;

    case "AccessForumDel":
    include ("admin/phpbbaccess.php");
    AccessForumDel($access_id, $ok);
    break;

    case "AccessForumAdd":
    include ("admin/phpbbaccess.php");
    AccessForumAdd($access_title);
    break;

    case "AccessForumSave":
    include ("admin/phpbbaccess.php");
    AccessForumSave($access_id, $access_title);
    break;

    case "ForumConfigAdmin":
    include ("admin/phpbbconfig.php");
    ForumConfigAdmin();
    break;

    case "ForumConfigChange":
    include ("admin/phpbbconfig.php");
    ForumConfigChange($allow_html,$allow_bbcode,$allow_sig,$posts_per_page,$hot_threshold);
    break;

    case "RankForumAdmin":
    include ("admin/phpbbrank.php");
    RankForumAdmin();
    break;

    case "RankForumEdit":
    include ("admin/phpbbrank.php");
    RankForumEdit($rank_id);
    break;

    case "RankForumDel":
    include ("admin/phpbbrank.php");
    RankForumDel($rank_id, $ok);
    break;

    case "RankForumAdd":
    include ("admin/phpbbrank.php");
    RankForumAdd($rank_title,$rank_min,$rank_max,$rank_special);
    break;

    case "RankForumSave":
    include ("admin/phpbbrank.php");
    RankForumSave($rank_id, $rank_title, $rank_min, $rank_max, $rank_special);
    break;


    case "ForumGoAdd":
        include ("admin/phpbbforum.php");
        if (!isset($forum_mods))
        {
            $forum_mods = null;
        }

        ForumGoAdd($forum_name, $forum_desc, $forum_access, $forum_mods, $cat_id, $forum_type, $forum_pass);
    break;

    case "ForumGoSave":
        include ("admin/phpbbforum.php");
        if (!isset($forum_mods))
        {
            $forum_mods = null;
        }

        if (!isset($rem_mods))
        {
            $rem_mods = null;
        }

        ForumGoSave($forum_id, $forum_name, $forum_desc, $forum_access, $forum_mods, $rem_mods, $cat_id, $forum_type, $forum_pass);
    break;

    case "ForumCatDel":
    include ("admin/phpbbforum.php");
    ForumCatDel($cat_id, $ok);
    break;

    case "ForumGoDel":
    include ("admin/phpbbforum.php");
    ForumGoDel($forum_id, $ok);
    break;

    case "ForumCatSave":
    include ("admin/phpbbforum.php");
    ForumCatSave($cat_id, $cat_title);
    break;

    case "ForumCatEdit":
    include ("admin/phpbbforum.php");
    ForumCatEdit($cat_id);
    break;

    case "ForumGoEdit":
    include ("admin/phpbbforum.php");
    ForumGoEdit($forum_id);
    break;

    case "ForumGo":
    include ("admin/phpbbforum.php");
    ForumGo($cat_id);
    break;

    case "ForumCatAdd":
    include ("admin/phpbbforum.php");
    ForumCatAdd($catagories);
    break;

    case "ForumAdmin":
    include ("admin/phpbbforum.php");
    ForumAdmin();
    break;

    case "FaqCatSave":
    include ("admin/adminfaq.php");
    FaqCatSave($id_cat, $categories);
    break;

    case "FaqCatGoSave":
    include ("admin/adminfaq.php");
    FaqCatGoSave($id, $question, $answer);
    break;

    case "FaqCatAdd":
    include ("admin/adminfaq.php");
    FaqCatAdd($categories);
    break;

    case "FaqCatGoAdd":
    include ("admin/adminfaq.php");
    FaqCatGoAdd($id_cat, $question, $answer);
    break;

    case "FaqCatEdit":
    include ("admin/adminfaq.php");
    FaqCatEdit($id_cat);
    break;

    case "FaqCatGoEdit":
    include ("admin/adminfaq.php");
    FaqCatGoEdit($id);
    break;

    case "FaqCatDel":
    include ("admin/adminfaq.php");
    FaqCatDel($id_cat, $ok);
    break;

    case "FaqCatGoDel":
    include ("admin/adminfaq.php");
    FaqCatGoDel($id, $ok);
    break;

    case "FaqAdmin":
    include ("admin/adminfaq.php");
    FaqAdmin();
    break;

    case "FaqCatGo":
    include ("admin/adminfaq.php");
    FaqCatGo($id_cat);
    break;

    case "autoEdit":
    include("admin/automated.php");
    break;

    case "autoSaveEdit":
    include("admin/automated.php");
    break;

    case "autoDelete":
    include("admin/automated.php");
    break;

    case "QautoPreview":
    include("admin/automated.php");
    break;

    case "QautoStory":
    include("admin/automated.php");
    break;

    case "QautoSave":
    include("admin/automated.php");
    break;

    case "autoEdit":
    include("admin/automated.php");
    break;

    case "autoStory":
    include("admin/automated.php");
    break;

    case "autoSaveStory":
    include("admin/automated.php");
    break;

    case "autoPreviewStory":
    include("admin/automated.php");
    break;

    case "submissions":
    include("admin/stories.php");
    break;

    case "HeadlinesDel":
    include("admin/headlines.php");
    break;

    case "HeadlinesAdd":
    include("admin/headlines.php");
    break;

    case "HeadlinesSave":
    include("admin/headlines.php");
    break;

    case "HeadlinesAdmin":
    include("admin/headlines.php");
    break;

    case "HeadlinesEdit":
    include("admin/headlines.php");
    break;

    case "Configure":
    include("admin/settings.php");
    break;

    case "ConfigSave":
    include("admin/settings.php");
    break;

    case "relatedsave":
    include("admin/topics.php");
    break;

    case "relatededit":
    include("admin/topics.php");
    break;

    case "relateddelete":
    include("admin/topics.php");
    break;

    case "Ephemeridsedit":
    include("admin/ephemerids.php");
    break;

    case "Ephemeridschange":
    include("admin/ephemerids.php");
    break;

    case "Ephemeridsdel":
    include("admin/ephemerids.php");
    break;

    case "Ephemeridsmaintenance":
    include("admin/ephemerids.php");
    break;

    case "Ephemeridsadd":
    include("admin/ephemerids.php");
    break;

    case "Ephemerids":
    include("admin/ephemerids.php");
    break;

    case "links":
    include("admin/links.php");
    break;

    case "LinksDelNew":
    include("admin/links.php");
    break;

    case "LinksAddCat":
    include("admin/links.php");
    break;

    case "LinksAddSubCat":
    include("admin/links.php");
    break;

    case "LinksAddLink":
    include("admin/links.php");
    break;

    case "LinksAddEditorial":
    include("admin/links.php");
    break;

    case "LinksModEditorial":
    include("admin/links.php");
    break;

    case "LinksLinkCheck":
    include("admin/links.php");
    break;

    case "LinksValidate":
    include("admin/links.php");
    break;

    case "LinksDelEditorial":
    include("admin/links.php");
    break;

    case "LinksCleanVotes":
    include("admin/links.php");
    break;

    case "LinksListBrokenLinks":
    include("admin/links.php");
    break;

    case "LinksDelBrokenLinks":
    include("admin/links.php");
    break;

    case "LinksIgnoreBrokenLinks":
    include("admin/links.php");
    break;

    case "LinksListModRequests":
    include("admin/links.php");
    break;

    case "LinksChangeModRequests":
    include("admin/links.php");
    break;

    case "LinksChangeIgnoreRequests":
    include("admin/links.php");
    break;

    case "LinksDelCat":
    include("admin/links.php");
    break;

    case "LinksModCat":
    include("admin/links.php");
    break;

    case "LinksModCatS":
    include("admin/links.php");
    break;

    case "LinksModLink":
    include("admin/links.php");
    break;

    case "LinksModLinkS":
    include("admin/links.php");
    break;

    case "LinksDelLink":
    include("admin/links.php");
    break;

    case "LinksDelVote":
    include("admin/links.php");
    break;

    case "LinksDelComment":
    include("admin/links.php");
    break;

    case "BannersAdmin":
    include("admin/banners.php");
    break;

    case "BannersAdd":
    include("admin/banners.php");
    break;

    case "BannerAddClient":
    include("admin/banners.php");
    break;

    case "BannerFinishDelete":
    include("admin/banners.php");
    break;

    case "BannerDelete":
    include("admin/banners.php");
    break;

    case "BannerEdit":
    include("admin/banners.php");
    break;

    case "BannerChange":
    include("admin/banners.php");
    break;

    case "BannerClientDelete":
    include("admin/banners.php");
    break;

    case "BannerClientEdit":
    include("admin/banners.php");
    break;

    case "BannerClientChange":
    include("admin/banners.php");
    break;

    case "GraphicAdmin":
    GraphicAdmin($hlpfile);
    break;

    case "hreferer":
    include("admin/referers.php");
    break;

    case "delreferer":
    include("admin/referers.php");
    break;

    case "topicsmanager":
    include("admin/topics.php");
    break;

    case "topicedit":
    include("admin/topics.php");
    break;

    case "topicmake":
    include("admin/topics.php");
    break;

    case "topicdelete":
    include("admin/topics.php");
    break;

    case "topicchange":
    include("admin/topics.php");
    break;

    case "sections":
    include("admin/sections.php");
    break;

    case "sectionedit":
    include("admin/sections.php");
    break;

    case "sectionmake":
    include("admin/sections.php");
    break;

    case "sectiondelete":
    include("admin/sections.php");
    break;

    case "sectionchange":
    include("admin/sections.php");
    break;

    case "secarticleadd":
    include("admin/sections.php");
    break;

    case "secartedit":
    include("admin/sections.php");
    break;

    case "secartchange":
    include("admin/sections.php");
    break;

    case "secartdelete":
    include("admin/sections.php");
    break;

    case "DisplayStory":
    include("admin/stories.php");
    break;

    case "PreviewAgain":
    include("admin/stories.php");
    break;

    case "PostStory":
    include("admin/stories.php");
    break;

    case "EditStory":
    include("admin/stories.php");
    break;

    case "RemoveStory":
    include("admin/stories.php");
    break;

    case "RemoveComment":
    include("admin/comments.php");
    break;

    case "RemovePollComment":
    include("admin/comments.php");
    break;

    case "ChangeStory":
    include("admin/stories.php");
    break;

    case "DeleteStory":
    include("admin/stories.php");
    break;

    case "adminStory":
    include("admin/stories.php");
    break;

    case "PreviewAdminStory":
    include("admin/stories.php");
    break;

    case "PostAdminStory":
    include("admin/stories.php");
    break;

    case "mod_authors":
    include("admin/authors.php");
    break;

    case "modifyadmin":
    include("admin/authors.php");
    break;

    case "UpdateAuthor":
    include("admin/authors.php");
    break;

    case "AddAuthor":
    include("admin/authors.php");
    break;

    case "deladmin":
    include("admin/authors.php");
    break;

    case "deladminconf":
    include("admin/authors.php");
    break;

    case "mod_users":
    include("admin/users.php");
    break;

    case "modifyUser":
    include("admin/users.php");
    break;

    case "updateUser":
    include("admin/users.php");
    break;

    case "delUser":
    include("admin/users.php");
    break;

    case "delUserConf":
    include("admin/users.php");
    break;

    case "addUser":
    include("admin/users.php");
    break;

    case "create":
    include("admin/polls.php");
    break;

    case "createPosted":
    include("admin/polls.php");
    break;

    case "poll_editPoll":
    include("admin/polls.php");
    break;

    case "ChangePoll":
    include("admin/polls.php");
    break;

    case "remove":
    include("admin/polls.php");
    break;

    case "removePosted":
    include("admin/polls.php");
    break;

    case "view":
    include("admin/polls.php");
    break;

    case "viewPosted":
    include("admin/polls.php");
    break;

    default:
        include './admin/original/main.php';
    break;

} // End Switch

function deleteNotice( $id, $table_name, $op_back )
{
	global $mpnTables;

    @mysql_query( "DELETE FROM $table_name WHERE id = $id" );

    $_SERVER['F_LIB'] -> redirectRequest( 'admin.php?op=' . $op_back );
}

?>