</div>


<!--                                      size  -->
<div class="fileinfo center">
<h3>size</h3>

<?php 
    if ($fields['filelocal'] == 1) {
        echo "<input " . readonly($edit_id) . "type=\"text\" readonly=\"readonly\" ";
        echo "value=\"" . getmegabyte($fields['audio_size']) . " MB\" />";
        echo "<input type=\"hidden\" name=\"audio_size\" ";
        echo "value=\"" . getmegabyte($fields['audio_size']) . "\" />";
    } else {
        echo "<input " . readonly($edit_id) . "type=\"text\" name=\"audio_size\"";
        echo "value=\"" . getmegabyte($fields['audio_size']) . " MB\" />";
    }
    ?>

</div>
    
    
    
<!--                                      length  -->

<div class="fileinfo right">
<h3>duration</h3>
<input <?php 
    echo readonly($edit_id);
    ?>
type="text" name="audio_length" value="<?php 
Ejemplo n.º 2
0
function commentsize()
{
    //returns the audio size on the comments list
    global $currentcomment;
    global $comments;
    return getmegabyte($comments[$currentcomment]['audio_size']);
}
Ejemplo n.º 3
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";
     }
 }
    <?php 
$temp = array("", "");
$temp[$settings['cgi']] = "checked=\"checked\"";
?>
    <input class="radio" name="cgi" type="radio" value="1" <?php 
echo $temp[1];
?>
/>yes&nbsp;&nbsp;
    <input class="radio" name="cgi" type="radio" value="0" <?php 
echo $temp[0];
?>
/>no
    </td>
    <td class="right">
    Every PHP server has a size limit for browser uploads. Yours is <?php 
echo getmegabyte(uploadlimit());
?>
 MB. Use CGI/Perl to exceed this limitation.</td>
</tr>

<tr>
    <td class="left">CGI script location:</td>
    <td class="center">
    <?php 
$temp = array("", "");
$temp[$settings['cgi_local']] = "checked=\"checked\"";
?>
    <input class="radio" name="cgi_local" type="radio" value="1" <?php 
echo $temp[1];
?>
/>on this server&nbsp;&nbsp;
Ejemplo n.º 5
0
    }
    echo "\" />\n</form>\n";
} else {
    //okay, we use the classic php method for uploading!
    $soundsDir = "/opt/swara/web/posts";
    $mp3_target = "/opt/swara/web/posts/web/{$update_id}.mp3";
    echo "<form method=\"post\" action=\"index.php?page=record2&amp;do=browser";
    if ($update) {
        echo "&amp;id=" . $update_id;
    }
    $convertToWav1 = "/usr/local/bin/lame -b 32 {$mp3_target} {$soundsDir}/{$update_id}.wav";
    $convertToWav2 = "/usr/bin/sox -V {$soundsDir}/{$update_id}.wav -r 8000 -c 1 {$soundsDir}/{$update_id}.raw";
    exec($convertToWav1, $output = array());
    exec($convertToWav2);
    echo "\" enctype=\"multipart/form-data\" onSubmit=\"return saythis('" . bla("alert_patience") . "')\">\n";
    echo "<h2>" . bla("rec1_browser") . " <small>(<" . getmegabyte(uploadlimit()) . "MB)</small></h2>\n";
    echo "<div class=\"data\">\n";
    echo "<input button=\"hallo\" id=\"choosefile\" type=\"file\" name=\"fileupload\" size=\"20\" accept=\"audio/*\" />";
    echo "</div>\n<input type=\"submit\" value=\"" . bla("but_getfile") . "\" />\n</form>";
}
?>

</div>

<?php 
if ($settings['ftp'] == 1) {
    echo "<!--  UPLOAD VIA FTP  -->";
    echo "\n\n<div class=\"method\">\n";
    echo "<h2>" . bla("rec1_ftp") . "</h2>\n";
    echo "<div class=\"data\">\n";
    //not forget the id, if we are updating a file
    echo "<input id=\"choosefile\" type=\"file\" name=\"file\" size=\"20\" accept=\"audio/*\" />\n";
    echo "</div>\n";
    echo "<input type=\"submit\" value=\"get file\" />\n";
    echo "<input type=\"hidden\" name=\"callback_script\" value=\"" . $settings['url'] . "/loudblog/index.php?page=record2&amp;do=cgi";
    if ($update_id != false) {
        echo "&amp;id=" . $update_id;
    }
    echo "\" />\n</form>\n";
} else {
    //okay, we use the classic php method for uploading!
    echo "<form method=\"post\" action=\"index.php?page=record2&amp;do=browser";
    if ($update_id != false) {
        echo "&amp;id=" . $update_id;
    }
    echo "\" enctype=\"multipart/form-data\" onSubmit=\"return saythis('This may take some minutes. Start uploading now!')\">\n";
    echo "<h2>Via Browser <small>(<" . getmegabyte(uploadlimit()) . "MB)</small></h2>\n";
    echo "<div class=\"data\">\n";
    echo "<input id=\"choosefile\" type=\"file\" name=\"fileupload\" size=\"20\" accept=\"audio/*\" />";
    echo "</div>\n<input type=\"submit\" value=\"get file\" />\n</form>";
}
?>

