コード例 #1
0
function getPerson_telephoneByPhoneId($sessionkey, $appcode, $id)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result .= "<AUTHSTATUS>1</AUTHSTATUS>";
        $result = BL_managePerson_telephone::getPerson_telephoneListByPhoneId($id);
        if ($result->type == 1) {
            $arr_Person_telephoneList = $result->data;
            if (count($arr_Person_telephoneList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                foreach ($arr_Person_telephoneList as $obj_Person_telephone) {
                    $main_result .= getPerson_telephoneXml($obj_Person_telephone);
                }
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
コード例 #2
0
 public static function deletePerson_telephone($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $PhoneId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_PhoneId = 0;
     $retResult = BL_managePerson_telephone::getPerson_telephoneListByPhoneId($PhoneId);
     if ($retResult->type == 1) {
         $obj_Person_telephone = $retResult->data[0];
         $obj_result2 = DAL_managePerson_telephone::deletePerson_telephone($obj_Person_telephone->PhoneId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_PhoneId = $obj_Person_telephone->PhoneId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Person_telephone";
         }
     } else {
         $msg = "Sorry!!! The Person_telephone you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Person_telephone->PhoneId, $msg);
     $obj_mainpacket->main_setPacket();
 }