View file wap/inbxproc.php

File size: 24.79Kb
<?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();
  }

$pmsub = $_POST["pmsub"];
$whos = $_POST["whos"];
$pmtext = $_POST["pmtext"];


if($show=="sendpm")
{
          echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>Send PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
 if(valid(getuid_hits($hits)))
 {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>Your Account Not Validated Yet</b><br/>This Could Take Up To 30 Minutes<br/>Please Be Patient And Try Again Later<br/>Thank You";
 }else if(istrashed(getuid_hits($hits)))
 {
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM mx_penalties WHERE uid='".getuid_hits($hits)."' AND penalty='0'"));
    $remain = $banto[0]-time();
    $rmsg = gettimemsg($remain);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>You Has Been Mute!!</b><br/><br/>Remain: $rmsg";
    }else{
  $whonick = getnick_uid($who);
  $byuid = getuid_hits($hits);
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM mx_private WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+25;
  if($byuid==1)$pmfl=0;
  if($pmfl<$tm)
  {
    if(!isblocked($pmtext,$byuid))
    {
    if((!isignored($byuid, $who))&&(!istrashed($byuid)))
    {
  $res = mysql_query("INSERT INTO mx_private SET text='".$pmtext."', sub='".$pmsub."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
  }else{
    $res = true;
  }
  if($res)
  {

    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PM Sent Successfully<br/><br/>";
 echo "<b>$pmsub</b><br/>";
    echo parsepm($pmtext, $hits);
    
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM!";
  }
  }else{
    echo "Can't Send PM!";
  }
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Flood control: $rema Seconds";
  }
 }
 $view = $_GET["view"];
 echo "</div>";
 if(!$view=="")
 {
   echo "<a href=\"inbox.php?show=openfol&amp;view=$view&amp;hits=$hits\">Back To Folder</a><br/>";
 }
  echo "<a href=\"inbox.php?show=main&amp;hits=$hits\">Inbox Menu</a></div>";
 echo footerweb($hits);
    echo "</body>";
}
else if($show=="sendpmd")
{
  $who = $_POST["who"];
  $pmsub = $_POST["pmsub"];
  $pmtext = $_POST["pmtext"];
          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>Send PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
 if(valid(getuid_hits($hits)))
 {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>Your Account Not Validated Yet</b><br/>This Could Take Up To 30 Minutes<br/>Please Be Patient And Try Again Later<br/>Thank You";
 }else if(istrashed(getuid_hits($hits)))
 {
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM mx_penalties WHERE uid='".getuid_hits($hits)."' AND penalty='0'"));
    $remain = $banto[0]-time();
    $rmsg = gettimemsg($remain);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>You Has Been Mute!!</b><br/><br/>Remain: $rmsg";
    }else{
  $whonick = getnick_uid($who);
  $byuid = getuid_hits($hits);
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM mx_private WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+25;
  if($byuid==1)$pmfl=0;
  if($pmfl<$tm)
  {
    if(!isblocked($pmtext,$byuid))
    {
    if((!isignored($byuid, $who))&&(!istrashed($byuid)))
    {
  $res = mysql_query("INSERT INTO mx_private SET text='".$pmtext."', sub='".$pmsub."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
  }else{
    $res = true;
  }
  if($res)
  {

    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PM Send Successfully<br/><br/>";
 echo "<b>$pmsub</b><br/>";
    echo parsepm($pmtext, $hits);
    
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM!";
  }
  }else{
    echo "Can't Send PM!";
  }
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Flood control: $rema Seconds";
  }
 }
  echo "</div><a href=\"inbox.php?show=main&amp;hits=$hits\">Back to inbox</a>";
 echo "</div>";
 echo footerweb($hits);
    echo "</body>";
}
 else if($show=="pmstaff")
{
          echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>Send PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
 if(isowner(getuid_hits($hits)))
{
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM mx_private WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+getpmaf();
  if($byuid==1)$pmfl=0;
  if($pmfl<$tm)
  {
  $pmtexts = "$pmtext [i]Ps: Broadcasting PM To All RemiXchaT.COM Members[/i]";
  $tm24 = time() - (24*60*60);
  $pms = mysql_query("SELECT id, name FROM mx_users WHERE lastact>'".$tm24."'");
  $tm = time();
  while($pm=mysql_fetch_array($pms))
  {
  mysql_query("INSERT INTO mx_private SET text='".$pmtexts."', sub='".$pmsub."', byuid='1', autopm='1', touid='".$pm[0]."', timesent='".$tm."'");
  }
 echo "Broadcasting PM Sent!!";
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Flood control: $rema Seconds";
  }
 }else{
 echo "You Can Do That!!";
 }
 echo "</div></div>";
 echo footerweb($hits);
    echo "</body>";
}
 else if($show=="pmstaff2")
{
          echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>Send PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
 if(isowner(getuid_hits($hits)))
{
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM mx_private WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+getpmaf();
  if($byuid==1)$pmfl=0;
  if($pmfl<$tm)
  {
  $pmtexts = "$pmtext [i]Ps: PM To All  RemiXchaT.COM Staff[/i]";
  $pms = mysql_query("SELECT id, name FROM mx_users WHERE perm>'0'");
  $tm = time();
  while($pm=mysql_fetch_array($pms))
  {
  mysql_query("INSERT INTO mx_private SET text='".$pmtexts."', sub='".$pmsub."', byuid='1', autopm='1', touid='".$pm[0]."', timesent='".$tm."'");
  }
 echo "PM Has Been Sent!!";
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Flood control: $rema Seconds";
  }
 }else{
 echo "You Can Do That!!";
 }
 echo "</div></div>";
 echo footerweb($hits);
    echo "</body>";
}
else if($show=="sendto")
{
          echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>Send PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
 if(valid(getuid_hits($hits)))
 {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>Your Account Not Validated Yet</b><br/>This Could Take Up To 30 Minutes<br/>Please Be Patient And Try Again Later<br/>Thank You";
 }else if(istrashed(getuid_hits($hits)))
 {
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM mx_penalties WHERE uid='".getuid_hits($hits)."' AND penalty='0'"));
    $remain = $banto[0]-time();
    $rmsg = gettimemsg($remain);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>You Has Been Mute!!</b><br/><br/>Remain: $rmsg";
    }else{
  $who = $_POST["who"];
    if($who==0)
    {
      echo "<img src=\"images/notok.gif\" alt=\"x\"/>User Does Not exist";
    }else{
  $whonick = getnick_uid($who);
  $byuid = getuid_hits($hits);
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM mx_private WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+27;
  if($pmfl<$tm)
  {
    if(!isblocked($pmtext,$byuid))
    {
    if((!isignored($byuid, $who))&&(!istrashed($byuid)))
    {
  $res = mysql_query("INSERT INTO mx_private SET text='".$pmtext."', sub='".$pmsub."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
  }else{
    $res = true;
  }
  if($res)
  {
    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PM was sent successfully to $whonick";
    echo parsepm($pmtext, $hits);

  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM to $whonick";
  }
  }else{
    echo "Can't Send PM to $whonick";
  }
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Flood control: $rema Seconds";
  }

    }
 }
  
  echo "</div><a href=\"inbox.php?show=main&amp;hits=$hits\">Back to inbox</a></div>";
 echo footerweb($hits);
    echo "</body>";
}
else if($show=="proc")
{
    $pmact = $_POST["pmact"];
    $pact = explode("-",$pmact);
    $pmid = $pact[1];
    $pact = $pact[0];
            echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>PM Action</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
  if(valid(getuid_hits($hits)))
 {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>Your Account Not Validated Yet</b><br/>This Could Take Up To 30 Minutes<br/>Please Be Patient And Try Again Later<br/>Thank You";
 }else if(istrashed(getuid_hits($hits)))
 {
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM mx_penalties WHERE uid='".getuid_hits($hits)."' AND penalty='0'"));
    $remain = $banto[0]-time();
    $rmsg = gettimemsg($remain);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>You Has Been Mute!!</b><br/><br/>Remain: $rmsg";
    }else{
    $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM mx_private WHERE id='".$pmid."'"));
  if($pact=="del")
    {
        addonline(getuid_hits($hits),"Deleting PM","");
        if(getuid_hits($hits)==$pminfo[2])
        {
          if($pminfo[3]=="1")
          {
            
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM is reported, thus it can't be deleted";
          }else{
          $del = mysql_query("DELETE FROM mx_private WHERE id='".$pmid."' ");
        $usts = mysql_fetch_array(mysql_query("SELECT plusses FROM mx_users WHERE id='".$uid."'"));
        $upl = $usts[0]+3;
        mysql_query("UPDATE mx_users SET plusses='".$upl."' WHERE id='".$uid."'");

          if($del)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>PM delted successfully<br/>+3 Plusses";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Delete PM at the moment";
          }
          }

        }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
        }
    }else if($pact=="str")
    {
        addonline(getuid_hits($hits),"Starring PM","");
        if(getuid_hits($hits)==$pminfo[2])
        {
          $str = mysql_query("UPDATE mx_private SET starred='1' WHERE id='".$pmid."' ");
          if($str)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>PM starred successfully";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't star PM at the moment";
          }
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
        }
    }else if($pact=="ust")
    {
        addonline(getuid_hits($hits),"Unstarring PM","");
        if(getuid_hits($hits)==$pminfo[2])
        {
          $str = mysql_query("UPDATE mx_private SET starred='0' WHERE id='".$pmid."' ");
          if($str)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>PM unstarred successfully";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't unstar PM at the moment";
          }
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
        }
    }else if($pact=="rpt")
    {
        addonline(getuid_hits($hits),"Reporting PM","");
        if(getuid_hits($hits)==$pminfo[2])
        {
          if($pminfo[3]=="0")
          {
          $str = mysql_query("UPDATE mx_private 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_hits($hits),"Forwarding PM","");
        if(getuid_hits($hits)==$pminfo[2]||getuid_hits($hits)==$pminfo[1])
        {
          
  echo "Forward to e-mail:<br/><br/>";
  echo "<input name=\"email\" maxlength=\"250\"/><br/>";
  echo "<anchor>Froward<go href=\"inbxproc.php?show=frdpm&amp;hits=$hits\" method=\"post\">";
  echo "<postfield name=\"email\" value=\"$(email)\"/>";
  echo "<postfield name=\"pmid\" value=\"$pmid\"/>";
  echo "</go></anchor>";
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
        }
    }
	else if($pact=="dnl")
    {
        addonline(getuid_hits($hits),"Downloading PM","");
        if(getuid_hits($hits)==$pminfo[2]||getuid_hits($hits)==$pminfo[1])
        {
          echo "<img src=\"images/ok.gif\" alt=\"X\"/>request processed successfully<br/><br/>";
		  echo "<a href=\"rwdpm.php?show=dpm&amp;pmid=$pmid&amp;hits=$hits\">Download PM</a>";
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
        }
    }
 }
    echo "</div><a href=\"inbox.php?show=main&amp;hits=$hits\">Back to inbox</a></div>";
 echo footerweb($hits);
    echo "</body>";
  }

else if($show=="proall")
{
    $pact = $_GET["pmact"];
            echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>Delete PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
    addonline(getuid_hits($hits),"Deleting PMs","");
      $uid = getuid_hits($hits);
    if($pact=="ust")
    {
              $usts = mysql_fetch_array(mysql_query("SELECT plusses FROM mx_users WHERE id='".$uid."'"));
        $upl = $usts[0]+3;
        mysql_query("UPDATE mx_users SET plusses='".$upl."' WHERE id='".$uid."'");

      $del = mysql_query("DELETE FROM mx_private WHERE touid='".$uid."' AND reported !='1' AND starred='0' AND unread='0' AND autopm='0'");
      if($del)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>All Read PMs Except Autopm, Starred And Unread Are Deleted Successfully<br/>+3 Plusses";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Delete PM at the moment";
          }
  }else if($pact=="ustt")
    {
              $usts = mysql_fetch_array(mysql_query("SELECT plusses FROM mx_users WHERE id='".$uid."'"));
        $upl = $usts[0]+3;
        mysql_query("UPDATE mx_users SET plusses='".$upl."' WHERE id='".$uid."'");

      $del = mysql_query("DELETE FROM mx_private WHERE touid='".$uid."' AND reported !='1' AND starred='0' AND unread='1' AND autopm='0'");
      if($del)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>All Unread PMs Except Autopm, Starred And Read Are Deleted Successfully<br/>+3 Plusses";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Delete PM at the moment";
          }
    }else if($pact=="red")
    {
               $usts = mysql_fetch_array(mysql_query("SELECT plusses FROM mx_users WHERE id='".$uid."'"));
        $upl = $usts[0]+3;
        mysql_query("UPDATE mx_users SET plusses='".$upl."' WHERE id='".$uid."'");

        $del = mysql_query("DELETE FROM mx_private WHERE touid='".$uid."' AND reported !='1' and autopm='1'");
      if($del)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>All Auto PMS Except Unread Are Deleted Successfully<br/>+3 Plusses";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Delete PM at the moment";
          }
       
    }else if($pact=="all")
    {
        $del = mysql_query("DELETE FROM mx_private WHERE touid='".$uid."' AND reported !='1'");
      if($del)
          {
        $usts = mysql_fetch_array(mysql_query("SELECT plusses FROM mx_users WHERE id='".$uid."'"));
        $upl = $usts[0]+3;
        mysql_query("UPDATE mx_users SET plusses='".$upl."' WHERE id='".$uid."'");

            echo "<img src=\"images/ok.gif\" alt=\"O\"/>All PMS Except Reported, Including Starred And Unread Are Deleted Successfully<br/>+3 Plusses";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Delete PM at the moment";
          }
    }
    
    echo "</div><a href=\"inbox.php?show=main&amp;hits=$hits\">Inbox Main</a></div>";
 echo footerweb($hits);
    echo "</body>";
    
  }
