示例#1
0
<?php

// initialize
include_once '../../../common/init.php';
if (!isLoggedInAdmin()) {
    redirect('');
} else {
    // include needed database functions
    include_once $BASE_PATH . 'database/brands.php';
    $id = $_GET['id'];
    if (!empty($id)) {
        deleteBrand($id);
    }
    redirect('pages/manager/brands/list_brands.php');
}
示例#2
0
<?php

include 'config/autoload.php';
if (!isset($_GET['id'])) {
    header('Location: brand.php');
}
deleteBrand($db, $_GET['id']);
header('Location: brand.php');