$byuid = getuid_sid($sid);
$pmtou = mysql_real_escape_string($_POST["pmtou"]);
addonline(getuid_sid($sid),"Send photo $pmtou","");
echo head("Mms Inbox","", getuid_sid($sid));
$pmtext = mysql_real_escape_string($_POST["pmtext"]);
$size = mysql_real_escape_string($_FILES['attach']['size']/1024);
$origname = mysql_real_escape_string($_FILES['attach']['name']);
$ext = explode(".", strrev($origname));
switch(strtolower($ext[0])){
case "gpj":
$res = true;
break;
case "gnp":
$res = true;
break;
case "pmb":
$res = true;
break;
case "fig":
$res = true;
break;
}
$tm = time();
$uploaddir = $mmsdir; //can be configured in config.php
$who = getuid_nick($pmtou);
echo "<p align="center">";
if($size>1024){
echo "File is larger than 1024KB";
}
else if ($res!=true){
echo "<img src="images/notok.gif" alt="X"/> Message not sent! Check error messages and report to a moderator or admin if applicable. Error: Incorrect type of file.";
echo "<br/><a href="inbox.php?action=mmsdisp&sid=$sid">Back To MMS Inbox</a>";
}
else if(isblocked($pmtext,$byuid)){
$bantime = time() + (7*24*60*60);
echo "<img src="images/notok.gif" alt="X"/>";
echo "It's impossible to send a photo of PP $pmtou<br/><br/>";
//echo "You just sent a link to one of the crappiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED!";
mysql_query("INSERT INTO ibwf_penalties SET uid='".mysql_real_escape_string($byuid)."', penalty='1', exid='1', timeto='".mysql_real_escape_string($bantime)."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".mysql_real_escape_string($byuid)."'");
mysql_query("INSERT INTO ibwf_private SET text='".mysql_real_escape_string($pmtext)."', byuid='".mysql_real_escape_string($byuid)."', touid='1', timesent='".mysql_real_escape_string($tm)."'");
$res=false;
}
else if((isignored($byuid, $who))&&(istrashed($byuid))){
echo "me can send a photo because the PP You to Ignore List $pmtou.";
$res=false;
}
else{
$name = mysql_fetch_array(mysql_query("SELECT (MAX(id)+146) FROM ibwf_mms"));
$uploadfile = mysql_real_escape_string($name[0].".".strrev($ext[0]));
$imageurl = "/mmsloads/$uploadfile";
move_uploaded_file($_FILES['attach']['tmp_name'], "$uploaddir/$uploadfile");
$ext=strrev($ext[0]);
$res1 = mysql_query("INSERT INTO ibwf_mms SET origname='".mysql_real_escape_string($origname)."' , pmtext='".mysql_real_escape_string($pmtext)."', byuid='".mysql_real_escape_string($byuid)."', unread='1', touid='".mysql_real_escape_string($who)."', timesent='".mysql_real_escape_string($tm)."', filename='".mysql_real_escape_string($uploadfile). "', imglink='".mysql_real_escape_string($imageurl)."', size='$size', extension='".mysql_real_escape_string($ext)."'");
}
if($res1){
$shpl = getPoints($uid) - 10;
mysql_query("UPDATE ibwf_users SET Points='".mysql_real_escape_string($shpl)."' WHERE id='".mysql_real_escape_string($uid)."'");
echo "<div class="title">Your Message was Successfully Sent and 10 Points Were Deducted <img src="images/ok.gif" /></div>";
}
else {
echo "Not submitted.";
}
$pmtou = mysql_real_escape_string($_POST["pmtou"]);
addonline(getuid_sid($sid),"Send photo $pmtou","");
echo head("Mms Inbox","", getuid_sid($sid));
$pmtext = mysql_real_escape_string($_POST["pmtext"]);
$size = mysql_real_escape_string($_FILES['attach']['size']/1024);
$origname = mysql_real_escape_string($_FILES['attach']['name']);
$ext = explode(".", strrev($origname));
switch(strtolower($ext[0])){
case "gpj":
$res = true;
break;
case "gnp":
$res = true;
break;
case "pmb":
$res = true;
break;
case "fig":
$res = true;
break;
}
$tm = time();
$uploaddir = $mmsdir; //can be configured in config.php
$who = getuid_nick($pmtou);
echo "<p align="center">";
if($size>1024){
echo "File is larger than 1024KB";
}
else if ($res!=true){
echo "<img src="images/notok.gif" alt="X"/> Message not sent! Check error messages and report to a moderator or admin if applicable. Error: Incorrect type of file.";
echo "<br/><a href="inbox.php?action=mmsdisp&sid=$sid">Back To MMS Inbox</a>";
}
else if(isblocked($pmtext,$byuid)){
$bantime = time() + (7*24*60*60);
echo "<img src="images/notok.gif" alt="X"/>";
echo "It's impossible to send a photo of PP $pmtou<br/><br/>";
//echo "You just sent a link to one of the crappiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED!";
mysql_query("INSERT INTO ibwf_penalties SET uid='".mysql_real_escape_string($byuid)."', penalty='1', exid='1', timeto='".mysql_real_escape_string($bantime)."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".mysql_real_escape_string($byuid)."'");
mysql_query("INSERT INTO ibwf_private SET text='".mysql_real_escape_string($pmtext)."', byuid='".mysql_real_escape_string($byuid)."', touid='1', timesent='".mysql_real_escape_string($tm)."'");
$res=false;
}
else if((isignored($byuid, $who))&&(istrashed($byuid))){
echo "me can send a photo because the PP You to Ignore List $pmtou.";
$res=false;
}
else{
$name = mysql_fetch_array(mysql_query("SELECT (MAX(id)+146) FROM ibwf_mms"));
$uploadfile = mysql_real_escape_string($name[0].".".strrev($ext[0]));
$imageurl = "/mmsloads/$uploadfile";
move_uploaded_file($_FILES['attach']['tmp_name'], "$uploaddir/$uploadfile");
$ext=strrev($ext[0]);
$res1 = mysql_query("INSERT INTO ibwf_mms SET origname='".mysql_real_escape_string($origname)."' , pmtext='".mysql_real_escape_string($pmtext)."', byuid='".mysql_real_escape_string($byuid)."', unread='1', touid='".mysql_real_escape_string($who)."', timesent='".mysql_real_escape_string($tm)."', filename='".mysql_real_escape_string($uploadfile). "', imglink='".mysql_real_escape_string($imageurl)."', size='$size', extension='".mysql_real_escape_string($ext)."'");
}
if($res1){
$shpl = getPoints($uid) - 10;
mysql_query("UPDATE ibwf_users SET Points='".mysql_real_escape_string($shpl)."' WHERE id='".mysql_real_escape_string($uid)."'");
echo "<div class="title">Your Message was Successfully Sent and 10 Points Were Deducted <img src="images/ok.gif" /></div>";
}
else {
echo "Not submitted.";
}
Comment