<?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.5 2004/08/15 12:58:22 kirilt Exp $

checkAccess( 'blocks', array( 'left', 'right' ) );

include ("admin/rand_banners/rand_banners.$phpEx");

global $hlpfile;
$hlpfile = getHelpFile("rand_banners.htm","myphpnuke");

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

switch ($op){

    case "UpdateBanner":
        UpdateBanner($banner_id, $url, $image, $description);
        break;

    case "AddBanner":
        if (!isset($banner_id))
        {
            $banner_id = null;
        }

        AddBanner($banner_id, $url, $image, $descriptions);
        break;

    case "randbannersauve":
            randbannersauve($xmaxbanner);
            break;


    case "DeleteBanner":
        include("header.$phpEx");
        admin_menu($hlpfile);
        echo "<br>";
        DeleteBanner($banner_id, $ok);
        include("footer.$phpEx");
        break;

    case "EditBanner":
        include("header.$phpEx");
        admin_menu($hlpfile);
        echo "<br>";
        EditBanner($banner_id);
        include("footer.$phpEx");
        break;

    case "bannercfg":
        randbannerconfig();
    break;

    Default:
        include("header.$phpEx");
        admin_menu($hlpfile);
        echo "<br>";
        ListBanner();
        echo "<br>";
        include("footer.$phpEx");
        break;

}
?>
