📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv9.demodesign.com.tr
/
adminco
📝
ajax_table.php
← Geri Dön
<?php require_once('../init.php'); if(!m_admin_check()) { m_redirect(ADMIN_URL.'/login.php'); } if($_GET['type']) { switch(m_a_g('type')) { case 'products': if(m_a_g('search')=='') { if($_GET['c_id']) { $informations = $db->table('products')->where_set('c_id','LIKE',"'[%".m_a_g('c_id')."]%'")->pagination(20)->order('id','desc')->get(); } elseif($_GET['b_id']) { $informations = $db->table('products')->where('b_id','=',m_a_g('b_id'))->pagination(20)->order('id','desc')->get(); } else { $informations = $db->table('products')->pagination(20)->order('id','desc')->get(); } } else { if($_GET['c_id']) { $informations = $db->table('products')->where_set('c_id','LIKE',"'%[".m_a_g('c_id')."]%'")->where_set('title','LIKE',"'%".m_a_g('search')."%'",'AND (')->where('stock_code','=',m_a_g('search'),'OR')->where('barcode','=',m_a_g('search'),'OR',')')->pagination(20)->order('id','desc')->get(); echo $db->error().'aa'; } elseif($_GET['b_id']) { $informations = $db->table('products')->where('b_id','=',m_a_g('b_id'))->where('stock_code','=',m_a_g('search'),'OR')->where('barcode','=',m_a_g('search'))->pagination(20)->order('id','desc')->get(); } else { $informations = $db->table('products')->where_set('title','LIKE',"'%".m_a_g('search')."%'",'OR')->where('stock_code','=',m_a_g('search'),'OR')->where('barcode','=',m_a_g('search'))->pagination(20)->order('id','desc')->get(); } } $return = '<div class="ajax_table_header"><div class="ajax_table_header_inner"><span class="btn btn-primary btn-sm"><i class="fa fa-list"></i> '.LGA_TOTAL_RECORDS.': '.number_format($informations['total_count']).'</span></div> '.m_ajax_pagination($informations['total_page'],$informations['current_page']).' </div>'; $return.= '<table class="table table-bordered table-hover"> <thead> <tr> <th style="max-width:80px">'.LGA_PRODUCT_IMAGE.'</th> <th>'.LGA_STOCK_CODE.'</th> <th>'.LGA_PRODUCT_NAME.'</th> <th>'.LGA_STOCK.'</th> <th>'.LGA_PRICE.'</th> <th class="text-center">'.LGA_STATUS.'</th> <th class="text-end">'.LGA_ACTIONS.'</th> </tr> </thead> <tbody> <tbody>'; if($informations['total_count']>0) { foreach($informations['data'] as $info) { $return.= ' <tr> <td style="max-width:80px"><a href="'.m_image_url($info['image']).'" data-fancybox=""><img class="img-thumbnail" style="width:50px;height:50px;object-fit: contain;" src="'.m_image_url($info['image'],true).'"></a></td> <td>'.$info['stock_code'].'</td> <td>'.$info['title'].'</td> <td>'.number_format($info['stock']).'</td> <td data-order="'.m_remove_dot($info['sale_price']).'">'.m_currency($info['sale_price']).' '.currency_types($info['currency_type'],'value').'</td> <td class="text-center" data-order="'.$info['status'].'">'.m_admin_ajax_status('products',$info['id'],$info['status']).'</td> <td class="text-end"> <a href="'.ADMIN_URL.'/index.php?page=product_edit&id='.$info['id'].'"><span class="btn btn-sm btn-soft-primary"><i class="fa fa-edit"></i></span></a> <a class="delete" data-question="'.LGA_DELETE_QUESTION.'" href="'.ADMIN_URL.'/index.php?page=delete&table=products&id='.$info['id'].'"><span class="btn btn-sm btn-soft-danger"><i class="fa fa-trash"></i></span></a> </td> </tr>'; } } $return.= '</tbody></table></div>'; echo $return; break; } } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula