<?php
require_once "config/database.php";
require_once "config/fungsi_tanggal.php";
require_once "config/fungsi_rupiah.php";


if (empty($_SESSION['username']) && empty($_SESSION['password'])){
	echo "<meta http-equiv='refresh' content='0; url=index.php?alert=1'>";
}
else {
	
	
	
	
	/*if ($_GET['module'] == 'start') {
		include "modules/start/start/view.php";
	}*/

	if ($_GET['module'] == 'start') {
		include "modules/trade/start/view.php";
	}
	
	/************************************/
	/************ closed ************/
	/************************************/
	
	 elseif ($_GET['module'] == 'closed') {
		include "modules/trade/closed/view.php";
	}


	/************************************/
	/************ REMISIONES ************/
	/************************************/
	elseif ($_GET['module'] == 'remision') {
		include "modules/trade/remision/view.php";
	}
	elseif ($_GET['module'] == 'form_remision') {
		include "modules/trade/remision/form.php";
	}
	elseif ($_GET['module'] == 'remision_consulta') {
		include "modules/trade/remision/query.php";
	}
	elseif ($_GET['module'] == 'remision_surtir') {
		include "modules/trade/remision/surtir.php";
	}
	elseif ($_GET['module'] == 'remision_supervisor') {
		include "modules/trade/remision/query_supervisor.php";
	}
	
	elseif ($_GET['module'] == 'remision_almacenista') {
		include "modules/trade/remision/query_almacenista.php";
	}
	/************************************/
	/************ Kardex ************/
	/************************************/
    elseif ($_GET['module'] == 'view_kardex') {
		include "modules/trade/kardex/view.php";
	}
	elseif ($_GET['module'] == 'respaldo') {
		include "modules/respaldo/respaldo.php";
		}
	
	
	/************************************/
	/************ Buqueda por fechas ************/
	/************************************/
	 elseif ($_GET['module'] == 'busqueda_ent_sal') {
		include "modules/trade/busqueda/view.php";
	}
	 elseif ($_GET['module'] == 'record') {
		include "modules/trade/busqueda/record.php";
	}

	/************************************/
	/************ Modulo Start ************/
	/************************************/
	
	 elseif ($_GET['module'] == 'start_almacenista') {
		include "modules/trade/start/view_almacen.php";
	}
	  elseif($_GET['module'] == 'start_supervisor') {
		include "modules/trade/start/view_supervisor.php";
	}
		/************************************/
		/************ Modulo Productos ************/
		/************************************/
        elseif($_GET['module'] == 'view_codigo') {
		include "modules/trade/medicines/view_codigo.php";
	}
		/************************************/
		/************ cancelar salida de almacen ************/
		/************************************/
	elseif ($_GET['module'] == 'salida_consulta') {
		include "modules/trade/medicines_consulta_enc/query.php";
	}
		elseif ($_GET['module'] == 'salida_consulta_almacen') {
		include "modules/trade/medicines_consulta_enc/query_almacen.php";
	}
	elseif ($_GET['module'] == 'salida_consulta_supervisor') {
		include "modules/trade/medicines_consulta_enc/query_supervisor.php";
	}
	
	/************************************/
		/************ cancelar entrada de almacen ************/
		/************************************/
	elseif ($_GET['module'] == 'entrada_consulta') {
		include "modules/trade/consulta_entradas_enc/query.php";
	}
		elseif ($_GET['module'] == 'entrada_consulta_almacen') {
		include "modules/trade/consulta_entradas_enc/query_almacen.php";
	}
	elseif ($_GET['module'] == 'entrada_consulta_supervisor') {
		include "modules/trade/consulta_entradas_enc/query_supervisor.php";
	}
	
		/************************************/
		/************ catalogos ************/
		/************************************/
	elseif ($_GET['module'] == 'catalogo_motivos') {
		include "modules/trade/catalogos/motivos/view_motivos.php";

	}
    elseif ($_GET['module'] == 'form_motivos') {
		include "modules/trade/catalogos/motivos/form.php";
	}

elseif ($_GET['module'] == 'catalogo_motivos_si') {
		include "modules/trade/catalogos/motivos_si/view_motivos.php";

	}
    elseif ($_GET['module'] == 'form_motivos_si') {
		include "modules/trade/catalogos/motivos_si/form.php";
	}	
	
	elseif ($_GET['module'] == 'catalogo_unidades') {
		include "modules/trade/catalogos/unidades/view_unidades.php";

	}

    elseif ($_GET['module'] == 'form_unidades') {
		include "modules/trade/catalogos/unidades/form.php";
	}	
	
	elseif ($_GET['module'] == 'catalogo_correos') {
		include "modules/trade/catalogos/correos/view_correos.php";

	}
    elseif ($_GET['module'] == 'form_correos') {
		include "modules/trade/catalogos/correos/form.php";
	}	
	
	elseif ($_GET['module'] == 'parametro_correos') {
		include "modules/trade/catalogos/parametro_correos/view_parametros_c.php";

	}
    elseif ($_GET['module'] == 'form_parametro_correos') {
		include "modules/trade/catalogos/parametro_correos/form.php";
	}	
	elseif ($_GET['module'] == 'catalogo_perfil') {
		include "modules/trade/catalogos/perfil/view_perfil.php";

	}
    elseif ($_GET['module'] == 'form_perfil') {
		include "modules/trade/catalogos/perfil/form.php";
	}	

	    /************************************/
		/************ Saldo inicial ************/
		/************************************/
		
	elseif ($_GET['module'] == 'saldo_inicial') {
		include "modules/trade/saldo_inicial/view.php";

	}
  	elseif ($_GET['module'] == 'saldo_inicial_form') {
		include "modules/trade/saldo_inicial/form.php";
		
	}	
	
	  /************************************/
		/************ importacion ************/
		/************************************/
		
	elseif ($_GET['module'] == 'importar_correos') {
		include "modules/trade/importar/correos.php";
	}
	elseif ($_GET['module'] == 'importar_unidades') {
		include "modules/trade/importar/unidades.php";
	}
	elseif ($_GET['module'] == 'importar_productos') {
		include "modules/trade/importar/productos.php";
	}
	
	
	  /************************************/
		/************ apertura o cuerre de almacen ************/
		/************************************/
		
	elseif ($_GET['module'] == 'apertura_view') {
		include "modules/trade/apertura/view_apertura.php";
	}
	  elseif ($_GET['module'] == 'form_apertura') {
		include "modules/trade/apertura/form.php";
	}
	
        /************************************/
		/************ busqueda************/
		/************************************/
	elseif ($_GET['module'] == 'busqueda_view') {
		include "modules/trade/busqueda1/view1.php";
	}	
 
  /************************************/
		/************ reportes************/
		/************************************/
 
 elseif ($_GET['module'] == 'stock_inventory') {
		include "modules/trade/stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'stock_report') {
		include "modules/trade/stock_report/view.php";
	}
	elseif ($_GET['module'] == 'stock_report_entradas') {
		include "modules/trade/stock_report_entradas/view.php";
	}
	elseif ($_GET['module'] == 'stock_report_folio') {
	                        
		include "modules/trade/stock_report_folio/view.php";
	}
 
 
		
		
		
		
		

	
	
	#-----------------Sesion Don Jose ------------------#
	elseif ($_GET['module'] == 'start_adminalmacen') {
		include "modules/start/start_adminalmacen/view.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_medicines') {
		include "modules/adminalm/adminalmacen_medicines/view.php";
	}
	
	elseif ($_GET['module'] == 'form_adminalmacen_medicines') {
		include "modules/adminalm/adminalmacen_medicines/form.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_medicines_salidas') {
		include "modules/adminalm/adminalmacen_medicines/medicines_consulta_salidas/view.php";
	}
	
	
	elseif ($_GET['module'] == 'adminalmacen_cdc') {
		include "modules/adminalm/adminalmacen_cdc/view.php";
	}
	
	elseif ($_GET['module'] == 'form_adminalmacen_cdc') {
		include "modules/adminalm/adminalmacen_cdc/form.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_cdc_salidas') {
		include "modules/adminalm/adminalmacen_cdc/cdc_salidas/view.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_exp') {
		include "modules/adminalm/adminalmacen_exp/view.php";
	}
	
	elseif ($_GET['module'] == 'form_adminalmacen_exp') {
		include "modules/adminalm/adminalmacen_exp/form.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_exp_salidas') {
		include "modules/adminalm/adminalmacen_exp/exp_salidas/view.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_RP') {
		include "modules/adminalm/adminalmacen_RP/view.php";
	}
	
	elseif ($_GET['module'] == 'form_adminalmacen_RP') {
		include "modules/adminalm/adminalmacen_RP/form.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_RP_salidas') {
		include "modules/adminalm/adminalmacen_RP/RP_salidas/view.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_exp') {
		include "modules/adminalm/adminalmacen_exp/view.php";
	}
	
	elseif ($_GET['module'] == 'form_adminalmacen_exp') {
		include "modules/adminalm/adminalmacen_exp/form.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_exp_salidas') {
		include "modules/adminalm/adminalmacen_exp/exp_salidas/view.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_mercadotecnia') {
		include "modules/adminalm/adminalmacen_mercadotecnia/view.php";
	}
	
	elseif ($_GET['module'] == 'form_adminalmacen_mercadotecnia') {
		include "modules/adminalm/adminalmacen_mercadotecnia/form.php";
	}
	
	elseif ($_GET['module'] == 'adminalmacen_mercadotecnia_salidas') {
		include "modules/adminalm/adminalmacen_mercadotecnia/mercadotecnia_salidas/view.php";
	}
	
	
	/*elseif ($_GET['module'] == 'start_consulta') {
		include "modules/start/start_consulta/view_consulta.php";
	}*/
	
	
	elseif ($_GET['module'] == 'medicines') {
		include "modules/trade/medicines/view.php";
	}

	elseif ($_GET['module'] == 'form_medicines') {
		include "modules/trade/medicines/form.php";
	}
	

	elseif ($_GET['module'] == 'medicines_transaction') {
		include "modules/trade/medicines_transaction/view.php";
	}

	elseif ($_GET['module'] == 'form_medicines_transaction') {
		include "modules/trade/medicines_transaction/form.php";
	}
	
	elseif ($_GET['module'] == 'medicines_consulta') {		
		include "modules/trade/medicines_consulta/view.php";
	}

	elseif ($_GET['module'] == 'form_medicines_consulta') {
		include "modules/trade/medicines_consulta/form.php";
	}
/* Nueva pantalla de consulta de modulos */	
	elseif ($_GET['module'] == 'medicines_consulta_enc') {
		include "modules/trade/medicines_consulta_enc/view.php";
	}
	
	elseif ($_GET['module'] == 'medicines_consulta_enc_supervisor') {
		include "modules/trade/medicines_consulta_enc/view_supervisor.php";
	}
	elseif ($_GET['module'] == 'medicines_consulta_enc_almacenista') {
		include "modules/trade/medicines_consulta_enc/view_almacen.php";
	}

	elseif ($_GET['module'] == 'medicines_entradas_enc') {
		include "modules/trade/medicines_entradas_enc/view.php";
	}
	
	elseif ($_GET['module'] == 'cdc_salidas_enc') {
		include "modules/cdc/cdc_salidas_enc/view.php";
	}
	
	elseif ($_GET['module'] == 'cdc_entradas_enc') {
		include "modules/cdc/cdc_entradas_enc/view.php";
	}
	
	elseif ($_GET['module'] == 'RP_salidas_enc') {
		include "modules/RP/RP_salidas_enc/view.php";
	}
	elseif ($_GET['module'] == 'RP_entradas_enc') {
		include "modules/RP/RP_entradas_enc/view.php";
	}
	
	elseif ($_GET['module'] == 'exp_salidas_enc') {
		include "modules/exportaciones/exp_salidas_enc/view.php";
	}
	elseif ($_GET['module'] == 'exp_entradas_enc') {
		include "modules/exportaciones/exp_entradas_enc/view.php";
	}
	
	elseif ($_GET['module'] == 'mercadotecnia_salidas_enc') {
		include "modules/mercadotecnia/mercadotecnia_salidas_enc/view.php";
	}
	elseif ($_GET['module'] == 'mercadotecnia_entradas_enc') {
		include "modules/mercadotecnia/mercadotecnia_entradas_enc/view.php";
	}
/*Fin nueva pantalla de conuslta de modulos*/		
	
/* Nuevo Modulo encabezado */
	elseif ($_GET['module'] == 'form_medicines_consulta_enc') {
		include "modules/trade/medicines_consulta_enc/form.php";
	}
	elseif ($_GET['module'] == 'form_cdc_salidas_enc') {
		include "modules/cdc/cdc_salidas_enc/form.php";
	}
	
	elseif ($_GET['module'] == 'form_exp_salidas_enc') {
		include "modules/exportaciones/exp_salidas_enc/form.php";
	}
	elseif ($_GET['module'] == 'form_RP_salidas_enc') {
		include "modules/RP/RP_salidas_enc/form.php";
	}
	elseif ($_GET['module'] == 'form_mercadotecnia_salidas_enc') {
		include "modules/mercadotecnia/mercadotecnia_salidas_enc/form.php";
	}
	
/* Fin nuevo modulo Encabezado */

	
	elseif ($_GET['module'] == 'stock_inventory') {
		include "modules/trade/stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'stock_report') {
		include "modules/trade/stock_report/view.php";
	}
/*Modulo de reporte nuevo*/

elseif ($_GET['module'] == 'cdc_stock_report_folio') {
	                        
include "modules/cdc/cdc_stock_report_folio/view.php";
	}
elseif ($_GET['module'] == 'exp_stock_report_folio') {
include "modules/exportaciones/exp_stock_report_folio/view.php";
	}
elseif ($_GET['module'] == 'RP_stock_report_folio') {
include "modules/RP/RP_stock_report_folio/view.php";
	}
elseif ($_GET['module'] == 'mercadotecnia_stock_report_folio') {
include "modules/mercadotecnia/mercadotecnia_stock_report_folio/view.php";
	}

/*Fin modulo de repote nuevo */	
	elseif ($_GET['module'] == 'stock_report_folio') {
		include "modules/trade/stock_report_folio/view.php";
	}
	
	elseif 
	 ($_GET['module'] == 'start_exp') {
		include "modules/start/start_exp/view_exp.php";
	}
	
	elseif 
	 ($_GET['module'] == 'start_exp_consulta') {
		include "modules/start/start_exp_consulta/view_exp_consulta.php";
	}
	
	
	elseif ($_GET['module'] == 'exp') {
		include "modules/exportaciones/exp/view.php";
	}

	elseif ($_GET['module'] == 'form_exp') {
		include "modules/exportaciones/exp/form.php";
	}
	

	elseif ($_GET['module'] == 'exp_entradas') {
		include "modules/exportaciones/exp_entradas/view.php";
	}

	elseif ($_GET['module'] == 'form_exp_entradas') {
		include "modules/exportaciones/exp_entradas/form.php";
	}
	
	elseif ($_GET['module'] == 'exp_salidas') {
		include "modules/exportaciones/exp_salidas/view.php";
	}

	elseif ($_GET['module'] == 'form_exp_salidas') {
		include "modules/exportaciones/exp_salidas/form.php";
	}
	

	elseif ($_GET['module'] == 'exp_stock_inventory') {
		include "modules/exportaciones/exp_stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'exp_stock_report') {
		include "modules/exportaciones/exp_stock_report/view.php";
	}
	
		elseif 
	 ($_GET['module'] == 'start_cdc') {
		include "modules/start/start_cdc/view_cdc.php";
	}
	
	
	elseif 
	 ($_GET['module'] == 'start_cdc_consulta') {
		include "modules/start/start_cdc_consulta/view_cdc_consulta.php";
	}
	
	
	elseif ($_GET['module'] == 'cdc') {
		include "modules/cdc/cdc/view.php";
	}

	elseif ($_GET['module'] == 'form_cdc') {
		include "modules/cdc/cdc/form.php";
	}
	

	elseif ($_GET['module'] == 'cdc_entradas') {
		include "modules/cdc/cdc_entradas/view.php";
	}

	elseif ($_GET['module'] == 'form_cdc_entradas') {
		include "modules/cdc/cdc_entradas/form.php";
	}
	
	elseif ($_GET['module'] == 'cdc_salidas') {
		include "modules/cdc/cdc_salidas/view.php";
	}

	elseif ($_GET['module'] == 'form_cdc_salidas') {
		include "modules/cdc/cdc_salidas/form.php";
	}
	

	elseif ($_GET['module'] == 'cdc_stock_inventory') {
		include "modules/cdc/cdc_stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'cdc_stock_report') {
		include "modules/cdc/cdc_stock_report/view.php";
	}
	
		
		elseif 
	 ($_GET['module'] == 'start_RP') {
		include "modules/start/start_RP/view_RP.php";
	}
	
		elseif 
	 ($_GET['module'] == 'start_RP_consulta') {
		include "modules/start/start_RP_consulta/view_RP_consulta.php";
	}
	
	
	elseif ($_GET['module'] == 'RP') {
		include "modules/RP/RP/view.php";
	}

	elseif ($_GET['module'] == 'form_RP') {
		include "modules/RP/RP/form.php";
	}
	

	elseif ($_GET['module'] == 'RP_entradas') {
		include "modules/RP/RP_entradas/view.php";
	}

	elseif ($_GET['module'] == 'form_RP_entradas') {
		include "modules/RP/RP_entradas/form.php";
	}
	
	elseif ($_GET['module'] == 'RP_salidas') {
		include "modules/RP/RP_salidas/view.php";
	}

	elseif ($_GET['module'] == 'form_RP_salidas') {
		include "modules/RP/RP_salidas/form.php";
	}
	

	elseif ($_GET['module'] == 'RP_stock_inventory') {
		include "modules/RP/RP_stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'RP_stock_report') {
		include "modules/RP/RP_stock_report/view.php";
	}
	
	
			
		elseif 
	 ($_GET['module'] == 'start_mercadotecnia') {
		include "modules/start/start_mercadotecnia/view_mercadotecnia.php";
	}
	
			elseif 
	 ($_GET['module'] == 'start_mercadotecnia_consulta') {
		include "modules/start/start_mercadotecnia_consulta/view_mercadotecnia_consulta.php";
	}
	
	
	elseif ($_GET['module'] == 'mercadotecnia') {
		include "modules/mercadotecnia/mercadotecnia/view.php";
	}

	elseif ($_GET['module'] == 'form_mercadotecnia') {
		include "modules/mercadotecnia/mercadotecnia/form.php";
	}
	

	elseif ($_GET['module'] == 'mercadotecnia_entradas') {
		include "modules/mercadotecnia/mercadotecnia_entradas/view.php";
	}

	elseif ($_GET['module'] == 'form_mercadotecnia_entradas') {
		include "modules/mercadotecnia/mercadotecnia_entradas/form.php";
	}
	
	elseif ($_GET['module'] == 'mercadotecnia_salidas') {
		include "modules/mercadotecnia/mercadotecnia_salidas/view.php";
	}

	elseif ($_GET['module'] == 'form_mercadotecnia_salidas') {
		include "modules/mercadotecnia/mercadotecnia_salidas/form.php";
	}
	

	elseif ($_GET['module'] == 'mercadotecnia_stock_inventory') {
		include "modules/mercadotecnia/mercadotecnia_stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'mercadotecnia_stock_report') {
		include "modules/mercadotecnia/mercadotecnia_stock_report/view.php";
	}

elseif 
	 ($_GET['module'] == 'start_sis') {
		include "modules/start/start_sis/view_sis.php";
	}
	
		elseif 
	 ($_GET['module'] == 'start_sis_consulta') {
		include "modules/start/start_sis_consulta/view_sis_consulta.php";
	}

	elseif ($_GET['module'] == 'sis') {
		include "modules/sis/sis/view.php";
	}

	elseif ($_GET['module'] == 'form_sis') {
		include "modules/sis/sis/form.php";
	}
	

	elseif ($_GET['module'] == 'sis_entradas') {
		include "modules/sis/sis_entradas/view.php";
	}

	elseif ($_GET['module'] == 'form_sis_entradas') {
		include "modules/sis/sis_entradas/form.php";
	}
	
	elseif ($_GET['module'] == 'sis_salidas') {
		include "modules/sis/sis_salidas/view.php";
	}

	elseif ($_GET['module'] == 'form_sis_salidas') {
		include "modules/sis/sis_salidas/form.php";
	}
	

	elseif ($_GET['module'] == 'sis_stock_inventory') {
		include "modules/sis/sis_stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'sis_stock_report') {
		include "modules/sis/sis_stock_report/view.php";
	}
	
	
	
		elseif 
	 ($_GET['module'] == 'start_almacenes') {
		include "modules/start/start_almacenes/view_almacenes.php";
	}
	
	
	/* Consulta de folios sin cancelacion para Jramos*/	
	elseif ($_GET['module'] == 'medicines_consulta_enc_almacen') {
		include "modules/trade/medicines_consulta_enc/view_almacen.php";
	}
	elseif ($_GET['module'] == 'exp_salidas_enc_almacen') {
		include "modules/exportaciones/exp_salidas_enc/view_almacen.php";
	}
	elseif ($_GET['module'] == 'RP_salidas_enc_almacen') {
		include "modules/RP/RP_salidas_enc/view_almacen.php";
	}
	
	elseif ($_GET['module'] == 'cdc_salidas_enc_almacen') {
		include "modules/cdc/cdc_salidas_enc/view_almacen.php";
	}
	elseif ($_GET['module'] == 'mercadotecnia_salidas_enc_almacen') {
		include "modules/mercadotecnia/mercadotecnia_salidas_enc/view_almacen.php";
	}
	
	/*--------------Fin consulta de folios sin cancelacion para jramos*/
	
	
	
 
	elseif ($_GET['module'] == 'user') {
		include "modules/user/view.php";
	}


	elseif ($_GET['module'] == 'form_user') {
		include "modules/user/form.php";
	}

	elseif ($_GET['module'] == 'profile') {
		include "modules/profile/view.php";
		}


	elseif ($_GET['module'] == 'form_profile') {
		include "modules/profile/form.php";
	}

	elseif ($_GET['module'] == 'password') {
		include "modules/password/view.php";
	}
}
?>