Exemplo n.º 1
0
function getLocationList($sessionkey, $appcode, $paging)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result .= "<AUTHSTATUS>1</AUTHSTATUS>";
        $result = BL_manageLocation::getLocationList();
        if ($result->type == 1) {
            $arr_LocationList = $result->data;
            if (count($arr_LocationList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                $main_result .= "<LOCATIONLIST>";
                foreach ($arr_LocationList as $obj_Location) {
                    $main_result .= getLocationXml($obj_Location);
                }
                $main_result .= "</LOCATIONLIST>";
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}