/home/f07c9ogk/public_html/functions.php
}
function crm_get_each_unit_by_id( $id = '' ) {
$slug_new = explode("-", $id);
global $cache, $client;
$collectunits = $cache->get( 'crm_each_unit_'.end($slug_new) );
//if( false == $collectunits || EL_CACHE_DISABLED ) {
if( true || EL_CACHE_DISABLED ) {
$collectunits = $client->getUnit(end($slug_new));
$cache->set( 'crm_each_unit_'.end($slug_new), $collectunits );
}
return $collectunits;
}
function crm_get_units_by_developer( $developer_id = 0 ) {
global $cache;
/home/f07c9ogk/public_html/src/data/unit.php
<?php
error_reporting(0);
$slug_new = explode("-", $slug);
$eachunit = crm_get_each_unit_by_id( $slug );
//echo "Slugify : ".slugify($eachunit[0]['project']);
$projectid = crm_get_project_id( slugify($eachunit[0]['project']) );
if($projectid[1]){
$project = crm_get_project( $projectid[1] );
$projectObj = new Project( $project );
if(!empty($projectObj)){
$favicon = $projectObj->getDeveloperLogo();
$metaimg = $projectObj->getMetaimg();
}
$add_title = (!empty($eachunit[0]['rooms'])) ? $eachunit[0]['rooms'].' Bedrooms ' : (number_format($eachunit[0]['bua'],2) + 0 )." sqm " ;
$final = $add_title . $eachunit[0]['type'] . " for sale in " . $getName . ', ' . $eachunit[0]['district'];
$unitUrl = "https://elbayt.com/unit/".$slug;
// $schema_output = \JsonLd\Context::create('product', [
/home/f07c9ogk/public_html/index.php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
if(! $_route ) {
$_route = '404';
}
$file = sprintf(__DIR__.'/src/data/%s.php', $_route);
if( file_exists($file) ) include $file;
if( $_route != 'sitemap' && !$amp ) {
//echo "<script>console.log('Debug Objects: " . $_route . "' );</script>";
if (in_array($_route, array("webchat", "footer-load", "homepage-load", "homepage-mobile-load"))){
include sprintf(__DIR__.'/src/pages/%s.php', $_route);
}/* elseif (!(in_array($_route, array("homepage-test", "units", "unit", "project")))){
if(!$hidehtml) include __DIR__.'/src/pages/header.php';
include sprintf(__DIR__.'/src/pages/%s.php', $_route);
if(!$hidehtml) include __DIR__.'/src/pages/footer.php';
}*/ else {
if(!$hidehtml) include __DIR__.'/src/pages/header.php';