/var/www/vhosts/oakwoodproperties.com/httpdocs/lib/helpers/helpers_content.php
// Get config details
function webConfig($clave)
{
global $webConfigs;
return ($webConfigs[$clave]) ?? '*!!*' . $clave;
}
//Igual que el anterior sin necesidad de estar logeado en el helper
function art_sin($clave, $lang = null)
{
global $db;
$lang = ($lang) ? $lang : LANGUAGE;
$query = "SELECT art_{$lang} AS art_sin FROM " . XNAME . "_traducciones WHERE clave = '{$clave}'";
$sql = $db->record($query);
if (!$sql['art_sin']) return "!" . $clave;
return $sql['art_sin'];
}
//Corta una cadena de texto a un número determinado de caracteres
//añadiendo '...' al final de la misma
function shorten_text($text, $chars, $strip = true)
{
// Change to the number of characters you want to display
$elipsis = (strlen($text) > $chars) ? '...' : '';
$text = ($strip) ? strip_tags($text) : $text;
$text = $text . " ";
$text = substr($text, 0, $chars);
$text = substr($text, 0, strrpos($text, ' '));
$text = $text . $elipsis;
return $text;
}
// Current Page for social buttons
Arguments
"Trying to access array offset on value of type null"
/var/www/vhosts/oakwoodproperties.com/httpdocs/lib/helpers/helpers_content.php
// Get config details
function webConfig($clave)
{
global $webConfigs;
return ($webConfigs[$clave]) ?? '*!!*' . $clave;
}
//Igual que el anterior sin necesidad de estar logeado en el helper
function art_sin($clave, $lang = null)
{
global $db;
$lang = ($lang) ? $lang : LANGUAGE;
$query = "SELECT art_{$lang} AS art_sin FROM " . XNAME . "_traducciones WHERE clave = '{$clave}'";
$sql = $db->record($query);
if (!$sql['art_sin']) return "!" . $clave;
return $sql['art_sin'];
}
//Corta una cadena de texto a un número determinado de caracteres
//añadiendo '...' al final de la misma
function shorten_text($text, $chars, $strip = true)
{
// Change to the number of characters you want to display
$elipsis = (strlen($text) > $chars) ? '...' : '';
$text = ($strip) ? strip_tags($text) : $text;
$text = $text . " ";
$text = substr($text, 0, $chars);
$text = substr($text, 0, strrpos($text, ' '));
$text = $text . $elipsis;
return $text;
}
// Current Page for social buttons
/var/www/vhosts/oakwoodproperties.com/httpdocs/inc/header.php
<?php if(webConfig('youtube')): ?>
<li class="pr-4 pl-4">
<a class="text-white block" href="<?= webConfig('youtube') ?>">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 fill-current" viewBox="0 0 16 16"><g stroke="none"><path d="M15.8,4.8c-0.2-1.3-0.8-2.2-2.2-2.4C11.4,2,8,2,8,2S4.6,2,2.4,2.4C1,2.6,0.3,3.5,0.2,4.8C0,6.1,0,8,0,8 s0,1.9,0.2,3.2c0.2,1.3,0.8,2.2,2.2,2.4C4.6,14,8,14,8,14s3.4,0,5.6-0.4c1.4-0.3,2-1.1,2.2-2.4C16,9.9,16,8,16,8S16,6.1,15.8,4.8z M6,11V5l5,3L6,11z"></path></g></svg>
</a>
</li>
<?php endif; ?>
<?php if(webConfig('linkedin')): ?>
<li class="pr-4 pl-4">
<a class="text-white block" href="<?= webConfig('linkedin') ?>">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 fill-current" viewBox="0 0 16 16"><g stroke="none"><path d="M3.7 15.5h-3V5.4h3.2v10.2h-.2zM2.3 4.1C1.2 4.1.4 3.2.4 2.2.4 1.1 1.2.3 2.3.3s1.9.8 1.9 1.9c-.2.9-1 1.9-1.9 1.9zm13.3 11.4h-3.2v-4.9c0-1.2 0-2.7-1.6-2.7s-1.9 1.3-1.9 2.7v5.1H5.7V5.4h3.1v1.3c.4-.8 1.5-1.6 2.9-1.6 3.2 0 3.7 2.1 3.7 4.8v5.6h.2z"></path></g></svg>
</a>
</li>
<?php endif; ?>
</ul>
<div class="lg:hidden text-white mt-3 text-center mb-3 font-light w-full">
<div><a class="block font-medium text-lg" href="tel:<?= webConfig('telefono') ?>"><?= webConfig('telefono') ?></a></div>
<div><a class="block font-medium text-lg" href="tel:<?= webConfig('movil') ?>"> <?= webConfig('movil') ?></a></div>
<div><a class="block font-medium text-lg" href="mailto:<?= webConfig('email') ?>"><?= webConfig('email') ?></a></div>
<div class="mt-2 text-[13px] lg:max-w-xs"><?= art_sin('horario') ?></div>
</div>
</div>
<?php /*
<div class="hidden lg:flex flex-wrap">
<ul>
<li><a href="tel:<?= webConfig('telefono') ?>"><img alt="telphone" src="images/np_telephone.svg"><?= webConfig('telefono') ?></a></li>
<li><a href="tel:<?= webConfig('movil') ?>"><?= webConfig('movil') ?></a></li>
<li><a href="mailto:<?= webConfig('email') ?>"><img alt="telphone" src="images/np_email.svg"><?= webConfig('email') ?></a></li>
</ul>
<ul class="social-icons">
<li><a href="<?= webConfig('facebook') ?>"><i class="fab fa-facebook-f"></i></a></li>
</ul>
</div>
*/ ?>
/var/www/vhosts/oakwoodproperties.com/httpdocs/inc/html_head.php
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q18EF2LQPF"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-Q18EF2LQPF');
</script>
</head>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<body id="<?= $pagina ?>" class="<?= $pagina ?> <?= DOMAIN_KEY ?> text-black">
<?php require_once dirname(__FILE__) . '/header.php'; ?>
Arguments
"/var/www/vhosts/oakwoodproperties.com/httpdocs/inc/header.php"
/var/www/vhosts/oakwoodproperties.com/httpdocs/contenido.php
<?php
// Generic internal content pages
// ID para el <body>
$bodyid = $pagina;
$bodyclass = $pagina;
require_once dirname(__FILE__) . '/inc/form_arrays.php';
// Cargamos las vistas
require_once dirname(__FILE__) . '/inc/html_head.php';
// Cargamos la vista si existe, o si no cargamos vista de contenido genérico
if (file_exists( dirname(__FILE__) . '/inc/web/' . $pagina . '.php')){
require_once dirname(__FILE__) . '/inc/attn.php';
require_once dirname(__FILE__) . '/inc/web/' . $pagina . '.php';
} else {
require_once dirname(__FILE__) . '/inc/attn.php';
require_once dirname(__FILE__) . '/inc/web/contenido.php';
}
require_once dirname(__FILE__) . '/inc/footer.php';
// End file
Arguments
"/var/www/vhosts/oakwoodproperties.com/httpdocs/inc/html_head.php"
/var/www/vhosts/oakwoodproperties.com/httpdocs/index.php
<?php
// Routes all calls from .htaccess / nginx.conf
include('lib/admin.php');
$metas = [];
$pagina = ($pagina && $pagina != 'app') ? $pagina : $slug;
// Get page
if (file_exists($pagina.'.php')) {
include($pagina.'.php');
} else {
include('contenido.php');
}
// End file
Arguments
"/var/www/vhosts/oakwoodproperties.com/httpdocs/contenido.php"