Afta-dark Copyright? Phoenixbytes Html Code

Started on the old forum in December 2007 · view the original in the archive · old links redirect here

27 replies · 2,465 views · started 18 years ago · 1 min read

4 participants
cgp Developer · 107 posts #1

ok just been to after-darks site and all it is is a modded version of the phoenixbytes code i uploaded here AGGGGGEEEESSSS ago! i have had a version of it running for at least 2years maybe longer so how is it his code? he aint even changed the quiz questions!

any one tell me???

ta lots

fuck u lot make me laugh!

here have a copy of it again btw!

obviously its not my modded copy lol spent ages editing it!

no longer in the game

Attachments: phoenixbytes.zip
SiLeNce Developer · 138 posts #3

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/scripts/waawaamp.inc on line 493

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/scripts/waawaamp.inc on line 494

how ?

cgp Developer · 107 posts #4

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/scripts/waawaamp.inc on line 493

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/scripts/waawaamp.inc on line 494

how ?

thats coz its not fixed lol thing is i gave up this coding lark now i have to make a better site than afta-dark..pisses me off heh!

no longer in the game

cgp Developer · 107 posts #5

ok i cant be mean add this to ur data base

CREATE TABLE hit_counter ( hits int(7) NOT NULL auto_increment, PRIMARY KEY (hits) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=24 ;

no longer in the game

ori Lead · 512 posts #6

i only used the sql side from that script for quiz hav look i posted it here its not same lol my script works nothing like that 1 or any 1 4 that matter

ori Lead · 512 posts #7

i couldnt b bothered getting new Qs for my quiz my script is made up from ideas from lots sites but its scripting methods is unique jus ask any the other sites i host on that script

cgp Developer · 107 posts #8

login same code just a little added bookmark page same code was just trying to see if the formatting code where the same by sending myself an image but got a ban for spammin lol! so cant be arsed to re reg and see what else is the same! nice looking site mind but i so wouldnt have made it look like the other php's that are about! still i am now forced to make a better one....i hate you

no longer in the game

cgp Developer · 107 posts #9

oh and the quiz can all be done site side easy to update no need for server access works a treat on mine!

no longer in the game

ori Lead · 512 posts #10

oh and the quiz can all be done site side easy to update no need for server access works a treat on mine!

ye i made a quiz tools option as a option to admins/owners but cant b arsed doing it i wana finish the script 1st lol

ori Lead · 512 posts #12
<?php
/*
(c)wapdesire.com
*/
include("../web/config.php");
include("../web/core.php");
connectdb();
$brw = $HTTP_USER_AGENT;
$brws = explode("/",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$preview = $_GET["preview"];
$start = $_GET["start"];
$uid = getuid_sid($sid);
$nick = getnick_uid($uid);
$upload = $_GET["upload"];
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$bcon = connectdb();
$script = $_GET["script"];

header("Content-type: text/html; charset=ISO-8859-1");
header("Cache-Control: no-cache, must-revalidate, max-age=0");
header("Pragma: no-cache");
echo '<?xml version="1.0"?' . '>'; 
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\">";

/////////////////////////////Database Error/////////////////////////////

if (!$bcon)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"images/exit.gif\" alt=\"!\"/>
";
echo "[b]Error! Cannot Connect To Database...[/b]

";
echo "This error happens usually when backing up the database, please be patient...";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}

cleardata();
/////////////////////////////Ip Banned/////////////////////////////

if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<head>";
echo "<title>Ip Block!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>
";
echo "[b]This IP address is blocked!!![/b]
";
echo "
";
echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over

";
$banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
$remain =  $banto[0] - time();
$rmsg = gettimemsg($remain);
echo " IP: $rmsg

";
echo "</p>";
echo "

";
echo "<form action=\"../web/login.php\" method=\"get\">";
echo "[b]UserID:[/b]
<input name=\"loguid\" format=\"*x\" maxlength=\"30\"/>
";
echo "[b]Password:[/b]
<input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/>
";
echo "
<input name=\"Login\" type=\"submit\" value=\"Submit\"></form>";
echo "

Not registered yet? 
<a href=\"../web/register.php\">SignUp</a>
";
echo "<a href=\"../web/index.php?action=terms&sid=$sid\">Site Rules</a>
";
echo "</p>";
echo "<p align=\"center\">";
$onu = getnumonline();
echo "Members Inside: $onu</p>";
echo "<a href=\"../wap/index.php\">Wap 1.0(wml) Version</a></p>";
echo mobads();
echo "<div>[b]©2006-2007
$sitename[/b]</div>";
echo "</body>";
echo "</html>";
exit();
}
}
/////////////////////////////Session Expired/////////////////////////////

