Example #1
0
function mostrar_animacao_de_erro($p_tipo_proxima_questao, $p_proxima_questao)
{
    ?>
        </head>
        <body class="bg-Parallax">
        
        <div id="fundo-escuro"></div>
        <div id="negativo" > </div>
        </body>
        </html>
        <script>
        
            var alturaTela = $(document).height();
            var larguraTela = $(window).width();
                //colocando o fundo preto
            $('#fundo-escuro').css({'width':larguraTela,'height':alturaTela});
          //  $('#fundo-escuro').fadeIn(200); 
            $('#fundo-escuro').fadeTo(200,0.8, function(){
                    $("#negativo").html("<img src='<?php 
    echo ROOT_URL;
    ?>
view/img/negativo.gif'>");
            });


            $('#negativo').css({'top':($(window).height() / 3) ,
                                'left':($(window).width() /2) - ( $('#negativo').width() / 2 )});
            $('#negativo').show();



            $('#fundo-escuro, #negativo').click(function(){            
                <?php 
    avancar($p_tipo_proxima_questao, $p_proxima_questao);
    ?>
            });        
        </script>
    <?php 
}
Example #2
0
    $_SESSION['SOM'] = 'coin.mp3';
    $_SESSION['ACERTOU_ANTERIOR'] = 1;
} else {
    $_SESSION['SOM'] = 'crash.mp3';
    $_SESSION['ACERTOU_ANTERIOR'] = 0;
}
//******************************************************************************************************************************//
//******************************************** animação de erro *******************************************//
//se errou, mostrar dedo negativo
if ($resposta_atual != 1) {
    require_once ROOT . 'view/quiz/verrou.php';
    require_once ROOT . 'view/vhead.php';
    mostrar_animacao_de_erro($tipo_proxima_questao, $proxima_questao);
} else {
    echo ' <script>';
    avancar($tipo_proxima_questao, $proxima_questao);
    echo ' </script>';
}
//******************************************************************************************************************************//
//********************                 Regras para continuar ou finalizar                  *************************************//
//******************************************************************************************************************************//
/* $finalizar = ($_SESSION['ERROS'] == 100);
   $ganhou = ($_SESSION['ACERTOS'] == $_SESSION['QTD_QUESTOES']); 

if ((!isset($proxima_questao))||(($proxima_questao) == 0)){
  $_SESSION['STATUS']= -1;//acabou as questoes
  $finalizar = true;
}

if($ganhou) 
 $_SESSION['STATUS']= 1;//ganhou