$detect = new Mobile_Detect(); $isMobile = $detect->isMobile(); // get all news require_once 'clases/Database.php'; require_once 'clases/Query.php'; require_once 'clases/Noticia.php'; require_once 'clases/Entrevista.php'; $db = new Database(); $noticiasSQL = $db->getAllNoticias(); $noticias = array(); while ($row = mysql_fetch_array($noticiasSQL)) { $noticia = new Noticia($row['id_noticia'], $row['imagen'], $row['link'], $row['descripcion'], $row['titulo'], $row['destacada']); array_push($noticias, $noticia); } //get all interviews $entrevistasSQL = $db->getAllEntrevistas(); $entrevistas = array(); while ($row = mysql_fetch_array($entrevistasSQL)) { $entrevista = new Entrevista($row['id'], $row['link'], $row['descripcion'], $row['titulo'], $row['imagen']); array_push($entrevistas, $entrevista); } $publicidadesTapas = mysql_fetch_array($db->getPublidadesTapas()); $noticiasVideos = array(); foreach ($noticias as $noti) { if (!empty($noti->getLink())) { array_push($noticiasVideos, $noti); } } include_once 'common/header.php'; ?>