Fifth pass at adding key files
This commit is contained in:
		
							
								
								
									
										26
									
								
								site/stackreach/delete_brand.php
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								site/stackreach/delete_brand.php
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
<?php
 | 
			
		||||
include_once 'config.php';
 | 
			
		||||
include_once './models/services/BrandService.php';
 | 
			
		||||
include_once './config.php';
 | 
			
		||||
 | 
			
		||||
if ( ! is_updater() )
 | 
			
		||||
    return header('location:http://www.slowtwitch.com');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if($_SERVER['REQUEST_METHOD']=='POST')
 | 
			
		||||
{
 | 
			
		||||
    if (is_updater ())
 | 
			
		||||
    {
 | 
			
		||||
        $brandID = $_POST['brand_id'];
 | 
			
		||||
        $brandService = new BrandService();
 | 
			
		||||
        $brandService->deleteBrand($brandID);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
else
 | 
			
		||||
{
 | 
			
		||||
    echo $_SERVER['REQUEST_METHOD'];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header('location:brands.php');
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
		Reference in New Issue
	
	Block a user