Minnesota Court Ordered Alcohol and Drug Rehab Centers
Many individuals under the influence of drugs or alcohol are more willing to take part in activities, especially criminal activities, than if they were sober. The state of Minnesota often offers court-ordered treatment instead of punishment to individuals who have been caught committing a drug-related crime.
Drug and Alcohol Treatment and Recovery
Drug and alcohol addiction is an incredibly serious issue that affects millions of people all over the United States on a daily basis. In Minnesota in particular, it was estimated that almost half of all males that were arrested in the past 30 days alone were taken into custody as the result of some type of binge or excessive drinking situation.
In many of these types of cases, court-ordered treatment will be sentenced by a judge in court in an attempt to force the person in question to get the type of help that they need to beat their issues once and for all. In many situations, the person may be given a choice: they can either serve out a jail sentence or complete a mandatory treatment program at a facility in the area where they live. This type of treatment has the benefit of forcing the person to seek help for their addiction troubles, which is a type of power that the individual’s closest friends and family members may not necessarily have.
Cities In Minnesota With Court-Ordered Rehabs
//$startTime = microtime(true);
require_once 'inc/db.php';
require_once 'inc/lookups.php';
$requestLookup = $requestLookup ? $requestLookup : sanitize_text_field($_GET['lookup']);
$requestState = $requestState ? $requestState : sanitize_text_field($_GET['state']);
$requestCity = $requestCity ? $requestCity : sanitize_text_field($_GET['city']);
$requestLocation = $requestLocation? $requestLocation : sanitize_text_field($_GET['location']);
$dataOnly = $dataOnly ? $dataOnly : (bool) $_GET['dataonly'];
if ($requestLookup) {
if (array_key_exists($requestLookup, $lookupGroups)) {
$lookup = $requestLookup;
if (is_array($lookupGroups[$lookup])) {
$lookupGroup = $lookupGroups[$lookup];
}
$lookupName = $lookupTitles[$lookup];
}
if (!$lookup) {
$err['lookup'] = "Sorry, we couldn't find that category.";
}
}
if ($requestState && $lookup) {
$stateSlug = str_replace('-'.$requestLookup, '', $requestState);
$state = Model::factory('State')->where('url', $stateSlug)->find_one();
if (!$state) {
$err['state'] = "Sorry, we couldn't find that state.";
$is404 = true;
}
}
if ($requestCity && $state) {
$city = $state->city()->where('url', $requestCity)->find_one();
if (!$city) {
$err['city'] = "Sorry, we couldn't find that city.";
$is404 = true;
}
}
if ($requestLocation && $city ) {
/* Fetch Location Only under primary Lookup*/
if($lookup=='rehab-centers')
$location = $city->location()->where('url', $requestLocation)->find_one();
if (!$location) {
$err['location'] = "Sorry, we couldn't find that location.";
$is404 = true;
}
/* Special Header Addons - Locations Under Sub Lookups*/
if($lookup!='rehab-centers')
$sublookup_head = true;
}
/***
* Let's work backwards with what we have.
***/
// City Table Column Selector :: Num Locations by Lookup
switch($lookup){
case 'inpatient-rehab-centers' : $col = 'num_inpa'; break;
default : $col = 'num_locations';
}
if ($location) {
$attributes['S'] = $attributes['T'] = $attributes['D'] = $attributes['P'] = array();
foreach ($location->attribute()->find_many() as $attribute) {
$attributes[$attribute->type][] = $attribute;
}
$mapAddress = urlencode($location->location_street1 . ' ' . $location->location_street2 . ' ' . $city->name . ' ' . $state->abbr);
if ($dataOnly) {
// Reserved for location data-only
} else {
include_once 'templates/location.php';
}
}
else if ($city) {
if ($lookup == 'inpatient-rehab-centers') {
// Special case; exclude outpatient rehabs from inpatient list
$locations = ORM::for_table('location')
->raw_query('SELECT location.*
FROM location JOIN attribute_location ON location.id = attribute_location.location_id
WHERE location.city_id = ?
AND attribute_location.attribute_id IN (25,26,27)
AND location.id NOT IN (
SELECT location_id
FROM attribute_location
WHERE attribute_id = 23
)
GROUP BY location.id', array($city->id))
->find_many();
}
elseif ($lookupGroup) {
$built_re_state = explode('-'.$requestLookup,$requestState)[0];
$build_redirect = '/rehab-centers/'.$built_re_state.'-rehab-centers/'.$requestCity.'/';
header("HTTP/1.1 301 Moved Permanently");
header('Location: https://www.rehabcenter.net' . $build_redirect);
exit();
// Standard lookups
//$locations = ORM::for_table('location')->where('location.city_id', $city->id)->join('attribute_location', array('location.id', '=', 'attribute_location.location_id'))->where_in('attribute_location.attribute_id', $lookupGroup)->group_by('location.id')->find_many();
}
else {
// Show all rehab centers
$locations = $city->location()->find_many();
}
/* Show City Page Only if # Segments exist*/
if(count($segments)==3&&!$is404){
if ($dataOnly) {
// Reserved for city data-only
include_once 'templates/city-data.php';
} else {
include_once 'templates/city.php';
}
}
}elseif ($state) {
if ($lookup == 'inpatient-rehab-centers') {
// Special case; exclude outpatient rehabs from inpatient list
$cities = ORM::for_table('city')
->raw_query('SELECT city.*
FROM city
JOIN location ON city.id = location.city_id
JOIN attribute_location ON location.id = attribute_location.location_id
WHERE city.state_id = ?
AND attribute_location.attribute_id IN (25,26,27)
AND location.id NOT IN (
SELECT location_id
FROM attribute_location
WHERE attribute_id = 23
)
GROUP BY city.id', array($state->id))
->find_many();
}
else if ($lookupGroup) {
$cities = ORM::for_table('city')->select('city.*')->where('city.state_id', $state->id)->join('location', array('city.id', '=', 'location.city_id'))->join('attribute_location', array('location.id', '=', 'attribute_location.location_id'))->where_in('attribute_location.attribute_id', $lookupGroup)->group_by('city.id')->find_many();
}
else {
$cities = $state->city()->find_many();
}
// Let's make sure we only have # segments on the URL array(3)
if(count($segments)==2){
if ($dataOnly) {
include_once 'templates/state-data.php';
} else {
include_once 'templates/state.php';
}
}
}
else if ($lookup&&!$is404) {
$states = Model::factory('State')->find_many();
if ($dataOnly&&!$is404) {
include_once 'templates/lookup-data.php';
} else {
include_once 'templates/lookup.php';
}
}
else {
$is404 = true;
header('HTTP/1.0 404 Not Found');
}
// $endTime = microtime(true);
//echo '';
?>