<!DOCTYPE html>
<html lang="tr">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
    <?php  $ayarlar=$this->db->get_where('ayarlar',array('id'=>1))->row_array(); ?>
	<title><?php  echo $ayarlar['title']; ?> | <?php  echo $ayarlar['slogan']; ?></title>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	
	<!-- Favicon icon -->
	<link rel="shortcut icon" type="image/ico" href="<?php echo site_url('uploads/'. $ayarlar['favicon']); ?>">
	<!-- Ana css -->
	<link rel="stylesheet" href="<?php echo site_url('resources/assets/css/style.css');?>">

	<!-- Dropzone file upload -->
	<link rel="stylesheet" href="<?php echo site_url('resources\assets\pluad\dropzone\dropzone.css');?>">
	<!-- Light box image galery -->
	<link rel="stylesheet" href="<?php echo site_url('resources\assets\pluad\lightbox\lightbox.css');?>">
	<!-- dropify-->
	<link rel="stylesheet" href="<?php echo site_url('resources\assets\pluad\dopi\css\dropify.css');?>">
	
	<!-- select-->
	<link rel="stylesheet" href="<?php echo site_url('resources\assets\pluad\select\select.css');?>">
	
	
	
  
	 <!-- sayfalama -->
	 <link rel="stylesheet" href="<?php echo site_url('resources\assets\pluad/');?>sayfalama/css/paginate.css">
    <link rel="stylesheet" href="<?php echo site_url('resources\assets\pluad/');?>sayfalama/css/ligne.css">
    <script type="text/javascript" src="<?php echo site_url('resources\assets\pluad/');?>sayfalama/js/paginate.js"></script>





	
	 <script src="<?php echo site_url('resources/'); ?>assets/js/jquery.js"></script>

<script type="text/javascript">
  var mesajses_cal = function(){
			//mesaj ses 
			document.getElementById("audio").play().catch(function() {
			});
		
	}
	
</script>
	

</head>
<body class="">
<?php  		
			$userid  =  $this->session->userdata('userid');
			$userad =  $this->session->userdata('userad');
			$userprofil  =  $this->session->userdata('userprofil');
			$useryetki =  $this->session->userdata('useryetki');

		
