<?php
    require_once($pg.".html.php");
    class USER extends USER_HTML
    {


    }

    $cl=new USER();

    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 "user_$modulename":
            $clfile->$fn_module_init();
        break;
        
        case "contextmenu":
            $cl->FN_DHTMLXGRIDCONTEXTMENU();
        break;

        case "addcombo":
            $cl->FN_DHTMLXADDCOMBO();
        break;
        
        case "addcombohrm":
            $cl->FN_DHTMLXADDCOMBO(DB_SIMASHRM);
        break;
//        case "pagehome":
//            $cl->fn_page_home();
//        break;

//        default:
//            $cl->fn_page_default();  
//        break;
    }

?>