heres the chat script
PHP Code:
<?php
include("config.php");
include("core.php");
//session_start();
//header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head><title>pinoykindat.net</title>";
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
$rid=$_GET["rid"];
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"pinoykindat.net:)\">
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"></head>";
echo "<body>";
connectdb();
$action=$_GET["action"];
$id=$_GET["id"];
$sid = $_GET["sid"];
$rid=$_GET["rid"];
$rpw=$_GET["rpw"];
$chat=$_GET["chat"];
$who=$_GET["who"];
$unick=$_GET["unick"];
$uid = getuid_sid($sid);
$spin=$_GET["spin"];
$idn=$_GET["idn"];
$cancel=$_GET["cancel"];
$uexist = isuser($uid);
$time = date('dmHis');
if((islogged($sid)==false)||!$uexist)
{
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 "</body>";
echo "</html>";
exit();
}
if(isbanned($uid))
{
echo "<p align=\"center\">";
echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";
echo "You are <b>Banned</b><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg<br/><br/>";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE id='".$rid."'"));
if($isroom[0]==0)
{
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&sid=$sid&type=send&browse?start\">Chatrooms</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$passworded = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'"));
if($passworded[0]!="")
{
if($rpw!=$passworded[0])
{
echo "<p align=\"center\">";
echo "You can't enter this room<br/>";
echo "Stay away<br/><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid&type=send&browse?start\">Chatrooms</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
}
if(!canenter($rid,$sid))
{
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&sid=$sid\">Chatrooms</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
if(!inside($uid, $rid))
{
if(!iscowner($uid, $rid))
{
if(locked($uid, $rid))
{
echo "<p align=\"center\">";
echo "This room is locked!<br/>";
echo ":P Stay outside<br/><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid&type=send&browse?start\">Chatrooms</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
}
}
if(kick($uid, $rid))
{
echo "<p align=\"center\">";
echo "You have been kicked from this room hekhek!<br/>";
echo ":P Stay outside<br/><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid&type=send&browse?start\">Chatrooms</a>";
echo "</p>";
echo "</body>";
echo "</html>";
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."");
if ($action=="")
{
//start of main card
echo "<meta http-equiv=\"refresh\" content=\"20; URL= chat.php?action=$action&sid=$sid&rid=$rid\"/>";
echo "<timer value=\"200\"/><p align=\"left\">";
addonline($uid,"Chatrooms","");
addplace($uid,"chat.php?rid=$rid&rpw=$rpw","");
echo "<small>
<a href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">Write</a><br/>";
echo "<a href=\"chat.php?time=";
echo date('dmHis');
echo "&sid=$sid&rid=$rid&rpw=$rpw";
echo "\">Refresh</a><br/>";
if(iscowner($uid, $rid))
{
if(!locked($uid, $rid))
{
echo "<a href=\"genproc.php?action=lock&sid=$sid&rid=$rid&browse?start\">Lock</a><br/>";
}else{
echo "<a href=\"genproc.php?action=unlock&sid=$sid&rid=$rid&browse?start\">Unlock</a><br/>";
}
}
if(have())
{
if($rid==804)
{
$range_result = mysql_query( " SELECT MAX(`id`) AS max_id , MIN(`id`) AS min_id FROM `ibwf_quiz` ");
$range_row = mysql_fetch_object( $range_result );
$random = mt_rand( $range_row->min_id , $range_row->max_id );
$result = mysql_query( " SELECT question, answer, id FROM `ibwf_quiz` WHERE `id` >= $random LIMIT 0,1 ");
while($rpgds=mysql_fetch_array($result))
{
$winner =$rpgds[0];
$winner2 =$rpgds[1];
}
$tm = time();
$time = mysql_fetch_array(mysql_query("SELECT MAX(displaytime) FROM ibwf_quizrooms ORDER by id LIMIT 1"));
$pmfl = $time[0]+60;
if($pmfl<$tm)
{
mysql_query("INSERT INTO ibwf_chat SET chatter='133', who='', timesent='".time()."', msgtext='Nobody got the correct answer. Next question.', rid='".$rid."';");
mysql_query("INSERT INTO ibwf_quizrooms SET displaytime='".time()."', question='".$winner."', answer='".$winner2."';");
}else{
$quiz = mysql_query("SELECT question, answer, id FROM ibwf_quizrooms ORDER BY id DESC LIMIT 1");
while($rpgds=mysql_fetch_array($quiz))
{
$question =$rpgds[0];
$question2 =$rpgds[1];
$question3 =$rpgds[2];
}
echo "system: $question";
$rema = $pmfl - $tm;
if ($rema==60)
{
$kano ="100";
}else if ($rema==59)
{
$kano ="100";
}else if ($rema==58)
{
$kano ="90";
}else if ($rema==57)
{
$kano ="90";
}else if ($rema==56)
{
$kano ="80";
}else if ($rema==55)
{
$kano ="80";
}else if ($rema==54)
{
$kano ="80";
}else if ($rema==53)
{
$kano ="70";
}else if ($rema==52)
{
$kano ="70";
}else if ($rema==51)
{
$kano ="60";
}else if ($rema==50)
{
$kano ="50";
}else if ($rema==49)
{
$kano ="40";
}else if ($rema==48)
{
$kano ="40";
}else if ($rema==47)
{
$kano ="40";
}else if ($rema==46)
{
$kano ="40";
}else if ($rema==45)
{
$kano ="38";
}else if ($rema==44)
{
$kano ="38";
}else if ($rema==43)
{
$kano ="38";
}else if ($rema==42)
{
$kano ="38";
}else if ($rema==41)
{
$kano ="35";
}else if ($rema==40)
{
$kano ="35";
}else if ($rema==39)
{
$kano ="35";
}else if ($rema==38)
{
$kano ="35";
}else if ($rema==37)
{
$kano ="35";
}else if ($rema==36)
{
$kano ="35";
}else if ($rema==35)
{
$kano ="35";
}else if ($rema==34)
{
$kano ="35";
}else if ($rema==33)
{
$kano ="35";
}else if ($rema==32)
{
$kano ="35";
}else if ($rema==31)
{
$kano ="33";
}else if ($rema==30)
{
$kano ="33";
}else if ($rema==29)
{
$kano ="33";
}else if ($rema==28)
{
$kano ="33";
}else if ($rema==27)
{
$kano ="33";
}else if ($rema==26)
{
$kano ="33";
}else if ($rema==25)
{
$kano ="33";
}else if ($rema==24)
{
$kano ="30";
}else if ($rema==23)
{
$kano ="30";
}else if ($rema==22)
{
$kano ="30";
}else if ($rema==21)
{
$kano ="26";
}else if ($rema==20)
{
$kano ="26";
}else if ($rema==19)
{
$kano ="26";
}else if ($rema==18)
{
$kano ="26";
}else if ($rema==17)
{
$kano ="25";
}else if ($rema==16)
{
$kano ="25";
}else if ($rema==15)
{
$kano ="25";
}else if ($rema==14)
{
$kano ="20";
}else if ($rema==13)
{
$kano ="20";
}else if ($rema==12)
{
$kano ="20";
}else if ($rema==11)
{
$kano ="20";
}else if ($rema==10)
{
$kano ="18";
}else if ($rema==9)
{
$kano ="17";
}else if ($rema==8)
{
$kano ="17";
}else if ($rema==7)
{
$kano ="16";
}else if ($rema==6)
{
$kano ="15";
}else if ($rema==5)
{
$kano ="13";
}else if ($rema==4)
{
$kano ="10";
}else if ($rema==3)
{
$kano ="6";
}else if ($rema==2)
{
$kano ="5";
}else if ($rema==1)
{
$kano ="4";
}else if ($rema==0)
{
$kano ="0";
}
echo " Time Left to answer:$rema seconds.REWARD: $kano Plusses and GP.";
}
}
}
if($rid==182)
{
echo "<a href=\"chat.php?action=reset&sid=$sid&rid=182\">CLEAR DATA</a><br/>";
}
if($rid==454)
{
$tries2 = mysql_fetch_array(mysql_query("SELECT cards FROM ibwf_spincard"));
$mama2= $tries2[0];
if($mama2>0)
{
if($spin==1)
{
$tm = time();
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(spintime) FROM ibwf_users WHERE id='".$uid."'"));
$pmfl = $lastpm[0]+15;
if($pmfl<$tm)
{
}else{
$rema = $pmfl - $tm;
echo "Chat system:»*you can spin cards again after <b>$rema</b> seconds.*<br/>";
}
if(!spinned($uid))
{
$rpgd = mysql_query("SELECT id, no FROM ibwf_getcards ORDER by RAND() LIMIT 1");
while($rpgds=mysql_fetch_array($rpgd))
{
$cards =$rpgds[1];
}
if(getplusses(getuid_sid($sid))<10)
{
echo "You need 10 plusses in order to spin the wheel!";
}else{
mysql_query("UPDATE ibwf_users SET cards=cards+'$cards' WHERE id='".$uid."'");
mysql_query("UPDATE ibwf_spincard SET cards=cards-'$cards'");
mysql_query("UPDATE ibwf_users SET plusses=plusses-'1' WHERE id='".$uid."'");
mysql_query("UPDATE ibwf_users SET spintime='".time()."' WHERE id='".$uid."'");
mysql_query("UPDATE ibwf_users SET spinned='1' WHERE id='".$uid."'");
$mycards = mysql_fetch_array(mysql_query("SELECT cards FROM ibwf_users WHERE id='".$uid."'"));
echo "Chat system:»*you got $cards card(s) for that spin wait after 20 sec to spin cards again. You have $mycards[0] total of cards.*<br/>";
}
}
}else{
$tm = time();
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(spintime) FROM ibwf_users WHERE id='".$uid."'"));
$pmfl = $lastpm[0]+20;
if($pmfl<$tm)
{
mysql_query("UPDATE ibwf_users SET spinned='0' WHERE id='".$uid."'");
$cinfo = mysql_fetch_array(mysql_query("SELECT cards from ibwf_spincard"));
echo "<a href=\"index.php?action=viewuser&who=133&sid=$sid\">system</a>»There are $cinfo[0] remaining cards. Click <a href=\"chat.php?spin=1&sid=$sid&rid=$rid\">spin the wheel</a> spin cards to get some cards. Each spin will cost 1 plusses, if you got the highest number of cards after the remaining cards goes to zero, you will get the 1000 plusses prize more info for game info.<br/>";
}else{
$rema = $pmfl - $tm;
echo "Chat system:»*you can spin cards again after <b>$rema</b> seconds.*<br/>";
}
}
}else{
$rpgd = mysql_query("SELECT id, cards FROM ibwf_users ORDER by cards DESC LIMIT 1");
while($rpgds=mysql_fetch_array($rpgd))
{
$winner =$rpgds[0];
$winner2 =$rpgds[1];
}
$unick2 = getnick_uid($winner);
mysql_query("UPDATE ibwf_spincard SET cards='500'");
mysql_query("INSERT INTO ibwf_chat SET chatter='133', timesent='".time()."', msgtext='$unick2 got $winner2 cards, and the 1000 plusses prize', perm='".$perm[0]."', rid='".$rid."';");
mysql_query("UPDATE ibwf_users SET plusses=plusses+'1000' WHERE id='".$winner."'");
mysql_query("UPDATE ibwf_users SET cards='0'");
mysql_query("UPDATE ibwf_users SET spintime='0'");
}
}
if($cancel==1)
{
mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$idn."'");
}
$unreadinbox=mysql_fetch_array(mysql_query("SELECT byuid, text, id FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
$unrd="(".$unreadinbox[0]."/".$pmtotl[0].")";
if ($unreadinbox[0]>0)
{
$text = parsepm($unreadinbox[1], $sid);
$by = getnick_uid($unreadinbox[0]);
echo "<b>$by: </b>$text<br/>";
echo "REPLY:<br/>";
echo "<form action=\"chat.php?action=sendpm&who=$unreadinbox[0]&sid=$sid&rid=$rid\" method=\"post\">";
echo "<input name=\"pmtext\" maxlength=\"500\"/><br/>";
echo "<input type=\"submit\" value=\"Send\"/>";
echo "</form>";
echo "<br/><a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw&cancel=1&idn=$unreadinbox[2]&time=$time\">Cancel</a>";
}
if($rid==182)
{
$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 "<form action=\"chat.php?action=jnp&sid=$sid&rid=$rid&time=$time\" method=\"post\">";
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 "<input type=\"hidden\" name=\"who\" value=\"$ncl[2]\"/>";
echo "<input type=\"hidden\" name=\"poy\" value=\"$ncl[0]\"/>";
echo "<input type=\"submit\" value=\"Send\"/>";
echo "</form>";
}
}
$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
$unrd="(".$unreadinbox[0]."/".$pmtotl[0].")";
if ($unreadinbox[0]>0)
{
echo "<br/><a href=\"inbox.php?action=main&sid=$sid\">Inbox$unrd</a>";
}
echo "</small></p>";
$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($nosm[0]==0){
$perm = mysql_fetch_array(mysql_query("SELECT perm, id FROM ibwf_users WHERE perm>'0' AND id='".$uid."'"));
if($rid==804)
{
$tid = correct($message,$question3);
if($tid==0)
{
$by = getnick_uid($uid);
mysql_query("INSERT INTO ibwf_chat SET chatter='133', timesent='".time()."', msgtext='$by sorry your answer is incorrect.Please try again', rid='".$rid."'");
mysql_query("UPDATE ibwf_users SET plusses=plusses-'3' WHERE id='".$uid."'");
}else{
$range_result = mysql_query( " SELECT MAX(`id`) AS max_id , MIN(`id`) AS min_id FROM `ibwf_quiz` ");
$range_row = mysql_fetch_object( $range_result );
$random = mt_rand( $range_row->min_id , $range_row->max_id );
$result = mysql_query( " SELECT question, answer, id FROM `ibwf_quiz` WHERE `id` >= $random LIMIT 0,1 ");
while($rpgds=mysql_fetch_array($result))
{
$winner =$rpgds[0];
$winner2 =$rpgds[1];
}
mysql_query("DELETE FROM ibwf_quiz WHERE id='".$question3."'");
mysql_query("INSERT INTO ibwf_quizrooms SET displaytime='".time()."', question='".$winner."', answer='".$winner2."';");
$by = getnick_uid($uid);
mysql_query("INSERT INTO ibwf_chat SET chatter='133', who='".$who."', timesent='".time()."', msgtext='$by you are correct. [b]$message [/b] you got $kano plusses. Next question', rid='".$rid."'");
mysql_query("UPDATE ibwf_users SET plusses=plusses+'$kano' WHERE id='".$uid."'");
mysql_query("UPDATE ibwf_users SET gplus=gplus+'$kano' WHERE id='".$uid."'");
mysql_query("DELETE FROM ibwf_quizrooms WHERE id='".$question3."'");
}
}
$chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='".$uid."', who='".$who."', timesent='".time()."', msgtext='".$message."', perm='".$perm[0]."', 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."'");
if($rid!==454)
{
if($rid!==182)
{
$hehe2=mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
$totl2 = $hehe2[0]+1;
$msgst2= mysql_query("UPDATE ibwf_users SET plusses='".$totl2."' WHERE id='".$uid."'");
}
}
if($rinfo[1]==2)
{
//oh damn i gotta post this message to ravebabe :(
//will it succeed?
$botid = "f71659fb4e369b0f";
$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='14', who='', timesent='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
}
}
$message = "";
}
echo "<p>";
echo "<small>";
$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<20)
{
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[5]==3)
{
$chat[5] = "¹";
}else if($chat[5]==2)
{
$chat[5] = "²";
}else if($chat[5]==1)
{
$chat[5] = "³";
}else if($chat[5]==0)
{
$chat[5] = "";
}
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))
{
echo "<br/>";
$chnick = getnick_uid($chat[0]);
echo "<b>Chat system:»<i>*i love you! $chnick, pinoykindat.net*</i></b><br/>";
}
else if($nos>2){
echo "<br/>";
$chnick = getnick_uid($chat[0]);
echo "<b>Chat system:»<i>*hey are u ok? $chnick, you can only use 2 smilies per msg*</i></b><br/>";
}else{
$sres = substr($chat[3],0,3);
if($sres == "/me")
{
$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{
$tosay = parsepm($chat[3], $sid);
if($rinfo[0]==1)
{
$tosay = str_replace("****","*this word rhymes with duck*",$tosay);
$tosay = str_replace("****","*dont swear*",$tosay);
$tosay = str_replace("dick","*ooo! you dirty person*",$tosay);
$tosay = str_replace("pussy","*angel flaps*",$tosay);
$tosay = str_replace("cock","*daddy stick*",$tosay);
$tosay = str_replace("can i be a mod","*im sniffing staffs ass*",$tosay);
$tosay = str_replace("can i be admin","*im a big ass kisser*",$tosay);
$tosay = str_replace("ginger","*the cute arsonist*",$tosay);
$tosay = str_replace("neon","*the cute but evil princess*",$tosay);
$tosay = str_replace("kaas","*the cheese boy*",$tosay);
$tosay = str_replace("slut","*s+m freak*",$tosay);
$tosay = str_replace("kahla","*lyrical lizard*",$tosay);
}
if($rinfo[1]==1)
{
$tosay = htmlspecialchars($chat[3]);
$tosay = strrev($tosay);
}
echo "<br/><a href=\"chat.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink$chat[5]</a>:$tosay";
}
}
$counter++;
}
}
}
echo "</small>";
echo "</p>";
echo "<p align=\"left\">";
echo "<a href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">Write</a><br/>";
echo "<a href=\"chat.php?time=";
echo date('dmHis');
echo "&sid=$sid&rid=$rid&rpw=$rpw";
echo "\">Refresh</a>";
if(ismod($uid))
{
echo "<a href=\"lists.php?action=kicklist&sid=$sid&rid=$rid\">----Kick List</a>";
}
$chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
echo "<br/><a href=\"chat.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">Who's Inside($chatters[0])</a><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\"> Chatrooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main Menu</a><br/>";
/* editable area */
if(!$partnerid) $partnerid = 11004; // put your partnerID here
$alternate_link = ''; // use this to set a default link if no ad returned
/* end editable area */
//used for ad targeting
$ua = urlencode($_SERVER['HTTP_USER_AGENT']);
$ip = urlencode($_SERVER['REMOTE_ADDR']);
$url = 'http://ads.buzzcity.com/show.php?get=1&partnerid=' .
$partnerid . '&a=' . $ua . '&i='.$ip;
@$ad_serve = fopen($url,'r');
$contents = '';
if ($ad_serve) {
while (!feof($ad_serve))
$contents .= fread($ad_serve,1024);
fclose($ad_serve);
}
$link = explode("\n",$contents);
$text = $link[0];
$cid = $link[1];
if ( isset($link) && !empty($link) ) {
//display BuzzCity Ad
echo '<a href="http://click.buzzcity.com/click.php?partnerid=' .
$partnerid . '&cid=' . $cid . '">' . $text . '</a>';
}
else {
//no BuzzCity ad, display alternate
echo $alternate_link;
}
echo "<br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "</body>";
}
/////////////////////////////////////////////////////SAY
else if ($action=="options") {
addonline($uid,"Chatroom Options","");
echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
echo "<p>Message:<input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
echo "<input type=\"submit\" value=\"Say\"/>";
echo "</form><br/>";
echo "<small><a href=\"lists.php?action=chmood&sid=$sid&page=1\">»Chat mood</a></small><br/>";
echo "<small><a href=\"chat.php?action=smilies&sid=$sid&rid=$rid&rpw=$rpw\">»Smilies</a></small><br/>";
echo "<small><a href=\"chat.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">»Who's Inside</a></small><br/>";
echo "<small><a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">«Chatroom</a></small></p>";
//end
echo "<p align=\"center\"><a href=\"index.php?action=chat&sid=$sid\"><img src=\"../images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "</body>";
}
else if ($action=="say") {
addonline($uid,"Writing Chat Message","");
echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
echo "<p>Message:<input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
echo "<input type=\"submit\" value=\"Say\"/>";
echo "</form><br/>";
//echo "<small><a href=\"lists.php?action=chmood&sid=$sid&page=1\">»Chat mood</a></small><br/>";
//echo "<small><a href=\"chat.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">»Who's Inside</a></small><br/>";
echo "<small><a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back to room</a></small></p>";
//end
echo "<p align=\"center\"><a href=\"index.php?action=chat&sid=$sid\"><img src=\"../images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "</body>";
}
////////////////////////////////////////////
/////////////////////////////////////////////////////SAY2
else if ($action=="say2") {
echo "<p align=\"center\">";
$unick = getnick_uid($who);
echo "<b>Private to $unick</b>";
echo "</p>";
echo "<p align=\"left\">";
addonline($uid,"Writing chat message","");
if($rid==182)
{
echo "<form action=\"chat.php?action=jnpc&sid=$sid&rid=$rid&time=$time\" method=\"post\">";
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 "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
echo "<input type=\"submit\" value=\"Send\"/>";
echo "</form>";
}
echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
echo "Message:<input name=\"message\" type=\"text\" value=\" \" maxlength=\"255\"/><br/>";
echo "<input type=\"submit\" value=\"Say\"/>";
echo "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
echo "</form>";
echo "<small><a href=\"index.php?action=viewuser&sid=$sid&who=$who\">»View $unick's Profile</a></small><br/>";
echo "<small><a href=\"chat.php?action=expose&sid=$sid&who=$who&rid=$rid&rpw=$rpw\">»Expose $unick</a></small><br/>";
if(iscowner($uid, $rid))
{
if(!kick($who, $rid))
{
echo "<a href=\"genproc.php?action=kick&sid=$sid&who=$who&rid=$rid\">»Kick</a><br/>";
}else{
echo "<a href=\"genproc.php?action=unkick&sid=$sid&who=$who&rid=$rid\">»Unkick</a><br/>";
}
}
echo "<small><a href=\"chat.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">»Who's Inside</a></small><br/>";
echo "<small><a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back to room</a></small></p>";
//end
echo "<p align=\"center\"><a href=\"index.php?action=chat&sid=$sid\"><img src=\"../images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "</body>";
}
////////////////////////////////////////////
//////////////////////////////inside//////////
else if ($action=="inside") {
addonline($uid,"Chat inside list","");
echo "<card id=\"main\" title=\"Inside list\">";
echo "<p align=\"left\"><br/>";
$inside=mysql_query("SELECT DISTINCT * FROM ibwf_chonline WHERE rid='".$rid."' and uid IS NOT NULL");
while($ins=mysql_fetch_array($inside))
{
$who = $ins[1];
$noi = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$var1 = date("His",$noi[0]);
$var2 = time();
$var21 = date("His",$var2);
$var3 = $var21 - $var1;
$var4 = date("s",$var3);
$remain = time() - $noi[0];
$idle = gettimemsg($remain);
$idle2 = "- idle:";
$unick = getnick_uid($ins[1]);
$userl = "<small><a href=\"chat.php?action=say2&sid=$sid&who=$ins[1]&rid=$rid&rpw=$rpw\">$unick</a> $idle2 $idle<br/></small>";
echo "$userl";
}
echo "<br/><br/>";
echo "<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back to room</a><br/>";
echo "<br/><a href=\"index.php?action=chat&sid=$sid\"><img src=\"../images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "</body>";
}
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 "<br/><br/>";
echo "<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back to room</a><br/>";
echo "<br/><a href=\"index.php?action=chat&sid=$sid\"><img src=\"../images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "</body>";
}
//////////////////////////////////Smilies :)
else if($action=="smilies")
{
addonline(getuid_sid($sid),"Viewing The Smilies List","");
echo "<small><a href=\"chat.php?action=options&sid=$sid&rid=$rid&rpw=$rpw\">Options</a>, ";
echo "<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Chatroom</a><br/></small>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_smilies"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT id, scode, imgsrc FROM ibwf_smilies ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isadmin(getuid_sid($sid)))
{
$delsl = "<a href=\"admproc.php?action=delsm&sid=$sid&smid=$item[0]\">[x]</a>";
}else{
$delsl = "";
}
echo "$item[1] » ";
echo "<img src=\"$item[2]\" alt=\"$item[1]\"/> $delsl<br/>";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"lists.php?action=smilies&page=$ppage&sid=$sid&rid=$rid&rpw=$rpw\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"chat.php?action=smilies&page=$npage&sid=$sid&rid=$rid&rpw=$rpw\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"chat.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"rid\" value=\"$rid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "</body>";
}
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&rid=$rid&rpw=$rpw&type=send&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."'");
}
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 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&rid=$rid&rpw=$rpw&type=send&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&rid=$rid&rpw=$rpw&type=send&time=$time\">back to room</a><br/>";
echo "</p></body>";
}
if($action=="sendpm")
{
$pmtext = $_POST["pmtext"];
echo "<p align=\"center\">";
$whonick = getnick_uid($who);
$byuid = getuid_sid($sid);
if(($pmtext==""))
{
echo "Dont leave them empty!";
}else{
$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&rid=$rid&rpw=$rpw&type=send&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&sid=$sid\">";
echo "Home</a>";
echo "</p>";
echo "</body>";
}
?>
</html>
Comment