?>
  <audio id='audio'> <source src="<?php echo site_url('resources/assets/mesaj.mp3');?>" type="audio/mp3" /> </audio>
	<!-- [ Pre-loader ] start -->
	<div class="loader-bg">
		<div class="loader-track">
			<div class="loader-fill"></div>
		</div>
	</div>
	<!-- [ Pre-loader ] End -->
	<!-- [ navigation menu ] start -->
			
				<nav class="pcoded-navbar menu-light">
			
		<div class="navbar-wrapper  ">
			<div class="navbar-content scroll-div " >
				
				<div class="">
					<div class="main-menu-header">
						<img class="img-radius" src="<?php echo site_url('uploads/'.$userprofil);?>" alt="User-Profile-Image">
						<div class="user-details">
							<div id="more-details"><?php  echo   isimogren('yapan', $userid);  ?></div>
							<div id="more-details"><?php  echo   isimogren('yapangorev', $useryetki);  ?></div>
						</div>
					</div>
				</div>
				
				<ul class="nav pcoded-inner-navbar ">
					<li class="nav-item pcoded-menu-caption">
						<label>Menü</label>
					</li>
					<?php 
						
						$useryetki=$this->session->userdata('useryetki');
						
						$sayfa=$this->uri->segment(1);
						$sayfa2=$this->uri->segment(2);
						
						if ($useryetki==1)
							// Yönetici menüsü
							{
						
						//echo $sayfa;
						?>
						<li class="nav-item <?php if($sayfa=='anasayfa'){echo"active";};?>">
							<a href="<?php echo site_url('anasayfa/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-home"></i></span> <span class="pcoded-mtext">Anasayfa</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='calisan'){echo"active";};?>">
							<a href="<?php echo site_url('calisan/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-user"></i></span> <span class="pcoded-mtext">Çalışanlar</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='musteri'){echo"active";};?>">
							<a href="<?php echo site_url('musteri/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-users"></i></span> <span class="pcoded-mtext">Müşteriler</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='isler' && $sayfa2=='index'){echo"active";};?>">
							<a href="<?php echo site_url('isler/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-layers"></i></span><span class="pcoded-mtext">İşler</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='isler' && $sayfa2=='donenisler'){echo"active";};?>">
							<a href="<?php echo site_url('isler/donenisler');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-corner-up-left"></i></span> <span class="pcoded-mtext">Dönen İşler</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='isler' && $sayfa2=='tamam'){echo"active";};?>">
							<a href="<?php echo site_url('isler/tamam');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-check-circle"></i></span> <span class="pcoded-mtext">Tamamlanan İşler</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='revize' && $sayfa2=='index'){echo"active";};?>">
							<a href="<?php echo site_url('revize/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-message-circle"></i></span><span class="pcoded-mtext">Revize</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='revize' && $sayfa2=='ceviri'){echo"active";};?>">
							<a href="<?php echo site_url('revize/ceviri');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-globe"></i></span> <span class="pcoded-mtext">Çeviri</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='gmuhasebe' ){echo"active";};?>">
							<a href="<?php echo site_url('gmuhasebe/genel');?>" class="nav-link "><span class="pcoded-micon"><i class="fas fa-money-bill"></i></span><span class="pcoded-mtext">Muhasebe</span></a>
						</li>
                         <li class="nav-item <?php if($sayfa=='ayarlar' ){echo"active";};?>">
                             <a href="<?php echo site_url('ayarlar/edit/1');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-settings"></i></span><span class="pcoded-mtext">Ayarlar</span></a>
                          </li>
							<?php
							}else{
								
								// çalışan menüsü
							
						?>
						<li class="nav-item <?php if($sayfa=='anasayfa'){echo"active";};?>">
							<a href="<?php echo site_url('anasayfa/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-home"></i></span> <span class="pcoded-mtext">Anasayfa</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='cisler' && $sayfa2=='havuz'){echo"active";};?>">
							<a href="<?php echo site_url('cisler/havuz');?>" ><span class="pcoded-micon"><i class="feather icon-layers"></i></span> <span class="pcoded-mtext">İş Havuzu</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='cisler' && $sayfa2=='bende'){echo"active";};?>">
							<a href="<?php echo site_url('cisler/bende');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-corner-up-right"></i></span><span class="pcoded-mtext">Bendeki İşler</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='cisler' && $sayfa2=='tamamlanan'){echo"active";};?>">
							<a href="<?php echo site_url('cisler/tamamlanan');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-check-circle"></i></span><span class="pcoded-mtext">Tamamlanan İşler</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='revize'){echo"active";};?>">
							<a href="<?php echo site_url('revize/index');?>" class="nav-link "><span class="pcoded-micon"><i class="feather icon-message-circle"></i></span> <span class="pcoded-mtext">Revize</span></a>
						</li>
						<li class="nav-item <?php if($sayfa=='calisanmuhasebe'){echo"active";};?>">
							<a href="<?php echo site_url('calisanmuhasebe/index');?>" class="nav-link "><span class="pcoded-micon"><i class="fas fa-money-bill"></i></span> <span class="pcoded-mtext">Muhasebe</span></a>
						</li>
						<?php		
							}
						?>
					
				</ul>
				
				<div class="card text-center">
					<div class="card-block">
						<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
						<i class="feather icon-sunset f-40"></i>
						<h6 class="mt-3">Yardım</h6>
						<p>Bir Sorunla Karşılar veya sistem hakkında öneriniz olursa Lütfen Bildirin</p>
						
						
					</div>
				</div>
				
			</div>
		</div>
	</nav>

	<header class="navbar pcoded-header navbar-expand-lg navbar-light header-blue">
		
			
				<div class="m-header">
					<a class="mobile-menu" id="mobile-collapse" ><span></span></a>
					<a href="#!" class="b-brand">
						<!-- ========   change your logo hear   ============ -->
                        <img style="height: 40px;" src="<?php echo site_url('uploads/'. $ayarlar['logo']); ?>" alt="">
					</a>
					<a href="#!" class="mob-toggler">
						<i class="feather icon-more-vertical"></i>
					</a>
				</div>
				<div class="collapse navbar-collapse">
					
					<ul class="navbar-nav ml-auto">
						<li>
							<div class="dropdown">
								<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="bilsay"><i class="icon feather icon-bell"></i></a>
								<div class="dropdown-menu dropdown-menu-right notification">
									<div class="noti-head">
										<h6 class="d-inline-block m-b-0">Bildirimler</h6>
									</div>
									<ul class="noti-body">
										
											<div id="bilgel">
											</div>
									</ul>
									<div class="noti-footer">
										<a href="<?php echo site_url('bildirim/');?>">Tüm Bildirimler</a>
									</div>
								</div>
							</div>
						</li>
						<li>
					
							<div class="dropdown">
								<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="mesajsay"><i class="icon feather icon-mail"></i></a>
								<div class="dropdown-menu dropdown-menu-right notification">
									<div class="noti-head">
										<h6 class="d-inline-block m-b-0">Mesajlar</h6>
									</div>
									<ul class="noti-body">
									
									 	   <div id="mesajgel">
											</div>
									</ul>
									<div class="noti-footer">
										<a href="<?php echo site_url('revize/index');?>">Tüm Mesajlar</a>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="dropdown drp-user">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">
									<i class="feather icon-user"></i>
								</a>
								<div class="dropdown-menu dropdown-menu-right profile-notification">
									<div class="pro-head">
										<img src="<?php echo site_url('uploads/'. $userprofil); ?>" class="img-radius" alt="<?php echo $userad; ?>">
										<span><?php echo $userad; ?></span>
										<a href="<?php echo site_url('login/cikis'); ?>" class="dud-logout" title="Logout">
											<i class="feather icon-log-out"></i>
										</a>
									</div>
									<ul class="pro-body">
										<li><a href="<?php echo site_url('profil/'); ?>" class="dropdown-item"><i class="feather icon-user"></i> Profil</a></li>
										<li><a href="<?php echo site_url('login/cikis'); ?>" class="dropdown-item"><i class="feather icon-lock"></i> Çıkış Yap</a></li>
									</ul>
								</div>
							</div>
						</li>
					</ul>
				</div>
				
			
	</header>
	<!-- [ Header ] end -->
	
	<!-- [ ic bölüm ] bas -->
  
					<?php  
			
                    if(isset($_view) && $_view)
                        $this->load->view($_view);
					
                    ?>     
    
