Beispiel #1
0
<head>
<link href="phqueue.css" rel="stylesheet" type="text/css">
</head>
<?php 
include "config.php";
include "header.php";
include "helpers.php";
include "mp3info.php";
require_once "/var/www/freetag/freetag.class.php";
if (isset($_GET['refresh'])) {
    delete_all_showtunes(-1);
}
import_show(-1, $randomizer_path, 0);
?>
<table align='center' border="1px dotted #909090"><tr><td><h2>Song Name</h2></td><td><h2>Filename</h2></td><td><h2>Artist</h2></td><td><h2>Album</h2></td><td><h2>time</h2></td><td><h2>Operation</h2></td><td><h2>tags</h2></td></tr>
<?php 
$sql = "select * from tunes where showid='-1' and type='0'";
if (!($result = mysql_query($sql))) {
    print mysql_error();
} else {
    $freetag_options = array('db_user' => 'root', 'db_pass' => '', 'db_host' => 'localhost', 'db_name' => 'tunequeue');
    $freetag = new freetag($freetag_options);
    $userid = 1;
    while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
        print "<tr align='center'><td>\n";
        print $line['title'] . "</td><td>\n";
        print $line['fullpath'] . "</td><td>\n";
        $artist_name = get_artist_name($line['artistid']);
        print $artist_name . "</td><td>\n";
        print $line['album'] . "</td><td>\n";
        print $line['time'] . "</td>\n";
Beispiel #2
0
    $showname = $_POST['showname'];
    if (file_exists($show_path . "/" . $_POST['dir'])) {
        insert_into_shows($showname, $description, $logoimage, $show_path . "/" . $_POST['dir']);
        $showid = get_show_id($showname);
        import_show($showid, $show_path . "/" . $_POST['dir'], 0);
    } else {
        $error = 1;
        print 'Directory does not exist, Please create it and refresh';
    }
}
if ($error == 0) {
    if (isset($_GET['showid'])) {
        $showid = $_GET['showid'];
        $showname = get_showname($showid);
        if (isset($_GET['refresh'])) {
            delete_all_showtunes($showid);
        }
        $path = get_show_path($showid);
        import_show($showid, $path, 0);
    }
    print "<table align='center' border='1px dotted #909090'><tr><td><h2>Song Name</h2></td><td><h2>Artist</h2></td><td><h2>Album</h2></td><td><h2>time</h2></td><td>Operation</td><td>Order</td><td><h2>Filename</h2></td></tr>";
    $sql = "select * from tunes where showid='{$showid}'";
    if (!($result = mysql_query($sql))) {
        print mysql_error();
    } else {
        while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
            print "<tr align='center'><td>\n";
            print $line['title'] . "</td><td>\n";
            $artist_name = get_artist_name($line['artistid']);
            print $artist_name . "</td><td>\n";
            print $line['album'] . "</td><td>\n";