ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/var/www/html/tien-dien/code/admin/store/del.php
<?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');
}
?>

ZeroDay Forums Mini