Exemplo n.º 1
0
         //ist it a video or enhanced podcast? Link to external player!
         if ($type == "14" or $type == "10" or $type == "13" or $type == "7") {
             $target = "quicktimeplayer";
         }
         //build html-code for quicktime plugin (audio)
         echo showquicktime($src, $link, 90, 20, $target, "false");
     } else {
         //if its not an mp3 or quicktime, show a simple link!
         if ($showtable[$i]['audio_file'] != "") {
             echo "<a href=\"" . $link . "\">\n                 " . getmediatypename($showtable[$i]['audio_type']) . "</a>";
             echo "</td>\n";
         }
     }
 }
 //showing audio length in minutes
 echo "<td>" . getminutes($showtable[$i]['audio_length']) . "</td>\n";
 //the status radio buttons
 $temp = $showtable[$i]['status'];
 echo "<td>\n";
 if ($temp == 1) {
     echo "<span style=\"color:#dd0067;\">" . bla("draft") . "</span>";
 }
 if ($temp == 2) {
     echo "<span style=\"color:#090;\">" . bla("finished") . "</span>";
 }
 if ($temp == 3) {
     echo bla("onair");
 }
 echo "</td>\n";
 //a beautiful button for deleting
 echo "<td class=\"right\">\n";
Exemplo n.º 2
0
         echo "    <description>" . $mess . "</description>\n";
         echo "    <itunes:summary>" . $tunmess . "</itunes:summary>\n";
         //bodytext
         echo "    <content:encoded>" . html_to_xml($comfields['message_html']);
         //preparing some variables
         $audiourl = $settings['url'] . "/audio/" . $comfields['audio_file'];
         if (!filled($comfields['audio_file'])) {
             $audiothere = false;
         } else {
             $audiothere = true;
         }
         $tmp = "";
         //do we have an audio file? link to it here!
         if ($audiothere) {
             $tmp .= "<p><a href=\"" . $audiourl . "\">File Download ";
             $tmp .= "(" . getminutes($comfields['audio_length']) . " min / " . getmegabyte($comfields['audio_size']) . " MB)</a>";
         }
         echo trim(htmlspecialchars($tmp, ENT_QUOTES));
         echo "</content:encoded>\n";
         //date of publication
         echo "    <pubDate>" . date("r", strtotime($comfields['posted'])) . "</pubDate>\n\n";
         //do we add an enclosure?
         if ($audiothere) {
             echo "    <enclosure url=\"" . $audiourl . "\" ";
             echo "length=\"" . $comfields['audio_size'] . "\" ";
             echo "type=\"" . mime_type($comfields['audio_type']) . "\" />\n";
             echo "    <itunes:duration>" . getitunesduration($comfields['audio_length']) . "</itunes:duration>\n";
         }
         echo "</item>\n\n";
     }
 }
    echo "<td>\n";
    if ($showtable[$i]['audio_type'] == 1) {
        echo "<object type=\"application/x-shockwave-flash\" ";
        echo "data=\"backend/emff_list.swf?src=" . $link;
        echo "\" width=\"90\" height=\"19\">\n";
        echo "<param name=\"movie\" value=\"backend/emff_list.swf?src=" . $link;
        echo "\" />\n";
        echo "</object>\n</td>\n";
    } else {
        //if its not an mp3, show a simple link!
        if ($showtable[$i]['audio_file'] != "") {
            echo "<a href=\"" . $link . "\">\n                 " . getmediatypename($showtable[$i]['audio_type']) . "</a>";
            echo "</td>\n";
        }
    }
    //showing length in minutes
    echo "<td class=\"size\">" . getminutes($showtable[$i]['audio_length']) . "</td>\n";
    //a beautiful button for deleting
    echo "<td class=\"right\">\n";
    if (allowed(1, $showtable[$i]['id'])) {
        echo "<form method=\"post\" enctype=\"multipart/form-data\" ";
        echo "action=\"index.php?page=comments&amp;do=x&amp;";
        echo "id=" . $showtable[$i]['id'] . "\" ";
        echo "onSubmit=\"return yesno('Do you really want to delete this comment?')\">\n";
        echo "<input type=\"submit\" value=\"delete\" />\n";
        echo "</form>\n";
    }
    echo "</td>\n";
    echo "</tr>\n\n";
}
echo "</table>";
            $tmp = "";
            //do we have an audio file? link to it here!
            if ($audiothere) {
                $tmp .= "<p><a href=\"{$audiourl}\">Audio Download ";
                $tmp .= "(" . getminutes($comfields['audio_length']) . " min / " . getmegabyte($comfields['audio_size']) . " MB)</a>";
            }
            echo trim(htmlspecialchars($tmp, ENT_QUOTES));
            echo "    </content:encoded>\n";
            //date of publication
            echo "    <pubDate>" . date("r", strtotime($comfields['posted'])) . "</pubDate>\n\n";
            //do we add an enclosure?
            if ($audiothere) {
                echo "    <enclosure url=\"{$audiourl}\" ";
                echo "length=\"{$comfields['audio_size']}\" ";
                echo "type=\"" . mime_type($comfields['audio_type']) . "\" />\n";
                echo "    <itunes:duration>" . getminutes($comfields['audio_length']) . "</itunes:duration>\n";
            }
            echo "</item>\n\n";
        }
    }
}
echo "\n\n</channel>\n\n</rss>";
// ------------------------------------- FUNCTIONS -----------------------------
function showcats($fields)
{
    $tempcats = "";
    if ($fields['category1_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category1_id'])) . ", ";
    }
    if ($fields['category2_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category2_id'])) . ", ";
function commentlength()
{
    //returns the audio length on the comments list
    global $currentcomment;
    global $comments;
    return getminutes($comments[$currentcomment]['audio_length']);
}