<?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:15 kirilt Exp $

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

include ("admin/blocks/blocks.$phpEx");
global $hlpfile;
$hlpfile = getHelpFile("blocks.htm","myphpnuke");

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

switch($op)
{
   case "BlocksAdd":
      BlocksAdd($bside, $bweight, $badmin, $bposition, $bvisible, $bspecial, $btitle, $bcontent,$bcategory);
      break;

   case "BlocksSave":
      BlocksSave($bbid, $bbside, $bbweight, $bbadmin, $bbposition, $bbvisible, $bbspecial, $bbtitle, $bbcontent,$bbcategory, $page,$side);
      break;

   case "BlocksDeleteOk":
      BlocksDeleteOk($bid,$page,$side);
      break;

   case "BlocksDisplay":
      include("header.$phpEx");
      admin_menu($hlpfile);
      echo "<br>";
      BlocksDisplay($page,$side);
      echo "<br>";
      include("footer.$phpEx");
      break;

   case "BlocksDelete":
      include("header.$phpEx");
      admin_menu($hlpfile);
      echo "<br>";
      BlocksDelete($bid,$page,$side);
      echo "<br>";
      include("footer.$phpEx");
      break;

   case "BlocksEdit":
      include("header.$phpEx");
      admin_menu($hlpfile);
      echo "<br>";
      BlocksEdit($bid,$page,$side);
      echo "<br>";
      include("footer.$phpEx");
      break;

   default:
      include("header.$phpEx");
      admin_menu($hlpfile);
      echo "<br>";
      BlocksAdmin();
      echo "<br>";
      include("footer.$phpEx");
      break;
}
?>
