
  <!-- [ 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">Müşteriler</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="#!">Müşteriler</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!-- [ breadcrumb ] end -->
        <!-- [ Main Content ] start -->
        <div class="row">
            <!-- customar project  start -->
			<div class="col-sm-9">
                <div class="card">
                    <div class="card-body text-center">
                        <div class="row align-items-center m-l-0">
                            <div class="col-sm-6 text-left">
                                <h5>Tüm Müşteriler</h5>
                            </div>
                            <div class="col-sm-6 text-right">
                                <button type="button" class="btn btn-primary btn-sm" onclick="location.href='<?php echo site_url('musteri/add');?>'" ><i class="feather icon-plus"></i>Müşteri Ekle</button>
                            </div>
						</div>
							<ul class="list-inline">
								<li class="list-inline-item border-right m-0"><a href="#!" class="pr-2 pl-1 font-weight-bolder"> Tümü</a></li>
           
							</ul>
                  </div>
                </div>
            </div>
			
			<div class="col-sm-3">
					<div class="card">
								<div class="card-body">
									<div class="input-group">
										<input type="search" id="arama" placeholder="Arama...">
									</div>
								</div>
					</div>
			</div>
            <div class="col-xl-12">
                <div class="card">
                    <div class="card-body">
                       
                        <div class="table table-responsive">
                            <table id="report-table" class="table mb-0">
                                <thead class="thead-light">
                                    <tr>
										<th>Logo</th>
										<th>Ad</th>
										<th>Adres</th>
										<th>Reçete</th>
										<th>Kayıt Tarihi</th>
										<th>Eylemler</th>
                                    </tr>
                                </thead>
                                <tbody>
								<?php foreach($musteri as $m){ ?>
                                    <tr>
                                        <td class="align-middle">
											<?php musteriyaz($m['id']) ?>
                                        </td>
                                        <td><?php echo $m['ad']; ?></td>
										<td><?php echo $m['adres']; ?></td>
                                         <td>			
										<?php if($m['recete']!="") {  ?>
										
										<a href="<?php echo site_url('uploads/'. $m['recete']); ?>" target="_blank" class="btn btn-success ladda-button waves-effect waves-classic" data-style="slide-down" data-plugin="ladda">
										  <span class="ladda-label"><i class="icon md-long-arrow-down mr-10" aria-hidden="true"></i>Reçete İndir</span>
										</a>
									 
										<?php }else{ ?>
										Reçete Yüklenmemiş
										<?php }  ?>
										</td>
										<td><?php echo $m['kayittarih']; ?></td>

                                        <td class="table-action">
                                            <a href="<?php echo site_url('musteri/edit/'.$m['id']); ?>" class="btn btn-icon btn-outline-success"><i class="feather icon-edit"></i></a>
                                            <a  href="#" data-toggle="modal" data-target="#sil<?php echo $m['id']; ?>"  class="btn btn-icon btn-outline-danger"><i class="feather icon-trash-2"></i></a>
                                        </td>
                                    </tr>
									  
									  <div class="modal fade modal-default" id="sil<?php echo $m['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">Müşteriyi Silmek İstediğinize Emin misiniz ?</h4>
											</div>
											<div class="modal-body">
												</br>
											 <?php echo $m['ad']; ?>
											</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('musteri/remove/'.$m['id']); ?>" class="btn btn-success btn-sm waves-effect waves-classic"><span class="fa fa-trash"></span> Sil</a>
											</div>
										  </div>
										</div>
									  </div>
								<?php } ?>
                                 </tbody>
                            </table>
							
                        </div>
                    </div>
                </div>
            </div>
            <!-- customar project  end -->
        </div>
        <!-- [ Main Content ] end -->
    </div>
</div>
