Esempio n. 1
0
 public function getContent()
 {
     $playlist = new playlist();
     $playlist->getPlaylistByID(Request::getInstance()->getGetRequests('pl_id'));
     require_once PATH . 'classes/Songs/playlistPDFgenerator.php';
     $playlistPDFgenerator = new playlistPDFgenerator();
     $playlistPDFgenerator->generatePDF($playlist);
     die;
 }
Esempio n. 2
0
 public function getContent()
 {
     $playlist = new playlist();
     $playlist->getPlaylistByID(Request::getInstance()->getGetRequests('pl_id'));
     echo 'PLAYLIST ' . $playlist->name . '<br>';
     foreach ($playlist->bloecke as $b) {
         echo $b->pb_sort_order . '<br>';
         foreach ($b->songs as $s) {
             echo $s->title . '<br>';
         }
     }
     die;
 }
Esempio n. 3
0
<?php

// $Id: playlist.php,v 1.8 2004/03/04 22:20:02 entropie Exp $ //
include './cfg/cfg.php';
include './libraries/class.main.php';
include './libraries/class.playlist.php';
$mp3 = new main();
$mp3playlist = new playlist();
if (isset($_GET['load'])) {
    $mp3playlist->load_playlist($_GET["load"]);
}
if (!isset($_GET['playlist']) || empty($_GET['playlist'])) {
    $mp3->sendHeader('index.php');
} else {
    $mp3playlist->view_playlists($_GET['playlist']);
}
Esempio n. 4
0
<?php

// $Id: form.php,v 1.29 2004/10/06 02:11:16 entropie Exp $ //
include './cfg/cfg.php';
include './libraries/class.main.php';
include './libraries/class.play.php';
include './libraries/class.search.php';
include './libraries/class.playlist.php';
include './libraries/class.updatedb.php';
include './libraries/class.admin.php';
$mp3 = new main();
$mp3play = new play();
$mp3playlist = new playlist();
$mp3updatedb = new updatedb();
if (isset($_POST['text'])) {
    $text = trim($_POST['text']);
} elseif (isset($_GET['text'])) {
    $text = trim($_GET['text']);
} else {
    $mp3->sendHeader('index.php', TRUE);
}
$cs = $cfg['command_string'];
switch ($text) {
    // main: help
    case substr($text, 0, 5) == $cs . 'help':
        $mp3->sendHeader('help.php', TRUE);
        break;
        // login
    // login
    case substr($text, 0, 6) == $cs . 'login':
        $mp3->adminLogin();
Esempio n. 5
0
 function printFooter($mainTableStr = 'browser', $append = '')
 {
     if (!isset($_GET['pathid'])) {
         $_GET['pathid'] = 0;
     }
     // Initialize Shoutbox
     include './libraries/class.shoutbox.php';
     $sb = new shoutbox();
     // Initialize user temporary playlists
     include './libraries/class.playlist_in.php';
     $playlist_in = new playlist_in();
     // Initialize user playlists
     include './libraries/class.playlist.php';
     $playl = new playlist();
     // Check if plalists are availible, if not => empty string
     if (!($lplayl = $playl->list_playlists())) {
         $lplayl = '';
     }
     $content = $this->parseXmlFile('style.xml', 'footer');
     $proll = $this->parseXmlFile('style.xml', 'prolling');
     $proll = ereg_replace(':proll:', PROLL, $proll['main']);
     $mainTableStr = $this->printLangS('STR_maintabletitle_' . $mainTableStr, $append);
     $myn = ereg_replace(':user:'******'ADMIN') && ADMIN == 'admin' && defined('USER') ? '@' . USER : (defined('USER') ? USER : '******'), $content['main']);
     $myn = ereg_replace(':hplink:', $this->evalStyle('hplink', $this->printLangS('STR_hplink')), $myn);
     $myn = ereg_replace(':pathid:', isset($_GET['pathid']) ? $_GET['pathid'] : 0, $myn);
     $myn = ereg_replace(':backid:', $this->backId, $myn);
     $myn = ereg_replace(':playlist:', $lplayl, $myn);
     $myn = ereg_replace(':checkalldirs:', $this->evalStyle('checkalldirs', $this->printLangS('STR_checkalldirs'), $this->printLangS('STR_uncheckalldirs'), $this->printLangS('STR_uncheckenddirs')), $myn);
     $myn = ereg_replace(':checkallfiles:', $this->evalStyle('checkallfiles', $this->printLangS('STR_checkallfiles'), $this->printLangS('STR_uncheckallfiles'), $this->printLangS('STR_uncheckendfiles')), $myn);
     $myn = ereg_replace(':randlink:', $this->evalStyle('randlink', $this->printLangS('STR_randlink')), $myn);
     $myn = ereg_replace(':helplink:', $this->evalStyle('helplink', $this->printLangS('STR_helplink')), $myn);
     $myn = ereg_replace(':adminlink:', defined('ADMIN') && ADMIN == 'admin' ? $this->evalStyle('adminlink', $this->printLangS('STR_adminlink')) : '', $myn);
     $myn = ereg_replace(':INIT_prolling:', $proll, $myn);
     $myn = ereg_replace(':adminLogin:'******'LOGIN') ? $this->evalStyle('adminLogin') : '', $myn);
     $myn = ereg_replace(':maintabletitle:', $mainTableStr, $myn);
     $myn = ereg_replace(':homelink:', $this->evalStyle('homelink'), $myn);
     // Write 'inputs' for hidden form.
     $str = '';
     if (isset($this->collectArray) && !empty($this->collectArray)) {
         foreach ($this->collectArray as $pid) {
             $str .= '<input type="hidden" name="ids[]" value="' . $pid . '">' . "\n" . '              ';
         }
     }
     $myn = ereg_replace(':collectarray:', $str, $myn);
     // user own temporary playlist
     $myn = ereg_replace(':playlist_in:', $playlist_in->init(), $myn);
     // link to validator
     $myn = ereg_replace(':validator:', $this->evalStyle('validator'), $myn);
     // shoutbox init
     $myn = ereg_replace(':INIT_shoutbox:', $sb->printShoutBox(), $myn);
     // stats & informations
     $myn = ereg_replace(':botline:', $this->evalStyle('botline', $this->printLangS('botline', $this->JampTime()), $this->printLangS('botlineStats', STATS)), $myn);
     print $myn;
     ob_end_flush();
 }
