<?php

@( (bool)FALSE === strpos( $_SERVER['REQUEST_URI'], basename( __FILE__ ) ) ) OR exit( '!! ACCESS DENIED !!' );
error_reporting( _E_VALUE );


/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | myPHPNuke Version 188_8 RC2                                          |
// +----------------------------------------------------------------------+
// | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html              |
// +----------------------------------------------------------------------+
// | Support: http://myphpnuke.com/                                       |
// +----------------------------------------------------------------------+
// | Author: myPHPNuke Dev Team                                           |
// +----------------------------------------------------------------------+
// | Copyright: © 2001-2004 myPHPNuke Dev Team                            |
// +----------------------------------------------------------------------+
// $Id: main.php,v 1.5.2.6 2004/08/15 12:58:17 kirilt Exp $




/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2001 by Francisco Burzi (fbc@mandrakesoft.com)         */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* 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.       */
/************************************************************************/

checkAccess( 'modules', array( 'download' ) );

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

include("admin/download/download.php");

switch ($op)
{
    case "DownloadConfigEdit":
    DownloadConfigEdit();
    break;

    case "DownloadsConfig":
    include("admin/download/download_config.php");
    DownloadsConfig($con_downadd, $con_page, $con_popular, $con_newdown, $con_topdown, $con_search, $con_anonblock, $con_top10, $con_regmod);
    break;

    case "DownloadsDelNew":
    DownloadsDelNew($lid);
    break;

    case "DownloadsAddCat":
    DownloadsAddCat($title, $cdescription);
    break;

    case "DownloadsAddSubCat":
    DownloadsAddSubCat($cid, $title);
    break;

    case "DownloadsAddDownload":
	if (!isset($new))
	{
	    $new = null;
	}

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

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

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

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

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

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

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

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

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

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

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

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

    DownloadsAddDownload($new, $lid, $title, $url, $cat, $description, $name, $email, $submitter, $filesize, $Version, $homepage, $hits);
    break;

    case "DownloadsAddEditorial":
	if (!isset($downloadid))
	{
	    $downloadid = null;
	}

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

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

    DownloadsAddEditorial($downloadid, $editorialtitle, $editorialtext);
    break;

    case "DownloadsModEditorial":
	if (!isset($downloadid))
	{
	    $downloadid = null;
	}

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

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

    DownloadsModEditorial($downloadid, $editorialtitle, $editorialtext);
    break;

    case "DownloadsDownloadCheck":
    DownloadsDownloadCheck();
    break;

    case "DownloadsValidate":
    DownloadsValidate($cid, $sid);
    break;

    case "DownloadsDelEditorial":
    DownloadsDelEditorial($downloadid);
    break;

    case "DownloadsCleanVotes":
    DownloadsCleanVotes();
    break;

    case "DownloadsListBrokenDownloads":
    DownloadsListBrokenDownloads();
    break;

    case "DownloadsDelBrokenDownloads":
    DownloadsDelBrokenDownloads($lid);
    break;

    case "DownloadsIgnoreBrokenDownloads":
    DownloadsIgnoreBrokenDownloads($lid);
    break;

    case "DownloadsListModRequests":
    DownloadsListModRequests();
    break;

    case "DownloadsChangeModRequests":
    DownloadsChangeModRequests($requestid);
    break;

    case "DownloadsChangeIgnoreRequests":
    DownloadsChangeIgnoreRequests($requestid);
    break;

    case "DownloadsDelCat":
    DownloadsDelCat($cid, $sid, $sub, $ok);
    break;

    case "DownloadsModCat":
    DownloadsModCat($cat);
    break;

    case "DownloadsModCatS":
	if (!isset($sid))
	{
	    $sid = null;
	}

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

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

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

    DownloadsModCatS($cid, $sid, $sub, $title, $cdescription);
    break;

    case "DownloadsModDownload":
    DownloadsModDownload($lid);
    break;

    case "DownloadsModDownloadS":
	if (!isset($lid))
	{
	    $lid = null;
	}

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

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

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

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

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

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

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

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

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

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

    DownloadsModDownloadS($lid, $title, $url, $description, $name, $email, $hits, $cat, $filesize, $Version, $homepage);
    break;

    case "DownloadsDelDownload":
    DownloadsDelDownload($lid);
    break;

    case "DownloadsDelVote":
    DownloadsDelVote($lid, $rid);
    break;

    case "DownloadsDelComment":
    DownloadsDelComment($lid, $rid);
    break;

    default:
    case "downloads":
    downloads();
    break;

}

?>