else if($show=="frdpm")
{
	$email = $_POST["email"];
	$pmid = $_POST["pmid"];
  addonline(getuid_hits($hits),"Forwarding PM","");
          echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  ///echo "<card=\"main\" title=\"Inbox\">";
  echo "<div class=\"box_cen\" align=\"center\">";
 echo "<b>Forward PM</b>";
  echo "<div class=\"box_sub\" align=\"center\">";

  $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported FROM mx_private WHERE id='".$pmid."'"));
  
  
  if(($pminfo[3]==getuid_hits($hits))||($pminfo[1]==getuid_hits($hits)))
  {
  $from_head = "From: noreplay@RemiXchaT.com";
  $subject = "PM By ".getnick_uid($pminfo[1])." To ".getnick_uid($pminfo[3])." (RemiXchaT.CoM)";
  $content = "Date: ".date("l d/m/y H:i:s", $pminfo[2])."\n\n";
  $content .= $pminfo[0]."\n------------------------\n";
  $content .= "RemiXchaT.COM: The best wap community!";
  mail($email, $subject, $content, $from_head);
 echo "<img src=\"images/ok.gif\" alt=\"X\"/>PM forwarded to $email";
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain't yours";
  }
  echo "</div><a href=\"inbox.php?show=main&amp;hits=$hits\">Back to inbox</a></div>";
 echo footerweb($hits);
    echo "</body>";

}