</div>

<?php 
if ($settings['ftp'] == 1) {
    echo "<!--  UPLOAD VIA FTP  -->";
    echo "\n\n<div class=\"method\">\n";
    echo "<h2>Upload via FTP</h2>\n";
    echo "<div class=\"data\">\n";
    //not forget the id, if we are updating a file
Ejemplo n.º 7
0
    unset($linkrows[$j]);
    $tmp = "";
    if ($j > 0) {
        $tmp = "\n\n    <ul>\n\n";
        //start loop for showing links
        foreach ($linkrows as $link) {
            $tmp .= "    <li>\n<a href=\"{$link['url']}\" ";
            $tmp .= "title=\"{$link['description']}\">";
            $tmp .= "{$link['title']}</a>&nbsp;&ndash; ";
            $tmp .= "{$link['description']}</a>\n    </li>\n\n";
        }
        $tmp .= "    </ul>\n\n";
    }
    //do we have an audio file? link to it here!
    if ($fields['audio_file'] != "") {
        $tmp .= "<p><a href=\"{$tempurl}\">Audio Download ";
        $tmp .= "(" . getmegabyte($fields['audio_size']) . " MB)</a>";
    }
    echo trim(htmlspecialchars($tmp, ENT_QUOTES));
    echo "    </content:encoded>\n";
    //date of publication
    echo "    <pubDate>" . date("r", strtotime($fields['posted'])) . "</pubDate>\n\n";
    //do we add an enclosure?
    if ($fields['audio_file'] != "") {
        echo "    <enclosure url=\"{$tempurl}\" ";
        echo "length=\"{$fields['audio_size']}\" ";
        echo "type=\"" . mime_type($fields['audio_type']) . "\" />\n";
    }
    echo "</item>\n\n";
}
echo "\n\n</channel>\n\n</rss>";
Ejemplo n.º 8
0
    <td class="center">
    <?php 
$temp = array("", "");
$temp[$settings['cgi']] = "checked=\"checked\"";
?>
    <input class="radio" name="cgi" type="radio" value="1" <?php 
echo $temp[1] . "/>" . bla("yes");
?>
&nbsp;&nbsp;
    <input class="radio" name="cgi" type="radio" value="0" <?php 
echo $temp[0] . "/>" . bla("no");
?>
    </td>
    <td class="right">
    <?php 
echo bla("set_cgihelp1") . " " . getmegabyte(uploadlimit()) . bla("set_cgihelp2");
?>
</td>
</tr>

<tr>
    <td class="left"><?php 
echo bla("set_cgiloc");
?>
:</td>
    <td class="center">
    <?php 
$temp = array("", "");
$temp[$settings['cgi_local']] = "checked=\"checked\"";
?>
    <input class="radio" name="cgi_local" type="radio" value="1" <?php 
     if ($showtable[$i]['audio_file'] != "") {
         echo "<a href=\"" . $link . "\">Listen to \n                 " . getmediatypename($showtable[$i]['audio_type']) . "</a>";
         echo "</td>\n";
     }
 }
 /*
     
     //a beautiful button for listening
     echo "<td>\n";
     echo "<form method=\"get\"";
     echo "action=\"" . $link . "\">\n";
     echo "<input type=\"submit\" value=\"listen\" />\n";
     echo "</form>\n</td>\n";
 */
 //showing audio size in megabyte
 echo "<td>" . getmegabyte($showtable[$i]['audio_size']) . " MB</td>\n";
 //the status radio buttons
 $temp = $showtable[$i]['status'];
 echo "<td>\n";
 if ($temp == 1) {
     echo "<span style=\"color:#dd0067;\">draft</span>";
 }
 if ($temp == 2) {
     echo "<span style=\"color:#090;\">finished</span>";
 }
 if ($temp == 3) {
     echo "live";
 }
 echo "</td>\n";
 //a beautiful button for deleting
 echo "<td class=\"right\">\n";
Ejemplo n.º 10
0
function audiosize()
{
    //returns the filesize of an audio-file (works within postings-loop)
    global $postings;
    global $currentid;
    return getmegabyte($postings[$currentid]['audio_size']);
}