<?php
        session_cache_expire(1440);
        session_start();
        session_name("insys");
        include "include/config.php";
        include "include/functions.php";
        include "include/fifo.php";
        include "include/save_fifo.php"; 
        include "include/save_log_stock.php";
        include "include/process_general_ledger.php";
        include "class/UctVw.php";

	$form = $_REQUEST[form];

	$objAxpDB = new UctVw();
    $objAxpDB->LookupMagicQuotes(True);
	$objAxpDB->strModule("absensi");
      if($_SESSION['usernameApprove']) {
                $_SESSION['username']= $_SESSION['usernameApprove'];
         }

         //Process
        $file1="modules_process/absensi/master/{$form}.php";
        $file2="modules_process/absensi/transaksi/{$form}.php";
        $file3="modules_process/absensi/laporan/{$form}.php";


         if(file_exists($file1)||file_exists($file2)||file_exists($file3)) {
             if(file_exists($file1) ) {
                  include $file1;
             }
             else if(file_exists($file2) ) {
                   include $file2;
             }
             else if(file_exists($file3) ) {
                   include $file3;
             }
         }

        //Menu
        $file1="modules_menu/absensi/master/{$form}.php";
        $file2="modules_menu/absensi/transaksi/{$form}.php";
        $file3="modules_menu/absensi/laporan/{$form}.php";


         if(file_exists($file1)||file_exists($file2)||file_exists($file3)) {
             if(file_exists($file1) ) {
                  include $file1;
             }
             else if(file_exists($file2) ) {
                   include $file2;
             }
             else if(file_exists($file3) ) {
                   include $file3;
             }

         }
         else {
            if($_REQUEST['p']==1) {
//                 $objAxpDB->headerData();
                   $objAxpDB->menuData("absensi");
//                $objAxpDB->footerData();
            }
            else {
                 #$objAxpDB->headerData();
                 #$objAxpDB->menuData("absensi");
                 #$objAxpDB->footerData();
            }

         }


        // -----------------------------------------
            $_SESSION['usernameApprove']="";
        $_SESSION['username']= $_SESSION['usernameTemp'];