<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">İş Detayları</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="">İşler</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!-- [ breadcrumb ] end -->
        <!-- [ Main Content ] start -->
       
 <div class="row justify-content-center">
            <!-- liveline-section start -->
	
	
	
						<div class="col-md-9">
								<div class="card user-card user-card-1">
									
									<div class="card-body pt-0">
										<div class="user-about-block text-center">
											<div class="row align-items-end">
												<div class="col"></div>
												<div class="col"><img class="img-radius img-fluid wid-80" src="<?php echo site_url('uploads/'.isimogren('musterilogo', $isler['musteri']) ); ?>" alt="User image"></div>
												<div class="col"></div>
											</div>
										</div>
										<div class="text-center">
											<h6 class="mb-1 mt-3"><?php /*Veri Tabanı Ad Sorgulama */ echo  isimogren('musteri', $isler['musteri']);  ?></h6>
										</div>
										<hr>
										<p class="mb-0"><?php echo $isler['aciklama'];?></p>
										
										
									
										<hr class="wid-80 b-wid-3 my-4">
										<div class="row text-center">
											<div class="col">
												<h6 class="mb-1">İş Türü</h6>
												<p class="mb-0"><?php /*Veri Tabanı Ad Sorgulama */ echo  isimogren('istur', $isler['istur']);  ?></p>
											</div>
											<div class="col">
												<h6 class="mb-1">Acil</h6>
												<p class="mb-0"><?php $acil = $isler['acil'];  if($acil==1){?> <span class="badge badge-danger">Çok Acil</span><?php } if($acil==2){?><span class="badge badge-danger">Acil</span> <?php } if($acil==3){?><span class="badge badge-info">Normal</span><?php } if($acil==4){?><span class="badge badge-warning">Yavaş</span> <?php } ?></p>
											</div>
											<div class="col">
												<h6 class="mb-1">Durum</h6>
												<p class="mb-0"> <?php $durum = $isler['onay'];  if($durum==0){?> Yeni	<?php } if($durum==2){?>Revize <?php } if($durum==3){?>Onaylandı<?php } ?></p>
											</div>
											<div class="col">
												<h6 class="mb-1">Fiyat</h6>
												<p class="mb-0"><?php echo $isler['fiyat'];?></p>
											</div>
											<div class="col">
												<h6 class="mb-1">Müşteri Reçete</h6>
												<p class="mb-0"><?php if($musteri['recete']!="") {  ?>
													<a href="<?php echo site_url('uploads/'. $musteri['recete']); ?>"  target="_blank" class="btn btn-success  waves-effect waves-classic" >
														Reçete İndir
													</a>

													<?php }else{echo "Dosya Yüklenmemiş";}  ?></p>
											</div>
										</div>
									</div>
								</div>
						</div>
							
					<div class="col-md-3" style="">
					
					<div class="card new-cust-card" style="">
					<div class="card-header">
						<h5>Kişiler</h5>
						<div class="card-header-right">
							
						</div>
					</div>
					
						<div class="card-body p-b-0">
							<div class="align-middle m-b-25">
								<img src="<?php echo site_url('uploads/'.isimogren('yapanprofil', $ekleyen['id']) ); ?>" alt="user image" class="img-radius align-top m-r-15">
								<div class="d-inline-block">
									<a href="#!">
										<h6><?php /*Veri Tabanı Ad Sorgulama */   $isiyukleyen=isimogren('yapan', $ekleyen['id']); echo $isiyukleyen; ?></h6>
									</a>
									<p class="m-b-0">İşi Yükleyen Yönetici</p>
									<span class="status active"></span>
								</div>
							</div>
							<?php if(($isler['yapan']!=0)) {  ?>
							<div class="align-middle m-b-25">
								<img src="<?php echo site_url('uploads/'.isimogren('yapanprofil', $isler['yapan']) ); ?>" alt="user image" class="img-radius align-top m-r-15">
								<div class="d-inline-block">
									<a href="#!">
										<h6><?php /*Veri Tabanı Ad Sorgulama */   $isialan=isimogren('yapan', $isler['yapan']); echo $isialan; ?></h6>
									</a>
									<p class="m-b-0">İşi Alan Çalışan</p>
									<span class="status active"></span>
								</div>
							</div>
							<?php }else{  ?>
							
							<?php } ?>
						</div>
					
					</div>
					
					</div>
	
	

<?php
//divlerin boyutlarını ayarlamak için


 if(($isler['dosyagiden']=="" && $isler['dosyadonen']!="") || ($isler['dosyagiden']!="" && $isler['dosyadonen']=="")) { 

$dosyasm=8;
 }else{
	 
	$dosyasm=4; 
 }

