Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/modules/Downloads/index.php
<?php // $Id: index.php,v 1.39 2001/12/12 01:45:17 gregorrothfuss Exp $ $Name:  $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// 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.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Francisco Burzi
// Purpose: Download tracker/organizer
// ----------------------------------------------------------------------


if (!defined("LOADED_AS_MODULE"))
{
    die ("You can't access this file directly...");
}

include 'mainfile.php';

$ModName = basename( dirname( __FILE__ ) );
$modurl="modules.php?op=modload&amp;name=$ModName&amp;file=index"; //Shorten url text

modules_get_language();

include_once ("modules/$ModName/dl-util.php");
include_once ("modules/$ModName/dl-navigation.php");

/**
 * Switch on $req
 * load the appropriate module, and call the appropriate function.
 */
if(empty($req)) {
	$req = '';
}

switch($req) {

    case "menu":
      menu($maindownload);
    break;

    // Menu downloads
    case "AddDownload":
      include_once ("modules/$ModName/dl-adddownload.php");
      AddDownload();
    break;

    case "NewDownloads":
      include_once ("modules/$ModName/dl-newdownloads.php");
      NewDownloads($newdownloadshowdays);
    break;

    case "NewDownloadsDate":
      include_once ("modules/$ModName/dl-newdownloads.php");
      NewDownloadsDate($selectdate);
    break;
    
    case "CoolSize":
        CoolSize($size);
    break;
        
    case "TopRated":
      include_once ("modules/$ModName/dl-toprated.php");
      TopRated($ratenum, $ratetype);
    break;

    case "MostPopular":
      include_once ("modules/$ModName/dl-mostpopular.php");
      MostPopular($ratenum, $ratetype);
    break;

    // currently not implemented. i just left this in. anyone plug it in?
    case "Randomdownload":
       include_once ("modules/$ModName/dl-randomdownload.php");
        Randomdownload();
    break;

    case "search":
      include_once ("modules/$ModName/dl-search.php");
      search($query, $min, $orderby, $show);
    break;

    //End of navigation Menu downloads

    //Display a download - called from index
    case "viewdownload":
      include_once ("modules/$ModName/dl-viewdownload.php");
      viewdownload($cid, $min, $orderby, $show);
    break;

    case "viewsdownload":
      include_once ("modules/$ModName/dl-viewdownload.php");
      viewsdownload($sid, $min, $orderby, $show);
    break;

    case "brokendownload":
      include_once ("modules/$ModName/dl-downloaddetails.php");
      brokendownload($lid);
    break;

    case "modifydownloadrequest":
      include_once ("modules/$ModName/dl-downloaddetails.php");
      modifydownloadrequest($lid);
    break;

    case "modifydownloadrequestS":
      include_once ("modules/$ModName/dl-downloaddetails.php");
        modifydownloadrequestS($lid, $cat, $title, $url, $description, $modifysubmitter, $aname, $email, $filesize, $version, $homepage);
    break;

    case "brokendownloadS":
      include_once ("modules/$ModName/dl-downloaddetails.php");
        brokendownloadS($lid, $modifysubmitter);
    break;

    case "getit":
        visit($lid);
    break;

    case "Add":
      include_once ("modules/$ModName/dl-adddownload.php");
        Add($title, $url, $nname, $cat, $description, $name, $email, $filesize, $version, $homepage);
    break;

    case "rateinfo":
      include_once ("modules/$ModName/dl-rating.php");
        rateinfo($lid, $user, $title);
    break;

    case "ratedownload":
      include_once ("modules/$ModName/dl-rating.php");
      ratedownload($lid, $user, $ttitle);
    break;

    case "addrating":
      include_once ("modules/$ModName/dl-rating.php");
        addrating($ratinglid, $ratinguser, $rating, $ratinghost_name, $ratingcomments, $user);
    break;

    case "viewdownloadcomments":
      include_once ("modules/$ModName/dl-downloaddetails.php");
      viewdownloadcomments($lid, $ttitle);
    break;

    case "outsidedownloadsetup":
      include_once ("modules/$ModName/dl-downloaddetails.php");
      outsidedownloadsetup($lid);
    break;

    case "viewdownloaddetails":
      include_once ("modules/$ModName/dl-downloaddetails.php");
      viewdownloaddetails($lid, $ttitle);
    break;

    case "viewdownloadeditorial":
      include_once ("modules/$ModName/dl-downloadeditorial.php");
      viewdownloadeditorial($lid, $ttitle);
    break;

    default:
      index();
}

?>
Return current item: ProNuke. Postnuke To Oracle