Beispiel #1
0
 public static function deleteTown($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $TownId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_TownId = 0;
     $retResult = BL_manageTown::getTownListByTownId($TownId);
     if ($retResult->type == 1) {
         $obj_Town = $retResult->data[0];
         $obj_result2 = DAL_manageTown::deleteTown($obj_Town->TownId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_TownId = $obj_Town->TownId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Town";
         }
     } else {
         $msg = "Sorry!!! The Town you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Town->TownId, $msg);
     $obj_mainpacket->main_setPacket();
 }