else if($show=="sendpopup")
{
  $whonick = getnick_uid($who);
  addonline(getuid_hits($hits),"Send Pop Up To $whonick","");
          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>Send Popup</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
  if(valid(getuid_hits($hits)))
 {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>Your Account Not Validated Yet</b><br/>This Could Take Up To 30 Minutes<br/>Please Be Patient And Try Again Later<br/>Thank You";
 }else if(istrashed(getuid_hits($hits)))
 {
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM mx_penalties WHERE uid='".getuid_hits($hits)."' AND penalty='0'"));
    $remain = $banto[0]-time();
    $rmsg = gettimemsg($remain);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><b>You Has Been Mute!!</b><br/><br/>Remain: $rmsg";
    }else{
  $whonick = getnick_uid($who);
  $byuid = getuid_hits($hits);
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM mx_popups WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+27;
  if($pmfl<$tm)
  {
    if(!isblocked($pmtext,$byuid))
    {
    if((!isignored($byuid, $who))&&(!istrashed($byuid)))
    {
  $res = mysql_query("INSERT INTO mx_popups SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
  }else{
    $res = true;
  }
  if($res)
  {
      $pmin = mysql_fetch_array(mysql_query("SELECT id FROM mx_popups WHERE unread='1' AND touid='".getuid_hits($hits)."'"));
	   mysql_query("UPDATE mx_popups SET unread='0' WHERE id='".$pmin[0]."'");
    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "Pop Up Was Sent Successfully To $whonick<br/>";
  echo "<br/>";
    echo "<b>Message: </b>";
 echo parsepm($pmtext);
    
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send Pop Up To $whonick";
  }
  }else{
    echo "Can't Send Pop Up To $whonick";
  }
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "<b>Flood Control: </b>$rema Seconds";
  }
 }
  echo "</div>";
  echo "<a href=\"inbox.php?show=main&amp;hits=$hits\">Back to inbox</a></div>";
 echo footerweb($hits);
    echo "</body>";
}

else if($show=="rptpop")
    {
        addonline(getuid_hits($hits),"Reporting Popup","");
          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>Report Popup</b>";
  echo "<div class=\"box_sub\" align=\"center\">";
    $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM mx_popups WHERE id='".$pmid."'"));

        if(getuid_hits($hits)==$pminfo[2])
        {
          if($pminfo[3]=="0")
          {
          $str = mysql_query("UPDATE mx_popups SET reported='1' WHERE id='".$who."' ");
          if($str)
          {
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Popup Reported To Staff Successfully";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can't Report Popup At The Moment!";
          }
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>This Popup Is Already Reported!";
          }
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>This Popup Ain't Yours!";
        }
 echo "</div></div>";
 echo footerweb($hits);
    echo "</body>";
    }else{
       echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
   echo getpagerror();
   echo "</body>";
}
?>
</html>