Quiz Html To Wml

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

    Quiz Html To Wml

    whats wrong i do here anybody help

    Code:
    <?php
    //» »
    //« «
    include("config.php");
    include("core.php");
    //session_start();
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo("<?xml version=\"1.0\"?>");
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    
    ?>
    
    <wml>
    
    
    <?php
    
    $bcon = connectdb();
    if (!$bcon)
    {
        echo "<card id=\"main\" title=\" (ERROR!)\">";
        echo "<p align=\"center\">";
        echo "<img src=\"images/exit.gif\" alt=\"*\"/>
    ";
        echo "ERROR! cannot connect to database
    
    ";
        echo "This error happens usually when backing up the database, please be patient, The site will be up any minute
    
    ";
        echo "Soon, we will offer services that doesn&#39;t depend on MySQL databse to let you enjoy our site, while the database is not connected
    ";
        echo "[b]THANK YOU VERY MUCH[/b]";
        echo "</p>";
        echo "</card>";
        echo "</wml>";
        exit();
    }
    $brws = explode(" ",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    $uip = getip();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    
    $uid = getuid_sid($sid);
    
    cleardata();
    if(isipbanned($uip,$ubr))
        {
          if(!isshield(getuid_sid($sid)))
          {
            echo "<card id=\"main\" title=\"\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
          echo "This IP address is blocked
    ";
          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 "));
          //echo mysql_error();
          $remain =  $banto[0] - time();
          $rmsg = gettimemsg($remain);
          echo "Time to unblock the IP: $rmsg
    
    ";
          
          echo "</p>";
          echo "
    
    ";
      echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/>
    ";
      echo "Password: <input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/>
    ";
      echo "<anchor>LOGIN<go href=\"login.php\" method=\"get\">";
      echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
      echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
      echo "</go></anchor>";
      echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
          }
        }
    if(($action != "") && ($action!="terms"))
    {
        $uid = getuid_sid($sid);
        if((islogged($sid)==false)||($uid==0))
        {
            echo "<card id=\"main\" title=\"\">";
          echo "<p align=\"center\">";
          echo "You are not logged in
    ";
          echo "Or Your session has been expired
    
    ";
          echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
        
        
        
    }
    //echo isbanned($uid);
    if(isbanned($uid))
        {
            echo "<card id=\"main\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
          echo "You are [b]Banned[/b]
    ";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#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 "Time to finish your penalty: $rmsg
    
    ";
          echo "Ban Reason: $banres[0]";
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
    /////////////////////////////QUIZ/////////////////////////////
    
    if($action=="quiz")
    {
    addonline(getuid_sid($sid),"Quiz","");
    
    echo "[b][i]Quiz[/i][/b]";
    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><a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////LOSERS/////////////////////////////
    
    else if($action=="losers")
    {
    addonline(getuid_sid($sid),"Quiz","");
    
    echo "[b][i]Quiz[/i][/b]";
    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><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    ";
    echo "<a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////WINNERS/////////////////////////////
    
    else if($action=="winners")
    {
    addonline(getuid_sid($sid),"Quiz","");
    
    echo "[b][i]Quiz[/i][/b]";
    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><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    ";
    echo "<a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    
    echo "</card>";
    }
    /////////////////////////////ABOUT/////////////////////////////
    
    else if($action=="about")
    {
    addonline(getuid_sid($sid),"Quiz","");
    
    echo "[b][i]Quiz[/i][/b]";
    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><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    
    echo "</card>";
    }
    /////////////////////////////PLAY/////////////////////////////
    
    else if($action=="play")
    {
    addonline(getuid_sid($sid),"Quiz","");
    
    echo "[b][i]Quiz
    please select level of difficulty[/i][/b]";
    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><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    
    echo "</card>";
    }
    /////////////////////////////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 "[b][i]Quiz
    Question $q[/i][/b]";
    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><a href=\"./quiz.php?action=play&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    
    echo "</card>";
    }
    /////////////////////////////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 "[b]Cheater![/b]
    <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&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>
    </card>
    </wml>\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 "[b][i]Correct![/i][/b]";
    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><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    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 "[b][i]Wrong![/i][/b]";
    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&amp;sid=$sid&amp;q=$q&amp;dif=$l\">try question $q again</a>
    
    </p>";
    echo "<center><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    }
    /////////////////////////////OPTIONS/////////////////////////////
    
    else if($action=="options")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    $row_quiz=mysql_fetch_array(mysql_query("select * from ibwf_quiz"));
    echo "[b][i]Quiz Options[/i][/b]";
    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><a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////RESET/////////////////////////////
    
    else if($action=="reset") 
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "[b][i]Quiz Options[/i][/b]";
    $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> <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////QUIZ ON/////////////////////////////
    
    else if($action=="on")
    {
    if(!isowner(getuid_sid($sid)))
    {
    
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "[b][i]Quiz Options[/i][/b]";
    $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><a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////QUIZ OFF/////////////////////////////
    
    else if($action=="off")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "[b][i]Quiz Options[/i][/b]";
    $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><a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////EDIT/////////////////////////////
    
    else if($action=="edit")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "[b][i]Quiz Options[/i][/b]";
    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><anchor>UPDATE
    <go href=\"./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\"/>
    
    </go>
    </anchor>
    </center>\n";
    echo "<center><a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////SAVE/////////////////////////////
    
    else if($action=="save")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "[b][i]Quiz Options[/i][/b]";
    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><a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></center>";
    
    echo "</card>";
    }
    /////////////////////////////Error/////////////////////////////
    
    else
    {
    
    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 "</card>";
    
    }
    ?>
    
    </wml>
    error i get

    Code:
    Warning: Cannot modify header information - headers already sent by (output started at /home/www/domains/domain.com/public_html/wap/quiz.php:1) in /home/www/domains/domain.com/public_html/wap/quiz.php on line 12
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/www/domains/domain.com/public_html/wap/quiz.php:1) in /home/www/domains/domain.com/public_html/wap/quiz.php on line 13
    Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

    <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>


    #2
    Code:
    <?php
    //» »
    //« «
    include("config.php");
    include("core.php");
    //session_start();
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo("<?xml version=\"1.0\"?>");
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    
    ?>
    
    <wml>
    
    
    <?php
    
    $bcon = connectdb();
    if (!$bcon)
    {
        echo "<card id=\"main\" title=\" (ERROR!)\">";
        echo "<p align=\"center\">";
        echo "<img src=\"images/exit.gif\" alt=\"*\"/>
    ";
        echo "ERROR! cannot connect to database
    
    ";
        echo "This error happens usually when backing up the database, please be patient, The site will be up any minute
    
    ";
        echo "Soon, we will offer services that doesn&#39;t depend on MySQL databse to let you enjoy our site, while the database is not connected
    ";
        echo "[b]THANK YOU VERY MUCH[/b]";
        echo "</p>";
        echo "</card>";
        echo "</wml>";
        exit();
    }
    $brws = explode(" ",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    $uip = getip();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    
    $uid = getuid_sid($sid);
    
    cleardata();
    if(isipbanned($uip,$ubr))
        {
          if(!isshield(getuid_sid($sid)))
          {
            echo "<card id=\"main\" title=\"\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
          echo "This IP address is blocked
    ";
          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 "));
          //echo mysql_error();
          $remain =  $banto[0] - time();
          $rmsg = gettimemsg($remain);
          echo "Time to unblock the IP: $rmsg
    
    ";
          
          echo "</p>";
          echo "
    
    ";
      echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/>
    ";
      echo "Password: <input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/>
    ";
      echo "<anchor>LOGIN<go href=\"login.php\" method=\"get\">";
      echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
      echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
      echo "</go></anchor>";
      echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
          }
        }
    if(($action != "") && ($action!="terms"))
    {
        $uid = getuid_sid($sid);
        if((islogged($sid)==false)||($uid==0))
        {
            echo "<card id=\"main\" title=\"\">";
          echo "<p align=\"center\">";
          echo "You are not logged in
    ";
          echo "Or Your session has been expired
    
    ";
          echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
        
        
        
    }
    //echo isbanned($uid);
    if(isbanned($uid))
        {
            echo "<card id=\"main\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
          echo "You are [b]Banned[/b]
    ";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#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 "Time to finish your penalty: $rmsg
    
    ";
          echo "Ban Reason: $banres[0]";
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
    /////////////////////////////QUIZ/////////////////////////////
    
    if($action=="quiz")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"quiz\">";
    
    echo "<p align=\"center\">";
    echo "Welcome To $sitename Quiz
    ";
    
    echo "<a href=\"./quiz.php?action=play&amp;sid=$sid\">Play</a>
    ";
    echo "<a href=\"./quiz.php?action=about&amp;sid=$sid\">About</a>
    ";
    echo "<a href=\"./quiz.php?action=winners&amp;sid=$sid\">Top Scorers</a>
    ";
    echo "<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 "<a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>";
    echo "</card>";
    }
    /////////////////////////////LOSERS/////////////////////////////
    
    else if($action=="losers")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"Losers\">";
    echo "<p align=\"center\">";
    echo "[b][i]Quiz [/i][/b]";
    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 "[b]$num_items[0] have failed miserably[/b]";
    $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\n";
    echo "
    <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    ";
    echo "<a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>";
    echo "</card>";
    }
    /////////////////////////////WINNERS/////////////////////////////
    
    else if($action=="winners")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"winners\">";
    echo "<p align=\"center\">\n";
    echo "[b][i]Quiz [/i][/b]";
    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 "[b]$num_items[0] players made the leaderboard[/b]";
    $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\n";
    echo "
    <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    ";
    echo "<a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>";
    
    echo "</card>";
    }
    /////////////////////////////ABOUT/////////////////////////////
    
    else if($action=="about")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"about\">";
    echo "<p align=\"center\">";
    echo "Welcome To $sitename Quiz";
    
    echo "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:
    ";
    echo "[b]easy = 10 points[/b]
    ";
    echo "[b]medium = 20 points[/b]
    ";
    echo "[b]hard = 30 points[/b]
    ";
    echo "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.
    ";
    echo "
    <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    
    echo "</p>";
    echo "</card>";
    }
    /////////////////////////////PLAY/////////////////////////////
    
    else if($action=="play")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"quiz\">";
    echo "<p align=\"center\">\n";
    echo "[b][i]Quiz
    please select level of difficulty[/i][/b]
    ";
    $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 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 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 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 "
    <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>\n";
    
    echo "</card>";
    }
    /////////////////////////////QUESTIONS/////////////////////////////
    
    else if($action=="questions")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"questions\">";
    $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 "<p align=\"center\">\n";
    echo "[b][i]Quiz
    Question $q[/i][/b]";
    echo "</p>";
    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 "<a href=\"./quiz.php?action=play&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>";
    
    echo "</card>";
    }
    /////////////////////////////ANSWER/////////////////////////////
    
    else if($action=="answer")
    {
    addonline(getuid_sid($sid),"Quiz","");
    echo "<card id=\"main\" title=\"answer\">";
    $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 "<p align=\"center\">";
    echo "[b]Cheater![/b]";
    echo "<img src=\"../images/error.gif\" alt=\"[x]\"/>
    [b]Error!!![/b]
    ";
    echo "You cannot reload this page to gain more points DO NOT CHEAT!";
    echo "</p>\n";
    echo "<a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>
    </card>
    </wml>\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 "<p align=\"center\">";
    echo "[b][i]Correct![/i][/b]";
    echo "[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 "
    <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>";
    echo "</card>";
    }
    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 "[b][i]Wrong![/i][/b]";
    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&amp;sid=$sid&amp;q=$q&amp;dif=$l\">try question $q again</a>
    
    </p>";
    echo "<a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    
    echo "</card>";
    }
    }
    /////////////////////////////OPTIONS/////////////////////////////
    
    else if($action=="options")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    echo "<card id=\"main\" title=\"option\">";
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    $row_quiz=mysql_fetch_array(mysql_query("select * from ibwf_quiz"));
    echo "<card id=\"main\" title=\"answer\">";
    echo "<p align=\"center\">";
    echo "[b][i]Quiz Options[/i][/b]
    ";
    
    echo "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\">easy</a>
    
    <a href=\"./quiz.php?action=edit&amp;q=1&amp;diff=med&amp;sid=$sid\">medium</a>
    
    <a href=\"./quiz.php?action=edit&amp;q=1&amp;diff=hard&amp;sid=$sid\">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 "
    
    <a href=\"./quiz.php?action=quiz&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>\n";
    echo "</card>";
    }
    /////////////////////////////RESET/////////////////////////////
    
    else if($action=="reset") 
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    echo "<card id=\"main\" title=\"reset\">";
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    echo "<p align=\"center\">";
    echo "[b][i]Quiz Options[/i][/b]
    ";
    $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 "[b]done![/b]
    ";
    echo "
    all sections will now appear as unplayed for all users.";
    echo "
    
    ";
    echo " <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>\n";
    echo "</card>";
    }
    /////////////////////////////QUIZ ON/////////////////////////////
    
    else if($action=="on")
    {
    if(!isowner(getuid_sid($sid)))
    {
    echo "<card id=\"main\" title=\"on\">";
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    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 "</card>";
    exit;
    }
    echo "<card id=\"main\" title=\"Quiz Options\">";
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "<p align=\"center\">";
    echo "[b][i]Quiz Options[/i][/b]";
    $query="UPDATE ibwf_quiz SET switch=&#39;on&#39;";
    mysql_query($query);
    
    echo "[b]done![/b]
    
    
    the quiz was activated, 
    now all other users can participate.";
    
    echo "
    
    <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>\n";
    echo "</card>";
    }
    /////////////////////////////QUIZ OFF/////////////////////////////
    
    else if($action=="off")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    echo "<p align=\"center\">";
    echo "[b][i]Quiz Options [/i][/b]";
    $query="UPDATE ibwf_quiz SET switch=&#39;off&#39;";
    mysql_query($query);
    
    echo "[b]done![/b]
    
    
    the quiz was deactivated, 
    the link has disappeared from the main menu.";
    
    echo "
    
    <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>\n";
    echo "</card>";
    }
    /////////////////////////////EDIT/////////////////////////////
    
    else if($action=="edit")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    echo "<p align=\"center\">";
    echo "[b][i]Quiz Options[/i][/b]
    ";
    $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]
    ";
    echo "one of the answers below must be the same case and spelling as the correct answer
    ";
    echo "<anchor>UPDATE";
    echo "<go href=\"./quiz.php?action=save&amp;q=$q&amp;diff=$diff&amp;sid=$sid\" method=\"post\">";
    echo "
    question:
    ";
    echo "<input type=\"text\" name=\"nquestion\" value=\"$question\" maxlength=\"100\"/>";
    echo "
    correct answer:
    ";
    echo "<input type=\"text\" name=\"nright\" value=\"$correct\" maxlength=\"100\"/>";
    echo "
    answer 1:
    ";
    echo "<input type=\"text\" name=\"na\" value=\"$a\" maxlength=\"100\"/>";
    echo "
    answer 2:
    ";
    echo "<input type=\"text\" name=\"nb\" value=\"$b\" maxlength=\"100\"/>";
    echo "
    answer 3:
    ";
    echo "<input type=\"text\" name=\"nc\" value=\"$c\" maxlength=\"100\"/>";
    echo "
    answer 4:
    ";
    echo "<input type=\"text\" name=\"nd\" value=\"$d\" maxlength=\"100\"/>";
    echo "</go>
    </anchor>
    ";
    echo "
    <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    ";
    echo "<a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>\n";
    echo "</card>";
    }
    /////////////////////////////SAVE/////////////////////////////
    
    else if($action=="save")
    {
    if(!isowner(getuid_sid($sid)))
    {
    addonline(getuid_sid($sid),"In The Forbidden Zone","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    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 "</card>";
    exit;
    }
    addonline(getuid_sid($sid),"Quiz Options","");
    echo "<card id=\"main\" title=\"Quiz Options\">";
    echo "<p align=\"center\">";
    echo "[b][i]Quiz Options[/i][/b]";
    $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 "
    <a href=\"./quiz.php?action=options&amp;sid=$sid\">Back</a>
    
    <a href=\"./index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo "</p>";
    echo "</card>";
    }
    /////////////////////////////Error/////////////////////////////
    
    else
    {
    echo "<card id=\"main\" title=\"error\">";
    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 "</card>";
    
    }
    ?>
    
    </wml>
    I DID EVERYFIN APART FROM ACTION=EDIT DIDNT HAVE TIME TO DO THAT, T WORKS BUT THE PAGE IS FREE OF VALIDATION ERRORS AL TRY GET THAT DUN FOR YA LATER ON IN THE DAY IF I CAN
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      fank u brou what was i dong wrong in converting?
      Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

      <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

      Comment


        #4
        1. echo "<card id=\"main\" title=\"\">";
        2. some tags in wrong order
        3. wml dosnt like the tag <center>
        4. Colours are not supported in wml
        and i think there was a few more
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          oh thank you bro i learned something new today about wml
          Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

          <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

          Comment


            #6
            no probs m8
            Want something coded email me at sales@webnwaphost.com for a prices.




            Comment


              #7
              no probs m8[/b]
              how about its html and sql... can you also put it here?

              Comment


                #8
                how about its html and sql... can you also put it here?[/b]
                its in wapdesire

                Comment


                  #9
                  yeh it was m8 so that should be the wap version of it
                  Want something coded email me at sales@webnwaphost.com for a prices.




                  Comment


                    #10
                    how about its html and sql... can you also put it here?[/b]
                    Code:
                    <?php
                    
                    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>";
                    }
                    ?>
                    Want something coded email me at sales@webnwaphost.com for a prices.




                    Comment


                      #11
                      heres the sql

                      Code:
                      -- --------------------------------------------------------
                      
                      --
                      -- Table structure for table `ibwf_quiz`
                      --
                      
                      CREATE TABLE `ibwf_quiz` (
                        `id` int(11) NOT NULL auto_increment,
                        `question` varchar(200) NOT NULL default &#39;&#39;,
                        `answer` varchar(30) NOT NULL default &#39;&#39;,
                        `difficulty` varchar(12) NOT NULL default &#39;&#39;,
                        `number` int(11) NOT NULL default &#39;0&#39;,
                        `answer1` varchar(50) NOT NULL default &#39;&#39;,
                        `answer2` varchar(50) NOT NULL default &#39;&#39;,
                        `answer3` varchar(50) NOT NULL default &#39;&#39;,
                        `answer4` varchar(50) NOT NULL default &#39;&#39;,
                        `switch` char(3) NOT NULL default &#39;on&#39;,
                        PRIMARY KEY  (`id`)
                      ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=31;
                      
                      --
                      -- Dumping data for table `ibwf_quiz`
                      --
                      
                      INSERT INTO `ibwf_quiz` VALUES(1, &#39;Who preceded Margaret Thatcher as Prime Minister of Great Britain*wank*&#39;, &#39;james callaghan&#39;, &#39;easy&#39;, 1, &#39; shaun texas&#39;, &#39;john newton&#39;, &#39;james callaghan&#39;, &#39;greg peterson&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(2, &#39;Who was the second man to step foot on the surface of the moon?&#39;, &#39;buzz aldrin&#39;, &#39;easy&#39;, 2, &#39;no man&#39;, &#39;buzz aldrin&#39;, &#39;james newman&#39;, &#39;paul newton&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(3, &#39;Where were the 1970 football World Cup finals held*wank*&#39;, &#39;mexico&#39;, &#39;easy&#39;, 3, &#39;russia&#39;, &#39;mexico&#39;, &#39;spain&#39;, &#39;georgia&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(4, &#39;In books by JRR Tolkien, what kind of creatures are Bilbo and Frodo Baggins*wank*&#39;, &#39;hobbits&#39;, &#39;easy&#39;, 4, &#39;trees&#39;, &#39;kings&#39;, &#39;hobbits&#39;, &#39;elfs&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(5, &#39;Which Italian city is home of the car manufacturer Fiat?*wank*&#39;, &#39;turin&#39;, &#39;easy&#39;, 5, &#39;rome&#39;, &#39;grease&#39;, &#39;turin&#39;, &#39;italy&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(6, &#39;What do the French call the English Channel*wank*&#39;, &#39;le manche&#39;, &#39;easy&#39;, 6, &#39;le moon&#39;, &#39;le manche&#39;, &#39;le river&#39;, &#39;le lake&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(7, &#39;In which year of the 1940&#39;&#39;s did the D-Day landings take place on the coast of Normandy*wank*&#39;, &#39;1944&#39;, &#39;easy&#39;, 7, &#39;1950&#39;, &#39;1949&#39;, &#39;1945&#39;, &#39;1944&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(8, &#39;Who starred in the films Some Like It Hot Bus Stop The Seven Year Itch*wank*&#39;, &#39;marilyn monroe&#39;, &#39;easy&#39;, 8, &#39;betty moore&#39;, &#39;patrica newman&#39;, &#39;marilyn monroe&#39;, &#39;sue white&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(9, &#39;What is the largest mammal on Earth*wank*&#39;, &#39;blue whale&#39;, &#39;easy&#39;, 9, &#39;white shark&#39;, &#39;man eating whale&#39;, &#39;blue whale&#39;, &#39;red whale&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(10, &#39;What is North Americas highest mountain?*wank*&#39;, &#39;mount mckinley&#39;, &#39;easy&#39;, 10, &#39;mount hilton&#39;, &#39;mount america&#39;, &#39;mount mckinley&#39;, &#39;mount nothing&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(11, &#39;What is the chemical symbol for tin?*wank*&#39;, &#39;sn&#39;, &#39;med&#39;, 1, &#39;ca&#39;, &#39;pn&#39;, &#39;sn&#39;, &#39;vp&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(12, &#39;What are Corvettes, Sloops and Brigantines*wank*&#39;, &#39;sailing ships&#39;, &#39;med&#39;, 2, &#39;ships&#39;, &#39;raceing ships&#39;, &#39;sailing ships&#39;, &#39;small ships&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(13, &#39;Until the introduction of the Euro, what is the unit of currency in Austria*wank*&#39;, &#39;schilling&#39;, &#39;med&#39;, 3, &#39;penny&#39;, &#39;dollar&#39;, &#39;cents&#39;, &#39;schilling&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(14, &#39;Which African country s capital city is Luanda&#39;, &#39;angola&#39;, &#39;med&#39;, 4, &#39;angola&#39;, &#39;pangoa&#39;, &#39;africa&#39;, &#39;zambia&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(15, &#39;what is the Meaning before noon what does the abbreviation am stand for *wank*&#39;, &#39;ante meridiem&#39;, &#39;med&#39;, 5, &#39;ante sun rize&#39;, &#39;ante meridiem&#39;, &#39;ante morning&#39;, &#39;ante night&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(16, &#39;hat is the fifth book book of the Old Testament?&#39;, &#39;deuteronomy&#39;, &#39;med&#39;, 6, &#39;mark&#39;, &#39;luke&#39;, &#39;matthew&#39;, &#39;deuteronomy&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(17, &#39;Other than the Sun what is the nearest star to the Earth*wank*&#39;, &#39;proxima centauri&#39;, &#39;med&#39;, 7, &#39;sun centauri&#39;, &#39;Proxima sun&#39;, &#39;proxima centauri&#39;, &#39;centauri sun&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(18, &#39;Which band topped the UK album charts in 1991 with their debut LP Nevermind&#39;, &#39;nirvana&#39;, &#39;med&#39;, 8, &#39;pearl jam&#39;, &#39;nirvana&#39;, &#39;ozzy&#39;, &#39;acdc&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(19, &#39;In which city was the first series of Auf Wiedersehen Pet primarily set&#39;, &#39;dusseldorf&#39;, &#39;med&#39;, 9, &#39;the pet primarily&#39;, &#39;dusseldorf&#39;, &#39;the auf&#39;, &#39;pet house&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(20, &#39;What precious gemstone is associated with the 45th wedding anniversary*wank*&#39;, &#39;sapphire&#39;, &#39;med&#39;, 10, &#39;ruby&#39;, &#39;pink ruby&#39;, &#39;sapphire&#39;, &#39;topaz&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(21, &#39; What is the square root of 121*wank*&#39;, &#39;11&#39;, &#39;hard&#39;, 1, &#39;54&#39;, &#39;17&#39;, &#39;11&#39;, &#39;23&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(22, &#39;How many dimes are in a US dollar?&#39;, &#39;10&#39;, &#39;hard&#39;, 2, &#39;30&#39;, &#39;24&#39;, &#39;15&#39;, &#39;10&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(23, &#39;What is the chemical symbol for Gold*wank*&#39;, &#39;au&#39;, &#39;hard&#39;, 3, &#39;pn&#39;, &#39;ga&#39;, &#39;au&#39;, &#39;cn&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(24, &#39;Which television character has the car registration plate FAB1*wank*&#39;, &#39;lady penelope&#39;, &#39;hard&#39;, 4, &#39;fed&#39;, &#39;smufs&#39;, &#39;lady penelope&#39;, &#39;tom and jerry&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(25, &#39;Who composed the ballets The Nutcracker and Swan Lake *wank*&#39;, &#39;peter tchaikovsky&#39;, &#39;hard&#39;, 5, &#39;rob tilton&#39;, &#39;james corbet&#39;, &#39;peter tchaikovsky&#39;, &#39;tom hanks&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(26, &#39;If you suffered from arachnophobia what would you have an irrational fear of&#39;, &#39;spiders&#39;, &#39;hard&#39;, 6, &#39;brids&#39;, &#39;dogs&#39;, &#39;spiders&#39;, &#39;ants&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(27, &#39;Which company produces the computer operating system Windows&#39;, &#39;microsoft&#39;, &#39;hard&#39;, 7, &#39;windows xp&#39;, &#39;vesta&#39;, &#39;windows nt&#39;, &#39;microsoft&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(28, &#39;What is the deepest lake in the world, with depths over 1,600 metres&#39;, &#39;lake baykal&#39;, &#39;hard&#39;, 8, &#39;lake baykal&#39;, &#39;lake tinaroo&#39;, &#39;lake paroo&#39;, &#39;the glass lake&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(29, &#39;What city does Sugar Loaf mountain overlook?&#39;, &#39;rio de janeiro&#39;, &#39;hard&#39;, 9, &#39;vegas&#39;, &#39;reno&#39;, &#39;rio de janeiro&#39;, &#39;green land&#39;, &#39;on&#39;);
                      INSERT INTO `ibwf_quiz` VALUES(30, &#39;What were the names of the 3 ships Christopher Columbus led in his discovery of da Americas in 1492&#39;, &#39;santa maria nina&#39;, &#39;hard&#39;, 10, &#39;santa maria nina&#39;, &#39;maria pinta nina&#39;, &#39;pinta santa nove&#39;, &#39;nina pinta santa&#39;, &#39;on&#39;);
                      
                      -- --------------------------------------------------------
                      
                      --
                      -- Table structure for table `ibwf_quizusers`
                      --
                      
                      CREATE TABLE `ibwf_quizusers` (
                        `uid` int(100) NOT NULL default &#39;0&#39;,
                        `easy_question` char(2) NOT NULL default &#39;0&#39;,
                        `easy_next` char(2) NOT NULL default &#39;0&#39;,
                        `med_question` char(2) NOT NULL default &#39;0&#39;,
                        `med_next` char(2) NOT NULL default &#39;0&#39;,
                        `hard_question` char(2) NOT NULL default &#39;0&#39;,
                        `hard_next` char(2) NOT NULL default &#39;0&#39;,
                        PRIMARY KEY  (`uid`)
                      ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
                      
                      --
                      -- Dumping data for table `ibwf_quizusers`
                      --
                      
                      -- --------------------------------------------------------
                      Want something coded email me at sales@webnwaphost.com for a prices.




                      Comment


                        #12
                        my only problem now is when i click Play it just say

                        Code:
                        Quiz
                        please select level of difficulty
                        your current score is 0
                        but theres no link for difficulties...

                        Comment


                          #13
                          al av a look i didnt test it to see if it worked all a did was convert it so let me put it on a site and al give yu the fix m8
                          Want something coded email me at sales@webnwaphost.com for a prices.




                          Comment


                            #14
                            av just put it on my site and it works perfectly, whats ur site url ?
                            Want something coded email me at sales@webnwaphost.com for a prices.




                            Comment


                              #15
                              av just put it on my site and it works perfectly, whats ur site url ?[/b]
                              you just upload the stuff? OK let me do it again... sorry if i cant put my Crap site here... cause Amy always hack lava sites...

                              Comment

                              Working...
                              X