<?php

$accessControl = array('Admin' => true); 
require_once '../../AccessControl.php';

if (isset($_REQUEST["toggle"])==1) {
    $cs = getGlobalSetting("ToggleUrlInsensitiveImport",0);
    if ($cs == 0) {
        setGlobalSetting("ToggleUrlInsensitiveImport",1);
        $msg = _CASE_SENS_ENABLED;

    } else {
        setGlobalSetting("ToggleUrlInsensitiveImport",0);
        $msg = _CASE_SENS_DISABLED;
    }
    echo '{ "Status": "Success", "Message": "'.$msg.'" }';
      
} else {

	# we are not setting the value, just requesting it
    $cs = getGlobalSetting("ToggleUrlInsensitiveImport",0);
	if ($cs!=0) {
        echo '{ "Status": "'. _ENABLED .'" }';
    } else {
        echo '{ "Status": "'. _DISABLED .'" }';
    }
}
?>