function writepage($content){
$file = "/home/abovetopsecret/podcast/log.txt";
// $delete = unlink($file);
touch($file);
$handle = fopen($file, 'a');
fwrite($handle,$content);
$handle = fclose($handle);
}
$ref = $_SERVER['HTTP_REFERER'];
if($_COOKIE['atspodcast']) {
$xmbuser = $_COOKIE['atspodcast'];
}else{
if($ref == "http://www.abovetopsecret.com/forum/podcasts.php"){
if($_GET[xmbuser]) { $xmbuser = $_GET[xmbuser];
$expire = time() + 900000;
setcookie("atspodcast", $xmbuser, $expire);
}
}else{
$expire = time();
setcookie("atspodcast", "", $expire);
echo "access error: ".$ref." - ".$_COOKIE['atsuploads']."";
exit;
}
}
if($xmbuser != "SkepticOverlord"){
echo "podcast uploads are disabled."; exit;
}
// require_once "/home/abovetopsecret/aboveboard/config.php";
$dbhost = "74.86.13.34";
$dbuser = "atspodcast";
$dbpassword = "POD3edc";
$dbname = "ats_db";
$link = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($dbname);
require_once "/home/abovetopsecret/public_html/forum/ats_xmb_functions.php";
require_once "/home/abovetopsecret/public_html/forum/xmb.php";
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
if($reply){
$formtitle = "Reply to a PODcast with a PODcast.";
$replyquery = mysql_query("select * from podcast where podid = '$reply'");
$replypod = mysql_fetch_array($replyquery);
$replythread = $replypod['tid'];
$podthread = $replypod['podthread'];
$firstpod = mysql_query("select * from podcast where podid = '$podthread'");
$first = mysql_fetch_array($firstpod);
$num = mysql_query("select * from podcast where podthread = '$podthread' and status='live'");
$number = mysql_numrows($num);
$replytitle = stripslashes($first['title'])." (reply ".$number.")";
$replyfeed = $replypod['feed'];
$replychannel = $replypod['podchannel'];
}else{
$formtitle = "Create a new PODcast.";
$podthread = 0;
$replythread = 0;
}
// echo time();
$memq = mysql_query("select * from xmb_members where username = '$xmbuser'");
$memr = mysql_fetch_array($memq);
// $thefeed = "ats";
if($memr['postnum'] > 200){
$approval = "live";
$apMsg = "You have more than 200 posts and your PODcast submission has been immediately added to the ATS stream.";
$postMsg = "Your submission will be automatically added to the RSS feed.";
} else {
$approval = "hold";
$apMsg = "You have less than 200 posts, your PODcast submission is pending staff approval before it is added to our stream.";
$postMsg = "Your submission requires approval before it is added to the RSS feed."; }
$directory = "";
$sizecheck = 1;
$staffupload == "no";
if(!$xmbuser) { exit; }
/*
echo $_POST[fileupload]."-
";
echo $_POST[upload]."-
";
$thefile = $_FILES[userfile];
echo $thefile[name]."-
";
print_r($_POST);
print_r($_FILES);
*/
$htmltop="
ATS PODcast Creator
";
$uploadform1 = "
";
$formfooter = "Members can upload MP3 files smaller than 24 megabytes for inclusion in our PODcast feed.
Your file will be renamed after upload, please take note of the renaming of your file.
$postMsg
|
";
if($fileupload && ($podtitle == "" || $poddescription == "" || $podmin == "" || $podsec == "" || $podfile == "")){
unset($fileupload);
/*
$uploadform_upload = "
";
*/
}else{
if($reply){
$uploadform_upload = "|
";
echo $htmltop;
echo $uploadform;
echo $files;
echo $uploadform_upload;
echo $formfooter;
echo "";
echo $podping;
echo $htmlbottom;
?>