<?php

include_once './config.php';
include_once './models/services/BrandService.php';

if ( ! is_updater() )
    return header('location:http://www.slowtwitch.com');

if($_SERVER['REQUEST_METHOD']=='POST')
{
    if (is_updater ())
    {
        $brand_id = $_POST['brand_id'];
        $brandService = new BrandService();
        
        $item = $brandService->getBrandByID($brand_id);
        $item->approved = 1;

        $brandService->updateBrand($item);
        
    }
}
else
{
    echo $_SERVER['REQUEST_METHOD'];
}

header('location:brands.php');

?>