View file wap/pupload.php

File size: 7.16Kb
<?php
include("inc/func.inc.php");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo "<?xml version=\"1.0\"?>\n";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
  if(!db()){
  echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
  echo "</head>";
  echo "<body>";
  echo getdberror();
  echo "</body>";
  echo "</html>";
  exit();
  }

  $show = $_GET["show"];
  $hits = $_GET["hits"];
  $page = $_GET["page"];
  $who = $_GET["who"];
  $uid = getuid_hits($hits);
  $uip = getip();
  $ubr = $_SERVER['HTTP_USER_AGENT'];
  cleardata();
  addvisitor();

  if(isipbanned($uip,$ubr)){
  if(!isshield(getuid_hits($hits))){
  echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
  echo "</head>";
  echo "<body>";
  echo getipbanned($uip, $ubr);
  echo "</body>";
  echo "</html>";
  exit();
  }
  }

  if(($show != "") && ($show != "terms")){
  $uid = getuid_hits($hits);
  if((islogged($hits)==false)||($uid==0)){
  echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
  echo "</head>";
  echo "<body>";
  echo getsesexplog();
  echo "</body>";
  echo "</html>";
  exit();
  }
  }

  if((isbanned($uid))&&($uid != '0')){
  echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
  echo "</head>";
  echo "<body>";
  echo getbanned($uid);
  echo "</body>";
  echo "</html>";
  exit();
  }

$tid = $_GET["tid"];
$post = $_GET["post"];
$plusses = $_POST["plusses"];
$info = $_POST["info"];

addonline(getuid_hits($hits),"Add Attachments","");
     echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  echo "<div class=\"box_cen\" align=\"center\">";
