public function load($itemId, $pages_total) { $html = new Html(); $menu = new Menu(); if (isset($_GET['page'])) { if ($_GET['page'] <= 1) { $back = $_GET['page'] == 1; } else { $back = $_GET['page'] - 1; } } else { $back = ''; } $html->b('section', 0, 1, '', '{"class":"row", "data-min-height":"10"}'); $html->b('div', 0, 1, '', '{"class":"vertical"}'); $html->b('div', 0, 1, '', '{"class":"col col-center col-xs-8"}'); $html->b('ul', 0, 1, '', '{"class":"pagination"}'); $html->b('li', 0, 1, '', '{"class":"back"}'); $html->b('a', 0, 1, '', '{"href":"' . $menu->link($itemId) . '&page=' . $back . '"}'); $html->e(1, 'Back'); $html->b('a', 1, 1); $html->b('li', 1, 1); for ($i = 1; $i <= $pages_total; $i++) { if (empty($_GET["page"])) { $_GET["page"] = 1; } if ($_GET["page"] == $i) { $class = 'active'; } else { $class = ''; } $html->b('li', 0, 1, '', '{"class":"' . $class . '"}'); $html->b('a', 0, 1, '', '{"href":"' . $menu->link($itemId) . '&page=' . $i . '"}'); $html->e(1, $i); $html->b('a', 1, 1); $html->b('li', 1, 1); } if ($_GET['page'] >= $pages_total) { $next = $pages_total; } else { $next = $_GET["page"] + 1; } $html->b('li', 0, 1, '', '{"class":"next"}'); $html->b('a', 0, 1, '', '{"href":"' . $menu->link($itemId) . '&page=' . $next . '"}'); $html->e(1, 'Next'); $html->b('a', 1, 1); $html->b('li', 1, 1); $html->b('ul', 1, 1); $html->b('div', 1, 1); $html->b('div', 1, 1); $html->b('section', 1, 1); }
use Antfuentes\Titan\Joomla; use Antfuentes\Titan\Framework; require_once 'templates/what/vendor/james-heinrich/getid3/getid3/getid3.php'; $db = new Joomla\Database(); $article = new Joomla\Article(); $menu = new Joomla\Menu(); $string = new Framework\String(); $h = new Framework\Html(); $article->content($this->routerId); $audio = scandir(AUDIO_PATH . $article->alias); $audio = array_slice($audio, 2); $getID3 = new getID3(); $introtext = $string->breakExplode($article->introtext); $content = array_slice($introtext, 2); $img = json_decode($article->images); $fbCommentsLink = $menu->link(JRequest::getVar('Itemid')); $article->getCatergoryPath($this->routerId); $city = ucwords($string->replaceString('-', ' ', $article->path_1)); $artist = ucwords($article->path_2); $row = '{"class":"row", "id":"article-audio", "data-min-height":"80"}'; $vertical = '{"class":"vertical"}'; $container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}'; $title = '{"class":"title col col-xs-12"}'; $imgCol = '{"class":"img-col col col-xs-6", "data-mh":"article-audio-col"}'; $imgVertical = '{"class":"vertical"}'; $imgContainer = '{"class":"col col-xs-12"}'; $img = '{"class":"img", "src":"' . $img->image_fulltext . '", "alt":"' . $img->image_fulltext_alt . '"}'; $contentCol = '{"class":"content-col col col-xs-6", "data-mh":"article-audio-col"}'; $contentVertical = '{"class":"vertical"}'; $contentContainer = '{"class":"col col-xs-12"}'; $playBar = '{"class":"play-bar col col-xs-12", "preload":"auto", "tabindex":"0", "controls":"controls", "type":"audio/mpeg", "id":"audio"}';