Example #1
0
<?php

include 'inc/functions_record.php';
global $fields;
$edit_id = $_GET['id'];
//update stuff, if requested by url
if (isset($_GET['do']) and $_GET['do'] == "save") {
    echo "<h1>" . bla("hl_editid3") . saveid3($edit_id) . "</h1>";
} else {
    //gets the filename from the posting-id we want to edit
    $dosql = "SELECT title, audio_file, filelocal FROM " . $GLOBALS['prefix'] . "lb_postings WHERE id = '" . $edit_id . "'";
    $result = $GLOBALS['lbdata']->GetArray($dosql);
    $fields = $result[0];
    echo "<h1>" . bla("hl_editid3") . "</h1>";
}
if ($fields['filelocal'] != 1) {
    echo "<p class=\"msg\">" . bla("msg_changeremoteid3") . "</p>";
} else {
    $id3data = getid3data($GLOBALS['audiopath'] . $fields['audio_file'], "back");
    echo "<form action=\"index.php?page=id3&amp;do=save&amp;id=" . $edit_id;
    echo "\" accept-charset=\"utf-8\" method=\"post\" enctype=\"multipart/form-data\">";
    echo "<table summary=\"ID3 tags of this audio posting\">\n\n";
    echo "<tr>\n";
    echo "<td class=\"text\">" . bla("id3_title") . ":</td>\n";
    echo "<td><input type=\"text\" name=\"id3title\" \n      value=\"" . $id3data['title'] . "\" /></td>\n\n";
    echo "<td class=\"right text\">" . bla("id3_artist") . ":</td>\n";
    echo "<td class=\"right\"><input type=\"text\" name=\"id3artist\" \n      value=\"" . $id3data['artist'] . "\" /></td>\n";
    echo "</tr>\n\n";
    echo "<tr>\n";
    echo "<td class=\"text\">" . bla("id3_album") . ":</td>\n";
    echo "<td><input type=\"text\" name=\"id3album\" \n      value=\"" . $id3data['album'] . "\" /></td>\n\n";
<?php

include 'inc/functions_record.php';
global $fields;
$edit_id = $_GET['id'];
//update stuff, if requested by url
if (isset($_GET['do']) and $_GET['do'] == "save") {
    echo "<h1>Edit ID3 Tags" . saveid3($edit_id) . "</h1>";
} else {
    //gets the filename from the posting-id we want to edit
    $dosql = "SELECT title, audio_file, filelocal FROM " . $GLOBALS['prefix'] . "lb_postings \n              WHERE id='" . $edit_id . "';";
    $result = mysql_query($dosql) or die(mysql_error());
    $fields = mysql_fetch_assoc($result);
    echo "<h1>Edit ID3 Tags</h1>";
}
if ($fields['filelocal'] != 1) {
    echo "<p class=\"msg\">Cannot change id3-tags from remote files</p>";
} else {
    $id3data = getid3data($GLOBALS['audiopath'] . $fields['audio_file'], "back");
    echo "<form action=\"index.php?page=id3&amp;do=save&amp;id=" . $edit_id;
    echo "\" method=\"post\" enctype=\"multipart/form-data\">";
    echo "<table summary=\"ID3 tags of this audio posting\">\n\n<tr>\n";
    echo "<td>Posting Title:</td>\n";
    echo "<td><input type=\"text\" style=\"color: #999;\" readonly=\"readonly\" ";
    echo "value=\"" . $fields['title'] . "\" /></td>\n";
    echo "<td class=\"right text\">Filename:</td>\n";
    echo "<td class=\"right\"><input style=\"color: #999;\" type=\"text\" readonly=\"readonly\" ";
    echo "value=\"" . $fields['audio_file'] . "\" /></td>\n";
    echo "</tr>\n\n";
    echo "<tr>\n";
    echo "<td>ID3 Title:</td>\n";