<?php

class anlikkontrol extends CI_Controller{
    function __construct()
    {
        parent::__construct();
		
    } 
	
	//////////////////////////////////ADMİN//////////////////////////////////////////
	///Calisan///
	function admin_calisan($userid)
    {
		
			
		$veri = $this->db->query("SELECT * FROM  calisan ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Müşteri///
	function admin_musteri($userid)
    {
		
			
		$veri = $this->db->query("SELECT * FROM  musteri ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///İşler///
	function admin_isler($userid)
    {
		
			
		$veri = $this->db->query("SELECT * FROM  isler ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Dönen İşler///
	function admin_donen_isler($userid)
    {
		
			
		$veri = $this->db->query("SELECT * FROM  isler WHERE dosyadonen!=0 AND onay!=3 ORDER BY id DESC")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Tamamlanan İşler///
	function admin_tamam_isler($userid)
    {
		
			
		$veri = $this->db->query("SELECT * FROM  isler WHERE onay=3 ORDER BY id DESC")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Revize///
	function admin_revize($userid)
    {
	
		$veri = $this->db->query("SELECT * FROM  revize WHERE  alan=$userid  ORDER BY id DESC")->result_array();
	
		echo	md5(json_encode($veri));
		
    }
	///////////////////////////////////ÇALIŞAN////////////////////////////////////
	///Tamam///
	function calisan_tamam($userid)
    {
		
			
		$veri = $this->db->query("SELECT * FROM  isler WHERE  yapan=$userid AND onay=3 ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Havuz///
	function calisan_havuz($useryetki)
    {
				
		$veri = $this->db->query("SELECT * FROM  isler WHERE  istur=$useryetki AND yapan=0 ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Havuz///
	function calisan_bende($userid)
    {
		
		
		$veri = $this->db->query("SELECT * FROM  isler WHERE  yapan=$userid  ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	///Revize///
	function calisan_revize($userid)
    {
		
		
		$veri = $this->db->query("SELECT * FROM  revize WHERE  alan=$userid  ORDER BY id DESC ")->result_array();
		
		echo	md5(json_encode($veri));
		
    }
	
}