MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/allyindian_com/sbltt/app/city_api.php
<?php
if($_SERVER['HTTP_ORIGIN'] == "http://sblttweb.cafsinfotech.com") {
    header('Access-Control-Allow-Origin: http://sblttweb.cafsinfotech.com');  
}
if($_SERVER['HTTP_ORIGIN'] == "http://sblt.co.in") {
    header('Access-Control-Allow-Origin: http://sblt.co.in');  
}

$frm = "";
/* Module Initilization */
	if (isset($_REQUEST["frm"])){
	    $frm = $_REQUEST['frm']; 
	    require("./mobileapi_model.php");
	    $api_model = new mobileapi_model;
	}	
/* City Details Call API */
	if ($frm === "city_info"){
	   $source_info = $api_model->city();
	   return_rslt($frm, $source_info);
	}		
function return_rslt($frm, $rslt){
    $rslt_count = count($rslt);
    if ($rslt_count === 0) {
        echo json_encode(array(
        	'Status' => 500,
            'Success' => FALSE,
            'data' => "No Record found"
        ));
    }else{
        echo  json_encode(array(
        	'Status' => 200,
            'Success' => TRUE,
            "data" => utf8ize($rslt)
        ));
    }
}
function utf8ize($d) {
    if (is_array($d)) {
        foreach ($d as $k => $v) {
            $d[$k] = utf8ize($v);
        }
    } else if (is_string ($d)) {
        return utf8_encode($d);
    }
    return $d;
}
?>