コード例 #1
0
ファイル: Pagination.php プロジェクト: h3xc0ntr0l/titan
 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);
 }
コード例 #2
0
ファイル: item.php プロジェクト: h3xc0ntr0l/what
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$menu = new Joomla\Menu();
$h = new Framework\Html();
$sch = new Framework\Sch();
$string = new Framework\String();
$menu->categoryBlog($this->catid, $this->id);
$menu->article($this->id, JRequest::getVar('Itemid'));
$text = $string->breakExplode($this->introtext);
$img = json_decode($this->images);
$link = 'index.php?option=com_content&view=article&id=' . $this->id . ':' . $this->alias . '&catid=' . $this->catid . '&Itemid=' . JRequest::getVar('Itemid');
//echo '<a href="'.$link.'">'.$this->title.'</a>';
//echo '<br>';
if ($resultsKey == 0) {
    $h->b('section', 0, 1, '{"class":"row section", "data-min-height":"80"}');
    $h->b('div', 0, 1, '', '{"class":"vertical"}');
    $h->b('div', 0, 1, '', '{"class":"col col-center col-xs-8", "data-mh":"audio-cat-div"}');
}
$h->b('article', 0, 1, '', '{"class":"col col-xs-12 col-sm-3 col-md-3 col-lg-3", "id":"article", "data-mh":"artists-catergory-article"}');
$h->b('a', 0, 1, '', '{"href":"' . $menu->articleLink . '", "class":"col col-xs-12 artists-a"}');
$h->b('figure', 0, 1, '', '{"class":"col col-xs-12 figure"}');
$h->b('img', 0, 1, '', '{"class":"col col-xs-12 image", "src":"' . $img->image_intro . '", "alt":"' . $img->image_intro_alt . '"}');
$h->b('div', 0, 1, '', '{"style":"background-image: url(' . $img->image_intro . ')", "class":"div-img"}');
$h->b('div', 1, 1);
$h->b('figure', 1, 1);
$h->b('a', 1, 1);
$h->b('a', 0, 1, '', '{"href":"' . $menu->articleLink . '", "class":"col col-xs-12 artists-a"}');
$h->b('hgroup', 0, 1, '{"id":"hgroup"}');
$h->b('h2', 0, 1);
コード例 #3
0
ファイル: section.php プロジェクト: h3xc0ntr0l/what
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$menu = new Joomla\Menu();
$db = new Joomla\Database();
$string = new Framework\String();
$h = new Framework\Html();
$h->b('ul', 0, 1);
$menu->build('mainmenu', 'li', 1);
$db->tables();
$result = $db->q("SELECT * FROM {$db->categories} WHERE id = '{$this->categoryParentId}'");
$cleanAlias = $string->replaceString('-', '', $result[0]['alias']);
$menu->build($cleanAlias, 'li', $this->routerId);
$h->b('ul', 1, 1);
コード例 #4
0
ファイル: default.php プロジェクト: h3xc0ntr0l/what
<?php

//ARTICLE
//AUDIO
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 . '"}';