<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General includes License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
/********************************************************/
/* NSN GR Downloads                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/
/* Based on Journey Links Hack                          */
/* Copyright (c) 2000 by James Knickelbein              */
/* Journey Milwaukee (http://www.journeymilwaukee.com)  */
/********************************************************/
defined('MAXIMUS') or Header("Location: ../../index.php");

$module_name = "Downloads";
get_lang($module_name);
$pagetitle = _DOWNLOADS;
if (is_file('modules/Downloads/includes/functions.php')) {
	include_once('modules/Downloads/includes/functions.php');
}
$result1 = $db->sql_query("SELECT * FROM `".TABLE_NSNGD_CONFIG."`");
$dl_config = gdget_configs();
if (!$dl_config OR $dl_config=="") {
    incoh();
    title(_DL_DBCONFIG);
    incof();
    die();
}
$index = 0;
if(isset($d_op)) { $op = $d_op; unset($d_op); }
if(!isset($op)) { $op = 'index'; }
if($op == 'viewdownload') { $op = 'getit'; }
if($op == 'viewdownloaddetails') { $op = 'getit'; }
switch($op) {
    case 'index':include_once("modules/$module_name/includes/index.php");break;
    case 'NewDownloads':include_once("modules/$module_name/includes/NewDownloads.php");break;
    case 'NewDownloadsDate':include_once("modules/$module_name/includes/NewDownloadsDate.php");break;
    case 'MostPopular':include_once("modules/$module_name/includes/MostPopular.php");break;
    case 'brokendownload':include_once("modules/$module_name/includes/brokendownload.php");break;
    case 'brokendownloadS':include_once("modules/$module_name/includes/brokendownloadS.php");break;
    case 'modifydownloadrequest':include_once("modules/$module_name/includes/modifydownloadrequest.php");break;
    case 'modifydownloadrequestS':include_once("modules/$module_name/includes/modifydownloadrequestS.php");break;
    case 'getit':include_once("modules/$module_name/includes/getit.php");break;
    case 'go':include_once("modules/$module_name/includes/go.php");break;
    case 'search':include_once("modules/$module_name/includes/search.php");break;
    case 'gfx':include_once("modules/$module_name/includes/gfx.php");break;
}