<?php  $ayarlar=$this->db->get_where('ayarlar',array('id'=>1))->row_array(); ?>
<!-- [ Main Content ] start -->
<div class="pcoded-main-container">
	<div class="pcoded-content">
		<!-- [ breadcrumb ] start -->
		<div class="page-header">
			<div class="page-block">
				<div class="row align-items-center">
					<div class="col-md-12">
						<div class="page-header-title">
							<h5 class="m-b-10"><?php  echo $ayarlar['title']; ?></h5>
						</div>
						<ul class="breadcrumb">
							<li class="breadcrumb-item"><a href="<?php echo site_url('anasayfa');?>"><i class="feather icon-home"></i></a></li>
							<li class="breadcrumb-item"><a href="#!">Anasayfa</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
 

         
      

<div class="row">
                    <div class="col-sm-4">
                        <div class="card">
                            <div class="card-body">
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <a href="<?php echo site_url('isler/index');?>">
                                        <h4 class="text-c-yellow"><?php echo toplamisadet();?></h4>
                                        <h6 class="text-muted m-b-0">Tüm işlerin Sayısı</h6>
                                        </a>
                                    </div>

                                    <div class="col-4 text-right">
                                        <i class="feather icon-bar-chart-2 f-28"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="card-footer bg-c-yellow">
                                <a href="<?php echo site_url('isler/index');?>">
                                <div class="row align-items-center">
                                    <div class="col-9">
                                        <p class="text-white m-b-0">Toplam İşler</p>
                                    </div>
                                    <div class="col-3 text-right">
                                        <i class="feather icon-trending-up text-white f-16"></i>
                                    </div>
                                </div>
                                </a>
                            </div>
                        </div>
                    </div>
					   
 
                    <div class="col-sm-4">
                        <div class="card">
                            <div class="card-body">
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <a href="<?php echo site_url('isler/donenisler');?>">
                                        <h4 class="text-c-red"><?php echo revizeisadet();?></h4>
                                        <h6 class="text-muted m-b-0">Revizeli İş Sayısı</h6>
                                        </a>
                                    </div>
                                    <div class="col-4 text-right">
                                        <i class="feather icon-file-text f-28"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="card-footer bg-c-red">
                                <a href="<?php echo site_url('isler/donenisler');?>">
                                <div class="row align-items-center">
                                    <div class="col-9">
                                        <p class="text-white m-b-0">Onaylanmayan İşler</p>
                                    </div>
                                    <div class="col-3 text-right">
                                        <i class="feather icon-trending-up text-white f-16"></i>
                                    </div>
                                </div>
                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="card">
                            <div class="card-body">
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <a href="<?php echo site_url('isler/tamam');?>">
                                        <h4 class="text-c-green"><?php echo onayisadet();?></h4>
                                        <h6 class="text-muted m-b-0">Tamamlanan İş Sayısı</h6>
                                        </a>
                                    </div>
                                    <div class="col-4 text-right">
                                        <i class="feather icon-calendar f-28"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="card-footer bg-c-green">
                                <a href="<?php echo site_url('isler/tamam');?>">
                                <div class="row align-items-center">
                                    <div class="col-9">
                                        <p class="text-white m-b-0"> Onaylanan İşler</p>
                                    </div>
                                    <div class="col-3 text-right">
                                        <i class="feather icon-trending-down text-white f-16"></i>
                                    </div>
                                </div>
                                </a>
                            </div>
                        </div>
                    </div>
              </div>



      <div class="row" data-by-row="true">
        <div class="col-xxl-3 col-xl-3" style="">
		
            <div class="card user-card user-card-1 mt-4">
                    <div class="card-body pt-0">
                        <div class="user-about-block text-center">
                            <div class="row align-items-end">
                                <div class="col text-left pb-3">
                                    <span class="badge badge-success">Online</span>
                                </div>
                                <div class="col"><img class="img-radius img-fluid wid-100" src="<?php echo site_url('uploads/'. $calisan['profil']); ?>" alt="User image"></div>
                                <div class="col text-right pb-3">
                                 
                                </div>
                            </div>
                        </div>
                        <div class="text-center">
                            <a href="#!" data-toggle="modal" data-target="#modal-report">
                                <h4 class="mb-1 mt-3"><?php echo $calisan['ad']; ?></h4>
                            </a>
                            <p class="mb-3 text-muted"><?php /*Veri Tabanı Ad Sorgulama */ echo   isimogren('istur', $calisan['tur']);  ?></p>
                            <p class="mb-1"><b>Email : </b><?php echo $calisan['mail']; ?></p>
                            <p class="mb-0"><b>Telefon: </b><?php echo $calisan['telefon'];  ?></p>
                        </div>
					</div>
                </div>
				
        </div>
		
		<div class="col-xxl-9 col-lg-9 " id="arama">
		<div class="card card-shadow">
		<div class="card-block text-center bg-white p-40">
		<div class="example-wrap">
                <h4 class="example-title">Tüm İşler</h4>
                <div class="example table-responsive-lg">
                  <table class="table">
                    <thead>
                      <tr>
                        <th>Müşteri</th>
                        <th>Yapan Çalışan</th>
                        <th>Açıklama</th>
                        <th>Durum</th>
                       
                      </tr>
                    </thead>
                    <tbody>
					<?php 
						$useryetki=$this->session->userdata('useryetki');
						
						if ($useryetki==1)
							{
								// Yönetici 
								$detayislink="isler/detay/";
							}
							else{
								// Çalışan 
								$detayislink="cisler/detay/";
							}
						
						?>
					<?php foreach($isler as $i){ ?>
                      <tr>
                        <td><?php /*Veri Tabanı Ad Sorgulama */ echo  isimogren('musteri', $i['musteri']);  ?></td>
                        <td><?php /*Veri Tabanı Ad Sorgulama */ echo  isimogren('yapan', $i['yapan']);  ?> </td>
                        <td><?php echo mb_substr($i['aciklama'],0,40); ?>...</td>
                      
                       <td><?php $durum = $i['onay'];  if($durum==0){?> <span class="badge badge-warning">Yeni</span><?php } if($durum==1){?><span class="badge badge-primary">Yapılıyor</span> <?php } if($durum==2){?><span class="badge badge-danger">Revize</span><?php } if($durum==3){?><span class="badge badge-info">Onaylandı</span> <?php } ?></td>
						
                      </tr>
					  <?php } ?>
                   </tbody>
                  </table>
				   
				  
				  
				 
								
                </div>
          </div>
          </div>
          </div>
          </div>
		   
		</div>
      
  </div>
  </div>
  
  	</div>
</div>
<!-- [ Main Content ] end -->