View file wap/modproc.php

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

if(!ismod(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 "<card=\"main\" title=\"MaxHits.CO.CC\">";
      echo "<p align=\"center\">";
   $shtxt = "This User ".getnick_uid(getuid_hits($hits))." Has Been Try To Hack Mod Tool ! !";

   $sub = "TRY TO HACK!";

    mysql_query("INSERT INTO mx_private SET text='".$shtxt."', byuid='".getuid_hits($hits)."', touid='2', sub='".$sub."', timesent='".time()."'");
      echo "You Are Not A Mod<br/>Please Stop Your Action Before Your ID Got Delete!<br/><br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
	  echo "</html>";
	  exit();
    }

    addonline(getuid_hits($hits),"Mod CP","");
if($show=="delp")
{
  $pid = $_GET["pid"];
  $tid = gettid_pid($pid);
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $res = mysql_query("DELETE FROM mx_posts WHERE id='".$pid."'");
  if($res)
          {
            $tname = mysql_fetch_array(mysql_query("SELECT name FROM mx_topics WHERE id='".$tid."'"));
            mysql_query("INSERT INTO mx_mlog SET action='posts', details='<b>".getnick_uid(getuid_hits($hits))."</b> Deleted Post Number $pid Of the thread ".mysql_escape_string($tname[0])." at the forum ".getfname($fid)."', actdt='".time()."'");
            
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Post Message Deleted";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  
  echo "<br/><br/><a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$tid&amp;page=1000\">";
echo "View Topic</a><br/>";
$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

////////////////////////////////////////////Edit Post

else if($show=="edtpst")
{
  $pid = $_GET["pid"];
  $ptext = $_POST["ptext"];
  $tid = gettid_pid($pid);
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $res = mysql_query("UPDATE mx_posts SET text='"
  .$ptext."' WHERE id='".$pid."'");
  if($res)
          {
            $tname = mysql_fetch_array(mysql_query("SELECT name FROM mx_topics WHERE id='".$tid."'"));
            mysql_query("INSERT INTO mx_mlog SET action='posts', details='<b>".getnick_uid(getuid_hits($hits))."</b> Edited Post Number $pid Of the thread ".mysql_escape_string($tname[0])." at the forum ".getfname($fid)."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Post Message Edited";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";
  echo "<a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$tid\">";
echo "View Topic</a><br/>";
$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

////////////////////////////////////////////validate

else if($show=="validate")
{
  $who = $_GET["who"];
  $user = getnick_uid($who);
          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=\"Mod Tools\">";
  echo "<p align=\"center\">";
  $res = mysql_query("Update mx_users SET validated='1' WHERE id='".$who."'");
  if($res)
  {
  $sub = "Account Validate ! !";
  $nama = getnick_uid($who);
  $shtxt = "Hai $nama, Your Account Has Been Validate ! ! Now You Can Use All Service In This Wap. Thank You Because Join This Wap Site. Feel Free To Invite Your Friends Join Here ! .pis.";
    mysql_query("INSERT INTO mx_private SET text='".$shtxt."', autopm='1', byuid='1', touid='".$who."', sub='".$sub."', timesent='".time()."'");
  mysql_query("INSERT INTO mx_mlog SET action='validation', details='<b>".getnick_uid(getuid_hits($hits))."</b> validated $user', actdt='".time()."'");
  echo "<img src=\"images/ok.gif\" alt=\"O\"/>$user validated successfully";
  }else{
  echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error validating $user";
  }
  echo "<br/><br/><a href=\"prov.php?show=viewuser&amp;who=$who&amp;hits=$hits\">$user's Profile</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
include("wapv.php");
  echo "</p>";
  echo "</body>";
}


////////////////////////////////////////////Edit Post

else if($show=="edttpc")
{
  $tid = $_GET["tid"];
  $ttext = $_POST["ttext"];
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $res = mysql_query("UPDATE mx_topics SET text='"
  .$ttext."' WHERE id='".$tid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='topics', details='<b>".getnick_uid(getuid_hits($hits))."</b> Edited the text Of the thread ".mysql_escape_string(gettname($tid))." at the forum ".getfname($fid)."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic Message Edited";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";
  echo "<a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$tid\">";
echo "View Topic</a><br/>";
$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

///////////////////////////////////////Close/ Open Topic

else if($show=="clot")
{
  $tid = $_GET["tid"];
  $tdo = $_GET["tdo"];
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $res = mysql_query("UPDATE mx_topics SET closed='"
  .$tdo."' WHERE id='".$tid."'");
  if($res)
          {
            if($tdo==1)
            {
              $msg = "Closed";
            }else{
                $msg = "Opened";
            }
            mysql_query("INSERT INTO mx_mlog SET action='topics', details='<b>".getnick_uid(getuid_hits($hits))."</b> Closed The thread ".mysql_escape_string(gettname($tid))." at the forum ".getfname($fid)."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic $msg";
			$tpci = mysql_fetch_array(mysql_query("SELECT name, authorid FROM mx_topics WHERE id='".$tid."'"));
			$tname = htmlspecialchars($tpci[0]);
   $sub = "Topic Status ! !";
			$msg = "your thread [topic=$tid]$tname"."[/topic] is $msg"."[br/][small][i]p.s: this is an automatic pm[/i][/small]";
			autopm($msg, $tpci[1], $sub);
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";
  
$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

///////////////////////////////////////Untrash user

else if($show=="untr")
{
  $who = $_GET["who"];
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $res = mysql_query("DELETE FROM mx_penalties WHERE penalty='0' AND uid='".$who."'");
  if($res)
          {
            $unick = getnick_uid($who);
            mysql_query("INSERT INTO mx_mlog SET action='penalties', details='<b>".getnick_uid(getuid_hits($hits))."</b> Untrashed The user <b>".$unick."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick Untrashed";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";


  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}


///////////////////////////////////////Delete shout

else if($show=="delsh")
{
  $shid = $_GET["shid"];
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $sht = mysql_fetch_array(mysql_query("SELECT shouter, shout FROM mx_shouts WHERE id='".$shid."'"));
  $msg = getnick_uid($sht[0]);
  $msg .= ": ".htmlspecialchars((strlen($sht[1])<20?$sht[1]:substr($sht[1], 0, 20)));
  $res = mysql_query("DELETE FROM mx_shouts WHERE id ='".$shid."'");
  if($res)
          {
		  mysql_query("INSERT INTO mx_mlog SET action='shouts', details='<b>".getnick_uid(getuid_hits($hits))."</b> Deleted the shout <b>".$shid."</b> - $msg', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout deleted";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";


  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

///////////////////////////////////////Delete shout

else if($show=="delsh2")
{
  $shid = $_GET["shid"];
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $sht = mysql_fetch_array(mysql_query("SELECT shouter, shout FROM mx_oshouts WHERE id='".$shid."'"));
  $msg = getnick_uid($sht[0]);
  $msg .= ": ".htmlspecialchars((strlen($sht[1])<20?$sht[1]:substr($sht[1], 0, 20)));
  $res = mysql_query("DELETE FROM mx_oshouts WHERE id ='".$shid."'");
  if($res)
          {
		  mysql_query("INSERT INTO mx_mlog SET action='ANNOunce', details='<b>".getnick_uid(getuid_hits($hits))."</b> Deleted the Announcement <b>".$shid."</b> - $msg', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Announcement deleted";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";


  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

else if($show=="delsht")
{
          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>Clear Shout</b>";
    echo "<div class=\"box_sub\" align=\"center\">";
  $res = mysql_query("DELETE FROM mx_shouts");
  if($res)
  {

    $uid = getuid_hits($hits);
    $nick = getnick_uid($uid);
    $stat = getstatus($uid);

    $shtxt = "Last Shouts Has Been Clear By ".$stat." $nick!! Thank You.";
    $shtm = time();

    mysql_query("INSERT INTO mx_shouts SET shout='".$shtxt."', shouter='1', shtime='".$shtm."'");
  echo "<img src=\"images/ok.gif\" alt=\"O\"/>Old Shouts Deleted";
  }else{
  echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error!";
  }
  echo "</div></div>";
 echo footerweb($hits);
  echo "</body>";
}
///////////////////////////////////////Pin/ Unpin Topic

else if($show=="pint")
{
  $tid = $_GET["tid"];
  $tdo = $_GET["tdo"];
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $pnd = getpinned($fid);
  if($pnd<=5)
  {
  $res = mysql_query("UPDATE mx_topics SET pinned='"
  .$tdo."' WHERE id='".$tid."'");
  if($res)
          {
            if($tdo==1)
            {
              $msg = "Pinned";
            }else{
                $msg = "Unpinned";
            }
            mysql_query("INSERT INTO mx_mlog SET action='topics', details='<b>".getnick_uid(getuid_hits($hits))."</b> $msg The thread ".mysql_escape_string(gettname($tid))." at the forum ".getfname($fid)."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic $msg";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>You can only pin 5 topics in every forum";
          }
  echo "<br/><br/>";

$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

///////////////////////////////////Delete the damn thing

else if($show=="delt")
{
  $tid = $_GET["tid"];
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $tname=gettname($tid);
  $res = mysql_query("DELETE FROM mx_topics WHERE id='".$tid."'");
  if($res)
          {
            mysql_query("DELETE FROM mx_posts WHERE tid='".$tid."'");
            mysql_query("INSERT INTO mx_mlog SET action='topics', details='<b>".getnick_uid(getuid_hits($hits))."</b> Deleted The thread ".mysql_escape_string($tname)." at the forum ".getfname($fid)."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic Deleted";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  echo "<br/><br/>";
  
$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}


////////////////////////////////////////////Edit Post

else if($show=="rentpc")
{
  $tid = $_GET["tid"];
  $tname = $_POST["tname"];
  $fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $otname = gettname($tid);
  if(trim($tname!=""))
  {
    $not = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_topics WHERE name LIKE '".$tname."' AND fid='".$fid."'"));
    if($not[0]==0)
    {
  $res = mysql_query("UPDATE mx_topics SET name='"
  .$tname."' WHERE id='".$tid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='topics', details='<b>".getnick_uid(getuid_hits($hits))."</b> Renamed The thread ".mysql_escape_string($otname)." to ".mysql_escape_string($tname)." at the forum ".getfname($fid)."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic  Renamed";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>Topic Name already exist";
  }
    
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>You must specify a name for the topic";
  }
  echo "<br/><br/>";
  echo "<a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$tid\">";
echo "View Topic</a><br/>";
$fname = getfname($fid);
      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$fid\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

///////////////////////////////////////////////////Move topic



else if($show=="mvt")
{
  $tid = $_GET["tid"];
  $mtf = $_POST["mtf"];
  $fname = htmlspecialchars(getfname($mtf));
  //$fid = getfid_tid($tid);
         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=\"Mod CP\">";
  echo "<p align=\"center\">";
  
    $not = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_topics WHERE name LIKE '".$tname."' AND fid='".$mtf."'"));
    if($not[0]==0)
    {
  $res = mysql_query("UPDATE mx_topics SET fid='"
  .$mtf."', moved='1' WHERE id='".$tid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='topics', details='<b>".getnick_uid(getuid_hits($hits))."</b> Moved The thread ".mysql_escape_string($tname)." to forum ".getfname($fid)."', actdt='".time()."'");
			$tpci = mysql_fetch_array(mysql_query("SELECT name, authorid FROM mx_topics WHERE id='".$tid."'"));
			$tname = htmlspecialchars($tpci[0]);
   $sub = "Topic Status ! !";
			$msg = "your thread [topic=$tid]$tname"."[/topic] Was moved to $fname forum[br/][small][i]p.s: this is an automatic pm[/i][/small]";
			autopm($msg, $tpci[1], $sub);
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic Moved";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>Topic Name already exist";
  }


  echo "<br/><br/>";
  

      echo "<a href=\"index.php?show=viewfrm&amp;hits=$hits&amp;fid=$mtf\">";
echo "$fname</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

 else if($show=="hansh")
{

  $id = $_GET["id"];
  $type = $_GET["type"];

          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=\"Mod CP\">";
  echo "<p align=\"center\">";
  echo "<b>Handle Smilies</b><br/><br/>";
      $info = mysql_fetch_array(mysql_query("SELECT who, req FROM mx_shop WHERE id='".$_GET["id"]."'"));

    $res = mysql_query("UPDATE mx_shop SET req='0' WHERE id='".$id."'");


     if($res)
          {
           echo "<img src=\"images/ok.gif\" alt=\"O\"/>Smilies Handled! Auto PM Has Been Sent!";
   $sub = "Buy Smilies ! !";
   $uid = getuid_hits($hits);
   $shtxt = "Your Smilies Has Been Handle By ".getnick_uid($uid)." PM He/She To Get More Info[br/][small][i]p.s: this is an automatic pm[/i][/small]";
    mysql_query("INSERT INTO mx_private SET text='".$shtxt."', byuid='1', autopm='1', touid='".$info[0]."', sub='".$sub."', timesent='".time()."'");
  $user = getnick_uid($info[0]);
  mysql_query("INSERT INTO mx_mlog SET action='Handle Smilies', details='<b>".getnick_uid(getuid_hits($hits))."</b> handle smilies $user', actdt='".time()."'");
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }

          echo "<br/><br/>";
          echo "<a href=\"prov.php?show=viewuser&amp;hits=$hits&amp;who=$info[1]\">Buyer Profile</a><br/>";
      echo "<a href=\"modcp.php?show=main&amp;hits=$hits\">";
echo "Mod R/L</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  include("wapv.php");
  echo "</p></body>";
}

else if($show=="hpm")
{
  $pid = $_GET["pid"];
  
         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=\"Mod CP\">";
  echo "<p align=\"center\">";

    $info = mysql_fetch_array(mysql_query("SELECT byuid, touid FROM mx_private WHERE id='".$pid."'"));
  $res = mysql_query("UPDATE mx_private SET reported='2' WHERE id='".$pid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='handling', details='<b>".getnick_uid(getuid_hits($hits))."</b> handled The PM ".$pid."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>PM Handled";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }



  echo "<br/><br/>";
    
    echo "<a href=\"prov.php?show=viewuser&amp;hits=$hits&amp;who=$info[0]\">PM Sender's Profile</a><br/>";
      echo "<a href=\"prov.php?show=viewuser&amp;hits=$hits&amp;who=$info[1]\">PM Reporter's Profile</a><br/><br/>";
      echo "<a href=\"modcp.php?show=main&amp;hits=$hits\">";
echo "Mod R/L</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

//////////////////////////////////////////Handle Post

else if($show=="hps")
{
  $pid = $_GET["pid"];

         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=\"Mod CP\">";
  echo "<p align=\"center\">";

    $info = mysql_fetch_array(mysql_query("SELECT uid, tid FROM mx_posts WHERE id='".$pid."'"));
  $res = mysql_query("UPDATE mx_posts SET reported='2' WHERE id='".$pid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='handling', details='<b>".getnick_uid(getuid_hits($hits))."</b> handled The Post ".$pid."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Post Handled";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }



  echo "<br/><br/>";
    $poster = getnick_uid($info[0]);
    echo "<a href=\"prov.php?show=viewuser&amp;hits=$hits&amp;who=$info[0]\">$poster's Profile</a><br/>";
      echo "<a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$info[1]\">View Topic</a><br/><br/>";
      echo "<a href=\"modcp.php?show=main&amp;hits=$hits\">";
echo "Mod R/L</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}
//////////////////////////////////////////Handle Post

else if($show=="hsh")
{
  $pid = $_GET["pid"];

         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=\"Mod CP\">";
  echo "<p align=\"center\">";

    $info = mysql_fetch_array(mysql_query("SELECT shouter FROM mx_shouts WHERE id='".$pid."'"));
  $res = mysql_query("UPDATE mx_shouts SET reported='0' WHERE id='".$pid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='Shouts', details='<b>".getnick_uid(getuid_hits($hits))."</b> handled The Shouts ".$pid."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout Handled";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }



  echo "<br/><br/>";
    $poster = getnick_uid($info[0]);
    echo "<a href=\"prov.php?show=viewuser&amp;hits=$hits&amp;who=$info[0]\">$poster's Profile</a><br/><br/>";
      echo "<a href=\"modcp.php?show=main&amp;hits=$hits\">";
echo "Mod R/L</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

//////////////////////////////////////////Handle Topic

else if($show=="htp")
{
  $pid = $_GET["tid"];

         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=\"Mod CP\">";
  echo "<p align=\"center\">";

    $info = mysql_fetch_array(mysql_query("SELECT authorid FROM mx_topics WHERE id='".$pid."'"));
  $res = mysql_query("UPDATE mx_topics SET reported='2' WHERE id='".$pid."'");
  if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='handling', details='<b>".getnick_uid(getuid_hits($hits))."</b> handled The topic ".mysql_escape_string(gettname($pid))."', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>Topic Handled";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }



  echo "<br/><br/>";
    $poster = getnick_uid($info[0]);
    echo "<a href=\"prov.php?show=viewuser&amp;hits=$hits&amp;who=$info[0]\">$poster's Profile</a><br/>";
      echo "<a href=\"index.php?show=viewtpc&amp;hits=$hits&amp;tid=$pid\">View Topic</a><br/><br/>";
      echo "<a href=\"modcp.php?show=main&amp;hits=$hits\">";
echo "Mod R/L</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}

else if($show=="pls")
{
    $pid = $_POST["pid"];
    $who = $_GET["who"];
    $pres = $_POST["pres"];
    $pval = $_POST["pval"];
            echo "<head>";
  echo "<title>RemiXchaT.CoM - World Wide Chat Community And Downloads !</title>";
  include("inc/css.inc.php");
 echo "</head>";
 echo "<body>";
  echo "<p align=\"center\">";
 $unick = getnick_uid($who);
$opl = mysql_fetch_array(mysql_query("SELECT plusses FROM mx_users WHERE id='".$who."'"));

 if($who == getuid_hits($hits))
 {

    echo "<img src=\"images/notok.gif\" alt=\"X\"/>You Can Update Your Plusses It Self..";
 }else{
if($pid=='0')
{
  $npl = $opl[0] - $pval;
}else{
    $npl = $opl[0] + $pval;
}
if($npl<0)
{
  $npl=0;
}
  if(trim($pres)=="")
  {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>You must Specify a reson for updating $unick's Plusses";
  }else{
    
    $res = mysql_query("UPDATE mx_users SET lastplreas='".mysql_escape_string($pres)."', plusses='".$npl."' WHERE id='".$who."'");
    if($res)
          {
            mysql_query("INSERT INTO mx_mlog SET action='PLUSSES', details='<b>".getnick_uid(getuid_hits($hits))."</b> Updated <b>".$unick."</b> plusses from ".$opl[0]." to $npl', actdt='".time()."'");
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick's Plusses Updated From $opl[0] to $npl";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  }
}
    echo "<br/><br/><a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></body>";
}
else if($show=="untr")
{
  $who = $_GET["who"];
  $user = getnick_uid($who);
          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=\"Mod CP\">";
  echo "<p align=\"center\">";
  $res = mysql_query("DELETE FROM mx_penalties WHERE penalty='0' AND uid='".$who."'");
  if($res)
  {
  $unick = getnick_uid($who);
  mysql_query("INSERT INTO mx_mlog SET action='unmute', details='<b>".getnick_uid(getuid_hits($hits))."</b> Unmute The user <b>".$unick."', actdt='".time()."'");
  echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick Unmute";
  }else{
  echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
  }
  echo "<br/><br/><a href=\"prov.php?show=viewuser&amp;who=$who&amp;hits=$hits\">$user's Profile</a><br/>";
  echo "<a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p></body>";
}
else if($show=="pun")
{
    $pid = $_POST["pid"];
    $who = $_POST["who"];
    $pres = $_POST["pres"];
    $pds = $_POST["pds"];
    $phr = $_POST["phr"];
    $pmn = $_POST["pmn"];
    $psc = $_POST["psc"];
            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=\"Mod CP\">";

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

   $perm = mysql_fetch_array(mysql_query("SELECT spermis FROM mx_users WHERE id='".$who."'"));

  if($perm[0]>0)
 { 
  echo "<b>Permission Denied</b><br/><br/>You Can't Mute Staff LolZz!";
 }else{
  $pmsg[0]="Mute";
  if(trim($pres)=="")
  {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>You must Specify A Reson For Punishing The User";
  }else{
    $timeto = $pds*24*60*60;
    $timeto += $phr*60*60;
    $timeto += $pmn*60;
    $timeto += $psc;
    $ptime = $timeto + time();
    $unick = getnick_uid($who);

    $res = mysql_query("INSERT INTO mx_penalties SET uid='".$who."', penalty='".$pid."', exid='".getuid_hits($hits)."', timeto='".$ptime."', pnreas='".mysql_escape_string($pres)."'");

    if($res)
          {
            mysql_query("UPDATE mx_users SET  lastpnreas='".$pmsg[$pid].": ".mysql_escape_string($pres)."' WHERE id='".$who."'");
            mysql_query("INSERT INTO mx_mlog SET action='penalties', details='<b>".getnick_uid(getuid_hits($hits))."</b> $pmsg[$pid] The user <b>".$unick."</b> For ".$timeto." Seconds', actdt='".time()."'");
            
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick is $pmsg[$pid] for $timeto Seconds";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  }
}
    echo "<br/><br/><a href=\"index.php?show=main&amp;hits=$hits\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
include("wapv.php");
  echo "</p></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>