<?php
include("core.php");
include("config.php");
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\">";
$addy = "wapirate.net";
connectdb();
$action=$_GET["action"];
$id=$_GET["id"];
$sid = $_GET["sid"];
$rid=$_GET["rid"];
$rpw=$_GET["rpw"];
$uid = getuid_sid($sid);
$who = $_GET["who"];
$uexist = isuser($uid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
if((islogged($sid)==false)||!$uexist)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
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 "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
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 "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
$isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM quiz_rooms WHERE id='".$rid."'"));
if($isroom[0]==0)
{
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Games Rooms!<br/></div>";
echo "<p align=\"center\">";
echo "<img src=\"/images/Quiz.gif\" alt=\"*\"/><br/>";
echo "<br/>";
$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".getuid_sid($sid)."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".getuid_sid($sid)."'"));
$unrd="[".$unreadinbox[0]."/".$pmtotl[0]."]";
echo "<a href=\"inbox6.php?action=main&sid=$sid&page=1\">Inbox $unrd</a><br/><br/> ";
$rooms = mysql_query("SELECT id, name, perms, mage, chposts FROM quiz_rooms WHERE static='1' AND clubid='0'");
while ($room= mysql_fetch_array($rooms)){
if(canenter($room[0], $sid)){
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM quiz_chonline WHERE rid='".$room[0]."'"));
echo "<a href=\"quiz.php?sid=$sid&rid=$room[0]\">$room[1] [$noi[0]]</a><br/>";
}
}
echo "<br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a><br/>";
echo "</p>";
echo "<div>$addy</div>";
exit();
}
///////////////////////////////
$passworded = mysql_fetch_array(mysql_query("SELECT pass FROM quiz_rooms WHERE id='".$rid."'"));
if($passworded[0]!="")
{
if($rpw!=$passworded[0])
{
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
echo "<p align=\"center\">";
echo "You can't enter this room<br/>";
echo ":P stay away<br/><br/>";
echo "<a href=\"quiz.php?sid=$sid\">Gamesrooms</a>";
echo "</p>";
echo "<div>$addy</div>";
exit();
}
}
if(!canenter($rid,$sid))
{
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
echo "<timer value=\"200\"/><p align=\"center\">";
echo "You can't enter this room<br/>";
echo ":P stay away<br/><br/>";
echo "<a href=\"quiz.php?sid=$sid\">Gamesrooms</a>";
echo "</p>";
echo "<div>$addy</div>";
exit();
}
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<meta http-equiv=\"refresh\" content=\"20; quiz.php?sid=$sid&rid=$rid&rpw=$rpw\">";
addtoquiz($uid, $rid);
$timeto = 300;
$timenw = time();
$timeout = $timenw-$timeto;
$deleted = mysql_query("DELETE FROM quiz_chat WHERE timesent<".$timeout."");
if ($action=="")
{
//start of main card
if($rid=="1"){
echo "<div><br/>Quiz<br/></div>";
}else if($rid=="2"){
echo "<div><br/>Scramble<br/></div>";
}
echo "<p align=\"center\">";
addonline($uid,"Games rooms","");
$message=$_POST["message"];
$who = $_POST["who"];
$chnick=$_POST["xnick"];
$who = $_POST["who"];
$timo = time();
$tim = $timo + 90;
$timx = $tim - 60;
if($rid==1){//////////////////////quiz start////////
$quiz = mysql_fetch_array(mysql_query("SELECT time, question, answer, points FROM quiztime WHERE id='1'"));
$win = mysql_fetch_array(mysql_query("SELECT win, spare2, spare1 FROM quizwin WHERE id='1'"));
$chatx = mysql_fetch_array(mysql_query("SELECT chatter, msgtext FROM quiz_chat WHERE rid='".$rid."'"));
$text = parsepm($message, $sid);
$ans = substr_count($text,"$quiz[2]");
if($ans>0){
if($win[1]==1){
$quid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$chnick."'"));
$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$quid[0]."'"));
$ugpl = $ugpl[0] + $quiz[3];
$frogx = mysql_query("UPDATE ibwf_users SET gplus='".$ugpl."' WHERE id='".$quid[0]."'");
$elephantx = mysql_query("UPDATE quizwin SET spare2='0', spare1='0' WHERE id='1'");
}
echo "<b>Correct the answer was $quiz[2].</b><br/><b>$chnick got it right!</b><br/>";
$next = "<b>Correct the answer was $quiz[2].</b><br/><b>$chnick got it right!</b><br/>";
$pigeonx = mysql_query("DELETE FROM quizwin WHERE id='1'");
$fishx = mysql_query("INSERT INTO quizwin SET id='1', win='$next'");
}else if($quiz[3]==0){
echo "$win[0]<br/>Next question!<br/>";
}else if($quiz[3]>0){
if($win[2]==1){
echo "$quiz[1]<br/>Value = $quiz[3] points!<br/>";
}else{
$xin = mysql_fetch_array(mysql_query("SELECT win FROM quizwin WHERE id='1'"));
echo "$xin[0]";
}
}
$timecurrent=date('U');
$pirtime = $quiz[0] - $timecurrent;
if($pirtime<1){
if($win[2]==1){
echo "Time left 0 seconds<br/>";
}else{
echo "<br/>Time left 0 seconds<br/>";
}
}else if($pirtime==1){
echo "Time left 1 second<br/>";
}else{
echo "Time left $pirtime seconds<br/>";
}
if($ans>0){
$timx = $tim - 60;
$dogx = mysql_query("UPDATE quiztime SET time='".$timo."', points='1' WHERE id='1'");
}else
if($pirtime<1){
if($quiz[3]>0){
$timx = $tim - 60;
$chickenx = mysql_query("DELETE FROM quiztime WHERE id='1'");
$rabbitx = mysql_query("INSERT INTO quiztime SET id='1', time='$timx'");
}
else if($quiz[3]==0){
$catx = mysql_query("DELETE FROM quiztime WHERE id='1'");
$nom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM quiz"));
$num = rand(1,$nom[0]);
$wor = mysql_fetch_array(mysql_query("SELECT question, answer, points FROM quiz WHERE id='".$num."'"));
$horsex = mysql_query("INSERT INTO quiztime SET id='1', time='".$tim."', question='".$wor[0]."', answer='".$wor[1]."', points='".$wor[2]."'");
$lionx = mysql_query("DELETE FROM quizwin WHERE id='1'");
$badgerx = mysql_query("INSERT INTO quizwin SET id='1', spare2='1', spare1='1'");
}
}
////////////////////////quiz end/////////////
//////////////////////Scramble start////////
}else if($rid==2){
$quiz = mysql_fetch_array(mysql_query("SELECT time, question, answer, points FROM quiztime WHERE id='2'"));
$win = mysql_fetch_array(mysql_query("SELECT win, spare2, spare1 FROM quizwin WHERE id='2'"));
$chatx = mysql_fetch_array(mysql_query("SELECT chatter, msgtext FROM quiz_chat WHERE rid='".$rid."'"));
$text = parsepm($message, $sid);
$ans = substr_count($text,"$quiz[2]");
if($ans>0){
if($win[1]==1){
$quid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$chnick."'"));
$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$quid[0]."'"));
$ugpl = $ugpl[0] + $quiz[3];
$goatx = mysql_query("UPDATE ibwf_users SET gplus='".$ugpl."' WHERE id='".$quid[0]."'");
$foxx = mysql_query("UPDATE quizwin SET spare2='0', spare1='0' WHERE id='2'");
}
echo "<b>Correct the answer was $quiz[2].</b><br/><b>$chnick got it right!</b><br/>";
$next = "<b>Correct the answer was $quiz[2].</b><br/><b>$chnick got it right!</b><br/>";
$hedgehogx = mysql_query("DELETE FROM quizwin WHERE id='2'");
$mousex = mysql_query("INSERT INTO quizwin SET id='2', win='$next'");
}else if($quiz[3]==0){
echo "$win[0]<br/>Next Word!<br/>";
}else if($quiz[3]>0){
if($win[2]==1){
echo "$quiz[1]<br/>Value = $quiz[3] points!<br/>";
}else{
$xin = mysql_fetch_array(mysql_query("SELECT win FROM quizwin WHERE id='2'"));
echo "$xin[0]";
}
}
$timecurrent=date('U');
$pirtime = $quiz[0] - $timecurrent;
if($pirtime<1){
if($win[2]==1){
echo "Time left 0 seconds<br/>";
}else{
echo "<br/>Time left 0 seconds<br/>";
}
}else if($pirtime==1){
echo "Time left 1 second<br/>";
}else{
echo "Time left $pirtime seconds<br/>";
}
if($ans>0){
$timx = $tim - 60;
$tigerx = mysql_query("UPDATE quiztime SET time='".$timo."', points='1' WHERE id='2'");
}else
if($pirtime<1){
if($quiz[3]>0){
$timx = $tim - 60;
$hamsterx = mysql_query("DELETE FROM quiztime WHERE id='2'");
$crowx = mysql_query("INSERT INTO quiztime SET id='2', time='$timx'");
}
else if($quiz[3]==0){
$spiderx = mysql_query("DELETE FROM quiztime WHERE id='2'");
$nom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM scramble"));
$num = rand(1,$nom[0]);
$wor = mysql_fetch_array(mysql_query("SELECT word FROM scramble WHERE id='".$num."'"));
$word = $wor[0];
$Sword = str_shuffle($word);
$molex = mysql_query("INSERT INTO quiztime SET id='2', time='".$tim."', question='".$Sword."', answer='".$wor[0]."', points='15'");
$rabbitx = mysql_query("DELETE FROM quizwin WHERE id='2'");
$snakex = mysql_query("INSERT INTO quizwin SET id='2', spare2='1', spare1='1'");
}
}
////////////////////////scramble end/////////////
}
echo "<a href=\"quiz.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">write</a>, ";
echo "<a href=\"quiz.php?time=";
echo date('dmHis');
echo "&sid=$sid&rid=$rid&rpw=$rpw";
echo "\">refresh</a>";
$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=\"inbox6.php?action=main&sid=$sid&rid=$rid&rpw=$rpw\">Inbox $unrd</a>";
}
echo "</p>";
$rinfo = mysql_fetch_array(mysql_query("SELECT censord, freaky FROM quiz_rooms WHERE id='".$rid."'"));
if (trim($message) != "")
{
$nosm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM quiz_chat WHERE msgtext='".$message."'"));
if($nosm[0]==0){
$chatok = mysql_query("INSERT INTO quiz_chat SET chatter='".$uid."', who='".$who."', timesent='".time()."', msgtext='".$message."', rid='".$rid."';");
$lstmsg = mysql_query("UPDATE quiz_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($rinfo[1]==2)
{
//oh damn i gotta post this message to ravebabe :(
//will it succeed?
$botid = "a13d14da1e36eb15";
$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 quiz_chat SET chatter='8152', who='', timesent='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
}
}
$message = "";
}
echo "<p>";
$chats = mysql_query("SELECT chatter, who, timesent, msgtext, exposed FROM quiz_chat WHERE rid='".$rid."' ORDER BY timesent DESC, id DESC");
$counter=0;
while($chat = mysql_fetch_array($chats))
{
$canc = true;
if($counter<10)
{
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=");
$inca = parsepm($chat[3], $sid);
$chav = substr_count($inca,"*secret*");
if(isqspam($text))
{
$chnick = getnick_uid($chat[0]);
echo "<b>Pirate Babe:»<i>*Oi! $chnick, no spamming*</i></b><br/>";
}
else if($nos>3){
$chnick = getnick_uid($chat[0]);
echo "<b>Pirate Babe:»<i>*Hey! $chnick, you can only use 3 smileys per msg*</i></b><br/>";
}
else if(isadmin($chat[0])&&$chav>0){
$inca = str_replace("*secret*","",$inca);
echo "<b>PirateBabe:»<i>$inca</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("fuck","f**k",$tosay);
$tosay = str_replace("shit","sh*t",$tosay);
$tosay = str_replace("dick","d**k",$tosay);
$tosay = str_replace("pussy","pu**y",$tosay);
$tosay = str_replace("cock","c**k",$tosay);
$tosay = str_replace("piss ","p*s* ",$tosay);
}
if($rinfo[1]==1)
{
$tosay = htmlspecialchars($chat[3]);
$tosay = strrev($tosay);
}
echo "<a href=\"quiz.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a>»$ds<br/>";
echo $tosay."<br/>";
}
}
$counter++;
}
}
}
echo "</p>";
echo "<p align=\"center\">";
$chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM quiz_chonline where rid='".$rid."'"));
echo "<br/><a href=\"quiz.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">Who's Inside [$chatters[0]]</a><br/>";
echo "<a href=\"quiz.php?sid=$sid\">Games Rooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a></p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
/////////////////////////////////////////////////////SAY
else if ($action=="say") {
addonline($uid,"Games Rooms","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Say<br/></div>";
$xnick = getnick_sid($sid);
echo "<form action=\"quiz.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
echo "<input type=\"Hidden\" name=\"xnick\" value=\"$xnick\">";
echo "Message: <input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
echo "<input type=\"submit\" value=\"Say\"/>";
echo "</form><br/>";
echo "<p align=\"center\">";
echo "<a href=\"lists.php?action=chmood&sid=$sid&page=1\">»Chat Mood</a><br/>";
echo "<a href=\"quiz.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">»Who's Inside</a><br/>";
if(getgold($uid)>20){
echo "<a href=\"lists.php?action=smilies&sid=$sid&ice=1\">»Smileys</a><br/>";
}else{
echo "»Smileys<br/>";
echo "(More Gold Required For Smilie access!)<br/>";
}
if($rid==1){
if(ismod($uid)){
echo "<a href=\"modcp.php?action=addquiz&sid=$sid\">»Add Question</a><br/>";
echo "<a href=\"lists.php?action=vquiz&sid=$sid\">»User Questions</a><br/>";
}else{
echo "<a href=\"quiz.php?action=addquiz&sid=$sid&rid=1\">»Add Question</a><br/>";
}
}
echo "<a href=\"quiz.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back</a></p>";
//end
echo "<p align=\"center\"><a href=\"quiz.php?sid=$sid\"><img src=\"/images/Quiz.gif\" alt=\"*\"/>Games Rooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
////////////////////////////////////////////
/////////////////////////////////////////////////////SAY2
else if ($action=="say2") {
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Private<br/></div>";
echo "<p align=\"center\">";
$unick = getnick_uid($who);
echo "<b>Private to $unick</b>";
echo "</p>";
addonline($uid,"Games Rooms","");
$xnick = getnick_sid($sid);
echo "<form action=\"quiz.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
echo "<input type=\"Hidden\" name=\"xnick\" value=\"\">";
echo "<input type=\"Hidden\" name=\"who\" value=\"$xnick\">";
echo "Message: <br/><input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
echo "<input type=\"Submit\" name=\"private\" Value=\"Private\"></form>";
echo "<p align=\"center\">";
echo "<br/>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">»View $unick's Profile</a><br/>";
echo "<a href=\"quiz.php?action=expose&sid=$sid&who=$who&rid=$rid&rpw=$rpw\">»Expose $unick</a><br/>";
echo "<a href=\"quiz.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">»Who's Inside</a><br/>";
if(getgold($uid)>20){
echo "<a href=\"lists.php?action=smilies&sid=$sid&ice=1\">»Smileys</a><br/>";
}else{
echo "»Smileys<br/>";
echo "(More Gold Required For Smilie access!)<br/>";
}
echo "<a href=\"quiz.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back</a></p>";
//end
echo "<p align=\"center\"><a href=\"quiz.php?sid=$sid\"><img src=\"/images/Quiz.gif\" alt=\"*\"/>Games Rooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
////////////////////////////////////////////
//////////////////////////////inside//////////
else if ($action=="inside") {
addonline($uid,"Games Rooms","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Inside<br/></div>";
echo "<p align=\"center\"><br/>";
$inside=mysql_query("SELECT DISTINCT * FROM quiz_chonline WHERE rid='".$rid."' and uid IS NOT NULL");
while($ins=mysql_fetch_array($inside))
{
$unick = getnick_uid($ins[1]);
$userl = "<a href=\"quiz.php?action=say2&sid=$sid&who=$ins[1]&rid=$rid&rpw=$rpw\">$unick</a>, ";
echo "$userl";
}
echo "<br/><br/>";
echo "<a href=\"quiz.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back</a><br/>";
echo "<br/><a href=\"quiz.php?sid=$sid\"><img src=\"/images/Quiz.gif\" alt=\"*\"/>Games Rooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
///////////////////////////
else if ($action=="expose") {
addonline($uid,"Games Rooms","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Expose!<br/></div>";
echo "<p align=\"center\"><br/>";
mysql_query("UPDATE quiz_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=\"quiz.php?sid=$sid&rid=$rid&rpw=$rpw\">«Back</a><br/>";
echo "<br/><a href=\"quiz.php?sid=$sid\"><img src=\"/images/Quiz.gif\" alt=\"*\"/>Games Rooms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
////////////////////////////////////////////////////
////////////////////////////////////////////add quiz words gencp
else if($action=="addquiz")
{
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Add Quiz Question!<br/></div>";
echo "<p align=\"center\">";
$qnick = getnick_sid($sid);
echo "<b>Add Quiz Question</b><br/><br/>";
echo "Please Make Sure answers are spelt correctly!<br/>Answers Can be 2 or more words if required. Eg: <br/>Who is minnie mouses boyfriend?<br/>mickey mouse<br/>Please Pick 10 points for easy questions and 20 points for harder questions.<br/>You will recieve 2 Game points for every Question that is of a suitable nature<br/>";
echo "</p>";
echo "<form action=\"genproc.php?action=addquiz&sid=$sid\" method=\"post\">";
echo "Question:<input name=\"question\" maxlength=\"250\"/><br/>";
echo "Answer:<input name=\"answer\" format=\"*x\" maxlength=\"50\"/><br/>";
echo "Points:<select name=\"points\">";
echo "<option value=\"10\">10</option>";
echo "<option value=\"20\">20</option>";
echo "</select><br/>";
echo "<input type=\"hidden\" name=\"qnick\" value=\"$qnick\">";
echo "<input type=\"submit\" value=\"Add\"/>";
echo "</form><br/>";
echo "<p align=\"center\">";
echo "<br/><br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
echo "</html>";
?>