function updatePerson($sessionkey, $appcode, $Persondata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Person = new Person(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "PERSONID": $obj_Person->PersonId = $child; break; case "FULLNAME": $obj_Person->FullName = $child; break; case "NICKNAME": $obj_Person->NickName = $child; break; case "OTHERNAMES": $obj_Person->OtherNames = $child; break; case "DRIVINGLICENCENO": $obj_Person->DrivingLicenceNo = $child; break; case "PASSPORTNO": $obj_Person->PassportNo = $child; break; case "PERMANENTADDRESS": $obj_Person->PermanentAddress = $child; break; case "EMAIL": $obj_Person->Email = $child; break; case "WEBSITE": $obj_Person->Website = $child; break; case "DESCRIPTION": $obj_Person->Description = $child; break; case "GENDER": $obj_Person->Gender = $child; break; case "DOB": $obj_Person->DOB = $child; break; case "HEIGHT": $obj_Person->Height = $child; break; case "WEIGHT": $obj_Person->Weight = $child; break; case "HAIRCOLOR": $obj_Person->HairColor = $child; break; case "EYECOLOR": $obj_Person->EyeColor = $child; break; case "BLOODTYPE": $obj_Person->BloodType = $child; break; case "OCCUPATION": $obj_Person->Occupation = $child; break; case "MONTHLYINCOME": $obj_Person->MonthlyIncome = $child; break; case "FUTURETARGETS": $obj_Person->FutureTargets = $child; break; case "FUTURENEEDS": $obj_Person->FutureNeeds = $child; break; case "DOD": $obj_Person->DOD = $child; break; case "PICTURE": $obj_Person->Picture = $child; break; case "NIC": $obj_Person->NIC = $child; break; case "STATUS": $obj_Person->Status = $child; break; } } $obj_retResult_Person = DAL_managePerson::updatePerson($obj_Person); if ($obj_retResult_Person->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getPersonXml($obj_retResult_Person->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updatePerson2($PersonId, $FullName, $NickName, $OtherNames, $DrivingLicenceNo, $PassportNo, $PermanentAddress, $Email, $Website, $Description, $Gender, $DOB, $Height, $Weight, $HairColor, $EyeColor, $BloodType, $Occupation, $MonthlyIncome, $FutureTargets, $FutureNeeds, $DOD, $Picture, $NIC, $Status) { $obj_retResult = new returnResult(); $obj_newPerson = new Person(); $obj_newPerson->PersonId = $PersonId; $obj_newPerson->FullName = $FullName; $obj_newPerson->NickName = $NickName; $obj_newPerson->OtherNames = $OtherNames; $obj_newPerson->DrivingLicenceNo = $DrivingLicenceNo; $obj_newPerson->PassportNo = $PassportNo; $obj_newPerson->PermanentAddress = $PermanentAddress; $obj_newPerson->Email = $Email; $obj_newPerson->Website = $Website; $obj_newPerson->Description = $Description; $obj_newPerson->Gender = $Gender; $obj_newPerson->DOB = $DOB; $obj_newPerson->Height = $Height; $obj_newPerson->Weight = $Weight; $obj_newPerson->HairColor = $HairColor; $obj_newPerson->EyeColor = $EyeColor; $obj_newPerson->BloodType = $BloodType; $obj_newPerson->Occupation = $Occupation; $obj_newPerson->MonthlyIncome = $MonthlyIncome; $obj_newPerson->FutureTargets = $FutureTargets; $obj_newPerson->FutureNeeds = $FutureNeeds; $obj_newPerson->DOD = $DOD; $obj_newPerson->Picture = $Picture; $obj_newPerson->NIC = $NIC; $obj_newPerson->Status = $Status; $issuccess = DAL_managePerson::updatePerson($obj_newPerson); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_managePerson::getPersonByPersonId($obj_newPerson->PersonId); $obj_retResult->msg = "Person updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Person updation is Failed"; } return $obj_retResult; }