echo "<b>Download Uploader</b></div>";
 echo "<div class=\"box_sub\" align=\"center\">";

 echo "Max File Size Limit To Upload Is 2MB!</div>";
 echo "<div class=\"box_cen\" align=\"center\">";
 echo "<div class=\"box_sub\" align=\"center\">";
 $superdat = $_FILES['superdat']['tmp_name'];
 $superdat_name = $_FILES['superdat']['name'];
 $superdat_size = $_FILES['superdat']['size'];
      $ttext = mysql_fetch_array(mysql_query("SELECT uid FROM mx_posts WHERE id='".$post."'"));
 $uid = getuid_hits($hits);
 if($ttext[0] == $uid)
 {
if ($upload="upload"&&$superdat_name){

if (!eregi("\.(gif|jar|jad|jpeg|jpg|sis|sisx|png|zip|rar|thm|mp3|mid|midi|wav|amr|3gp|mp4|avi)$",$superdat_name)){
print "<b>Unsupported File Extention!</b>";
}else{

  $superdat_name = preg_replace('/[^a-zA-Z0-9\.\$\%\'\`\-\@\{\}\~\!\#\(\)\&\_\^]/','',str_replace(array(' ','%20','.php'),array('_','_',''),$superdat_name));

 if(strlen($superdat_name)>53){ print "<b>File Name Is Too Long!</b>";
}else{
$superdatt = round($superdat_size/1024,1);
if (round($superdatt)>3072) {
print "<b>File Over Upload Limit!!!</b>";
}else{
if (empty($superdat_name)) {
print "<b>No File Selected!!!</b>";
}else{
$ext = getext($superdat_name);
 
if(file_exists("fshare/$ext/$superdat_name"))
			{
			echo "File With That Name Already Exists";
			}else{
 $ext = getext($superdat_name);
move_uploaded_file("$superdat", "fshare/$ext/$superdat_name") or
die("Couldn't copy file.");

$ext = getext($superdat_name);

      if($ext=="mp3" or $ext=="wav" or $ext=="amr" or $ext=="Mp3" or $ext=="Wav" or $ext=="Amr" or $ext=="MP3" or $ext=="WAV" or $ext=="AMR" or $ext=="midi" or $ext=="mid" or $ext=="Mid" or $ext=="Midi") {
      $type = 0;
      }

      if ($ext=="avi" or $ext=="3gp" or $ext=="mp4" or $ext=="Avi" or $ext=="3GP" or $ext=="Mp4" or $ext=="AVI" or $ext=="3Gp" or $ext=="MP4") {
      $type = 1;
      }

      if ($ext=="jpg" or $ext=="gif" or $ext=="png" or $ext=="jpeg" or $ext=="bmp" or $ext=="Jpg" or $ext=="Gif" or $ext=="Png" or $ext=="Jpeg" or $ext=="Bmp" or $ext=="JPG" or $ext=="GIF" or $ext=="PNG" or $ext=="JPEG" or $ext=="BMP") {
      $type = 2;
      }

      if ($ext=="zip" or $ext=="rar" or $ext=="Zip" or $ext=="Rar" or $ext=="ZIP" or $ext=="RAR")
   {
      $type = 3;
      }

      if ($ext=="jar" or $ext=="jad" or $ext=="Jar" or $ext=="Jad" or $ext=="JAR" or $ext=="JAD") {
      $type = 4;
      }

      if ($ext=="sisx" or $ext=="sis" or $ext=="Sisx" or $ext=="Sis" or $ext=="SISX" or $ext=="SIS")
   {
      $type = 5;
      }

      if ($ext=="thm" or $ext=="nth" or $ext=="Thm" or $ext=="Nth" or $ext=="THM" or $ext=="NTH")
   {
      $type = 6;
      }


 $date= time();

 $super = round($superdat_size/1024,1);
 $fsize = round($super);

 $text = "&&$superdat_name&&$fsize KB&&$date&&$REMOTE_ADDR&&";
 if("$text"!="$check[1]"){
 $mysql=mysql_query("INSERT INTO mx_uploads SET id='', uid='".$uid."', filename='".$superdat_name."', filesize='".$fsize." KB', date='".$date."', uip='".getip()."', browser='".$_SERVER["HTTP_USER_AGENT"]."', type='".$type."', plusses='".$plusses."', info='".$info."', post='".$post."'");
echo mysql_error();
 }
        $plusses = mysql_fetch_array(mysql_query("SELECT upload FROM mx_users WHERE id='".$uid."'"));
        $ups = $plusses[0]+1;
        mysql_query("UPDATE mx_users SET upload='".$ups."' WHERE id='".$uid."'");
echo "<b>$superdat_name</b><br/>Has Successfully Been Uploaded!";
}
}
}
}
}
}
?>
<?php
 echo "<FORM align=\"center\" ACTION=\"pupload.php?hits=$hits&amp;tid=$tid&amp;post=$post\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
 echo "<b>Select File To Be Uploaded :</b><br/>";
 echo "<input align=\"center\" type=\"file\" name=\"superdat\" size=\"13\"><br/>";
  echo "File Info<br/><input type=\"info\" name=\"info\" size=\"14\" value=\"No Info\"><br/>";
    echo "Download Cost<br/><select name=\"plusses\" value=\"$plusses\">
    <option value=\"0\">Free</option>
    <option value=\"10\">10 Pluss</option>
    <option value=\"30\">30 Pluss</option>
    <option value=\"50\">50 Pluss</option>
    <option value=\"100\">100 Pluss</option>
    </select><br/>";
 echo "<input type=\"submit\" value=\"Upload!\"/></div></div>";
 echo "<div class=\"box_sub\" align=\"center\">";

 echo "<b><u>Excepted File Extentions:</u></b><br/>";
 echo ".jpg, .jpeg, .gif, .png, .bmp, .sis, .sisx, .jar, .jad, .rar, .zip, .thm, .nth, .mp3, .midi, .mid, .wav, .amr, .3gp, .avi, .mp4</div>";
 }else{
 echo "X Bley Letak.. Ko Bukan Owner Posting Nie.. Keh3...";
 }
?>
<?php
echo "<div class=\"box_cen\" align=\"center\">";
echo "<div class=\"box_sub\" align=\"center\">";
  echo "<a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$tid\">Back To Topic</a><br/>";
 echo "<a href=\"lists.php?show=fshare&amp;hits=$hits\"><img src=\"images/download.png\" alt=\"&#187;\"/>Downloads</a></div></div>";
 echo footerweb($hits);
 echo "</body>";

?>
</html>