예제 #1
0
파일: index.php 프로젝트: junctiontech/dbho
    $arr_property_address2 = array($ap_details[0]['building_no_or_name'], $ap_details[0]['flatNO'], $ap_details[0]['apointmentWing'], $ap_details[0]['apponitmentStreet'], $ap_details[0]['locality'], $ap_details[0]['subLocality'], $ap_details[0]['pincode'], $ap_details[0]['landmark']);
    $propertyAddress2 = join($arr_property_address2, ' ');
    $arr_property_details = array('propertyID' => $property_id, 'versionID' => 1, 'languageID' => 1, 'propertyName' => $property_name, 'propertyAddress1' => $result['address'], 'propertyAddress2' => $propertyAddress2, 'propertyDescription' => $propertyDescription, 'propertyLocality' => $ap_details[0]['locality'], 'propertyMetaTitle' => $propertyDescription, 'propertyMetaKeyword' => $propertyDescription, 'propertyMetaDescription' => $propertyDescription, 'propertyShortDescription' => $propertyDescription, 'propertySpecifications' => $property_name, 'propertyCurrentStatus' => '');
    $arr_property_prices = array('propertyID' => $property_id, 'currencyID' => 3, 'propertyPrice' => $ap_details[0]['rentAmount']);
    $app_data = array();
    // Get appointment mapping
    $app_data['app_details'] = $ap_details;
    $app_data['app_kitchens'] = $ak_details;
    $app_data['app_images'] = $ai_details;
    $app_data['app_livingroom'] = $al_details;
    $app_data['app_toilets'] = $at_details;
    $app_data['app_bedrooms'] = $ab_details;
    //$app_data['app_washdry_area'] = $aw_details;
    $attributes_map = $ob_map->get_attributes_map();
    $attributes = $ob_property->prepare_property_attributes($attributes_map, $app_data);
    $amenities_map = $ob_map->get_amenities_map();
    $amenities = $ob_property->prepare_property_amenities($amenities_map, $app_data);
    // Save all amenities
    $ob_property::save_amenities($property_id, $amenities);
    debug_message('Create data for property data.');
    $property_details_id = $ob_property::save_data('rp_property_details', $arr_property_details);
    $property_price_id = $ob_property::save_data('rp_property_price', $arr_property_prices);
    // Save all attributes
    $ob_property::save_attributes($property_id, $attributes);
    // Update the property appointment relationship
    $ob_appointment::save_data('rp_appointment_property', array('APID' => $result['appointmentID'], 'LPID' => $property_id));
    $ob_log->write("A new property with id {$property_id} is created.");
}
$app_db = NULL;
$admin_dbh = NULL;
$ob_log->write("Script execution complete.");