Exemplo n.º 1
0
Arquivo: excel.php Projeto: nuiz/bkk
 public function readFile($file)
 {
     if (!preg_match('/^\\d+_\\d+\\.html$/', $file)) {
         return false;
     }
     $html = file_get_contents($this->dir . '/' . $file);
     $pos = strrpos($html, "<body");
     $html2 = substr($html, $pos);
     $editPage = new EditPage($html2);
     $page = ["property_id" => $editPage->getPropertyID(), "owner" => $editPage->getOwner(), "resale_type" => $editPage->getResaleType(), "size" => $editPage->getSize(), "size_type" => $editPage->getSizeType(), "original_price" => $editPage->getOriginalPrice(), "actual_size" => $editPage->getActualSize(), "property_status" => $editPage->getPropertyStatus(), "desired_profit" => $editPage->getDesiredProfit(), "inc_7%_vat" => $editPage->getPropertyIncVat(), "requirement_type" => $editPage->getRequirementType(), "with_tenant" => $editPage->getWithTenant(), "tenant_price_per_month" => $editPage->getTenantPricePerMonth(), "sell_price" => $editPage->getSellingPrice(), "commission" => $editPage->getComission(), "commission_unit" => $editPage->getCommissionUnit(), "markup_type" => $editPage->getMarkupType(), "markup_price" => $editPage->getMarkuPrice(), "property_type" => $editPage->getPropertyType(), "sold_price" => $editPage->getSoldPrice(), "transferring_date" => $editPage->getTransferringDate(), "branch" => $editPage->getBranch(), "rental_price" => $editPage->getRentalPrice(), "rented_price" => $editPage->getRentedPrice(), "transfer_status" => $editPage->getTransferStatus(), "additional_area_price" => $editPage->getAdditionalAreaPrice(), "area_price" => $editPage->getAreaPrice(), "project" => $editPage->getProject(), "project_name" => $editPage->getProjectName(), "address_no" => $editPage->getAddressNo(), "commission_unit_no" => $editPage->getCommissionUnitNo(), "owner_ship" => $editPage->getOwnership(), "bedrooms" => $editPage->getBedrooms(), "bathrooms" => $editPage->getBathrooms(), "key_location" => $editPage->getKeyLocation(), "floors" => $editPage->getFloors(), "province" => $editPage->getProvince(), "head_line" => $editPage->getHeadLine(), "road" => $editPage->getRoad(), "district" => $editPage->getDistrict(), "property_highlight" => $editPage->getPropertyHighlight(), "sub_district" => $editPage->getSubDistrict(), "description" => $editPage->getDescription(), "promotion" => $editPage->getPromotion(), "head_line_eng" => $editPage->getHeadLineEng(), "web_status" => $editPage->getWebStatus(), "feature_unit" => $editPage->getFeatureUnit(), "description_eng" => $editPage->getDescriptionEng(), "shortcut" => $editPage->getShortCut(), "source_category" => $editPage->getSourceCat(), "source" => $editPage->getSource(), "source_list" => $editPage->getSourceList(), "remark" => $editPage->getRemark(), "comment" => $editPage->getComment(), "update_date" => $editPage->getUpdateDate(), "update_message" => $editPage->getUpdateMessage(), "tier_level" => $editPage->getTierLevel()];
     unset($editPage, $html, $pos, $html2, $file);
     return $page;
 }