<?php
require '../../config/database.php'; 
require '../model/model.php';

if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'main-total'){
	echo get_stats($_REQUEST['postcode']);
}
else if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'get_stats_fleet_size'){
	echo get_stats_fleet_size($_REQUEST['postcode']);
}
else if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'get_stats_fleet_size_no_web_phone'){
	echo get_stats_fleet_size_no_web_phone($_REQUEST['postcode']);
}
else if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'get_stats_fleet_size_no_phone'){
	echo get_stats_fleet_size_no_phone($_REQUEST['postcode']);
}
else if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'get_stats_fleet_size_no_web'){
	echo get_stats_fleet_size_no_web($_REQUEST['postcode']);
}
else if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'get_stats_phone_no'){
	echo get_stats_phone_no($_REQUEST['postcode']);
}