<?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->strModule("keuangan");
       

        if($_SESSION['usernameApprove']) {              
                $_SESSION['username']= $_SESSION['usernameApprove'];
         }
         
        //Proses
        $file1="modules_process/keuangan/master/{$form}.php";
        $file2="modules_process/keuangan/transaksi/{$form}.php";
        $file3="modules_process/keuangan/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(file_exists($file4) ) {
                   include $file4;
             }     
         }
       
        //Tampilan
        $file1="modules_menu/keuangan/master/{$form}.php";
        $file2="modules_menu/keuangan/transaksi/{$form}.php";
        $file3="modules_menu/keuangan/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("keuangan");
//                $objAxpDB->footerData();
            }
            else {
                 $objAxpDB->headerData();
                # $objAxpDB->menuData("keuangan");
                 $objAxpDB->footerData();
            }
           
         }
         
        $_SESSION['usernameApprove']="";
        $_SESSION['username']= $_SESSION['usernameTemp'];

        if($_REQUEST['remainder']=='1') {
            if(Getsecurity("pegawai_remainder")) {
                 echo  "<script> document.getElementById('iframe1').src='hrd.php?form=pegawai_remainder'; </script>";
                 echo "<script> alert('Berikut adalah Daftar Pegawai Seminggu Sebelum Habis Kontrak ');</script> ";
            }
           
        }