Jnp wml

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Jnp wml

    i got error @ my wml jnp script

    Code:
    XML Parsing Error: not well-formed
    Location: http://amats.freehostia.com/wap/chat.php?action=jnpc&sid=bb48dfe75734d6f6d70c00c101a8883a&rid=49&time=0507062431
    Line Number 13, Column 67:Location: http://amats.freehostia.com/wap/chat.php?action=jnpc&sid=bb48dfe75734d6f6d70c00c101a8883a&rid=49&time=0507062431
    ------------------------------------------------------------------^
    and this is the script


    Code:
    <?php
    header("Content-type: text/vnd.wap.wml");
    /*header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");*/
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    ?>
    <wml>
    <head>
    <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
    <meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
    </head>
    <?php
    
    include("config.php"); 
    include("core.php"); 
    connectdb();
    $action=$_GET["action"];
    $id=$_GET["id"];
    $sid = $_GET["sid"];
    $rid=$_GET["rid"];
    $chat=$_GET["chat"];
    $who=$_GET["who"];
    $unick=$_GET["unick"];
    $rpw=$_GET["rpw"];
    $uid = getuid_sid($sid);
    $spin=$_GET["spin"];
    $idn=$_GET["idn"];
    $cancel=$_GET["cancel"];
    $uexist = isuser($uid);
    $time = date('dmHis');
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];  
    
    
    if((islogged($sid)==false)||!$uexist)
        {
            echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "You are not logged in<br/>";
          echo "Or Your session has been expired<br/><br/>";
          echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
        
    if(isbanned($uid))
        {
          echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";
          echo "<b>You are Banned</b><br/><br/>";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
    	$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
          $remain = $banto[0]- time();
          $rmsg = gettimemsg($remain);
          echo "<b>Time Left: </b>$rmsg<br/>";
          $nick = getnick_uid($banto[2]);
    	echo "<b>By: </b>$nick<br/>";
    	echo "<b>Reason: </b>$banto[1]";
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
        $isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE id='".$rid."'"));
        if($isroom[0]==0)
        {
            echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "This room doesn't exist anymore<br/>";
          echo ":P see in another room<br/><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
        $passworded = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'"));
        if($passworded[0]!="")
        {
          if($rpw!=$passworded[0])
          {
            echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "You can't enter this room<br/>";
          echo ":P stay away<br/><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
          }
        }
        if(!canenter($rid,$sid))
        {
            echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "You can't enter this room<br/>";
          echo ":P stay away<br/><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
        addtochat($uid, $rid);
            //This Chat Script is by Ra'ed Far'oun
            //raed_mfs@yahoo.com
            //want to see main menu...
            $timeto = 300;
            $timenw = time();
            $timeout = $timenw-$timeto;
            $deleted = mysql_query("DELETE FROM ibwf_chat WHERE timesent<".$timeout."");
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
            $nick = getnick_sid($sid);
    
            if ($action=="")
            {
          $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'"));
          if ($unreadpopup[0]<1)
          {
          echo "<card id=\"chat\" title=\"$sitename\" ontimer=\"chat.php?time=";
          echo date('dmHis');
          echo "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw";
          echo "\">";
          }else{
          echo "<card id=\"chat\" title=\"$sitename\">";
          }
          echo "<timer value=\"200\"/>";
          addonline($uid,"Chating in $rname","chat.php?rid=$rid&amp;rpw=$rpw");
          echo popup($sid);
    	  echo "<a href=\"#say\">options</a><br/>";
          echo "<a href=\"chat.php?time=date('dmHis')&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">refresh</a><br/>";
    
          //echo "</p>";
          //echo "<br/><br/>";
    	  
    	  
    	  if($rid==49)
            {
    
    
         $uid = getuid_sid($sid);
    
    $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_jnp WHERE touid='".$uid."' AND reply='1'"));
    if($nopop[0]>0)
    {  
     $ncl = mysql_fetch_array(mysql_query("SELECT id, bet, byuid, touid FROM ibwf_jnp WHERE touid='".$uid."' ORDER BY id DESC LIMIT 1"));
    $by = getnick_uid($ncl[2]);
    echo "Jack en Poy challenge from $by BET: $ncl[1]<br/>";
    
        echo "JNP Challenge: <select name=\"kamay\">";
     echo "<option value=\"0\">Decline</option>";
     echo "<option value=\"1\">Paper</option>";
      echo "<option value=\"2\">Scissors</option>";
      echo "<option value=\"3\">Rock</option>";
      echo "</select>";
    echo "<anchor>send<br/>";
       echo "<go action=\"chat.php?action=jnp&amp;sid=$sid&amp;rid=$rid&amp;time=$time\" method=\"post\">"; 
    echo "<postfield name=\"hidden\" name=\"who\" value=\"$ncl[2]\"/>";
    echo "<postfield name=\"hidden\" name=\"poy\" value=\"$ncl[0]\"/>";
    echo "<postfield name=\"submit\" value=\"send\"/>";    
    echo "</anchor>";
    }
    }
    	  
    	  
    	  
            $message=$_POST["message"];
            $who = $_POST["who"];
            $rinfo = mysql_fetch_array(mysql_query("SELECT censord, freaky FROM ibwf_rooms WHERE id='".$rid."'"));
            if (trim($message) != "")
            {
              $nosm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE msgtext='".$message."'"));
        if(!isblocked($message,$uid))
        {
    
          $chatok = mysql_query("INSERT INTO ibwf_chat SET  chatter='".$uid."', who='".$who."', timesent='".time()."', msgtext='".$message."', rid='".$rid."';");
          $lstmsg = mysql_query("UPDATE ibwf_rooms SET lastmsg='".time()."' WHERE id='".$rid."'");
                
          $hehe=mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
          $totl = $hehe[0]+1;
          $msgst= mysql_query("UPDATE ibwf_users SET chmsgs='".$totl."' WHERE id='".$uid."'");
        }else{
        $bantime = time() + (30*24*60*60);
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
        echo "Can't Post Msg<br/><br/>";
        echo "You just tried sending a msg with a link to one of the crapiest 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!";
            $user = getnick_sid($sid);
        mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='<b>".getnick_uid(1)."</b> auto banned $user for spamming chat', actdt='".time()."'");
        mysql_query("INSERT INTO ibwf_penalties SET uid='".$uid."', 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='".$uid."'");
        echo "</card>";
        echo "</wml>";
        exit();
      }
                if($rinfo[1]==2)
                {
                  //oh damn i gotta post this message to ravebabe :(
                  //will it succeed?
                  $botid = "eeb070e74e366473";
                  $hostname = "www.pandorabots.com";
                  $hostpath = "/pandora/talk-xml";
                  $sendData = "botid=".$botid."&input=".urlencode($message)."&custid=".$custid;
                  
                  $result = PostToHost($hostname, $hostpath, $sendData);
                  
                  $pos = strpos($result, "custid=\"");
                  $pos = strpos($result, "<that>");
        	if ($pos === false) {
        		$reply = "";
        	} else {
        		$pos += 6;
        		$endpos = strpos($result, "</that>", $pos);
        		$reply = unhtmlspecialchars2(substr($result, $pos, $endpos - $pos));
        		$reply = mysql_escape_string($reply);
        	}
        	
        	$chatok = mysql_query("INSERT INTO ibwf_chat SET  chatter='1', who='', timesent='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
              }
              $message = "";
                }
                
                echo "<br/>";
                $chats = mysql_query("SELECT chatter, who, timesent, msgtext, exposed FROM ibwf_chat WHERE rid='".$rid."' ORDER BY timesent DESC, id DESC");
                $counter=0;
    
                while($chat = mysql_fetch_array($chats))
                {
                    $canc = true;
                   
                    
                    if($counter<15)
                    {
                      if(istrashed($chat[0])){
                            if($uid!=$chat[0])
                            {
                              $canc = false;
                            }
                      }
                    //////good
                    /*if(isignored($chat[0],$uid)){
                      $canc = false;
                    }*/
                    //////////good
                    if($chat[0]!=$uid)
                    {
                      if($chat[1]!=0)
                      {
                        if($chat[1]!=$uid)
                        {
                          $canc = false;
                        }
                      }
                    }
                    if($chat[4]=='1' && ismod($uid))
                    {
                      $canc = true;
                    }
                    if($canc)
                    {
                       $cmid = mysql_fetch_array(mysql_query("SELECT  chmood FROM ibwf_users WHERE id='".$chat[0]."'"));
                       
                       $iml = "";
                    if(($cmid[0]!=0))
                    {
                      $mlnk = mysql_fetch_array(mysql_query("SELECT img, text FROM ibwf_moods WHERE id='".$cmid[0]."'"));
                      $iml = "<img src=\"$mlnk[0]\" alt=\"$mlnk[1]\"/>";
    
                    }
                      $chnick = getnick_uid($chat[0]);
                        $optlink = $iml.$chnick;
                      if(($chat[1]!=0)&&($chat[0]==$uid))
                      {
                        ///out
                        $iml = "<img src=\"../moods/out.gif\" alt=\"!\"/>";
                        $chnick = getnick_uid($chat[1]);
                        $optlink = $iml."PM to ".$chnick;
                      }
                      if($chat[1]==$uid)
                      {
                        ///out
                        $iml = "<img src=\"../moods/in.gif\" alt=\"!\"/>";
                        $chnick = getnick_uid($chat[0]);
                        $optlink = $iml."PM by ".$chnick;
                      }
                        if($chat[4]=='1')
                      {
                        ///out
                        $iml = "<img src=\"../moods/point.gif\" alt=\"!\"/>";
                        $chnick = getnick_uid($chat[0]);
                        $tonick = getnick_uid($chat[1]);
                        $optlink = "$iml by ".$chnick." to ".$tonick;
                      }
                      
                      $ds= date("H.i.s", $chat[2]);
                      $text = parsepm($chat[3], $sid);
                      $nos = substr_count($text,"<img src=");
                      if(isspam($text))
                      {
                        $chnick = getnick_uid($chat[0]);
                        echo "<b>Chat system:&#187;<i>*oi! $chnick, no spamming*</i></b><br/>";
                      }
                      else if($nos>2){
                        $chnick = getnick_uid($chat[0]);
                        echo "<b>Chat system:&#187;<i>*hey! $chnick, you can only use 2 smilies per msg*</i></b><br/>";
                      }else{
                        $sres = substr($chat[3],0,3);
                        
                        if(($sres == "/me")&&(ismod($chat[0])))
                        {
                            $chco = strlen($chat[3]);
                            $goto = $chco - 3;
                            $rest = substr($chat[3],3,$goto);
                            $tosay = parsepm($rest, $sid);
                            
                            echo "<b><i>*$chnick $tosay*</i></b><br/>";
                        }else if(($sres == "/me")&&(!ismod($chat[0]))){
                        echo "<b>Chat System:&#187;<i>*Hey! $chnick, U Cannot Use This Tool!*</i></b><br/>";
                         }else if($nosm[0]>1){
                          echo "<b>Chat System:&#187;<i>*Hey! $chnick, U Cannot Flood This Room!*</i></b><br/>";
                          }else{
                          if($rinfo[0]==0){
                          $tosay = getbbcode($chat[3], $sid, 0);
                          }else{
                          $tosay = parsepm($chat[3], $sid, 1);
                          }
                          
                          if($rinfo[1]==1)
                          {
                              $tosay = htmlspecialchars($chat[3]);
                              $tosay = strrev($tosay);
                            }
                      echo "<a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$chat[0]&amp;rid=$rid&amp;rpw=$rpw\">$optlink</a> - ";
                      echo $tosay."<br/>";
                      }
                    }
                   
                      $counter++;
                    }
                    }
                }
                //echo "</p>";
            
            echo "<br/>";
            echo popup($sid);
            echo "<a name=\"top\" id=\"top\" href=\"#say\">options</a><br/>";
            echo "<a href=\"chat.php?time=";
            echo "".date("dmHis")."";
            echo "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">refresh</a><br/>";
            
    		$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
            $unrd="".$unreadinbox[0]."";
            if ($unreadinbox[0]>0)
    		{echo "<a href=\"inbox.php?action=main&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">inbox: $unrd New!</a><br/>";
    		}
    		else {
    		echo "<a  href=\"inbox.php?action=main&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">Inbox</a><br/>";
    	  }
            $chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
            echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">online here ($chatters[0])</a><br/>";
            echo "<a href=\"index.php?action=chat&amp;sid=$sid\">chat menu</a><br/>";
            echo forumlink($sid);
            echo "<a href=\"index.php?action=main&amp;sid=$sid\">main menu</a>";
            echo "</card>";
    			echo "<card id=\"say\" title=\"$sitename\">";
            
            addonline($uid,"Writing Chat Message","");
              echo "<p align=\"left\">";
              echo "Message:<input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
              echo "<anchor>send";
              echo "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
              echo "<postfield name=\"message\" value=\"$(message)\"/>";
              echo "</go></anchor><br/><br/>";
              //echo "<a href=\"lists.php?action=chmood&amp;sid=$sid&amp;page=1\">Chat mood</a><br/>";
              //echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Who's Inside</a><br/>";
              //echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Chatroom</a><br/>";
    		  
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
            echo "<a href=\"lists.php?action=smilies&amp;sid=$sid\">smilies list</a><br/>";
            echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">back to room</a><br/>";
    		$chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
            echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">online here ($chatters[0])</a><br/>";
            echo "<a href=\"index.php?action=chat&amp;sid=$sid\">chat menu</a><br/>";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\">main menu</a></p>";
    
            echo "</card>";
    }
    
    /////////////////////////////////////////////////////SAY
            else if ($action=="say")                   {
            echo "<card id=\"say\" title=\"$sitename\">";
            
            addonline($uid,"Writing Chat Message","");
              echo "<p align=\"left\">";
              echo "Message:<input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
              echo "<anchor>send";
              echo "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
              echo "<postfield name=\"message\" value=\"$(message)\"/>";
              echo "</go></anchor><br/><br/>";
              //echo "<a href=\"lists.php?action=chmood&amp;sid=$sid&amp;page=1\">Chat mood</a><br/>";
              //echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Who's Inside</a><br/>";
              //echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Chatroom</a><br/>";
    		  
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
            echo "<a href=\"lists.php?action=smilies&amp;sid=$sid\">smilies list</a><br/>";
            echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">back to room</a><br/>";
    		$chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
            echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">online here ($chatters[0])</a><br/>";
            echo "<a href=\"index.php?action=chat&amp;sid=$sid\">chat menu</a><br/>";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\">main menu</a></p>";
    
            echo "</card>";
    }
    /////////////////////////////////////////////////////SAY2
            else if ($action=="say2")                   {
            echo "<card id=\"say\" title=\"$sitename\">";
            echo "<p align=\"center\">";
            $unick = getnick_uid($who);
            echo "<b>Private to $unick</b>";
            echo "</p>";
     if($rid==49)
            {
        echo "JNP Challenge: <select name=\"kamay\">";
      echo "<option value=\"1\">Paper</option>";
      echo "<option value=\"2\">Scissors</option>";
      echo "<option value=\"3\">Rock</option>";
      echo "</select>";
      echo "<br/>Bet: <input name=\"bet\" maxlength=\"4\" size=\"3\" format=\"*N\"/><br/>";
     echo "<anchor>Challenge";
        echo "
             <go href=\"chat.php?action=jnpc&amp;sid=$sid&amp;rid=$rid&amp;time=$time\" method=\"post\">
             <postfield name=\"kamay\" value=\"$(kamay)\"/>
             <postfield name=\"bet\" value=\"$(bet)\"/>
             <postfield name=\"who\" value=\"$who\"/>
            </go>
                ";
                echo "</anchor>";
    }
            addonline($uid,"Writing private message","");
             
    
    
    
              echo "<p>Message:<input name=\"message\" type=\"text\" value=\" \" maxlength=\"255\"/><br/>";
              echo "<anchor>Private Msg";
              echo "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
              echo "<postfield name=\"message\" value=\"$(message)\"/>";
              echo "<postfield name=\"who\" value=\"$who\"/>";
              echo "</go></anchor><br/><br/>";
            if(ismod($uid))
            {
            echo "<a href=\"chat.php?action=clear&amp;sid=$sid&amp;who=$who&amp;lstloc=cht&amp;rid=$rid\">Clear Msgs</a><br/>";
            }
            echo "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who&amp;lstloc=cht&amp;rid=$rid\">View $unick's Profile</a><br/>";
            echo "<a href=\"chat.php?action=expose&amp;sid=$sid&amp;who=$who&amp;rid=$rid&amp;rpw=$rpw\">Expose $unick</a><br/>";
            //echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Who's Inside</a><br/>";
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
            echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Back To $rname</a><br/>";
            echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
            echo "<a href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
            echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a><br/>";
            echo forumlink($sid);
            echo "</p>";
            echo "<p align=\"center\">";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
            echo "</p>";
            echo "</card>";
    }
    
    
    
    ////////////////////////// jnp proc
    
        else if ($action=="jnpc")
      {
     $who = $_POST["who"];
              $bet =$_POST["bet"];
        $kamay =$_POST["kamay"];
    $tnick = getnick_uid($who);
      echo "<card id=\"main\" title=\"Jack en Poy\">";
      echo "<p align=\"center\">";
      //$uid = getuid_sid($sid);
    
     if($uid==$who)
                            {
         echo "Dont be so stupid to challenge your self!<br/>";
     }else{
    if($bet<=19)
    {
       echo "We accept above 20 bet to make a challenge!<br/>";
     }else{
    if(chall($uid,$who))
        {
      echo "You have a pending challenge<br/>";
     }else{
     $gpsf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
      $gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
      if($gpsf[0]>=$bet)
    {
     if($gpst[0]>=$bet)
    {
        $res = mysql_query("INSERT INTO ibwf_jnp SET touid='".$who."', byuid='".$uid."', hand='".$kamay."', reply='1', bet='".$bet."', actime='".time()."'");
      if($res)
            {
    
                echo "Jack en poy challenge with $bet Sent to $tnick<br/>";
            }else{
              echo "Database error<br/>";
            }
          }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
            }
            }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
            }
    
    }
    }
    }
     echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
      echo "</p>";
      echo "</card>";
    }
      else if ($action=="jnp")
      {
     $who = $_POST["who"];
    
        $kamay =$_POST["kamay"];
    $poy =$_POST["poy"];
    
      echo "<card id=\"main\" title=\"Jack en Poy\">";
      echo "<p align=\"center\">";
      //$uid = getuid_sid($sid);
    
     if($uid==$who)
                            {
         echo "Dont be so stupid to challenge your self!<br/>";
     }else{
     $gpsf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
      $gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
     $number = mysql_fetch_array(mysql_query("SELECT hand, bet FROM ibwf_jnp WHERE id='".$poy."'"));
    $number2 = $number[0];
    $bet2 = $number[1];
    $plus = $number[1];
    if($gpsf[0]>=$bet2)
    {
     if($gpst[0]>=$bet2)
    {
    $unick = getnick_uid($uid);
    
    if ($kamay=="1")
    {
    $pchoice = "Paper";
    if ($number2 =="1")
    {
                            $cchoice = "Paper";
    
                            echo_scores2($uid,$poy,$pchoice,$cchoice,drew);
                            $msg = "Challenge draw with $unick!"."";
                            autopm($msg, $who);
      mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
    
    
                        }
    else if ($number2 =="2")
    {
    
                            $cchoice = "Scissors";
                          echo_scores2($uid,$poy,$pchoice,$cchoice,lost);
                   mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$uid."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$who."'");
              echo "$number[1] plusses has been deducted to your account";
                    $msg = "You won against $unick in your jack en poy challenge and you've got $plus plusses."."";
                            autopm($msg, $who);
                          mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
     }
    else if ($number2 =="3")
    {
    
                            $cchoice = "Rock";
                         echo_scores2($uid,$poy,$pchoice,$cchoice,won);
                       mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$who."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$uid."'");
              echo "You won $plus plusses added to your account!";
                    $msg = "You lose against $unick $number[1] plusses has been deducted from your account!"."";
                            autopm($msg, $who);
                      mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                      }
    else if ($number2 =="")
    {
    
              echo "Not in game!";
    
                      }
    }
    if ($kamay=="2")
    {
            $pchoice = "Scissors";
    if ($number2 =="1")
    {
    
                            $cchoice = "Paper";
                        echo_scores2($uid,$poy,$pchoice,$cchoice,won);
    
                         mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$who."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$uid."'");
              echo "You won $plus plusses added to your account!";
                    $msg = "You lose against by $unick $number[1] plusses has been deducted from your account!"."";
                            autopm($msg, $who);
                      mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                        }
    else if ($number2 =="2")
     {
                            $cchoice = "Scissors";
                         echo_scores2($uid,$poy,$pchoice,$cchoice,drew);
                       $msg = "Challenge draw with $unick!"."";
                            autopm($msg, $who);
                        mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
    
                        }
    else if ($number2 =="3")
    {
    
                            $cchoice = "Rock";
                          echo_scores2($uid,$poy,$pchoice,$cchoice,lost);
                       mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$uid."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$who."'");
    
                    $msg = "You won against $unick in your jack en poy challenge and you've got $plus plusses."."";
                            autopm($msg, $who);
    
                 mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                 }
    else if ($number2 =="")
    {
    
              echo "Not in game!";
    
                      }
    }
    if ($kamay=="3")
    {
            $pchoice = "Rock";
    if ($number2 =="1")
    {
    
                            $cchoice = "Paper";
                            echo_scores2($uid,$poy,$pchoice,$cchoice,lost);
                        mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$uid."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$who."'");
    
                    $msg = "You won against $unick in your jack en poy challenge and you've got $plus plusses."."";
                            autopm($msg, $who);
                     mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                     }
    else if ($number2 =="2")
    {
    
                            $cchoice = "Scissors";
                             echo_scores2($uid,$poy,$pchoice,$cchoice,won);
    
                        mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$who."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$uid."'");
              echo "You won $plus plusses added to your account!";
                    $msg = "You lose against $unick $number[1] plusses has been deducted from your account!"."";
                            autopm($msg, $who);
                         mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                        }
    else if ($number2 =="3") {
                            $cchoice = "Rock";
                            echo_scores2($uid,$poy,$pchoice,$cchoice,drew);
                         mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                     $msg = "Challenge draw with $unick!"."";
                            autopm($msg, $who);
                              }
    else if ($number2 =="")
    {
    
              echo "Not in game!";
    
                      }
    }
    if ($kamay == 0) {
      if($kamay==0)
                {
                  $msg = "declined";
                }else{
                    $msg = "";
                }
    echo "Challenge declined!<br/>";
    
                  $msg = "".getnick_uid(getuid_sid($sid))." has $msg to your jack en poy challenge!"."";
                            autopm($msg, $who);
    mysql_query("DELETE FROM ibwf_jnp WHERE touid='".$uid."' AND byuid='".$who."'");
    
        }
          }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
    
                  $msg = "Either you Or the recipient has insufficient plusses to complete this request!"."";
                            autopm($msg, $who);
    mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
            }
            }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
            }
       }
    echo "<br/><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
      echo "</p>";
      echo "</card>";
    }
    if($action=="sendpm")
    {
      echo "<card id=\"main\" title=\"Chat INBOX\">";
      echo "<p align=\"center\">";
     $pmtext = $_POST["pmtext"];
     $whonick = getnick_uid($who);
      $byuid = getuid_sid($sid);
      $tm = time();
      $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
      $pmfl = $lastpm[0]+getpmaf();
      if($byuid==1)$pmfl=0;
      if($pmfl<$tm)
      {
        if(!isblocked($pmtext,$byuid))
        {
        if((!isignored($byuid, $who))&&(!istrashed($byuid)))
        {
      $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
      }else{
        $res = true;
      }
      if($res)
      {
    
    mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$idn."'");
        echo "PM was sent successfully to $whonick<br/><br/>";
        echo parsepm($pmtext, $sid);
    
      }else{
        echo "Can't Send PM to $whonick<br/><br/>";
      }
      }else{
        $bantime = time() + (7*24*60*60);
    
        echo "Can't Send PM to $whonick<br/><br/>";
        echo "You just sent a link to one of the crapiest 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."'");
      }
      }else{
        $rema = $pmfl - $tm;
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
        echo "Flood control: $rema Seconds<br/><br/>";
      }
      echo "<br/><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
    $plc = mysql_fetch_array(mysql_query("SELECT saan FROM ibwf_users WHERE id='".$uid."'"));
    
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "Home</a>";
      echo "</p>";
        echo "</card>";
    }
       else if ($action=="reset")
    {
    
    
            echo "<card id=\"main\" title=\"Reset\">";
            echo "<p align=\"center\">DATA Reset Successfully";
            mysql_query("DELETE FROM ibwf_jnp WHERE byuid='".$uid."'");
          echo "<br/><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
            echo "</p></card>";
                      }
    
    
    
    /////////////////////////////////////////////////////CHAT OPTIONS
    
            else if ($action=="options")   
                            {
            echo "<card id=\"say\" title=\"$sitename\">";        
            addonline($uid,"Chat Options","");
            echo "<p align=\"center\">";
            echo "<b>Chat Options</b>";
            echo "</p>";
            echo "<p>";
            echo "<a href=\"lists.php?action=chmood&amp;sid=$sid&amp;page=1\">Chat Mood</a><br/>";
            echo "<a href=\"lists.php?action=smilies&amp;sid=$sid\">Smilies List</a><br/>";
            echo "<a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Who's Inside</a><br/><br/>";
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
            echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Back To $rname</a><br/>";
            echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
            echo "<a href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
            echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a><br/>";
            echo forumlink($sid);
            echo "</p>";
            echo "<p align=\"center\">";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
            echo "</p>";
            echo "</card>";
    }
    //////////////////////////////inside//////////
            else if ($action=="inside")           {
              
              addonline($uid,"Chat inside list","");
            echo "<card id=\"main\" title=\"Inside list\">";
            echo "<p align=\"left\">";
            echo "</p>";
            echo "<p>";
            $inside=mysql_query("SELECT DISTINCT * FROM ibwf_chonline WHERE rid='".$rid."' and uid IS NOT NULL");
            
            while($ins=mysql_fetch_array($inside))
            {
              $unick = getnick_uid($ins[1]);
              $userl = "<a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$ins[1]&amp;rid=$rid&amp;rpw=$rpw\">$unick</a><br/>";
              echo "$userl";
            }
            echo "</p>";
            echo "<p>";
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
          echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">back to chat</a><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">chat menu</a><br/>";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\">main menu</a></p>";
            echo "</card>";
                                               }
            else if ($action=="expose")           {
    
              addonline($uid,"Chat inside list","");
            echo "<card id=\"main\" title=\"Inside list\">";
            echo "<p align=\"center\"><br/>";
            mysql_query("UPDATE ibwf_chat SET exposed='1' WHERE chatter='".$who."' AND who='".$uid."'");
            $unick = getnick_uid($who);
            echo "$unick messages to you have been exposed to staff";
            echo "</p>";
            echo "<p>";
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            $rname = $rooms[1];
          echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">back to chat</a><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">chat menu</a><br/>";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\">main menu</a></p>";
            echo "</p>";
            echo "</card>";
          }
          else if(($action=="clear")&&(ismod($uid)))
          {
          addonline($uid,"Chat Tools","");
          echo "<card id=\"main\" title=\"Clearing Users Msgs\">";
          echo "<p align=\"center\"><br/>";
          $trgtnick=getnick_uid($who);
          $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
          $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
          if($trgtperm>$perm){ 
          echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
          echo "<br/>U Cannot Clear $trgtnick's Msgs<br/>";
          }else{
          if(($who!="")||($who!=0))
          {
          $res = mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."'");
          if($res)
          {
          echo "$trgtnick msgs have been cleared<br/>";
          }else{
          echo "Failed clearing $trgtnick msgs<br/>";
          }
          }else{
          echo "Username doesnot exist<br/>";
          }
          }
          echo "<br/>";
          $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
          $rname = $rooms[1];
          echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">back to chat</a><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">chat menu</a><br/>";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\">main menu</a></p>";
          echo "</card>";
    }        
    ?>
    </wml>
    i think error is in this code

    Code:
        else if ($action=="jnpc")
      {
     $who = $_POST["who"];
              $bet =$_POST["bet"];
        $kamay =$_POST["kamay"];
    $tnick = getnick_uid($who);
      echo "<card id=\"main\" title=\"Jack en Poy\">";
      echo "<p align=\"center\">";
      //$uid = getuid_sid($sid);
    
     if($uid==$who)
                            {
         echo "Dont be so stupid to challenge your self!<br/>";
     }else{
    if($bet<=19)
    {
       echo "We accept above 20 bet to make a challenge!<br/>";
     }else{
    if(chall($uid,$who))
        {
      echo "You have a pending challenge<br/>";
     }else{
     $gpsf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
      $gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
      if($gpsf[0]>=$bet)
    {
     if($gpst[0]>=$bet)
    {
        $res = mysql_query("INSERT INTO ibwf_jnp SET touid='".$who."', byuid='".$uid."', hand='".$kamay."', reply='1', bet='".$bet."', actime='".time()."'");
      if($res)
            {
    
                echo "Jack en poy challenge with $bet Sent to $tnick<br/>";
            }else{
              echo "Database error<br/>";
            }
          }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
            }
            }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
            }
    
    }
    }
    }
     echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
      echo "</p>";
      echo "</card>";
    }
      else if ($action=="jnp")
      {
     $who = $_POST["who"];
    
        $kamay =$_POST["kamay"];
    $poy =$_POST["poy"];
    
      echo "<card id=\"main\" title=\"Jack en Poy\">";
      echo "<p align=\"center\">";
      //$uid = getuid_sid($sid);
    
     if($uid==$who)
                            {
         echo "Dont be so stupid to challenge your self!<br/>";
     }else{
     $gpsf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
      $gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
     $number = mysql_fetch_array(mysql_query("SELECT hand, bet FROM ibwf_jnp WHERE id='".$poy."'"));
    $number2 = $number[0];
    $bet2 = $number[1];
    $plus = $number[1];
    if($gpsf[0]>=$bet2)
    {
     if($gpst[0]>=$bet2)
    {
    $unick = getnick_uid($uid);
    
    if ($kamay=="1")
    {
    $pchoice = "Paper";
    if ($number2 =="1")
    {
                            $cchoice = "Paper";
    
                            echo_scores2($uid,$poy,$pchoice,$cchoice,drew);
                            $msg = "Challenge draw with $unick!"."";
                            autopm($msg, $who);
      mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
    
    
                        }
    else if ($number2 =="2")
    {
    
                            $cchoice = "Scissors";
                          echo_scores2($uid,$poy,$pchoice,$cchoice,lost);
                   mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$uid."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$who."'");
              echo "$number[1] plusses has been deducted to your account";
                    $msg = "You won against $unick in your jack en poy challenge and you've got $plus plusses."."";
                            autopm($msg, $who);
                          mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
     }
    else if ($number2 =="3")
    {
    
                            $cchoice = "Rock";
                         echo_scores2($uid,$poy,$pchoice,$cchoice,won);
                       mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$who."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$uid."'");
              echo "You won $plus plusses added to your account!";
                    $msg = "You lose against $unick $number[1] plusses has been deducted from your account!"."";
                            autopm($msg, $who);
                      mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                      }
    else if ($number2 =="")
    {
    
              echo "Not in game!";
    
                      }
    }
    if ($kamay=="2")
    {
            $pchoice = "Scissors";
    if ($number2 =="1")
    {
    
                            $cchoice = "Paper";
                        echo_scores2($uid,$poy,$pchoice,$cchoice,won);
    
                         mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$who."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$uid."'");
              echo "You won $plus plusses added to your account!";
                    $msg = "You lose against by $unick $number[1] plusses has been deducted from your account!"."";
                            autopm($msg, $who);
                      mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                        }
    else if ($number2 =="2")
     {
                            $cchoice = "Scissors";
                         echo_scores2($uid,$poy,$pchoice,$cchoice,drew);
                       $msg = "Challenge draw with $unick!"."";
                            autopm($msg, $who);
                        mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
    
                        }
    else if ($number2 =="3")
    {
    
                            $cchoice = "Rock";
                          echo_scores2($uid,$poy,$pchoice,$cchoice,lost);
                       mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$uid."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$who."'");
    
                    $msg = "You won against $unick in your jack en poy challenge and you've got $plus plusses."."";
                            autopm($msg, $who);
    
                 mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                 }
    else if ($number2 =="")
    {
    
              echo "Not in game!";
    
                      }
    }
    if ($kamay=="3")
    {
            $pchoice = "Rock";
    if ($number2 =="1")
    {
    
                            $cchoice = "Paper";
                            echo_scores2($uid,$poy,$pchoice,$cchoice,lost);
                        mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$uid."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$who."'");
    
                    $msg = "You won against $unick in your jack en poy challenge and you've got $plus plusses."."";
                            autopm($msg, $who);
                     mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                     }
    else if ($number2 =="2")
    {
    
                            $cchoice = "Scissors";
                             echo_scores2($uid,$poy,$pchoice,$cchoice,won);
    
                        mysql_query("UPDATE ibwf_users SET plusses=plusses-'$number[1]' WHERE id='".$who."'");
                    mysql_query("UPDATE ibwf_users SET plusses=plusses+'$plus' WHERE id='".$uid."'");
              echo "You won $plus plusses added to your account!";
                    $msg = "You lose against $unick $number[1] plusses has been deducted from your account!"."";
                            autopm($msg, $who);
                         mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                        }
    else if ($number2 =="3") {
                            $cchoice = "Rock";
                            echo_scores2($uid,$poy,$pchoice,$cchoice,drew);
                         mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                     $msg = "Challenge draw with $unick!"."";
                            autopm($msg, $who);
                              }
    else if ($number2 =="")
    {
    
              echo "Not in game!";
    
                      }
    }
    if ($kamay == 0) {
      if($kamay==0)
                {
                  $msg = "declined";
                }else{
                    $msg = "";
                }
    echo "Challenge declined!<br/>";
    
                  $msg = "".getnick_uid(getuid_sid($sid))." has $msg to your jack en poy challenge!"."";
                            autopm($msg, $who);
    mysql_query("DELETE FROM ibwf_jnp WHERE touid='".$uid."' AND byuid='".$who."'");
    
        }
          }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
    
                  $msg = "Either you Or the recipient has insufficient plusses to complete this request!"."";
                            autopm($msg, $who);
    mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
            }
            }else{
              echo "Either you Or the recipient has insufficient plusses to complete this request!<br/>";
            }
       }
    echo "<br/><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
      echo "</p>";
      echo "</card>";
    }
    if($action=="sendpm")
    {
      echo "<card id=\"main\" title=\"Chat INBOX\">";
      echo "<p align=\"center\">";
     $pmtext = $_POST["pmtext"];
     $whonick = getnick_uid($who);
      $byuid = getuid_sid($sid);
      $tm = time();
      $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
      $pmfl = $lastpm[0]+getpmaf();
      if($byuid==1)$pmfl=0;
      if($pmfl<$tm)
      {
        if(!isblocked($pmtext,$byuid))
        {
        if((!isignored($byuid, $who))&&(!istrashed($byuid)))
        {
      $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
      }else{
        $res = true;
      }
      if($res)
      {
    
    mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$idn."'");
        echo "PM was sent successfully to $whonick<br/><br/>";
        echo parsepm($pmtext, $sid);
    
      }else{
        echo "Can't Send PM to $whonick<br/><br/>";
      }
      }else{
        $bantime = time() + (7*24*60*60);
    
        echo "Can't Send PM to $whonick<br/><br/>";
        echo "You just sent a link to one of the crapiest 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."'");
      }
      }else{
        $rema = $pmfl - $tm;
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
        echo "Flood control: $rema Seconds<br/><br/>";
      }
      echo "<br/><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
    $plc = mysql_fetch_array(mysql_query("SELECT saan FROM ibwf_users WHERE id='".$uid."'"));
    
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "Home</a>";
      echo "</p>";
        echo "</card>";
    }
       else if ($action=="reset")
    {
    
    
            echo "<card id=\"main\" title=\"Reset\">";
            echo "<p align=\"center\">DATA Reset Successfully";
            mysql_query("DELETE FROM ibwf_jnp WHERE byuid='".$uid."'");
          echo "<br/><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;type=send&amp;time=$time\">back to room</a><br/>";
            echo "</p></card>";
                      }
    because in the url is action=jnpc
    but im not sure
    Did I help you?
    You can help me too
    Your donations will help me finance my studies.

    #2
    change this
    if($bet<=19)

    Comment


      #3
      try to use wap.net.ph script, it has jnp wml and xhtml
      LDSWAPWORLD sigpic
      site closed.
      im busy with other things in life like facebook , send me PM so i can add you
      www.pinoySG.com

      don't ask for help if you're not even helping yourself!
      i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


      Comment


        #4
        ..now its working, i edit some of my code, heheh
        Did I help you?
        You can help me too
        Your donations will help me finance my studies.

        Comment

        Working...
        X