DODATI U inbox.php
-----------------------------
///////////////MMS Send///////////////
else if($action=="sendmms"){
        addonline(getuid_sid($sid),"Send photo","");
$pstyle=gettheme($sid);
echo xhtmlhead("Inbox",$pstyle);
        $whonick = getnick_uid($who);
	boxstart("Posalji foto PP");
        echo "<p>";
        echo "Sign representative who send:<br/><form enctype=\"multipart/form-data\" action=\"inbxproc.php?action=sendmms&amp;sid=$sid\" method=\"post\"><input id=\"inputText\" type=\"text\" name=\"pmtou\" value=\"$whonick\" maxlength=\"30\"/><br/>";
        echo "Text:<br/><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
        echo "Select the file from your browser";        
echo "<br/><input id=\"inputText\" type=\"file\" name=\"attach\"/><br/>";
        echo "<input id=\"inputButton\" type=\"submit\" name=\"submit\" value=\"Send\"/></form></p>";
	boxend();
echo "<p align=\"center\">";

echo "<br/><a href=\"inbox.php?action=mmsdisp&amp;sid=$sid\">Back to photo</a><br/>";
      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo xhtmlfoot();
}

////////////////////////
else if($action=="mmsdisp"){
addonline(getuid_sid($sid),"MMs Inbox","");
$pstyle=gettheme($sid);
echo xhtmlhead("Foto Inbox",$pstyle);
boxstart("Foto PP inbox");
echo "<b>Photo PP inbox will be deleted every 7 days!</b><br/><br/>";
echo "<p>";
echo "<img src=\"images/mailbox_new.gif\" alt=\"\"/><a href=\"inbox.php?action=mms&amp;view=urd&amp;sid=$sid\">Unread</a><br/>";
echo "<img src=\"images/mailbox_old.gif\" alt=\"\"/><a href=\"inbox.php?action=mms&amp;view=all&amp;sid=$sid\">All</a><br/><br/>";
echo "<img src=\"images/mailbox_out.gif\" alt=\"\"/><a href=\"inbox.php?action=mms&amp;view=snt&amp;sid=$sid\">Send</a><br/><br/>";
echo "<a href=\"inbox.php?action=sendmms&amp;sid=$sid\">Send New Mms</a><br/><br/>";



echo "</p>";
boxend();
echo "<p align=\"center\">";


      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";

  echo "</p>";
  echo xhtmlfoot();
}
///////////////////////////mms inbox//////////////////////////////
else if($action=="mms"){
addonline(getuid_sid($sid),"MMS Inbox","");
$pstyle=gettheme($sid);
echo xhtmlhead("Inbox",$pstyle);
boxstart("MMS Inbox");

$view = $_GET["view"];
//////ALL LISTS SCRIPT <<
if($view=="")$view="all";
if($page=="" || $page<=0)$page=1;
$myid = getuid_sid($sid);
$doit=false;
$num_items = getmmscount($myid,$view); //changable
$items_per_page= 7;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($num_items>0){
if($doit){
$exp = "&amp;rwho=$myid";
}else{
$exp = "";
}
if($view=="all"){
$sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a
            INNER JOIN mms b ON a.id = b.byuid
            WHERE b.touid='".$myid."'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
}
else if($view=="snt"){
    $sql = "SELECT
            a.name, b.id, b.touid, b.unread, b.starred FROM ibwf_users a
            INNER JOIN mms b ON a.id = b.touid
            WHERE b.byuid='".$myid."'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
}
    else if($view=="str"){
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a
            INNER JOIN mms b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.starred = '1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
    }
    else if($view=="urd"){
$sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a
            INNER JOIN mms b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.unread = '1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
   ";
}
}

echo "<p align=\"center\">";

$items = mysql_query($sql);
if (!$items) {
echo "	You do not have a photo-PP!<br/><br/><a href=\"inbox.php?action=sendmms&amp;sid=$sid\">Send photo</a><br/><br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a></div></div></font></body></html>";
exit();
}
echo mysql_error();
while ($item = mysql_fetch_array($items)){
if($item[3]=="1"){
$iml = "<img src=\"images/npm.gif\" alt=\"&#187;\"/>";
}else{
if($item[4]=="1"){
$iml = "<img src=\"images/spm.gif\" alt=\"*\"/>";
}else{
$iml = "<img src=\"images/opm.gif\" alt=\"-\"/>";
}
}
$lnk = "$iml<a href=\"inbox.php?action=readmms&amp;pmid=$item[1]&amp;sid=$sid\">$item[0]</a>";
echo "$lnk<br/>";
}

boxend();
echo "<p align=\"center\">";
$npage = $page+1;
echo "<a href=\"inbox.php?action=sendmms&amp;sid=$sid\">Send Mms</a><br/>";
if($page>1){
$ppage = $page-1;
echo "<a href=\"inbox.php?action=mms&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;Back</a> ";
}
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"inbox.php?action=mms&amp;page=$npage&amp;sid=$sid&amp;view=$view\">&#187;Next</a>";
}
echo "<br/>Strana $page of $num_pages<br/>";
if($num_pages>2){
$rets = "Strana<form action=\"inbox.php\" method=\"get\"><input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"mms\"/>";
$rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "<input type=\"submit\" value=\"IDI\"/></form>";
echo $rets;

}else{
        
}
echo "<br/></p>";

