/**
  * Function to get categories thumb data from plugin herlper
  */
 function home_categoriesthumbdata($pagenum, $dataLimit)
 {
     /** Set start and limit to fetch category thumbs */
     $pagenum = isset($pagenum) ? absint($pagenum) : 1;
     /** Set pagination for videos more page */
     $offset = ($pagenum - 1) * $dataLimit;
     /** Set the liimit */
     $limit = $offset . ',' . $dataLimit;
     /** Call helper function to fetch playlist details */
     return getPlaylist(' playlist_order ASC ', $limit);
 }
Example #2
0
 public function getInventory()
 {
     echo json_encode(getPlaylist());
 }
Example #3
0
                    </li> <!-- Submenu -->
                    <li><a href="songs.php">SONGS</a></li>
                    <li><a href="playlists.php">PLAYLISTS</a></li>
                    <li><a href="contacts.php">CONTACTS</a></li>
                </ul>
            </nav>
        </section>

        <section id="content-wrapper">
            <?php 
if (isset($_GET['song'])) {
    getSong($_GET['song']);
    getComments($_GET['song'], 'song');
} else {
    if (isset($_GET['playlist'])) {
        getPlaylist($_GET['playlist']);
        getComments($_GET['playlist'], 'playlist');
    } else {
        searchResult();
    }
}
?>
    </div>
    <div id="playlist-msg">
        <p id="msg"></p>
    </div>

    <script>
        var textarea = document.getElementById("textarea");
        var limit = 200;
<?php

if (!isset($_GET)) {
    exit;
} else {
    require_once dirname(__FILE__) . '/../inc/class.queryVideos.php';
    $queryVideos = new queryVideo();
}
function getPlaylist()
{
    if (isset($_GET['playlist'])) {
        return $_GET['playlist'];
    } else {
        return false;
    }
}
if (isset($_GET['all'])) {
    $JSONArray = $queryVideos->query(false, $_GET['all'], '', getPlaylist(), 24);
} else {
    if (isset($_GET['search']) && isset($_GET['q'])) {
        $JSONArray = $queryVideos->query(true, $_GET['search'], $_GET['q'], getPlaylist(), 24);
    }
}
for ($i = 0; $i < count($JSONArray); $i++) {
    echo $JSONArray[$i];
}
Example #5
0
<?php

include 'header.php';
?>

