ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /proc/self/root/var/www/html/tien-dien/code/admin/store/ |
<?php global $DB, $CORE, $print; $id = (isset($CORE->input['id']) && $CORE->input['id'] > 0) ? intval($CORE->input['id']) : 0; if ($id > 0) { // Check if there are products associated with this store $check_products = $DB->query("SELECT COUNT(*) as count FROM tb_product WHERE store_id = '$id'"); $product_count = $DB->fetch_row($check_products); if ($product_count['count'] > 0) { echo "<script>alert('Không thể xóa cá»a hà ng nà y vì có sản phẩm Ä‘ang liên kết vá»›i cá»a hà ng.'); window.location='?act=admin&code=store';</script>"; } else { // Delete the store $DB->query("DELETE FROM tb_stores WHERE store_id = '$id'"); $print->refresh('?act=admin&code=store'); } } else { $print->refresh('?act=admin&code=store'); } ?>