<!-- [ ic bölüm  ] bitis  -->

			
    <!-- Required Js -->
	<script src="<?php echo site_url('resources/'); ?>assets/js/vendor-all.min.js"></script>
    <script src="<?php echo site_url('resources/'); ?>assets/js/pcoded.min.js"></script> 
	
     
	
	<script src="<?php echo site_url('resources/'); ?>assets/js/plugins/bootstrap.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.18/dist/js/bootstrap-select.min.js"></script>

	
	
 

  <!-- file upload -->
  <script src="<?php echo site_url('resources\assets\pluad\dopi/js/dropify.js');?>"></script>
  <!-- jquerysession -->
  <script src="<?php echo site_url('resources\assets\pluad\jquerysession.js');?>"></script>
  <!-- Dropzone file upload -->
  <script src="<?php echo site_url('resources\assets\pluad\dropzone/dropzone.js');?>"></script>
  <!-- Lighbox image galery -->
  <script src="<?php echo site_url('resources\assets\pluad\lightbox/lightbox.js');?>"></script>
	<!-- smooth-scrollbar -->
  <script src="<?php echo site_url('resources\assets\pluad\smooth-scrollbar/smooth-scrollbar.js');?>"></script>
  

  <!-- sweet alert Js -->
	<script src="<?php echo site_url('resources/');?>assets/js/plugins/sweetalert.min.js"></script>
	<script src="<?php echo site_url('resources/');?>assets/js/pages/ac-alert.js"></script>

<script>
    (function(document, window, $) {
			Scrollbar.initAll();
			
		swal.setDefaults({ 
			confirmButtonText: "Tamam",
			cancelButtonText: "İptal" 
		});
				
		$('.dropify').dropify();
		

	   $('form').attr('autocomplete', 'off');
		
		$('[data-plugin="select2"]').selectpicker();
		
		$('[data-toggle="tooltip"]').tooltip();

	
			   
    })(document, window, jQuery);
	
	$( '.cikisyap' ).click(function() {
		
		$.session.clear();
		window.location.href = '<?php echo site_url('login/cikis');?>';
   
    });

					
			
			

  </script>


