Afta-dark Copyright? Phoenixbytes Html Code

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Afta-dark Copyright? Phoenixbytes Html Code

    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

    **** u lot make me laugh!

    here have a copy of it again btw!

    obviously its not my modded copy lol spent ages editing it!
    Attached Files
    no longer in the game

    #2
    Nyce ..

    Posting More

    Comment


      #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 ?

      Comment


        #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 ?[/b]
        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

        Comment


          #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

          Comment


            #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

            Comment


              #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

              Comment


                #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

                Comment


                  #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

                  Comment


                    #10
                    oh and the quiz can all be done site side easy to update no need for server access works a treat on mine![/b]
                    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

                    Comment


                      #11
                      can you conver me quiz in lavalair ?

                      Comment


                        #12
                        Code:
                        <?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=&#39;".$uid."&#39;"));
                        $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 &#39;<?xml version="1.0"?&#39; . &#39;>&#39;; 
                        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=&#39;2&#39; AND ipadd=&#39;".$uip."&#39; AND browserm=&#39;".$ubr."&#39; 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&amp;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=&#39;".$uid."&#39; AND penalty=&#39;1&#39; OR uid=&#39;".$uid."&#39; AND penalty=&#39;2&#39;"));
                        $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                        $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&amp;sid=$sid\">Play</a>
                        
                        <a href=\"./quiz.php?action=about&amp;sid=$sid\">About</a>
                        
                        <a href=\"./quiz.php?action=winners&amp;sid=$sid\">Top Scorers</a>
                        
                        <a href=\"./quiz.php?action=losers&amp;sid=$sid\">Top Losers</a>
                        ";
                        $count_score=mysql_fetch_array(mysql_query("SELECT count(*) from ibwf_users where total_score<&#39;0&#39;"));
                        $count_score1=$count_score[0];
                        $count_score=mysql_fetch_array(mysql_query("SELECT count(*) from ibwf_users where total_score>&#39;0&#39;"));
                        $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&amp;sid=$sid\">Update</a>";}
                        echo "</p>";
                        echo "<center>&lt;- <a href=\"./index.php?action=main&amp;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<&#39;0&#39;"));
                        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<&#39;0&#39; 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&amp;page=".($page-1)."&amp;sid=$sid\">&lt;-Prev</a> ";
                        }
                        if($page<$num_pages){
                        if($page==1)echo "
                        ";
                        echo "<a href=\"./quiz.php?action=losers&amp;page=".($page+1)."&amp;sid=$sid\">Next-&gt;</a>\n";
                        }
                        echo "
                        $page/$num_pages</p>\n";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        ";
                        echo "&lt;- <a href=\"./index.php?action=main&amp;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>&#39;0&#39;"));
                        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>&#39;0&#39; 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&amp;page=".($page-1)."&amp;sid=$sid\">&lt;-Prev</a> ";
                        }
                        if($page<$num_pages){
                        if($page==1)echo "
                        ";
                        echo "<a href=\"./quiz.php?action=losers&amp;page=".($page+1)."&amp;sid=$sid\">Next-&gt;</a>\n";
                        }
                        echo "
                        $page/$num_pages</p>\n";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        ";
                        echo "&lt;- <a href=\"./index.php?action=main&amp;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&#39;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&#39;t think it stops at zero, oh no, if you get your very first question wrong, 
                        you&#39;ll need to get the next one right to return to zero.
                        </p>";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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=&#39;".getuid_sid($sid)."&#39;"));
                        $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&amp;start=yes&amp;sid=$sid&amp;q=1&amp;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&amp;start=yes&amp;sid=$sid&amp;q=1&amp;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&amp;start=yes&amp;sid=$sid&amp;q=1&amp;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>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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=&#39;".getuid_sid($sid)."&#39;"));
                        if($row_quizusers[$dif."_question"]!=0){$q=$row_quizusers[$dif."_next"];}
                        $row_quiz=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_quiz WHERE difficulty=&#39;".$dif."&#39; AND number=&#39;".$q."&#39;"));
                        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=&#39;".$q."&#39;, easy_next=&#39;".$q."&#39;, med_question=&#39;".$q."&#39;, med_next=&#39;".$q."&#39;, hard_question=&#39;".$q."&#39;, hard_next=&#39;".$q."&#39;, uid=&#39;".getuid_sid($sid)."&#39;");
                        }
                        $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&amp;sid=$sid&amp;q=$q&amp;a=a&amp;quid=$quid&amp;l=$l\">$a</a>[/i]
                        
                        [i]<a href=\"./quiz.php?action=answer&amp;sid=$sid&amp;q=$q&amp;a=b&amp;quid=$quid&amp;l=$l\">$b</a>[/i]
                        
                        [i]<a href=\"./quiz.php?action=answer&amp;sid=$sid&amp;q=$q&amp;a=c&amp;quid=$quid&amp;l=$l\">$c</a>[/i]
                        
                        [i]<a href=\"./quiz.php?action=answer&amp;sid=$sid&amp;q=$q&amp;a=d&amp;quid=$quid&amp;l=$l\">$d</a>[/i]";
                        echo "</p>";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=play&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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=&#39;".getuid_sid($sid)."&#39;"));
                        $tmax=$row_ses["tmax"];
                        $totalscore=explode("/",$row_profiles["quiz_score"]);
                        $row_quiz=mysql_fetch_array(mysql_query("select * from ibwf_quiz where id=&#39;$quid&#39;"));
                        $row_quizusers=mysql_fetch_array(mysql_query("select * from ibwf_quizusers where uid=&#39;".getuid_sid($sid)."&#39;"));
                        $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>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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=&#39;".$q."&#39;, ".$l."_next=&#39;".($q+1)."&#39; where uid=&#39;".getuid_sid($sid)."&#39;");
                        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=&#39;".$totalscore."&#39;, total_score=&#39;".($total_score[0]+$total_score[1]+$total_score[2])."&#39; where id=&#39;".getuid_sid($sid)."&#39;");
                        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&amp;sid=$sid&amp;q=$next&amp;dif=$l\">go to question $next</a>
                        ";
                        }
                        else if($q==10){
                        if($l=="easy"){
                        mysql_query("update ibwf_users set quiz_easy=&#39;yes&#39; where id=&#39;".getuid_sid($sid)."&#39;");
                        }
                        else if($l=="med"){
                        mysql_query("update ibwf_users set quiz_medium=&#39;yes&#39; where id=&#39;".getuid_sid($sid)."&#39;");
                        }
                        else if($l=="hard"){
                        mysql_query("update ibwf_users set quiz_hard=&#39;yes&#39; where id=&#39;".getuid_sid($sid)."&#39;");
                        }
                        echo "
                        you&#39;ve completed this round.
                        
                        <a href=\"./quiz.php?action=play&amp;sid=$sid\">select difficulty</a>
                        ";
                        }
                        echo "</p>";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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=&#39;".$totalscore."&#39;, total_score=&#39;".($total_score[0]+$total_score[1]+$total_score[2])."&#39; where id=&#39;".getuid_sid($sid)."&#39;");
                        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\">
                        -&gt; <a href=\"./quiz.php?action=questions&amp;sid=$sid&amp;q=$q&amp;dif=$l\">try question $q again</a>
                        
                        </p>";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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&amp;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&amp;q=1&amp;diff=easy&amp;sid=$sid\" style=\"color:blue;\">easy</a>
                        
                        <a href=\"./quiz.php?action=edit&amp;q=1&amp;diff=med&amp;sid=$sid\" style=\"color:green;\">medium</a>
                        
                        <a href=\"./quiz.php?action=edit&amp;q=1&amp;diff=hard&amp;sid=$sid\" style=\"color:red;\">hard</a>
                        
                        
                        <a href=\"./quiz.php?action=play&amp;preview=yes&amp;sid=$sid\">preview</a>
                        
                        [i]lastly, you&#39;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&amp;sid=$sid\">Reset Scores</a>
                        \n";
                        if($row_quiz["switch"]=="on"){
                        echo "
                        [b]Quiz is active
                        <a href=\"./quiz.php?action=off&amp;sid=$sid\">turn it off?</a>[/b]\n";
                        }else{
                        echo "
                        [b]Quiz is not active
                        <a href=\"./quiz.php?action=on&amp;sid=$sid\">turn it on?</a>[/b]\n";
                        }
                        echo "</p>\n";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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&amp;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=&#39;no&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_users SET quiz_medium=&#39;no&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_users SET quiz_hard=&#39;no&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_users SET quiz_score=&#39;0/0/0&#39;, total_score=&#39;0&#39;";
                        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>&lt;- <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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&amp;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=&#39;on&#39;";
                        mysql_query($query);
                        echo "<p align=\"center\">
                        [b]done![/b]
                        
                        
                        the quiz was activated, 
                        now all other users can participate.
                        </p>\n";
                        echo "<center>&lt;- <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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&amp;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=&#39;off&#39;";
                        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>&lt;- <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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&amp;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=&#39;$diff&#39; AND number=&#39;$q&#39;";
                        $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&amp;q=$q&amp;diff=$diff&amp;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>&lt;- <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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&amp;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=&#39;$nquestion&#39; where number=$q AND difficulty=&#39;$diff&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_quiz SET answer=&#39;$nright&#39; where number=$q AND difficulty=&#39;$diff&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_quiz SET answer1=&#39;$na&#39; where number=$q AND difficulty=&#39;$diff&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_quiz SET answer2=&#39;$nb&#39; where number=$q AND difficulty=&#39;$diff&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_quiz SET answer3=&#39;$nc&#39; where number=$q AND difficulty=&#39;$diff&#39;";
                        mysql_query($query);
                        $query="UPDATE ibwf_quiz SET answer4=&#39;$nd&#39; where number=$q AND difficulty=&#39;$diff&#39;";
                        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&amp;q=$next&amp;diff=$diff&amp;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>&lt;- <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
                        
                        &lt;- <a href=\"./index.php?action=main&amp;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

                        Comment


                          #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

                          Comment


                            #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

                            Comment


                              #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[/b]
                              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

                              Comment

                              Working...
                              X