Anyone cn help me in my problem...My uploader can upload Successfully but with
Deprecated : Function eregi() is deprecated in / home/dreamwap/ public_html/wap/files/upload.php on line 104
Added after 2 minutes:
Here s the code of upload.php:
Deprecated : Function eregi() is deprecated in / home/dreamwap/ public_html/wap/files/upload.php on line 104
Added after 2 minutes:
Here s the code of upload.php:
PHP Code:
<?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>DreamWAP Uploader</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>DreamWAP Uploader</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>DreamWAP Uploader</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>DreamWAP Uploader</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"];
if($show=="")
{
addonline(getuid_hits($hits),"Upload Files","");
echo "<head>";
echo "<title>DreamWAP Uploader</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 5MB!</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'];
if ($upload="upload"&&$superdat_name){
if (!eregi("\.(gif|jar|jad|jpeg|jpg|sis|sisx|png|zip|rar|thm|mp3|wav|amr|3gp|mp4|avi|mid|midi)$",$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)>504 {
print "<b>File Over Upload Limit!!!</b>";
}else{
if (empty($superdat)) {
print "<b>No File Selected!!!</b>";
}else{
$ext = getext($superdat_name);
if(file_exists("$ext/$superdat_name"))
{
echo "File With That Name Already Exists";
}else{
$ext = getext($superdat_name);
copy("$superdat", "$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."'");
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=\"upload.php?hits=$hits\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
echo "<b>Select File To Upload</b><br/>";
echo "<input align=\"center\" type=\"file\" name=\"superdat\" size=\"8\"><br/>";
echo "File Info<br/><input type=\"info\" name=\"info\" size=\"18\" value=\"No Info\"><br/>";
echo "Download Cost<br/><select name=\"plusses\">
<option value=\"0\">Free</option>
<option value=\"10\">10 Plusses</option>
<option value=\"30\">30 Plusses</option>
<option value=\"50\">50 Plusses</option>
<option value=\"100\">100 Plusses</option>
</select><br/>";
echo "<input type=\"submit\" value=\"Upload!\"/></small></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<br/>.sisx, .jar, .jad, .rar, .zip, .thm,<br/>.nth, .mp3, .wav, .amr, .mid,<br/>.midi,.3gp, .avi, .mp4</div>";
?>
</FORM>
<?php
echo "<div class=\"box_cen\" align=\"center\">";
echo "<form action=\"../index.php?hits=$hits\" method=\"get\">";
echo "<select name=\"show\">";
echo "<option value=\"forum\">Forum</option>";
echo "<option value=\"book\">Bookmark</option>";
echo "<option value=\"cpanel\">Cpanel</option>";
echo "<option value=\"stats\">Stats</option>";
echo "<option value=\"info\">FaQ/Info</option>";
echo "<option value=\"chat\">ChitChat</option>";
echo "<option value=\"clmenu\">Club</option>";
echo "<option value=\"aonline\">Online (".getnumonline().")</option>";
echo "<option value=\"bank\">Bank Menu</option>";
echo "<option value=\"funm\">Fun Games</option>";
echo "<option value=\"logout\">Log Out</option>";
echo "</select>";
echo "<input type=\"hidden\" name=\"hits\" value=\"$hits\"/>";
echo "<input type=\"submit\" value=\"[GO]\"/>";
echo "</form>";
echo "</div>";
$umsg = getunreadpm(getuid_hits($hits));
if($umsg>0)
{
$pm = "<a href=\"../inbox.php?show=openfol&view=urd&hits=$hits&reply=1\">$umsg Inbox(s)</a>";
}else{
$pm = "<a href=\"../inbox.php?show=main&hits=$hits\">Inbox</a>";
}
echo "<div class=\"footer\" align=\"center\">";
echo "<a href=\"../index.php?show=main&hits=$hits\">Home</a> | $pm | <a href=\"index.php?show=term&hits=$hits\">T & C</a>";
echo "</div>";
echo "</body>";
}
?>
</html>
Comment