Exemplo n.º 1
0
     $response = array();
     $check = isset($_REQUEST['check']) ? $_REQUEST['check'] : false;
     if ($check == 'New Individual') {
         $msg = "Save Individual's data first then try again.";
         $response[0] = $msg;
         $response[1] = false;
         echo json_encode($response);
         exit;
     }
     $line = explode("|| ", $check);
     $temp_id = $line[2];
     $spouse = Spouse::getById($temp_id);
     foreach ($spouse as $key) {
         Place::dropById($key->place);
     }
     Spouse::dropByPerson($temp_id);
     Parents::dropByPerson($temp_id);
     Birth::dropByPerson($temp_id);
     Burial::dropByPerson($temp_id);
     Death::dropByPerson($temp_id);
     Place::dropByPerson($temp_id);
     Person::dropByPerson($temp_id);
     $response[] = "Person was Deleted";
     echo json_encode($response);
     exit;
 }
 if ($action == 'getPlace') {
     if (isset($_REQUEST['place'])) {
     }
     $place = $_REQUEST['place'];
     $set = Place::getByTown($place);