echo "<p align=\"center\">";

echo "<br/><a href=\"inbox.php?action=mmsdisp&amp;sid=$sid\">Back To MMs</a><br/>";
      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";

  echo "</p>";
  echo xhtmlfoot();
}
///////////////////////////////readmms//////////////////////////
else if($action=="readmms"){

$pminfo = mysql_fetch_array(mysql_query("SELECT pmtext, byuid, timesent,touid, reported, filename, size, extension, origname FROM mms WHERE id='".$pmid."'"));
  addonline(getuid_sid($sid),"See the photo of the PP <i>".getnick_uid($pminfo[1])."</i>\'","");

$pstyle=gettheme($sid);
echo xhtmlhead("Inbox",$pstyle);
if(getuid_sid($sid)==$pminfo[3]){
$chread = mysql_query("UPDATE mms SET unread='0' WHERE id='".$pmid."'");
}
//boxstart("MMS");

if(($pminfo[3]==getuid_sid($sid))||($pminfo[1]==getuid_sid($sid))){
if(getuid_sid($sid)==$pminfo[3]){
if(isonline($pminfo[1])){
$iml = "<img src=\"images/onl.gif\" alt=\"O\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"O\"/>";
}
$ptxt = "<b>Of</b>: ";
$bylnk = "$iml<a href=\"index.php?action=viewuser&amp;who=$pminfo[1]&amp;sid=$sid\">".getnick_uid($pminfo[1])."</a>";
}else{
if(isonline($pminfo[3])){
$iml = "<img src=\"images/onl.gif\" alt=\"O\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"O\"/>";
}
$ptxt = "<b>For</b>: ";
$bylnk = "$iml<a href=\"index.php?action=viewuser&amp;who=$pminfo[3]&amp;sid=$sid\">".getnick_uid($pminfo[3])."</a>";
}
echo "$ptxt $bylnk<br/>";
//$tmstamp = $pminfo[2] ();
$tmdt = date("d/m/Y h:i:s A", $tmstamp);
$diff1=time()-$pminfo[2];
echo "<b>Poslato</b>: pre".gettimemsg($diff1)." <br/>";
$pmtext = parsepm($pminfo[0], $sid);

if(isspam($pmtext)){
if(($pminfo[4]=="0") && ($pminfo[1]!=1)){
mysql_query("UPDATE ibwf_private SET reported='1' WHERE id='".$pmid."'");
}
}
switch(strtolower($pminfo[7])){
        case "mid":
        $ext = "MIDI tone";
        break;
        case "3gp":
        $ext = "3GP Video";
        break;
        case "amr":
        $ext = "AMR Audio/Recorded Voice";
        break;
        case "wav":
        $ext = "WAV Audio";
        break;
        case "mp3":
        $ext = "MP3 Audio";
        break;
        case "jpg":
        $ext = "JPG Image";
        break;
        case "gif":
        $ext = "GIF Image";
        break;
        case "png":
        $ext = "PNG Image";
        break;
        case "bmp":
        $ext = "BMP Image";
        break;
        case "exe":
        $ext = "Windows Executable file";
        break;
        case "zip":
        $ext = "Compressed ZIP Archive";
        break;
        case "rar":
        $ext = "Compressed RAR Archive";
        break;
        case "sis":
        $ext = "Symbian Application";
        break;
        case "jar":
        $ext = "Java Mobile Application";
        break;

}

echo "<b>Poruka</b>:<br/>".$pmtext;
if ($pminfo[7]=="gif"){
        echo "<br/>Slika:<br/><img src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" alt=\"Loading...\"/><br/>";
}
if ($pminfo[7]=="jpg"){
        echo "<br/>Slika:<br/><img src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" alt=\"Loading...\"/><br/>";
}
if ($pminfo[7]=="bmp"){
        echo "<br/>Slika:<br/><img src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" alt=\"Loading...\"/><br/>";
}
if ($pminfo[7]=="png"){
        echo "<br/>Slika:<br/><img src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" alt=\"Loading...\"/><br/>";
}
if ($pminfo[7]=="mid"){
        echo "<bgsound src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" loop=\"infinite\"/>";
}
if (($pminfo[7]=="amr") && ($pminfo[6]<100)){
        echo "<bgsound src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" loop=\"infinite\"/>";
}
if (($pminfo[7]=="mp3") && ($pminfo[6]<100)){
        echo "<bgsound src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" loop=\"infinite\"/>";
}
if (($pminfo[7]=="wav") && ($pminfo[6]<100)){
        echo "<bgsound src=\"getfile.php?sid=$sid&amp;fileid=$pmid\" loop=\"infinite\"/>";
}
echo "<br/><b>File Name</b>:<br/>".$pminfo[8];
echo "<br/><b>File Type</b>:<br/>".$ext;
echo "<br/><b>Size</b>:<br/>".$pminfo[6]."KB";
echo "<br/><a href=\"getfile.php?sid=$sid&amp;fileid=$pmid\">Download </a><br/>";
echo "<a href=\"inbox.php?action=sendmms&amp;sid=$sid&amp;who=$pminfo[1]\">Odgovoti through photo PP</a><br/><a href=\"inbox.php?action=sendpm&amp;sid=$sid&amp;who=$pminfo[1]\">Odgovori kroz text poruku</a>";
echo "<p>";
echo "<b>akcija</b>: <form action=\"inbxproc.php?action=mproc&amp;sid=$sid\" method=\"post\"><select id=\"inputText\" name=\"pmact\">";
echo "<option value=\"del-$pmid\">Skyline</option>";

  echo "</select>";
echo "<input type=\"submit\" value=\"Skyline\"/>";
echo "</form>";



}else{
echo "	This photo is not your PP";
}
echo "<br/><a href=\"inbox.php?action=mmsdisp&amp;sid=$sid\">Back To MMs</a><br/>";
boxend();
      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";

  echo "</p>";
  echo xhtmlfoot();
} 


