<?php
header("Content-Type: text/html;charset=utf-8");
require_once("dbcontroller.php");
include("JSON.php");
/* 
A domain Class to demonstrate RESTful web services
*/
Class Mobile {
	private $mobiles = array();
	
	public function getDataico(){
		$syseli="Eliminado";
		//if (isset($_REQUEST['tipo'])){$tipo=$_REQUEST['tipo'];}else{$tipo="";}
		if (isset($_REQUEST['documento'])){$documento=$_REQUEST['documento'];}else{$documento="";}
		if (isset($_REQUEST['empresa'])){$empresa=$_REQUEST['empresa'];}else{$empresa="";}
		if (isset($_REQUEST['accion'])){$accion=$_REQUEST['accion'];}else{$accion="";}
		
		//if($tipo=="l"){
			//$query = "SELECT * FROM documentos where codigo='YR994929467'  " ;
			$query = "select documentos.*,admemp.keyfel,'' as modope,prvtec.rutfel from documentos,admemp,prvtec where prvtec.codprv='dataico' and documentos.codemp=admemp.codfel and documentos.estado!='Eliminado' and documentos.codigo='".$documento."' and documentos.codemp='".$empresa."' ";		
			$dbcontroller = new DBController();
			$this->mobiles = $dbcontroller->executeSelectQuery($query);
			return $this->mobiles;
			
	   //}
	}	
	
}
?>