Beispiel #1
0
/**
 * Include the jqmPhp class.
 */
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>');
Beispiel #2
0
 * Include the jqmPhp class.
 */
include '../lib/jqmPhp.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;"', '&nbsp;'));
/**
Beispiel #3
0
 *
 * Copyright (c) 2012-* ShadowEO / Toxus Communications Systems
 * 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');
Beispiel #4
0
 /**
  * Adds a page (jqmPage) to the pages collection of HTML Body element (jqmBody).
  * @param jqmPage $page
  * @param bool $returnAdded
  * @return jqmPhp|jqmPage
  */
 function addBasicPage($id, $title, $content, $returnAdded = false)
 {
     $page = new jqmPage($id);
     $page->title($title)->addContent($content);
     $this->_html->body()->addPage($page);
     if ($returnAdded) {
         return $page;
     }
     return $this;
 }
Beispiel #5
0
<?php

/*
 * OpenUluh version 0.0.1
 *
 * Copyright (c) 2012-* ShadowEO / Toxus Communications Systems
 * 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("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;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']);
        }
Beispiel #6
0
 * Include the jqmPhp class.
 */
include '../lib/jqmPhp.php';
/**
 * Create a new jqmPhp object.
 */
$jqmPhp = new jqmPhp();
/**
 * Adding custom CSS to jqmHead in jqmPhp
 */
$jqmPhp->head()->title('Custom CSS Example');
$jqmPhp->head()->add(new jqmLink('custom.css'));
/**
 * Create a new jqmPage object.
 */
$p = new jqmPage('custom-css');
$p->theme('b');
$p->title('Custom CSS 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 CSS</h1>');
$p->addContent('<p align="justify">To add a custom CSS you need add the tag <b>' . htmlspecialchars('<link...></link>') . '</b>');
$p->addContent(' to the jqmHead object [<b>' . htmlspecialchars('$jqmPhp->head()') . '</b>] in the jqmPhp instance. ');
$p->addContent('To facilitate the addition of CSS you can use the class <b>jqmLink</b> as example:</p>');
$p->addContent('<pre class="ui-body-c">$jqmPhp = new jqmPhp();' . "\n" . '$jqmPhp->head()->add(' . "\n\t" . 'new jqmLink(\'custom.css\')' . "\n" . ');</pre>');
/**
 * Adding Source Code Links.
Beispiel #7
0
$j->html()->doctype('html');
$j->head()->title('Example 3');
$j->head()->css('http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css');
$j->head()->jq('http://code.jquery.com/jquery-1.4.4.min.js');
$j->head()->jqm('http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js');
$j->head()->add(new jqmLink('css/custom.css'));
// Adding a custom CSS.
$j->head()->add(new jqmScript('js/custom.js'));
// Adding a custom JavaScript.
//$j->body()->attribute('onload', 'initCustom();');     // Adding a custom attribute to 'body' tag.
/**
 * Create and config a jqmPage object.
 * Most methods return the object itself allowing call
 * another method on the object in sequence.
 */
$p = new jqmPage('example-3');
$p->theme('b')->title('Example 3')->header()->addButton('Example 2', 'example-2.php#', 'a', 'arrow-l')->addButton('Example 4', 'example-4.php#', 'b', 'arrow-r')->theme('a');
/**
 * addContent() is alias to content()->add().
 */
$p->content()->add('<h1>Adding Objects</h1>');
$p->addContent('<h3>Controlgroup and Buttons</h3>');
/**
 * Create and config a new jqmControlgroup object and add items.
 * Most methods of addition have the last parameter $returnAdded.
 * If it is set to 'true' the added object is returned, otherwise
 * the object that called the method is returned.
 */
$cg = $p->content()->add(new jqmControlgroup(), true);
$cg->dataType('vertical');
$cg->add(new jqmButton('', '', '', 'a', 'index.php#', 'Home', 'home', false));
Beispiel #8
0
 * Simple XML Load File to Listview
 * @package jqmPhp
 * @filesource
 */
/**
 * 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) {
    /**
Beispiel #9
0
 * 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";
$XBMC = new XBMCHelper();
$jqm = new jqmPhp();
$jqm->head()->add('<meta name="viewport" content="width=device-width, initial-scale=1"/>');
$jqm->head()->add('<style> .ui-content { padding: 0px; }</style>');
if ($_GET['ac'] == "si") {
    $page = new jqmPage('shows', array('data-add-back-btn=true'));
} elseif ($_GET['ac'] == "csl") {
    $page = new jqmPage('shows', array('data-add-back-btn' => 'true'));
} else {
    $page = new jqmPage('shows');
}
$currentPage = basename(__FILE__);
switch ($_GET['ac']) {
    case 'csl':
        $page->theme('b')->title('Shows');
        $page->header()->theme('a');
        $nav = $page->header()->add(new jqmNavbar(), true);
        //			$page->AddContent('<div style="padding: 15px;">');
        $nav->add(new jqmButton('', '', '', 'a', "index.php", 'Home', '', false));
        $nav->add(new jqmButton('', '', '', 'a', '#', 'All Shows', '', false));
        $nav->add(new jqmButton('', '', '', 'a', 'channels.php?ac=cl', 'Channels', '', true));
        $list = new jqmListviem();
        $list->inset(true)->theme('a');
        $list->addDivider('Shows from ' . $_GET['cn'], $XBMC->CountShowsByChannel($_GET['cn']))->dividerTheme('a')->countTheme('b');
        $Shows = $XBMC->SortShowsByChannel($_GET['cn']);
Beispiel #10
0
/**
 * Include the jqmPhp class.
 */
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).
Beispiel #11
0
 * Example 2 - Adding Pages
 * @package jqmPhp
 * @filesource
 */
/**
 * 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');
/**
Beispiel #12
0
/**
 * Include the jqmPhp class.
 */
include '../lib/jqmPhp.php';
/**
 * Create a new jqmPhp object.
 */
$j = new jqmPhp();
/**
 * Config 'html' and 'head' tag.
 */
$j->head()->title('Example 4');
/**
 * Create and config a jqmPage object.
 */
$p = new jqmPage('example-4');
$p->theme('b')->title('Example 4');
$p->header()->theme('a')->add(new jqmButton('', array(new jqmAttribute('data-iconpos', 'notext')), '', 'a', 'index.php#', '', 'home'));
/**
 * 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', '#', 'EX4', '', true));
$nav->add(new jqmButton('', '', '', 'a', 'example-5.php#', 'EX5', '', false));
/**
 * Confif page footer (jqmFooter).
 */
$p->footer()->addButton('EX1', 'example-1.php#', '', 'arrow-l');