Esempio n. 6
0
 private function getAndReturnPlayZeiten($pl_id)
 {
     $pl = new playlist();
     $pl->getPlaylistByID($pl_id);
     echo json_encode($pl->getDataForJson());
 }
Esempio n. 7
0
                }
                $pathh = "/var/www/StartSync.php {$auth_id['id']} '0.0.0.0' {$new_port}";
                error_log("Starting Sync server on port {$new_port} for ID: {$auth_id['id']}");
                exec("php -f {$pathh} >/dev/null &");
                sleep(2);
                $results['connection'] = array('ip' => '66.228.33.88', 'port' => $new_port);
                RestUtils::sendResponse(200, json_encode($results), 'application/json');
            }
            if (isset($get_data['role']) && $get_data['role'] == 'slave') {
                $active_masters = $auth->get_active_masters('login, id, server_pid, port');
                $active_masters_res = array();
                foreach ($active_masters as $val) {
                    if (!file_exists("/proc/{$val['server_pid']}")) {
                        $auth->update_auth($val['id'], array('active' => 'no', 'server_pid' => null, 'port' => null));
                    } else {
                        $active_masters_res[] = array('login' => $val['login'], 'id' => $val['id'], 'server_url' => '66.228.33.88', 'port' => $val['port']);
                    }
                }
                if (isset($get_data['master_id'])) {
                    $playlist = new playlist($dbcon);
                    $track = new track($dbcon);
                    $get_playlist = $playlist->get_slave_playlist($get_data['master_id'], 'id, title, description, last_update');
                    $get_tracks = $track->get_slave_tracks($get_playlist['id'], 't.*');
                    $get_playlist['tracks'] = $get_tracks;
                    RestUtils::sendResponse(200, json_encode($get_playlist), 'application/json');
                }
                RestUtils::sendResponse(200, json_encode($active_masters_res), 'application/json');
            }
        }
        break;
}
Esempio n. 8
0
File: ajax.php Progetto: hlag/svs
 private function savePlaylistStartzeit($pl_id, $uhrzeitStart)
 {
     $pl = new playlist();
     $pl->getPlaylistByID($pl_id);
     $pl->setStartUhrzeit($uhrzeitStart);
     $pl->savePlaylist();
     $pl->setUhrzeiten();
     $retval = $pl->getDataForJson();
     echo json_encode($retval);
 }