<script>
$(function(){

//mesajsayi session

if( $.session.get("mesajsayi") == undefined ){
	$.session.set("mesajsayi", "0");
}

$.mesaj_sayi_yenile = function(){
		$.session.set("mesajsayi", "0");
		$.ajax({
			async:true,
			type: "POST",
			url: "<?php echo site_url('anasayfa/mesajsayigoster');?>",
			success: function(cevap){
						if(cevap!=0)
						{
						$.session.set("mesajsayi", cevap );
						$("#mesajsay").html("<i class='icon feather icon-mail'></i><p class='badge badge-pill badge-primary'>" + $.session.get("mesajsayi") + "</p>" );
						}
			}
		});
};
$.mesaj_sayi_yenile();		


//bildirimler session
if( $.session.get("bilsayi") == undefined ){
	$.session.set("bilsayi", "0");
}

$.bil_sayi_yenile = function(){
		$.session.set("bilsayi", "0");
		$.ajax({
			async:true,
			type: "POST",
			url: "<?php echo site_url('anasayfa/yenibildirimsayi');?>",
			success: function(cevap){
						if(cevap!=0)
						{
						$.session.set("bilsayi", cevap );
						$("#bilsay").html("<i class='icon feather icon-bell'></i><p class='badge badge-pill badge-primary'>" + $.session.get("bilsayi") + "</p>" );
						}
			}
		});
};

$.bil_sayi_yenile();	


		
});
</script>
 <script>
    $( '#bilsay').click(function() {
		
		$("#bilgel").html('<center><div class="loader loader-default"></div></center>');
		$.getJSON("<?php echo site_url('anasayfa/bildirimcek');?>",function(data){
				if(data.length === 0)
				{
				$("#bilgel").html('<center>Yeni Bildiriminiz Yok </center>');	
				}
				$("#bilgel").html('');
			$.each(data,function(key,item){
				
				
				if(item.gor==0)
				{
				$("#bilgel").append("<a  class='gorulmedi'  href='<?php echo site_url();?>bildirim/gor/"+item.id+"' role='menuitem' ><li class='notification'><div class='media'><img class='img-radius' src='<?php echo site_url('uploads/'); ?>"+item.icon+"'><div class='media-body'><p><strong>"+item.bildirim+"</strong><span class='n-time text-muted'><i class='icon feather icon-clock m-r-10'></i>"+item.tarih+"</span></p><p>"+item.bildirim+"</p></div></div></li></a>");	
		
				}else
				{
				$("#bilgel").append("<a  href='<?php echo site_url();?>bildirim/gor/"+item.id+"' role='menuitem' ><li class='notification'><div class='media'><img class='img-radius' src='<?php echo site_url('uploads/'); ?>"+item.icon+"'><div class='media-body'><p><strong>"+item.bildirim+"</strong><span class='n-time text-muted'><i class='icon feather icon-clock m-r-10'></i>"+item.tarih+"</span></p><p>"+item.bildirim+"</p></div></div></li></a>");	
				}
				//bildirim seçilme kaldırma
				$("#bilgel").bind("contextmenu", function(){
                    return false;
                });
			})
			
		})
   
    });
	
	 $( '#mesajsay' ).click(function() {
		
		$("#mesajgel").html('<center><div class="loader loader-default"></div></center>');
		$.getJSON("<?php echo site_url('anasayfa/mesajcek');?>",function(data){
				
				if(data.length === 0)
				{
				$("#mesajgel").html('<center>Yeni Mesajınız Yok </center>');	
				}
				$("#mesajgel").html('');
			$.each(data,function(key,item){

				
				if(item.gor==0)
				{
				
				$("#mesajgel").append("<a  class='gorulmedi'  href='<?php echo site_url('revize/index');?>/"+item.isler+"' role='menuitem' ><li class='notification'><div class='media'><img class='img-radius' src='<?php echo site_url('uploads/'); ?>"+item.gonderen+"'><div class='media-body'><p><strong>"+item.gonderenad+"</strong><span class='n-time text-muted'><i class='icon feather icon-clock m-r-10'></i>"+item.tarih+"</span></p><p>"+item.aciklama+"</p></div></div></li></a>");	
		
				}else
				{
				$("#mesajgel").append("<a  href='<?php echo site_url('revize/index');?>/"+item.isler+"' role='menuitem' ><li class='notification'><div class='media'><img class='img-radius' src='<?php echo site_url('uploads/'); ?>"+item.gonderen+"'><div class='media-body'><p><strong>"+item.gonderenad+"</strong><span class='n-time text-muted'><i class='icon feather icon-clock m-r-10'></i>"+item.tarih+"</span></p><p>"+item.aciklama+"</p></div></div></li></a>");	
				}
				//bildirim seçilme kaldırma
				$("#mesajgel").bind("contextmenu", function(){
                    return false;
                });
			})
			
		})
   
    });

  </script>
<script>
//isler drop

Dropzone.options.myAwesomeDropzone = {
	autoProcessQueue: false,
  	uploadMultiple: true,
  	parallelUploads:10,
	successmultiple:function(data,response){
		$('#dosyagiden').attr('value', response);
		
	},
	init: function() {
		//Submitting the form on button click
		var submitButton = document.querySelector("#submit_dropzone_form");
			myDropzone = this; // closure
			submitButton.addEventListener("click", function() {
			myDropzone.processQueue(); // Tell Dropzone to process all queued files.
			
		});
		
	}
};


			  //calisan isler  drop
			Dropzone.options.calisandrop = {
				autoProcessQueue: false,
				uploadMultiple: true,
				parallelUploads:10,
				successmultiple:function(data,response){
					
						
					//Sayfayı Yenile
					 window.location.reload();
					
				},
				init: function() {
					//Submitting the form on button click
					var submitButton = document.querySelector("#submit_dropzone_form2");
						myDropzone = this; // closure
						submitButton.addEventListener("click", function() {
						myDropzone.processQueue(); // Tell Dropzone to process all queued files.
					});
				}
			};

</script>


<script>
//arama ve pattigon
if ($('.table tbody').length) {
 
 let options = {
        numberPerPage:5, 
        goBar:true, 
        pageCounter:true, 
    };

    let filterOptions = {
        el:'#arama' 
    };
	
    paginate.init('.table tbody',options,filterOptions);
    
}
</script>

<?php include "renk.php"; ?>


</body>
</html>



