<?php
//echo $_SESSION['branch_group'];
    //echo "<br/><br/>GGGGGG<br/>";
    require_once($pg.".html.php");   
    //echo "xxx<br/><br/>xxx$pg<br/>";
    class HOME extends HOME_HTML
    {                
        
    }
    //echo $pg;return false;
    $cl=new HOME();
    if(isset($_REQUEST['task'])){$case=$_REQUEST['task'];}
    if(isset($_POST['task'])){$case=$_POST['task'];}
    if(isset($_REQUEST['obj'])){$obj=$_REQUEST['obj'];}
    if(isset($_POST['obj'])){$obj=$_POST['obj'];}

    if($_REQUEST){if($_REQUEST['sec']){$case=$cl->dec($case);$obj=$cl->dec($obj);}}

    if(file_exists(PATH_OBJECT."/$option/$obj.php"))
    {
        require_once("$obj.php");
        $className=strtoupper($obj);
        $clfile=new $className();
        $fn_init_java=$className."_javainit";
        $init_java=trim($_REQUEST['init_java']);if($init_java){$clfile->$fn_init_java();}

        $case=$obj;
    }

    if(!$case){$case=$obj;if(!file_exists(PATH_OBJECT."/$option/$obj.php")){$cl->under_construction();}}
    $sptask=explode("_",$case);$modulename=$sptask[1];$fn_module_init="fn_".$modulename."_init";
                         
    //echo $case; 
    switch($case)
    {        
        case "home_$modulename":
          $clfile->$fn_module_init();
        break;
        
        case "treemenu":
            $cl->fn_treemenu();
        break;

        case "treemenuadmin":
            $cl->fn_treemenuadmin();
        break;
        
        default:
        //echo "test";return false;
            $cl->fn_page_default();
        break;
    }
?>
