<?php try { // Get the configuration require_once('../config/config.php'); // Get the code for this page require_once('../code/code.playing.php'); // Get the display for this page require_once('../display/display.current.php'); } catch (Exception $ex) { // The error page will be displayed if anything goes wrong above $message = $ex->getMessage(); require_once('../display/display.error.php'); }
<meta http-equiv="Refresh" content="5" /> <?php if(is_array($comingSongs) && count($comingSongs)>0) : ?> <div id="coming-up_wrapper"> <div id="coming-up"> <table cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <?php $counter = 1; $doCounter = count($comingSongs) > 1; foreach ($comingSongs as $comingSong): ?> <div> <?php echo $comingSong->artist; ?> <?php if(!empty($comingSong->artist)) : ?> - <?php echo $comingSong->title; ?> <?php endif; ?> <?php if($comingSong->isRequested): ?> (Заказ) <?php endif; ?> </div> <hr> <?php endforeach; ?> <hr style="width:100%;border:none;"/> </td> </tr> </tbody> </table> </div> </div> <?php endif; ?>
<?php
header('Content-Type: text/html; charset=windows-1251');
<?php header('Content-Type: text/html; charset=windows-1251'); try { // Get the configuration require_once('../config/current.php'); ...
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ setInterval("jQuery('#timeA').load('# dl#timeB');",5000); }); </script> <dl id="timeA"><dl id="timeB"> <!-- Сюда вставить код --> </dl></dl>
<!-- BEGIN:SEARCH --> <div id="search"> <form method="get" action="playlist.php" name="searchParameters"> Поиск: <?php InputText('search', $search, '',50); ?> <input type="submit" value="Go" name="B1" /> Показывать по <?php InputCombo('limit', $limit, 50, '25,50,100', "", "document.forms.searchParameters.submit();"); ?> результатов
<?php try { // Get the configuration require_once('../config/config.php'); // Get the code for this page require_once('../code/code.playlist.php'); // Get the display for this page require_once('../display/display.playlist.php'); } catch (Exception $ex) { // The error page will be displayed if anything goes wrong above $message = $ex->getMessage(); require_once('../display/display.error.php');
<?php // The class handling song info include_once('classes/class.song.php'); if (ALLOW_REQUESTS) { // An array of song objects with the top requested songs $topRequestedSongs = Song::getTopRequestedSongs(); } $start = Def('start', 0); // Where the playlist must start $limit = Def('limit', 25); // How many items will be displayed $search = Def('search'); // The search string $character = Def('character'); // The letter to sort the playlist by if ("All" == $character) { unset($character); } //########## BUILD SEARCH STRING ################ $search_words = ''; if ($search <> '') { $search_words = array(); $temp = explode(' ', $search); reset($temp); while (list($key, $val) = each($temp)) { $val = trim($val); if (!empty($val)) { $search_words[] = $val; } } } // An array of song objects matching the search criteria $playlistSongs = Song::getPlaylistSongs($search_words, $character, $start, $limit); $cnt = Song::getPlaylistSongCount(); //########## =================== ################ $first = $start + 1; $last = min($cnt, $start + $limit); // Create the previous and next links based on the result if ($cnt > 0) { $searchstr = urlencode($search); $prev = max(0, $start - $limit); if ($start > 0) { $prevlnk = "<a href='?start=$prev&limit={$limit}&character=$character&search=$searchstr'><< Предыдущая</a>"; } $tmp = ($start + $limit); if ($tmp < $cnt) { $nextlnk = "<a href='?start=$tmp&limit={$limit}&character=$character&search=$searchstr'>Следующая >></a>"; } }