<?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("penjualan");
        
        //Proses
        $file1="modules_process/penjualan/master/{$form}.php";
        $file2="modules_process/penjualan/transaksi/{$form}.php";
        $file3="modules_process/penjualan/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;
            }       
        }
      
        //Tampilan
        $file1="modules_menu/penjualan/master/{$form}.php";
        $file2="modules_menu/penjualan/transaksi/{$form}.php";
        $file3="modules_menu/penjualan/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("penjualan");
//                $objAxpDB->footerData();
           }
           else {
                $objAxpDB->headerData();
               #    $objAxpDB->menuData("penjualan");
                $objAxpDB->footerData();
           }

        }