jack en poy (chatroom)

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

    #16
    Originally posted by huwad View Post
    yup.. Ived seen it.. you're right.. its mobilezonez.. using boxstart.. but I dont use boxstart coz of lower model phones does not support it..
    supported.... not supported....
    thats why mobilezonez edit got also lo-fi version...
    beside... boxstart/boxend is perfectly valid by w3c
    and that only counts actually
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    Comment


      #17
      lol sooner or later old phone models will be phased out so i really dont mind if they are supported or not. but anyway, im planning to change the layout/css just for the sake of those
      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


        #18
        Originally posted by metulj View Post
        supported.... not supported....
        thats why mobilezonez edit got also lo-fi version...
        beside... boxstart/boxend is perfectly valid by w3c
        and that only counts actually
        wml has no themes.. :D

        Comment


          #19
          Originally posted by capofret View Post
          lol sooner or later old phone models will be phased out so i really dont mind if they are supported or not. but anyway, im planning to change the layout/css just for the sake of those
          so? It only means that your site is not user friendly,, ayt??

          Comment


            #20
            Additional

            add this to chat.php after else if ($action=="say2")

            Code:
            ///////////////JNP PROC////////////////
            
            
            
                else if ($action=="jnpc")         
              {
             $who = $_POST["who"];
                      $bet =$_POST["bet"];
                $kamay =$_POST["kamay"];
            $tnick = getnick_uid($who);
              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 "</body>";
            }
              else if ($action=="jnp")         
              {
             $who = $_POST["who"];
                    
                $kamay =$_POST["kamay"];
            $poy =$_POST["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 defeated $unick in your jack en poy challenge and you 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 defeated by $unick $number[1] plusses has been deducted!"."";
            			autopm($msg, $who);
                              mysql_query("DELETE FROM ibwf_jnp WHERE id='".$poy."'");
                              }
            {
                     
                      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 defeated by $unick $number[1] plusses has been deducted!"."";
            			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 defeated $unick in your jack en poy challenge and you 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 defeated $unick in your jack en poy challenge and you 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 defeated by $unick $number[1] plusses has been deducted!"."";
            			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 "</body>";
            }
               else if ($action=="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></body>";
                              }    
            
            
            //////////////////////////////////////
            Last edited by huwad; 12.06.09, 04:06.

            Comment


              #21
              Thanks!

              Thank you so much huwad for this nice script.. 2thumbsup for you..
              LESS TALK. LESS MISTAKE.

              HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

              Comment


                #22
                Thanx 4 d script

                Comment


                  #23
                  Huwad thanks for this script.

                  Comment


                    #24
                    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"];
                    $rpw=$_GET["rpw"];
                    $uid = getuid_sid($sid);
                    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
                    $sitename = $sitename[0];  
                    $uexist = isuser($uid);
                    
                    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/>";
                    
                            $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=\"chat.php?action=say&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">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>";
                            
                            addonline($uid,"Writing chat 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>";
                    }
                    /////////////////////////////////////////////////////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>
                    this is my chat.php

                    hOw can i insert the jnp code here?
                    Did I help you?
                    You can help me too
                    Your donations will help me finance my studies.

                    Comment

                    Working...
                    X