DODATI U inboxproc.php
-------------------------------

/////////////////Send MMS////////////////////////
else if($action=="sendmms"){
$byuid = getuid_sid($sid);
$pmtou = $_POST["pmtou"];
addonline(getuid_sid($sid),"Saljem foto PP $pmtou","");
$pstyle = gettheme($sid);
      echo xhtmlhead("Foto PP Inbox",$pstyle);
$pmtext = $_POST["pmtext"];
$size = $_FILES['attach']['size']/1024;
$origname = $_FILES['attach']['name'];
$ext = explode(".", strrev($origname));
switch(strtolower($ext[0])){
	case "dim":
	$res = true;
	break;
	case "3pm":
	$res = true;
	break;	
	case "mr":
	$res = true;
	break;
	case "fdp":
	$res = true;
	break;
	case "4pm":
	$res = true;
	break;
	case "iva":
	$res = true;
	break;
	case "rma":
	$res = true;
	break;
	case "vaw":
	$res = true;
	break;
      case "gpj":
	$res = true;
	break;
	case "gnp":
	$res = true;
	break;
	case "pmb":
	$res = true;
	break;
	case "fig":
	$res = true;
	break;
	case "pg3":
	$res = true;
	break;
	case "piz":
	$res = true;
	break;
	case "rar":
	$res = true;
	break;
	case "sis":
	$res = true;
	break;
	case "raj":
	$res = true;
	break;
	case "exe":
	$res = true;
	break;
	case "gepj":
	$res = true;
	break;
}
$tm = time();
$uploaddir = $mmsdir;  //can be configured in config.php
$who = getuid_nick($pmtou);
echo "<p align=\"center\">";
if($size>2048){
	echo "File is larger than 2MB";
	
}
else if ($res!=true){
									
	echo "Not allowed extenzija file, pleasure and select the file in extenziji JPG or JPEG or GIF or BMP or PNG or 
  3GP or MID or WAV or MP3 or MP4 or AVI or AMR or SIS or EXE or ZIP or JAR or RAR or PDF file";
}
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='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='2', timesent='".$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)+1) FROM mms"));
	$uploadfile = $name[0].".".strrev($ext[0]);
	move_uploaded_file($_FILES['attach']['tmp_name'], "$uploaddir/$uploadfile");
	$ext=strrev($ext[0]);
        $res1 = mysql_query("INSERT INTO mms SET origname='".$origname."', pmtext='".$pmtext."', byuid='".$byuid."', unread='1', touid='".$who."', timesent='".$tm."', filename='".$uploadfile."', size='$size', extension='".$ext."'");
}
if($res1){
	echo "Photo PP was successfully sent";
}
else {
	echo "Not submitted.";
}
echo "<br/><br/><a href=\"inbox.php?action=mms&amp;sid=$sid\">Back To MMs</a><br/>";
echo "</p>";
      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo xhtmlfoot();
}
/////////////////////mms proc////////////////
else if($action=="mproc"){
$pmact = $_POST["pmact"];
$pact = explode("-",$pmact);
$pmid = $pact[1];
$pact = $pact[0];
echo "<p align=\"center\">";
$pminfo = mysql_fetch_array(mysql_query("SELECT pmtext, byuid, touid,  filename FROM mms WHERE id='".$pmid."'"));
if($pact=="del"){
addonline(getuid_sid($sid),"Deleting photo PP","");
$pstyle = gettheme($sid);
      echo xhtmlhead("Foto PP Inbox",$pstyle);
if(getuid_sid($sid)==$pminfo[2]){
$del = mysql_query("DELETE FROM mms WHERE id='".$pmid."' ");
unlink($mmsdir."/".$pminfo[3]);
if($del){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>PP Photo successfully deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error";
}
}
else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>This photo is not your PP";
}
}
else if($pact=="str"){
addonline(getuid_sid($sid),"Downloading MMS","");
$pstyle = gettheme($sid);
      echo xhtmlhead("Foto PP Inbox",$pstyle);

if(getuid_sid($sid)==$pminfo[2]){
$str = mysql_query("UPDATE mms SET starred='1' WHERE id='".$pmid."' ");
if($str){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>MMS saved successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't save MMS at the moment";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>This MMS ain't yours";
}
}else if($pact=="ust"){
addonline(getuid_sid($sid),"Unsaving an MMS","");
if(getuid_sid($sid)==$pminfo[2]){
$str = mysql_query("UPDATE mms SET starred='0' WHERE id='".$pmid."' ");
if($str){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>MMS unsaved successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't unsave MMS at the moment";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>This MMS ain't yours";
}
}else if($pact=="rpt"){
addonline(getuid_sid($sid),"prijavljujem foto PP","");
$pstyle = gettheme($sid);
      echo xhtmlhead("Foto PPInbox",$pstyle);
if(getuid_sid($sid)==$pminfo[2]){
if($pminfo[3]=="0"){
$str = mysql_query("UPDATE mms SET reported='1' WHERE id='".$pmid."' ");
if($str){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>PM reported to mods successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't report PM at the moment";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM is already reported";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
}
}
else if($pact=="frd"){
addonline(getuid_sid($sid),"Forwarding PM","");
if(getuid_sid($sid)==$pminfo[2]||getuid_sid($sid)==$pminfo[1]){
echo "Forward to e-mail address:<br/><br/>";
echo "<form action=\"inbxproc.php?action=frdpm&amp;sid=$sid\" method=\"post\"><input type=\"text\" name=\"email\" maxlength=\"250\"/><input type=\"hidden\" name=\"pmid\" value=\"$pmid\"/><br/>";
echo "<input type=\"submit\" name=\"submit\" value=\"Send\"/>";
echo "</form>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
}
}
echo "<br/><br/><a href=\"inbox.php?action=mms&amp;sid=$sid\">Nazad u foto PP</a><br/>";
      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo xhtmlfoot();

}


///////////////////////////////////////////////////////////////
else if($action=="proall"){
$pact = $_POST["pmact"];
echo "<p align=\"center\">";
addonline(getuid_sid($sid),"Deleting photo PP","");
$pstyle = gettheme($sid);
      echo xhtmlhead(" Foto pp inboxInbox",$pstyle);
$uid = getuid_sid($sid);
if($pact=="ust"){
$del = mysql_query("DELETE FROM ibwf_private WHERE touid='".$uid."' AND reported !='1' AND starred='0' And unread='0'");
if($del){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>All photo PP have been deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error";
}
}else if($pact=="red"){
$del = mysql_query("DELETE FROM ibwf_private WHERE touid='".$uid."' AND reported !='1' and unread='0'");
if($del){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Photo PP was successfully deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error";
}
}else if($pact=="all"){
$del = mysql_query("DELETE FROM ibwf_private WHERE touid='".$uid."' AND reported !='1'");
if($del){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Photo PP was successfully deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Delete PM at the moment";
}
}
echo "<br/><br/><a href=\"inbox.php?action=mms&amp;sid=$sid\">Nazad u foto PP</a><br/>";
      $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo xhtmlfoot();
}

 DODATI U index.php
--------------------------------

$tmms = getmmscount(getuid_sid($sid));

$nmms = getunreadmms($uid);
if ($nmms>0){
	$rampage = "($nmms new)";
echo "<a href=\"inbox.php?action=mmsdisp&amp;sid=$sid\">FOTO Inbox ($nmms  new photo)</a><br/>";


} else{
	echo "<br/>";

echo "<a href=\"inbox.php?action=mmsdisp&amp;sid=$sid\">FOTO Inbox ($nmms /$tmms)</a><br/>";
  
  
}
----------------------------
u wievuserprofile
-----------------------
$noinm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE touid='".$who."'"));
$noutm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE byuid='".$who."'"));
echo " Received MMS: <b>$noinm[0]</b><br/> MMs Sended: <b>$noutm[0]</b><br/>";





DODATI U core.php
-------------------------------

function boxstart($title){

	echo "

	<div class=\"boxed\">

      <div class=\"boxedTitle\">

        <h1 align=\"center\" class=\"boxedTitleText\"><b>$title</b>

	</h1>

      </div>

      <div class=\"boxedContent\">

";

}

function boxend(){

	echo "</div></div>";

	}


function getmmscount($uid,$view="all"){

if($view=="all"){

$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE touid='".$uid."'"));

}else if($view =="snt"){

$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE byuid='".$uid."'"));

}else if($view =="str"){

$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE touid='".$uid."' AND starred='1'"));

}else if($view =="urd"){

$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE touid='".$uid."' AND unread='1'"));

}

return $nopm[0];

}
function getunreadmms($uid){

$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mms WHERE touid='".$uid."' AND unread='1'"));

return $nopm[0];

}

DODATI U config.php
------------------------------

$mmsdir = "./mmsloads";
 ---------------------------------

create a folder mmsloads and chmod it to 777