?>
	
<?php if(($isler['dosyagiden']=="")) { ?>



<?php }else{ ?>
<div class="col-md-<?php echo $dosyasm; ?>" style="">
			
                     <?php coklu_dosya_yazdir($isler['dosyagiden'],$isiyukleyen,"İş Dosyaları"); ?>
                 

</div>

<?php } ?>
	
	
<?php if(($isler['dosyadonen']=="")) {  ?>



<?php }else{ ?>
<div class="col-md-<?php echo $dosyasm; ?>" style="">
			
                     <?php coklu_dosya_yazdir($isler['dosyadonen'],$isialan,"Yapılan Çalışmalar"); ?>
                 

</div>

<?php } ?>


			<div class="col-md-4" style="">
					
					<div class="card new-cust-card" style="">
					<div class="card-header">
						<h5>İşlemler</h5>
						<div class="card-header-right">
							
						</div>
					</div>
					
						<div class="card-body p-b-0">
						<?php 
						$useryetki=$this->session->userdata('useryetki');
						
						if ($useryetki==1)
							{
								// Yönetici 
								?>
							 <a href="<?php echo site_url('isler/add/'); ?>" class="btn btn-icon btn-outline-info" data-toggle="tooltip" data-placement="top" title="Yeni İş Ekle"><i class="feather icon-plus"></i></a>
							 <a href="<?php echo site_url('revize/index/'.$isler['id']); ?>" class="btn btn-icon btn-outline-info" data-toggle="tooltip" data-placement="top" title="Revize"><i class="feather icon-message-circle"></i></a>
                             <a href="<?php echo site_url('isler/edit/'.$isler['id']); ?>" class="btn btn-icon btn-outline-success"data-toggle="tooltip" data-placement="top" title="Düzenle"><i class="feather icon-edit"></i></a>
                             <a href="#" data-toggle="modal" data-target="#sil<?php echo $isler['id']; ?>" class="btn btn-icon btn-outline-danger"data-toggle="tooltip" data-placement="top" title="Sil"><i class="feather icon-trash-2"></i></a>
                    
								<?php
							}else{
								// Çalışan 
								$userid=$this->session->userdata('userid');
								if ($isler['yapan']==$userid)
								{
								?>
								
								<a href="<?php echo site_url('revize/index/'.$isler['id']); ?>" class="btn btn-icon btn-outline-info" data-toggle="tooltip" data-placement="top" title="Revize"><i class="feather icon-message-circle"></i></a>
								<a href="<?php echo site_url('cisler/calismagonder/'.$isler['id']); ?>" class="btn btn-icon btn-outline-info" data-toggle="tooltip" data-placement="top" title="Çalışma Gönder"><i class="feather icon-file-minus"></i></a>
							
									
								<?php
								}else if($isler['istur']==isimogren('yapangorevid',$userid)){
								?>
								
								<a href="<?php echo site_url('cisler/al/'.$isler['id']); ?>" class="btn btn-icon btn-outline-success" data-toggle="tooltip" data-placement="top" title="İşi Al"><i class="feather icon-file-plus"></i></a>
									
								<?php	
								}else{
								?>
								
								<span class="badge badge-light-danger">Yetkiniz Yok</span>	
								
								<?php	
								}
							}
						
						?>
							
						</div>
					
					</div>
					
			</div>
	
	







		</div>
	</div>
  </div>
   
  <div class="modal fade modal-default" id="sil<?php echo $isler['id']; ?>" aria-hidden="true" role="dialog" tabindex="-1">
                    <div class="modal-dialog">
                      <div class="modal-content modal-simple modal-center">
                        <div class="modal-header">
                        
                          <h4 class="modal-title">İşi Silmek İstediğinize Emin misiniz ?</h4>
                        </div>
                        <div class="modal-body">
							</br>
						 Müşteri -<?php /*Veri Tabanı Ad Sorgulama */ echo  isimogren('musteri', $isler['musteri']);  ?></br>
						 İş türü -<?php /*Veri Tabanı Ad Sorgulama */ echo  isimogren('istur', $isler['istur']);  ?></br>
						Açıklama -<?php echo $isler['aciklama']; ?></br>
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-default btn-pure" data-dismiss="modal">Kapat</button>
                          <a href="<?php echo site_url('isler/remove/'.$isler['id']); ?>" class="btn btn-success btn-sm waves-effect waves-classic"><span class="fa fa-trash"></span> Sil</a>
                        </div>
                      </div>
                    </div>
       </div>
  