* Licensed under the GPLv3 * You are free to modify, distribute or redistribute this code as you please * so long as the above copyright notice remains intact. */ include "lib/jqmPhp.php"; include "../libs/XBMCHelper.class.php"; include "../config/application.php"; $currentPage = basename(__FILE__); $XBMC = new XBMCHelper(); $jqm = new jqmPhp(); $jqm->head()->title($config['AppTitle']); $jqm->head()->add("<meta name='viewport' content='width=device-width, initial-scale=1'/>"); // $jqm->head()->add(new jqmLink("themes/PandoraTV.min.css")); $page = new jqmPage('index'); $page->theme('b')->title($config['AppTitle']); $page->header()->theme('a'); $nav = $page->header()->add(new jqmNavbar(), true); $nav->add(new jqmButton('', '', '', 'a', "index.php", 'Home', '', true)); $nav->add(new jqmButton('', '', '', 'a', 'shows.php?ac=sl', 'All Shows', '', false)); $nav->add(new jqmButton('', '', '', 'a', 'channels.php?ac=cl', 'Channels', '', false)); //$page->AddContent('<h1>Pandora TV</h1>'); $g = $page->addContent(new jqmGrid(), true); $g->grid('b'); $ShowsList = $XBMC->RetrieveShowList(); $randshows = shuffle($ShowsList); $column1 = 0; $column2 = 0; $list = new jqmListviem(); $list->inset(true)->theme('a'); $list->addDivider('Random Shows')->dividerTheme('a')->countTheme('b'); foreach ($ShowsList as $k => $v) {
*/ include '../lib/jqmPhp.php'; /** * Create a new jqmPhp object. */ $j = new jqmPhp(); /** * Config 'html' and 'head' tag. */ $j->head()->title('Examples'); /** * Create and config a jqmPage object. */ $p = new jqmPage('examples'); $p->theme('b')->title('Examples'); $p->header()->theme('a'); $p->header()->addButton('Home', './', '', 'home'); //Get the Button Added and Set Attributes $p->header()->items()->get(1)->attribute('data-iconpos', 'notext')->attribute('rel', 'external'); /** * Create and config a new jqmListview object and add Items. */ $list1 = new jqmListview(); $list1->splitIcon('search')->splitTheme('c'); $list1->addDivider('Beginner', '2')->inset(true); $list1->addBasic('Basic Example', 'example-1.php#'); $list1->items()->get(1)->add('<a href="example-1.php.txt" rel="external" target="_blank"></a>'); $list1->addBasic('Adding Pages', 'example-2.php#'); $list1->items()->get(2)->add('<a href="example-2.php.txt" rel="external" target="_blank"></a>'); $list1->addDivider('Intermediate', '3'); $list1->addBasic('Adding Objects', 'example-3.php#');
/** * Create a new jqmPhp object. */ $jqmPhp = new jqmPhp(); /** * Adding custom JavaScript to jqmHead in jqmPhp */ $jqmPhp->head()->title('Custom JS Example'); $jqmPhp->head()->add(new jqmScript('custom.js')); /** * Create a new jqmPage object. */ $p = new jqmPage('custom-js'); $p->theme('b'); $p->title('Custom JS Example'); $p->header()->theme('a'); $bt = $p->header()->addButton('', 'index.php#', 'a', 'home', false, false, true); $bt->rel('external')->attribute('data-iconpos', 'notext'); /** * Adding Content. */ $p->addContent('<h1>Adding Custom JavaScript</h1>'); $p->addContent('<p align="justify">To add a custom JS you need add the tag <b>' . htmlspecialchars('<script...></script>') . '</b>'); $p->addContent(' to the jqmHead object [<b>' . htmlspecialchars('$jqmPhp->head()') . '</b>] in the jqmPhp instance. '); $p->addContent('To facilitate the addition of JS you can use the class <b>jqmScript</b> as example:</p>'); $p->addContent('<pre class="ui-body-c" style="padding:20px;">$jqmPhp = new jqmPhp();' . "\n" . '$jqmPhp->head()->add(' . "\n\t" . 'new jqmScript(\'custom.js\')' . "\n" . ');</pre>'); $p->addContent(new jqmTag('p', 'p_js', 'class="ui-body-c" style="padding:20px;"', ' ')); /** * Adding Source Code Links. */ $list = new jqmListview();
* Licensed under the GPLv3 * You are free to modify, distribute or redistribute this code as you please * so long as the above copyright notice remains intact. */ include "lib/jqmPhp.php"; include "../libs/XBMCHelper.class.php"; $XBMC = new XBMCHelper(); $jqm = new jqmPhp(); $jqm->head()->add('<meta name="viewport" content="width=device-width, initial-scale=1">'); $page = new jqmPage('episodes', array('data-add-back-btn=true')); $currentPage = basename(__FILE__); switch ($_GET['ac']) { case 'el': $ShowInfo = $XBMC->RetrieveShowInfo($_GET['id']); $page->theme('b')->title($ShowInfo['SeriesName']); $page->header()->theme('a'); $page->AddContent("<h1>Episodes</h1>"); // $page->header()->addButton('Back',"#shows.php?ac=si&id=".$_GET['id'],'a', 'arrow-l'); $list = new jqmListviem(); $list->inset(true)->theme('a'); // $list->addDivider('Episodes', $XBMC->CountShows())->dividerTheme('a')->countTheme('b'); $Shows = $XBMC->RetrieveEpisodesForShow($_GET['id']); foreach ($Shows as $k => $v) { $list->AddIcon("   S" . $v['season'] . "E" . $v['episode'] . ": " . $v['EpisodeName'], 'episodes.php?ac=ei&id=' . $v['idEpisode'], '../getimage.php?ac=et&ri=1&w=400&h=400&id=' . $v['idEpisode']); } $page->AddContent($list); $jqm->AddPage($page); echo $jqm; break; case 'ei': $EpisodeInfo = $XBMC->GetEpisodeInformation($_GET['id']);
*/ /** * Include the jqmPhp class. */ include '../lib/jqmPhp.php'; /** * Create a new jqmPhp object. */ $jqmPhp = new jqmPhp(); /** * Create a new jqmPage object. */ $p = new jqmPage('simple-xml'); $p->theme('b'); $p->title('Cars'); $bt = $p->header()->addButton('', 'index.php#', 'b', 'home', false, false, true); $bt->rel('external')->attribute('data-iconpos', 'notext'); /** * Adding Listview to jqmPage. */ $lv = $p->addContent(new jqmListviem(), true); $lv->filter(true); /** * Reading XML; */ $xml = @simplexml_load_file('cars.xml') or die("error loading xml file."); foreach ($xml->brandGroup as $brandGroup) { /** * Adding Dividers. */ $lv->addDivider($brandGroup->name);
*/ include '../lib/jqmPhp.php'; /** * Create a new jqmPhp object. */ $j = new jqmPhp(); /** * Config 'html' and 'head' tag. */ $j->head()->title('Example 5'); /** * Create and config a jqmPage object. */ $p = new jqmPage('example-5'); $p->theme('b')->title('Example 5'); $p->header()->theme('a')->add(new jqmButton('', array(new jqmAttribute('data-iconpos', 'notext')), '', 'a', 'index.php#', '', 'home')); //Get the Button Added and Set Attributes $p->header()->items()->get(1)->attribute('data-iconpos', 'notext')->attribute('rel', 'external'); /** * Create and config a new jqmNavbar object and add items. */ $nav = $p->header()->add(new jqmNavbar(), true); $nav->add(new jqmButton('', '', '', 'a', 'example-1.php#', 'EX1', '', false)); $nav->add(new jqmButton('', '', '', 'a', 'example-2.php#', 'Ex2', '', false)); $nav->add(new jqmButton('', '', '', 'a', 'example-3.php#', 'EX3', '', false)); $nav->add(new jqmButton('', '', '', 'a', 'example-4.php#', 'EX4', '', false)); $nav->add(new jqmButton('', '', '', 'a', '#', 'EX5', '', true)); /** * Confif page footer (jqmFooter). */ $p->footer()->addButton('EX1', 'example-1.php#', '', 'arrow-l');
*/ /** * Include the jqmPhp class. */ include '../lib/jqmPhp.php'; /** * Create a new jqmPhp object. */ $j = new jqmPhp(); /** * Create a new jqmPage object. */ $p = new jqmPage('example-2'); $p->theme('b'); $p->title('Example 2'); $p->header()->addButton('Example 1', 'example-1.php#', 'a', 'arrow-l'); $p->header()->addButton('Example 3', 'example-3.php#', 'b', 'arrow-r'); $p->header()->theme('a'); $p->addContent('<h1>Adding Pages</h1>'); $p->addContent('<p>In this example we create a page (jqmPage),'); $p->addContent(' add content and buttons to the header.'); $p->addContent(' After we add the page to jqmPhp object.</p>'); $p->addContent('<a href="index.php#" data-role="button" data-theme="a">Home</a>'); $p->addContent('<a href="example-3.php#" data-role="button">Example 3</a>'); $p->footer()->title('Example 2 Footer'); $p->footer()->position('fixed'); $p->footer()->theme('a'); /** * Add the page to jqmPhp object. */ $j->addPage($p);