function commentlimit() { //returns the maximal size of an audio comment (works within postings-loop) global $postings; global $currentid; if ($postings[$currentid]['comment_size'] > 0) { $tech = uploadlimit(); $user = $postings[$currentid]['comment_size']; if ($tech <= $user) { $show = $tech; } else { $show = $user; } return getmegabyte($show); } else { return ""; } }
} 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&do=browser"; if ($update) { echo "&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&do=cgi"; if ($update_id != false) { echo "&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&do=browser"; if ($update_id != false) { echo "&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
<?php $temp = array("", ""); $temp[$settings['cgi']] = "checked=\"checked\""; ?> <input class="radio" name="cgi" type="radio" value="1" <?php echo $temp[1]; ?> />yes <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
<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"); ?> <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