<?php 
$results = json_decode(getPlaylist($_GET['user_id'], $_GET['playlist_id']));
?>
      <h2></h2>
      <div class="sm2-bar-ui">

         <div class="bd sm2-main-controls">

          <div class="sm2-inline-texture"></div>
          <div class="sm2-inline-gradient"></div>

          <div class="sm2-inline-element sm2-button-element">
           <div class="sm2-button-bd">
            <a href="#play" class="sm2-inline-button play-pause">Play / pause</a>
           </div>
          </div>

          <div class="sm2-inline-element sm2-inline-status">

           <div class="sm2-playlist">
            <div class="sm2-playlist-target">
             <!-- playlist <ul> + <li> markup will be injected here -->
             <!-- if you want default / non-JS content, you can put that here. -->
             <noscript><p>JavaScript is required.</p></noscript>
            </div>
           </div>
         case "wax":
             $url = getPlaylist($playlist, "<ref");
             $url = eregi_replace("[ >\"']", "", substr($url, strpos($url, "=") + 1, -2));
             break;
         case "xspf":
             $xml = simplexml_load_file($playlist);
             if ($xml->trackList) {
                 $url = $xml->trackList->track[0]->location;
             }
             break;
         default:
             // try to match first url in file if content is unknown
             $lines = file($playlist);
             if ($lines) {
                 foreach ($lines as $line) {
                     $url = getPlaylist($playlist);
                     $fu = preg_match('~http:(.+?)[ "\'>]~is', trim($line) . " ", $matches);
                     if ($fu) {
                         $url = substr($matches[0], 0, -1);
                         break;
                     }
                 }
             }
             break;
     }
 } else {
     // assume it is a raw url to a steam and return
     $url = $playlist;
 }
 if ($url != "") {
     echo '({"url":"' . $url . '"})';
Example #7
0
     $mySqueezeCLI = new SqueezeCLI(addTitle($parameter));
     break;
 case 'loadTitle':
     //supprime la playlist, ajoute le titre en paramètre ->  exemple :loadTitle_02 No Woman No Cry.mp3 ->ok
     $mySqueezeCLI = new SqueezeCLI(addTitle($parameter));
     break;
 case 'deleteTitle':
     //retire un titre de la playlist, attention ici il s'agit des ID de l'index, 0 étant le titre en cour de la playlist-> exemple : deleteTitle_1 ->ok
     deleteTitle($parameter);
     echo "titre supprimé \n";
     break;
 case 'getPlaylist':
     // récupere la current playlist du media server et la retourne en HTML pour l'ajax ->ok
     $parameter = getPlaylistId();
     //Il n'y a qu'une playlist donc le première ID
     getPlaylist($parameter);
     break;
     /*
     
     	$mySqueezeCLI = new SqueezeCLI($_SESSION['mac']." playlist title 8 ?\n");
     	echo "la requete ".$_SESSION['mac']." playlist title 8 ?\n";
     	$response = $mySqueezeCLI->receiveCLI();
     		echo $response."\n";
     */
     /*
     $_SESSION['currentPlaylist']=array();
     
     
     $i = 0;
     //$request = 	$_SESSION['mac']." playlist title $i ?\n";
     while ( true ) 
 /**
  * Function get home categories thumb data 
  * from plugin helper
  * 
  * @param unknown $pagenum          
  * @param unknown $dataLimit          
  * @return Ambigous <type, mixed, NULL, multitype:, multitype:multitype: , multitype:Ambigous <multitype:, NULL> >
  */
 function home_categoriesthumbdata($pagenum, $dataLimit)
 {
     /** Set start and limit to get category thumbs */
     $pagenum = isset($pagenum) ? absint($pagenum) : 1;
     /** Set the pagination limit */
     $offset = ($pagenum - 1) * $dataLimit;
     $limit = $offset . ',' . $dataLimit;
     /** Return home categories data with help of model */
     return getPlaylist(' playlist_order ASC ', $limit);
 }
 /**
  * Fucntion to display the catgoery list as a link
  * 
  * @param unknown $args
  * @param unknown $instance
  */
 function widget($args, $instanceCat)
 {
     /** Set default limit as 3 */
     $show = 3;
     /** Get catgoery widget title */
     $title = empty($instanceCat['title']) ? ' ' : apply_filters('widget_title', $instanceCat['title']);
     /** Catgoery Widget code starts here */
     global $wpdb;
     /** These are our own options
      * Get "number of playlist" from backend option */
     if ($instanceCat['show'] && absint($instanceCat['show'])) {
         $show = $instanceCat['show'];
     }
     /** Get playlist from db  */
     $features = getPlaylist(' playlist_order ASC ', $show);
     /** Count selected playlist */
     $countCategories = getPlaylistCount();
     /** Call function to get more page id  */
     $moreName = morePageID();
     /** Get more categories link from helper */
     $more_videos_link = get_morepage_permalink($moreName, 'categories');
     /** Before widget functions category */
     echo $args['before_widget'];
     /** Set category widget output */
     $div = '';
     $div .= '<div id="videos-category"  class="widget widget_categories sidebar-wrap "> <h3 class="widget-title"><a href="' . $more_videos_link . '">' . $title . '</a></h3>
                 <ul class="ulwidget clearfix">';
     /** Check if playlist is exist */
     if (!empty($features)) {
         /** If found, loop through them */
         foreach ($features as $feature) {
             /** Get playlist name */
             $fetched = $feature->playlist_name;
             /** Get playlist seo name */
             $playlist_slugname = $feature->playlist_slugname;
             /** Get playlist id */
             $playlist_id = $feature->pid;
             /** Get playlist page url */
             $playlist_url = get_playlist_permalink($moreName, $playlist_id, $playlist_slugname);
             /** Display playlist name */
             $div .= '<li>';
             $div .= '<a class="videoHname "  href="' . $playlist_url . '">' . $fetched . '</a>';
             $div .= '</li>';
         }
     } else {
         /** If no data, then display no categories message */
         $div .= '<li>' . __('No Categories', APPTHA_VGALLERY) . '</li>';
     }
     /** End category list */
     if ($show < $countCategories) {
         $div .= '<li><div class="right video-more"><a href="' . $more_videos_link . '">' . __('More Categories', APPTHA_VGALLERY) . ' &#187;</a></div></li>';
     }
     $div .= '</ul></div>';
     /** Display category widget */
     echo $div;
     /** Display widget closing tag */
     /** After widget functions category */
     echo $args['after_widget'];
 }