if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You are not logged in
";
echo "Or Your session has been expired

";
echo "<a href=\"../web/index.php\">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
}
/////////////////////////////Banned/////////////////////////////

if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>
";
echo "[b]You are Banned[/b]

";
$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
";
$nick = getnick_uid($banto[2]);
echo "[b]By: [/b]$nick
";
echo "[b]Reason: [/b]$banto[1]";
//echo "<a href=\"../web/index.php\">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
/////////////////////////////QUIZ/////////////////////////////

if($action=="quiz")
{
addonline(getuid_sid($sid),"Quiz","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz[/i][/b]</div>";
echo "<p align=\"center\">
Welcome To $sitename Quiz
</p>
<p align=\"center\">
<a href=\"./quiz.php?action=play&sid=$sid\">Play</a>

<a href=\"./quiz.php?action=about&sid=$sid\">About</a>

<a href=\"./quiz.php?action=winners&sid=$sid\">Top Scorers</a>

<a href=\"./quiz.php?action=losers&sid=$sid\">Top Losers</a>
";
$count_score=mysql_fetch_array(mysql_query("SELECT count(*) from ibwf_users where total_score<'0'"));
$count_score1=$count_score[0];
$count_score=mysql_fetch_array(mysql_query("SELECT count(*) from ibwf_users where total_score>'0'"));
$count_score2=$count_score[0];
$countup=($count_score1+$count_score2);
echo "
$countup people have taken part in Quiz";
if(isowner(getuid_sid($sid))){echo "
<a href=\"./quiz.php?action=options&sid=$sid\">Update</a>";}
echo "</p>";
echo "<center><- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////LOSERS/////////////////////////////

else if($action=="losers")
{
addonline(getuid_sid($sid),"Quiz","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz[/i][/b]</div>";
if($page==""||$page<=0)$page=1;
$num_items=mysql_fetch_array(mysql_query("SELECT count(*) from ibwf_users where total_score<'0'"));
if(!$num_items[0])$num_items[0]=0;
echo "<center>[b]$num_items[0] have failed miserably[/b]</center>";
echo "<p align=\"center\">\n";
$items_per_page=10;
$num_pages=ceil($num_items[0]/$items_per_page);
if($page>$num_pages)$page=$num_pages;
$limit_start=($page-1)*$items_per_page;
if($num_items[0]==0)$limit_start=0;
$sql="SELECT * FROM ibwf_users WHERE total_score<'0' ORDER BY total_score DESC LIMIT $limit_start, $items_per_page";
$items=mysql_query($sql);
echo mysql_error();
if($num_items[0]!=0){
while($item=mysql_fetch_array($items)){
echo "[i][b]".getnick_uid($item["id"])."[/b][/i]
".$item["quiz_score"]."
\n";
}
}
if($page>1){
echo "
<a href=\"./quiz.php?action=losers&page=".($page-1)."&sid=$sid\"><-Prev</a> ";
}
if($page<$num_pages){
if($page==1)echo "
";
echo "<a href=\"./quiz.php?action=losers&page=".($page+1)."&sid=$sid\">Next-></a>\n";
}
echo "
$page/$num_pages</p>\n";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>
";
echo "<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////WINNERS/////////////////////////////

else if($action=="winners")
{
addonline(getuid_sid($sid),"Quiz","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz[/i][/b]</div>";
if($page==""||$page<=0)$page=1;
$num_items=mysql_fetch_array(mysql_query("SELECT count(*) from ibwf_users where total_score>'0'"));
if(!$num_items[0])$num_items[0]=0;
echo "<center>[b]$num_items[0] players made the leaderboard[/b]</center>";
echo "<p align=\"center\">\n";
$items_per_page=10;
$num_pages=ceil($num_items[0]/$items_per_page);
if($page>$num_pages)$page=$num_pages;
$limit_start=($page-1)*$items_per_page;
if($num_items[0]==0)$limit_start=0;
$sql="SELECT * FROM ibwf_users WHERE total_score>'0' ORDER BY total_score DESC LIMIT $limit_start, $items_per_page";
$items=mysql_query($sql);
echo mysql_error();
if($num_items[0]!=0){
while($item=mysql_fetch_array($items)){
echo "[i][b]".getnick_uid($item["id"])."[/b][/i]
".$item["quiz_score"]."
\n";
}
}
if($page>1){
echo "
<a href=\"./quiz.php?action=losers&page=".($page-1)."&sid=$sid\"><-Prev</a> ";
}
if($page<$num_pages){
if($page==1)echo "
";
echo "<a href=\"./quiz.php?action=losers&page=".($page+1)."&sid=$sid\">Next-></a>\n";
}
echo "
$page/$num_pages</p>\n";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>
";
echo "<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////ABOUT/////////////////////////////

else if($action=="about")
{
addonline(getuid_sid($sid),"Quiz","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz[/i][/b]</div>";
echo "<p align=\"center\">
Welcome To $sitename Quiz
</p>
<p align=\"center\">
this is a multiple choice quiz, each question has 4 possible answers.

for each question you get right, you get points, 
the points you get depend on the difficulty level you've selected:

[b]easy = 10 points[/b]

[b]medium = 20 points[/b]

[b]hard = 30 points[/b]

but, each time you get a question wrong, you lose the 10, 
20 or 
30 points depending on the difficulty level you selected, 
and don't think it stops at zero, oh no, if you get your very first question wrong, 
you'll need to get the next one right to return to zero.
</p>";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////PLAY/////////////////////////////

else if($action=="play")
{
addonline(getuid_sid($sid),"Quiz","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz
please select level of difficulty[/i][/b]</div>";
echo "<p align=\"center\">\n";
$row_profiles=mysql_fetch_array(mysql_query("select * from ibwf_users where id='".getuid_sid($sid)."'"));
$row_quiz=mysql_fetch_array(mysql_query("select * from ibwf_quiz"));
$score=explode("/",$row_profiles["quiz_score"]);
$score=$score[0]+$score[1]+$score[2];
$quiz_easy=$row_profiles["quiz_easy"];
$quiz_medium=$row_profiles["quiz_medium"];
$quiz_hard=$row_profiles["quiz_hard"];
if($row_quiz["switch"]==on||(isowner(getuid_sid($sid))&&$preview==yes)){
if($quiz_easy=="no")echo "<a style=\"color: blue;\" href=\"./quiz.php?action=questions&start=yes&sid=$sid&q=1&dif=easy\">easy</a>
\n";
else if($quiz_easy=="yes")echo "[b]** completed **[/b]
\n";
if($quiz_medium=="no")echo "<a style=\"color: green;\" href=\"./quiz.php?action=questions&start=yes&sid=$sid&q=1&dif=med\">medium</a>
\n";
elseif($quiz_medium=="yes")echo "[b]** completed **[/b]
\n";
if($quiz_hard=="no")echo "<a style=\"color: red;\" href=\"./quiz.php?action=questions&start=yes&sid=$sid&q=1&dif=hard\">hard</a>
\n";
else if($quiz_hard=="yes")echo "[b]** completed **[/b]
\n";
if(($quiz_hard=="yes")&&($quiz_easy=="yes")&&($quiz_medium=="yes")){
echo "[b]you have answered all the questions for this week, please try again next week![/b]
\n";
}
echo "
[b]your current score is $score[/b]\n";
}else{
echo "Quiz Is Currently Turned Off Please Come Back Later\n";
}
echo "</p>\n";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////QUESTIONS/////////////////////////////

else if($action=="questions")
{
addonline(getuid_sid($sid),"Quiz","");
$row_quizusers=mysql_fetch_array(mysql_query("select * from ibwf_quizusers where uid='".getuid_sid($sid)."'"));
if($row_quizusers[$dif."_question"]!=0){$q=$row_quizusers[$dif."_next"];}
$row_quiz=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_quiz WHERE difficulty='".$dif."' AND number='".$q."'"));
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz
Question $q[/i][/b]</div>";
if($start=yes){
mysql_query("insert into ibwf_quizusers set easy_question='".$q."', easy_next='".$q."', med_question='".$q."', med_next='".$q."', hard_question='".$q."', hard_next='".$q."', uid='".getuid_sid($sid)."'");
}
$question = $row_quiz["question"];
$a = $row_quiz["answer1"];
$b = $row_quiz["answer2"];
$c = $row_quiz["answer3"];
$d = $row_quiz["answer4"];
$q = $row_quiz["number"];
$quid = $row_quiz["id"];
$l = $row_quiz["difficulty"];
echo "<p align=\"center\">
[b]$question[/b]
</p>
<p align=\"center\">
[i]<a href=\"./quiz.php?action=answer&sid=$sid&q=$q&a=a&quid=$quid&l=$l\">$a</a>[/i]

[i]<a href=\"./quiz.php?action=answer&sid=$sid&q=$q&a=b&quid=$quid&l=$l\">$b</a>[/i]

[i]<a href=\"./quiz.php?action=answer&sid=$sid&q=$q&a=c&quid=$quid&l=$l\">$c</a>[/i]

[i]<a href=\"./quiz.php?action=answer&sid=$sid&q=$q&a=d&quid=$quid&l=$l\">$d</a>[/i]";
echo "</p>";
echo "<center><- <a href=\"./quiz.php?action=play&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////ANSWER/////////////////////////////

else if($action=="answer")
{
addonline(getuid_sid($sid),"Quiz","");
$row_profiles=mysql_fetch_array(mysql_query("select * from ibwf_users where id='".getuid_sid($sid)."'"));
$tmax=$row_ses["tmax"];
$totalscore=explode("/",$row_profiles["quiz_score"]);
$row_quiz=mysql_fetch_array(mysql_query("select * from ibwf_quiz where id='$quid'"));
$row_quizusers=mysql_fetch_array(mysql_query("select * from ibwf_quizusers where uid='".getuid_sid($sid)."'"));
$correct = $row_quiz["answer"];
$ga = $row_quiz["answer1"];
$gb = $row_quiz["answer2"];
$gc = $row_quiz["answer3"];
$gd = $row_quiz["answer4"];
if($a=="a")$guess="$ga";
else if($a=="b")$guess="$gb";
else if($a=="c")$guess="$gc";
else if($a=="d")$guess="$gd";
if($row_quizusers[$l."_next"]!=$q){
echo "<head>
<title>".getnick_sid($sid)."@Quiz</title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">
</head>
<body>
<div>[b]Cheater![/b]</div>
<p align=\"center\">
<img src=\"../images/error.gif\" alt=\"[x]\"/>
[b]Error!!![/b]

You cannot reload this page to gain more points DO NOT CHEAT!
</p>\n";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>
</body>
</html>\n";
exit;
}
else if($guess=="$correct"){
mysql_query("update ibwf_quizusers set ".$l."_question='".$q."', ".$l."_next='".($q+1)."' where uid='".getuid_sid($sid)."'");
if($l=="easy")$plus="10";
else if($l=="med")$plus="20";
else if($l=="hard")$plus="30";
if($l==easy)$totalscore=($totalscore[0]+$plus)."/".$totalscore[1]."/".$totalscore[2];
else if($l==med)$totalscore=$totalscore[0]."/".($totalscore[1]+$plus)."/".$totalscore[2];
else if($l==hard)$totalscore=$totalscore[0]."/".$totalscore[1]."/".($totalscore[2]+$plus);
$total_score=explode("/",$totalscore);
mysql_query("update ibwf_users set quiz_score='".$totalscore."', total_score='".($total_score[0]+$total_score[1]+$total_score[2])."' where id='".getuid_sid($sid)."'");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Correct![/i][/b]</div>";
echo "<p align=\"center\">
[i]you got the right answer, $plus points were added to your score.[/i]
";
if($q<10){
$next=$q+1;
echo "
<a href=\"./quiz.php?action=questions&sid=$sid&q=$next&dif=$l\">go to question $next</a>
";
}
else if($q==10){
if($l=="easy"){
mysql_query("update ibwf_users set quiz_easy='yes' where id='".getuid_sid($sid)."'");
}
else if($l=="med"){
mysql_query("update ibwf_users set quiz_medium='yes' where id='".getuid_sid($sid)."'");
}
else if($l=="hard"){
mysql_query("update ibwf_users set quiz_hard='yes' where id='".getuid_sid($sid)."'");
}
echo "
you've completed this round.

<a href=\"./quiz.php?action=play&sid=$sid\">select difficulty</a>
";
}
echo "</p>";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
else
{
if($l=="easy")$plus="10";
else if($l=="med")$plus="20";
else if($l=="hard")$plus="30";
if($l==easy)$totalscore=($totalscore[0]-$plus)."/".$totalscore[1]."/".$totalscore[2];
else if($l==med)$totalscore=$totalscore[0]."/".($totalscore[1]-$plus)."/".$totalscore[2];
else if($l==hard)$totalscore=$totalscore[0]."/".$totalscore[1]."/".($totalscore[2]-$plus);
$total_score=explode("/",$totalscore);
mysql_query("update ibwf_users set quiz_score='".$totalscore."', total_score='".($total_score[0]+$total_score[1]+$total_score[2])."' where id='".getuid_sid($sid)."'");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Wrong![/i][/b]</div>";
echo "<p align=\"center\">
[i]your answer was wrong, $plus points were deducted from your score.[/i]

</p>
<p align=\"center\">
-> <a href=\"./quiz.php?action=questions&sid=$sid&q=$q&dif=$l\">try question $q again</a>

</p>";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
}
/////////////////////////////OPTIONS/////////////////////////////

else if($action=="options")
{
if(!isowner(getuid_sid($sid)))
{
addonline(getuid_sid($sid),"In The Forbidden Zone","");
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "[b]Permission Denied![/b]
";
echo "
You cannot use this page...
";
echo "<a href=\"./index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit;
}
addonline(getuid_sid($sid),"Quiz Options","");
$row_quiz=mysql_fetch_array(mysql_query("select * from ibwf_quiz"));
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz Options</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz Options[/i][/b]</div>";
echo "<p align=\"center\">
Please select the set of questions you wish to edit

<a href=\"./quiz.php?action=edit&q=1&diff=easy&sid=$sid\" style=\"color:blue;\">easy</a>

<a href=\"./quiz.php?action=edit&q=1&diff=med&sid=$sid\" style=\"color:green;\">medium</a>

<a href=\"./quiz.php?action=edit&q=1&diff=hard&sid=$sid\" style=\"color:red;\">hard</a>

<a href=\"./quiz.php?action=play&preview=yes&sid=$sid\">preview</a>

[i]lastly, you'll want to make sure ALL users can play,

when a user completes a section, it appears as *complete*, you need to click below, 
after each update, 
before turning the quiz back on.[/i]

<a href=\"./quiz.php?action=reset&sid=$sid\">Reset Scores</a>
\n";
if($row_quiz["switch"]=="on"){
echo "
[b]Quiz is active
<a href=\"./quiz.php?action=off&sid=$sid\">turn it off?</a>[/b]\n";
}else{
echo "
[b]Quiz is not active
<a href=\"./quiz.php?action=on&sid=$sid\">turn it on?</a>[/b]\n";
}
echo "</p>\n";
echo "<center><- <a href=\"./quiz.php?action=quiz&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////RESET/////////////////////////////

else if($action=="reset") 
{
if(!isowner(getuid_sid($sid)))
{
addonline(getuid_sid($sid),"In The Forbidden Zone","");
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "[b]Permission Denied![/b]
";
echo "
You cannot use this page...
";
echo "<a href=\"./index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit;
}
addonline(getuid_sid($sid),"Quiz Options","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz Options</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz Options[/i][/b]</div>";
$query="UPDATE ibwf_users SET quiz_easy='no'";
mysql_query($query);
$query="UPDATE ibwf_users SET quiz_medium='no'";
mysql_query($query);
$query="UPDATE ibwf_users SET quiz_hard='no'";
mysql_query($query);
$query="UPDATE ibwf_users SET quiz_score='0/0/0', total_score='0'";
mysql_query($query);
$query="delete from ibwf_quizusers where uid!=0";
mysql_query($query);
echo "<p align=\"center\">
[b]done![/b]

all sections will now appear as unplayed for all users.
</p>\n";
echo "<center><- <a href=\"./quiz.php?action=options&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////QUIZ ON/////////////////////////////

else if($action=="on")
{
if(!isowner(getuid_sid($sid)))
{
addonline(getuid_sid($sid),"In The Forbidden Zone","");
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "[b]Permission Denied![/b]
";
echo "
You cannot use this page...
";
echo "<a href=\"./index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit;
}
addonline(getuid_sid($sid),"Quiz Options","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz Options</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz Options[/i][/b]</div>";
$query="UPDATE ibwf_quiz SET switch='on'";
mysql_query($query);
echo "<p align=\"center\">
[b]done![/b]

the quiz was activated, 
now all other users can participate.
</p>\n";
echo "<center><- <a href=\"./quiz.php?action=options&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////QUIZ OFF/////////////////////////////

else if($action=="off")
{
if(!isowner(getuid_sid($sid)))
{
addonline(getuid_sid($sid),"In The Forbidden Zone","");
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "[b]Permission Denied![/b]
";
echo "
You cannot use this page...
";
echo "<a href=\"./index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit;
}
addonline(getuid_sid($sid),"Quiz Options","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz Options</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz Options[/i][/b]</div>";
$query="UPDATE ibwf_quiz SET switch='off'";
mysql_query($query);
echo "<p align=\"center\">
[b]done![/b]

the quiz was deactivated, 
the link has disappeared from the main menu.
</p>\n";
echo "<center><- <a href=\"./quiz.php?action=options&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////EDIT/////////////////////////////

else if($action=="edit")
{
if(!isowner(getuid_sid($sid)))
{
addonline(getuid_sid($sid),"In The Forbidden Zone","");
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "[b]Permission Denied![/b]
";
echo "
You cannot use this page...
";
echo "<a href=\"./index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit;
}
addonline(getuid_sid($sid),"Quiz Options","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz Options</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz Options[/i][/b]</div>";
echo "<p align=\"center\">\n";
$query="select * FROM ibwf_quiz WHERE difficulty='$diff' AND number='$q'";
$result=mysql_query($query);
$num_rows=mysql_num_rows($result);
$row=mysql_fetch_array($result);
$question=$row["question"];
$correct=$row["answer"];
$a=$row["answer1"];
$b=$row["answer2"];
$c=$row["answer3"];
$d=$row["answer4"];
$id=$row["id"];
echo "[b]edit question $q
[difficulty: $diff][/b]
</p>
<center>
<form action=\"./quiz.php?action=save&q=$q&diff=$diff&sid=$sid\" method=\"post\">

question:

<input type=\"text\" name=\"nquestion\" value=\"$question\" maxlength=\"100\"/>

correct answer:

<input type=\"text\" name=\"nright\" value=\"$correct\" maxlength=\"100\"/>

one of the answers below must be the same case and spelling as the correct answer

answer 1:

<input type=\"text\" name=\"na\" value=\"$a\" maxlength=\"100\"/>

answer 2:

<input type=\"text\" name=\"nb\" value=\"$b\" maxlength=\"100\"/>

answer 3:

<input type=\"text\" name=\"nc\" value=\"$c\" maxlength=\"100\"/>

answer 4:

<input type=\"text\" name=\"nd\" value=\"$d\" maxlength=\"100\"/>

<input type=\"submit\" value=\"update\"/>
</form>
</center>\n";
echo "<center><- <a href=\"./quiz.php?action=options&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////SAVE/////////////////////////////

else if($action=="save")
{
if(!isowner(getuid_sid($sid)))
{
addonline(getuid_sid($sid),"In The Forbidden Zone","");
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "[b]Permission Denied![/b]
";
echo "
You cannot use this page...
";
echo "<a href=\"./index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit;
}
addonline(getuid_sid($sid),"Quiz Options","");
echo "<head>";
echo "<title>".getnick_sid($sid)."@Quiz Options</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div>[b][i]Quiz Options[/i][/b]</div>";
echo "<p align=\"center\">\n";
$query="UPDATE ibwf_quiz SET question='$nquestion' where number=$q AND difficulty='$diff'";
mysql_query($query);
$query="UPDATE ibwf_quiz SET answer='$nright' where number=$q AND difficulty='$diff'";
mysql_query($query);
$query="UPDATE ibwf_quiz SET answer1='$na' where number=$q AND difficulty='$diff'";
mysql_query($query);
$query="UPDATE ibwf_quiz SET answer2='$nb' where number=$q AND difficulty='$diff'";
mysql_query($query);
$query="UPDATE ibwf_quiz SET answer3='$nc' where number=$q AND difficulty='$diff'";
mysql_query($query);
$query="UPDATE ibwf_quiz SET answer4='$nd' where number=$q AND difficulty='$diff'";
mysql_query($query);
$next=($q+1);
if($next<=10){
echo "[b]done![/b]

question $q was updated

[b]question:[/b]
$nquestion

[b]right answer:[/b]
$nright

[b]answer 1:[/b]
$na

[b]answer 2:[/b]
$nb

[b]answer 3:[/b]
$nc

[b]answer 4:[/b]
$nd

<a href=\"./quiz.php?action=edit&q=$next&diff=$diff&sid=$sid\">Question $next</a>\n";
}else{
echo "[b]done![/b]

that was the last $diff question, 
taking you back to quiz admin..

[b]question:[/b]
$nquestion

[b]right answer:[/b]
$nright

[b]answer 1:[/b]
$na

[b]answer 2:[/b]
$nb

[b]answer 3:[/b]
$nc

[b]answer 4:[/b]
$nd\n";
}
echo "<center><- <a href=\"./quiz.php?action=options&sid=$sid\">Back</a>

<- <a href=\"./index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
echo "</body>";
echo "</html>";
}
/////////////////////////////Error/////////////////////////////

else
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You are not logged in
";
echo "Or Your session has been expired

";
echo "<a href=\"../web/index.php\">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
}
?>

ill get the sql import soon gota find it lol

ori Lead · 512 posts #13

that code was recoded from the quiz from the phoenixbytes script its main update is ppl cant cheat for points by reloading the correct answer page or doing 9/10 questions and restarting the quiz

Guest #14

i gave up that phoenixbytes script along time ago lol fixed it and just gave up with it cos i could not get hold of the chatroom phoenix made for his site in his version 3 but he never released it sob never mind using lavair now so not really bothered il dig my modded version if i can find it and upload it

cgp Developer · 107 posts #15

i gave up that phoenixbytes script along time ago lol fixed it and just gave up with it cos i could not get hold of the chatroom phoenix made for his site in his version 3 but he never released it sob never mind using lavair now so not really bothered il dig my modded version if i can find it and upload it

i have a chatroom working on it just pretty basic. i have picked my one up again and am playing lol aint touched it for aggggesss well over a year maybe 2!

no longer in the game

ori Lead · 512 posts #16

lol that script aint so gud its very insecure i only used few bits n pieces n most them needed fixing anyway

Guest #17

ya right ori the phoenix script is full of loop holes my members used to be able to make themselves admin lol in forums somehow i scrapped that years ago prefer the lavair script now which ive modded to the way i like it so its all good lol just the dejavu script i want now the web version tryied to convert my old wap cgi version but could not get it working lol php much easyier to mod

cgp Developer · 107 posts #18

ya right ori the phoenix script is full of loop holes my members used to be able to make themselves admin lol in forums somehow i scrapped that years ago prefer the lavair script now which ive modded to the way i like it so its all good lol just the dejavu script i want now the web version tryied to convert my old wap cgi version but could not get it working lol php much easyier to mod

andy u are full of shit you obviously missed he basics of chmod 644 when u "used the script" which you aint clever enough to have ever of done, if so please post your version of it here to show im wrong..... and i have posted the web version to the script and calling it the dejavu script just makes u look more stupid.... u cant code.. u will never be able to code.... all you have ever done is edit what others have done and said you made it........ go on show me sumthing you have made thats all your own... ppl like you really fucking annoy me..... your a leach nothing more...now go and fuck off! making out ur clever and can code...we all know now u cant..if u can lets see it you fucking numpty ta!

no longer in the game

Guest #19

andy u are full of shit you obviously missed he basics of chmod 644 when u "used the script" which you aint clever enough to have ever of done, if so please post your version of it here to show im wrong..... and i have posted the web version to the script and calling it the dejavu script just makes u look more stupid.... u cant code.. u will never be able to code.... all you have ever done is edit what others have done and said you made it........ go on show me sumthing you have made thats all your own... ppl like you really fucking annoy me..... your a leach nothing more...now go and fuck off! making out ur clever and can code...we all know now u cant..if u can lets see it you fucking numpty ta!

wotever craig i never said i could code got better things to do with my time lol and since wen do i claim any site my work you know shit about me so get to fuck ya clown ya think ya better than anyone else yes i EDIT SITES TO mY LIKING THATS NOT CODING !!! i dont want to code i just want a site thats secure and works so all that was un called for and i aint no leech

cgp Developer · 107 posts #20

wotever craig i never said i could code got better things to do with my time lol and since wen do i claim any site my work you know shit about me so get to fuck ya clown ya think ya better than anyone else yes i EDIT SITES TO mY LIKING THATS NOT CODING !!! i dont want to code i just want a site thats secure and works so all that was un called for and i aint no leech

hold on ur the one who said u stopped using the pb code coz of security issues i know for a fact u have never had a pb code working... your full of shit. when you have sumthing to say about something you know about i wont say anything but when u start sprouting shit about security on a site i know you have never had working it pisses me off.

your a fucking knob

no longer in the game

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close