예제 #1
0
        header('Location: ' . SITE);
    }
}
try {
    $av = new EconomicUnit($id);
} catch (Exception $e) {
    header("Location: " . SITE);
}
$av->setEconomicUnitName(fRequest::encode('title', 'string'));
//$av->setCreatedAt(date('Y-m-d H:m:s'));
$av->setEconomicUnitStreetType(fRequest::encode('type', 'string'));
$av->setEconomicUnitLatitude(fRequest::encode('latitude', 'string'));
$av->setEconomicUnitLongitude(fRequest::encode('longitude', 'string'));
$av->setEconomicUnitDescription(fRequest::encode('description', 'string'));
$av->setEconomicUnitStreetName(fRequest::encode('street', 'string'));
$av->setEconomicUnitLocationNumber(fRequest::encode('number', 'string'));
$av->setEconomicUnitReserve(fRequest::encode('reserve', 'string'));
$av->setEconomicUnitPhone(fRequest::encode('phone', 'string'));
$av->setEconomicUnitCellphone(fRequest::encode('cellphone', 'string'));
$av->setEconomicUnitEmail(fRequest::encode('email', 'string'));
$av->setEconomicUnitCreditCard(fRequest::encode('credit_card', 'string'));
$av->setEconomicUnitFacebookPage(fRequest::encode('fb', 'string'));
$av->setEconomicUnitTwitter(fRequest::encode('tw', 'string'));
$av->setActive(fRequest::encode('status', 'integer'));
$av->setVerified(fRequest::encode('verified', 'integer'));
try {
    $av->store();
} catch (Exception $e) {
    exit("Ha ocurrido un error." . $e->getMessage());
}
$id_cat = fRequest::encode('cat', 'array');