Przeglądaj źródła

Changes in the character's movement. Correction in the welcome message.

“paulovieira” 5 lat temu
rodzic
commit
7737db81fc

+ 99 - 36
assets/cn/save.php

@@ -1,18 +1,82 @@
- <?php
+<?php
+
+// ATENCAO ao
+// * nome da base de dados: db_ifractions
+// * nome da tabela dados : ifractions
+
+// assets/cn/save.php on line 23, referer: http://milanesa.ime.usp.br/ifractions1/
+
+/// @see js/circleOne.js
+/// @see js/squareOne.js
+/// @see js/squareTwo.js
+
+function remove_accents ($stripAccents) {
+  /*
+  $stripAccents = strtr($stripAccents,
+         'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ',
+         'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
+  $stripAccents = preg_replace('/[^\x20-\x7E]/','', $stripAccents);
+  */
+  return $stripAccents;
+  }
+
+// Monta vetor [0,1] de dados da m<E1>quina cliente
+function ipMaquina0 () {
+  if (getenv("HTTP_CLIENT_IP"))
+    $ip = getenv("HTTP_CLIENT_IP");
+  elseif (getenv("HTTP_X_FORWARDED_FOR"))
+    $ip = getenv("HTTP_X_FORWARDED_FOR");
+  elseif (getenv("REMOTE_ADDR"))
+    $ip = getenv("REMOTE_ADDR");
+  $resp[0] = $ip;
+  $resp[1] = gethostbyaddr($ip);
+  return $resp;
+  }
+
+// Monta vetor [0,1] de dados da m<E1>quina cliente
+function ipMaquina () {
+  if (getenv("HTTP_CLIENT_IP"))
+    $ip = getenv("HTTP_CLIENT_IP");
+  elseif (getenv("HTTP_X_FORWARDED_FOR"))
+    $ip = getenv("HTTP_X_FORWARDED_FOR");
+  elseif (getenv("REMOTE_ADDR"))
+    $ip = getenv("REMOTE_ADDR");
+  $strIP = $ip;
+  $resp = gethostbyaddr($ip);
+  if (isset($resp) && strlen($resp)>0) {
+    $strIP .= "; " . $resp;
+    }
+  return $strIP;
+  }
+
 
 $servername = "localhost";
-$username = "jrustler_uscore";
-$password = "12345";
-$dbname = "jrustler_fscore";
+$username = "root"; // "jrustler_uscore";
+$password = "sawgeo"; //"12345";
+$dbname = "db_ifractions"; //"jrustler_fscore";
 
 // Create connection
 $conn = new mysqli($servername, $username, $password, $dbname);
 // Check connection
 if ($conn->connect_error) {
-    die("Connection failed: " . $conn->connect_error);
-}
+  die("Connection failed: " . $conn->connect_error);
+  }
+
+
+// $ip = $_REQUEST["s_ip"];
+$ip = ipMaquina();
+/*
+$vet_ip = ipMaquina0();
+$ip = "";
+if (isset($vet_ip[0]) && strlen($vet_ip[0]>0))
+  $ip = $vet_ip[0];
+if (isset($vet_ip[1]) && strlen($vet_ip[1]>0))
+  if (strlen($ip)>0)
+    $ip = $ip . " - " . $vet_ip[1];
+  else
+    $ip = $vet_ip[1];
+*/
 
-$ip = $_REQUEST["s_ip"];
 $play = $_REQUEST["s_name"];
 $date = date("Y-m-d H:i:s");
 $lang = $_REQUEST["s_lang"];
@@ -25,39 +89,38 @@ $resu = $_REQUEST["s_resu"];
 $time = $_REQUEST["s_time"];
 $deta = $_REQUEST["s_deta"];
 
+$play0 = $play; // /var/www/html/ifractions1/js/preMenu.js: insert_name
+$play = remove_accents($play); // /js/squareOne.js:vars=s_ip=143.107.45.11&s_name=&s_lang=pt&s_game=Square&s_mode=A&s_oper=Plus&s_leve=1&s_posi=1&s_resu=true&s_time=3&s_deta=numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2; url=assets/cn/save.php
 
-$sql = "INSERT INTO `score`
-(`s_hostip`,
-`s_playername`,
-`s_datetime`,
-`s_lang`,
-`s_game`,
-`s_mode`,
-`s_operator`,
-`s_level`,
-`s_mappos`,
-`s_result`,
-`s_time`,
-`s_details`)
-VALUES(
-'$ip',
-'$play',
-'$date',
-'$lang',
-'$game',
-'$mode',
-'$oper',
-$leve,
-$posi,
-'$resu',
-$time,
-'$deta')";
+if (is_object($lang))
+  $lang = json_decode($lang);
 
+// Table 'ifractions': id s_hostip s_playername s_datetime s_lang s_game s_mode s_operator s_level s_mappos s_result s_time s_details
+$sql = "INSERT INTO ifractions
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('$ip', '$play', '$date', '$lang', '$game', '$mode', '$oper', $leve, $posi, '$resu', $time, '$deta')";
+
+// Register in database
 if ($conn->query($sql) === TRUE) {
-    echo "Grabado";
+  print "Gravado/Grabado";
+  $result = "OK";
 } else {
-    echo "Error: " . $sql . "<br>" . $conn->error;
-}
+  print "Error: " . $sql . "<br>" . $conn->error;
+  $result = "Erro: " . $conn->error;
+  }
+
+
+//DEBUG
+// js/menu.js : var menuState = { player_info = ... username ...}
+// welcome
+// index.php: game.state.add('name', nameState);
+$name = $_REQUEST["name"];
+$username = $_REQUEST["username"];
+$data = date('Y_m_d_H_i_s');
+$fp = fopen('../../temp/file_' . $data . ".txt", 'w');
+fwrite($fp, "nome=" . $play0 . ", name=" . $name . ", username=" . $username . "\n" . $sql . "\nResultado: " . $result);
+fclose($fp);
 
 $conn->close();
 ?> 

+ 1 - 1
assets/languages/es_PE.json

@@ -19,7 +19,7 @@
     "without_name": "SIN",
     "insert_name" : "INGRESA TU NOMBRE",
     "ready" : "LISTO",
-    "welcome" : "Bienvenid@",
+    "welcome" : "Hola que tal",
     "error_msg" : "Debes seleccionar una porción más pequeña que su tamaño completo",
     "empty_name" : "Usted ha olvidado de escribir su nombre",
     "audio" : "AUDIO"

+ 1 - 1
assets/languages/fr_FR.json

@@ -19,7 +19,7 @@
     "without_name": "SANS",
     "insert_name" : "ENTREZ VOTRE NOM",
     "ready" : "PRET",
-    "welcome" : "Bienvenue",
+    "welcome" : "Salut",
     "error_msg" : "Vous devriez choisir une portion plus petite que sa taille totale",
     "empty_name" : "Vous avez oublié de taper votre nom",
     "audio" : "AUDIO"

+ 1 - 1
assets/languages/pt_BR.json

@@ -19,7 +19,7 @@
     "without_name": "SEM",
     "insert_name" : "DIGITE SEU NOME",
     "ready" : "PRONTO",
-    "welcome" : "Bem vind@",
+    "welcome" : "Olá",
     "error_msg" : "Você deve selecionar uma porção menor que o seu tamanho total",
     "empty_name" : "Você esqueceu de digitar seu nome",
     "audio" : "ÁUDIO" 

+ 12 - 10
js/circleOne.js

@@ -238,12 +238,12 @@ var mapCircleOne = {
         var percentText = onePosition*25;
         var percentBlocks = onePosition;
         for(var p=0;p<percentBlocks;p++){
-            var block = game.add.image(680+p*37, 10, 'block');
+            var block = game.add.image(660+p*37, 10, 'block');
             block.scale.setTo(2.5, 1); //Scaling to double width
         }
-        game.add.text(840, 10, percentText+'%', styleMenu);
-        game.add.text(670, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
-        game.add.image(680, 10, 'pgbar');
+        game.add.text(820, 10, percentText+'%', styleMenu);
+        game.add.text(650, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
+        game.add.image(660, 10, 'pgbar');
         
          //Road
         this.points = {
@@ -888,12 +888,14 @@ var gameCircleOne = {
     postScore: function (){
         
         var abst = "numCircles:"+numBlocks+", valCircles: " + detail+" balloonX: " + basket.x + ", selIndex: " + fractionIndex;
-        
+
+        var lang_str = "pt_BR"; //TODO NAO esta pegando a lingua definida pelo usuario!
+
         var hr = new XMLHttpRequest();
         // Create some variables we need to send to our PHP file
         var url = "assets/cn/save.php";
-        var vars = "s_ip="+hip+"&s_name="+name+"&s_lang="+lang+"&s_game="+oneShape+"&s_mode="+oneType;
-        vars += "&s_oper="+oneOperator+"&s_leve="+oneDifficulty+"&s_posi="+onePosition+"&s_resu="+result+"&s_time="+totalTime+"&s_deta="+abst;
+        var vars = "s_ip=" + hip + "&s_name=" + username + "&s_lang=" + lang + "&s_game=" + oneShape + "&s_mode=" + oneType;
+        vars += "&s_oper=" + oneOperator + "&s_leve=" + oneDifficulty + "&s_posi=" + onePosition + "&s_resu=" + result + "&s_time=" + totalTime + "&s_deta=" + abst;
         
         hr.open("POST", url, true);
         hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
@@ -972,12 +974,12 @@ var endCircleOne = {
         
         // Progress bar
         for(var p=1;p<=5;p++){
-            var block = game.add.image(672+(p-1)*30, 10, 'block');
+            var block = game.add.image(660+(p-1)*30, 10, 'block');
             block.scale.setTo(2, 1); //Scaling to double width
         }
         game.add.text(820, 10, '100%', styleMenu);
-        game.add.text(660, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
-        game.add.image(670, 10, 'pgbar');
+        game.add.text(650, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
+        game.add.image(660, 10, 'pgbar');
         
         //School and trees
         game.add.sprite(600, 222 , 'school').scale.setTo(0.7);

+ 1 - 1
js/menu.js

@@ -193,7 +193,7 @@ var menuState = {
         }
         
         if(this.label){
-                     //-    sem/com                  legendas
+          //-    sem/com                  legendas
             title += " - " + lang.with_name + " " + lang.label_name;
         }else{
             title += " - " + lang.without_name + " " + lang.label_name;

+ 7 - 8
js/preMenu.js

@@ -83,12 +83,10 @@ var langState = {
     },
     
     setLang: function(){
-
         //set language
         lang = this.lang;
         //start resource loading
         game.state.start('load');
-
     }
 
 };
@@ -114,10 +112,10 @@ var loadState = {
         lang = game.cache.getJSON('dictionary');
         audio_lang_aux = lang.audio_on;
         if(!nameStatus){
-        	nameStatus = true;
-        	game.state.start('name');
+          nameStatus = true;
+          game.state.start('name');
         }else{
-        	game.state.start('menu');
+          game.state.start('menu');
         }
     
     }
@@ -170,10 +168,11 @@ var nameState = {
     nameIsEmpty: function() {
 
         if(document.getElementById("name_id").value!=""){
-            nameState["ready"]();
-            errorEmptyName.setText("");
+          nameState["ready"]();
+          errorEmptyName.setText("");
         }else{
-            errorEmptyName.setText(lang.empty_name);
+          errorEmptyName.setText(lang.empty_name);
+          //D alert('js/preMenu.js: errorEmptyName.setText=' + lang.empty_name);
         }
 
     },

+ 56 - 16
js/squareOne.js

@@ -192,12 +192,12 @@ var mapSquareOne = {
         var percentText = onePosition*20;
         var percentBlocks = onePosition;
         for(var p=1;p<=percentBlocks;p++){
-            var block = game.add.image(680+(p-1)*30, 10, 'block');
+            var block = game.add.image(660+(p-1)*30, 10, 'block');
             block.scale.setTo(2, 1); //Scaling to double width
         }
-        game.add.text(840, 10, percentText+'%', styleMenu);
-        game.add.text(670, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
-        game.add.image(680, 10, 'pgbar');
+        game.add.text(820, 10, percentText+'%', styleMenu);
+        game.add.text(650, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
+        game.add.image(660, 10, 'pgbar');
         
          //Road
         this.points = {
@@ -632,8 +632,13 @@ var gameSquareOne = {
             if(!move){
                 if(oneType=='A'){
                     //Follow mouse
-                    if (game.physics.arcade.distanceToPointer(arrow, game.input.activePointer) > 8){
-                        var xPos = game.input.mousePointer.x;
+                    if (game.physics.arcade.distanceToPointer(arrow, game.input.activePointer) > 8 )
+				    {	
+                    	var xPos = game.input.mousePointer.x;
+			            //set left limit to the arrow  
+                    	if  (xPos < 250){
+                    		xPos = 250;
+                    	}
                         arrow.x = xPos;
                     }                    
                 }
@@ -874,20 +879,55 @@ var gameSquareOne = {
     },
 
     postScore: function (){
-        
+
+        var lang_str = "pt_BR"; //TODO NAO esta pegando a lingua definida pelo usuario!
+	var aux;
+        // Get correct information about username and default language
+	// Variables 'username' and 'lang' is define on: js/menu.js
+	// Variable 'lang' has all the JSON content of 'assets/languages/pt_BR.json', 'lang.lang' defined in 'js/preMenu.js' (setLang())
+	// TODO: nao descobri esquema para pegar 'lang' (como 'pt_BR' ou 'en_US'), 'lang' esta' com o dicinario de lingua (definido em 'assets/languages/pt_BR.json').
+        if (name=='') name = username; //leo the correct is 'username'
+        // assets/languages/pt_BR.json
+
+        //DEBUG Testar 'lang'
+	/*
+        var contact = "";
+        if (typeof lang === 'object') {
+          //contact = JSON.parse(lang);
+          for (var i in lang) // will enumerate values of 'assets/languages/pt_BR.json'
+             contact += lang[i];
+          // Finaliza com os valores de 'assets/languages/pt_BR.json': 'CARREGANDOFraçõesSELECIONE UM JOGODificuldadeNívelSELECINAR OPERAÇÃO E DIFICULDADEBom trabalho!Tente novamente!SELECIONAR IDIOMAMENU PRINCIPALVOLTARVER
+          // SOLUÇÃOCírculosQuadriláteroslegendaMODOCOMSEMDIGITE SEU NOMEPRONTOOláVocê deve selecionar uma porção menor que o seu tamanho totalVocê esqueceu de digitar seu nomeÁUDIO'
+          lang_str = contact; aux = 1;
+          }
+	else
+        // if (lang === 'undefined') lang_str = "pt_BR";
+        */
+
         var abst = "numBlocks:"+numBlocks+", valBlocks: " + detail+" blockIndex: " + blockIndex + ", floorIndex: " + floorIndex;
-        
+
         var hr = new XMLHttpRequest();
         // Create some variables we need to send to our PHP file
         var url = "assets/cn/save.php";
-        var vars = "s_ip="+hip+"&s_name="+name+"&s_lang="+lang+"&s_game="+oneShape+"&s_mode="+oneType;
-        vars += "&s_oper="+oneOperator+"&s_leve="+oneDifficulty+"&s_posi="+onePosition+"&s_resu="+result+"&s_time="+totalTime+"&s_deta="+abst;
-        
+        var vars = "s_ip="+hip+"&s_name=" + name+"&s_lang=" + lang_str + "&s_game=" + oneShape + "&s_mode=" + oneType;
+        vars += "&s_oper=" + oneOperator + "&s_leve=" + oneDifficulty + "&s_posi=" + onePosition + "&s_resu=" + result + "&s_time=" + totalTime + "&s_deta=" + abst;
+
+        //D alert('/js/squareOne.js: url=' + url + '; aux=' + aux + ', lang_str=' + lang_str + ', lang=' + lang); //  + ', this.lang=" + this.lang
+        //D /js/squareOne.js: url=assets/cn/save.php; aux=1, lang_str=CARREGANDOFraçõesSELECIONE UM JOGODificuldadeNívelSELECINAR OPERAÇÃO E DIFICULDADEBom trabalho!Tente novamente!SELECIONAR IDIOMAMENU PRINCIPALVOLTARVER
+        //D SOLUÇÃOCírculosQuadriláteroslegendaMODOCOMSEMDIGITE SEU NOMEPRONTOOláVocê deve selecionar uma porção menor que o seu tamanho totalVocê esqueceu de digitar seu nomeÁUDIO, lang=[object Object]
+
+        // Sobre nome do usuario:
+	// * js/squareOne.js: name
+	// * js/pt_BR.json:   welcome="Ola'", insert_name="DIGITE SEU NOME"
+	// * assets/cn/save.php : $play = $_REQUEST["s_name"];
+	// * js/preMenu.js : insert_name, game.add.text(...), username = document.getElementById("name_id").value;
+
+	// Pegar valor de PHP para JS: echo("<script language='javascript'>location.href='download.php?arquivo=$nome_arquivo&dir=$dir&id_exer=$id_exer'</script>");
+
         hr.open("POST", url, true);
         hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
         hr.onreadystatechange = function() {
             console.log(hr);
-
             if(hr.readyState == 4 && hr.status == 200) {
                 var return_data = hr.responseText;
                 console.log(return_data);
@@ -947,12 +987,12 @@ var endSquareOne = {
         
         // Progress bar
         for(var p=1;p<=5;p++){
-            var block = game.add.image(680+(p-1)*30, 10, 'block');
+            var block = game.add.image(660+(p-1)*30, 10, 'block');
             block.scale.setTo(2, 1); //Scaling to double width
         }
-        game.add.text(830, 10, '100%', styleMenu);
-        game.add.text(670, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
-        game.add.image(680, 10, 'pgbar');
+        game.add.text(820, 10, '100%', styleMenu);
+        game.add.text(650, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
+        game.add.image(660, 10, 'pgbar');
         
         //Farm and trees
         game.add.sprite(650, 260 , 'farm').scale.setTo(1.1);

+ 49 - 38
js/squareTwo.js

@@ -3,7 +3,7 @@
         create: function(){},
         ---------------------------- end of phaser functions
         loadMap: function(){}
-    }  ;
+    };
 
     var mapSquareTwo = {
         create: function(){},
@@ -205,12 +205,12 @@ var mapSquareTwo={
         var percentText = onePosition*20;
         var percentBlocks = onePosition;
         for(var p=1;p<=percentBlocks;p++){
-            var block = game.add.image(680+(p-1)*30, 10, 'block');
+            var block = game.add.image(660+(p-1)*30, 10, 'block');
             block.scale.setTo(2, 1); //Scaling to double width
         }
-        game.add.text(840, 10, percentText+'%', styleMenu);
-        game.add.text(670, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
-        game.add.image(680, 10, 'pgbar');
+        game.add.text(820, 10, percentText+'%', styleMenu);
+        game.add.text(650, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
+        game.add.image(660, 10, 'pgbar');
         
          //Road
         this.points = {
@@ -256,7 +256,6 @@ var mapSquareTwo={
             sprite.scale.setTo(0.6);
             sprite.anchor.setTo(0.5, 0.95);
         }
-
         
         // places
         for (var p = 1; p < this.points.x.length -1; p++){
@@ -391,13 +390,16 @@ var gameSquareTwo = {
         }
              
         //kid
-        kid = game.add.sprite(100, 470, 'kid_walk');
+        kid = game.add.sprite(100, 470, 'kid_lost');
         kid.anchor.setTo(0.5, 0.7);
         kid.scale.setTo(0.8);
-        kid.animations.add('right',[0,1,2,3,4,5,6,7,8,9,10,11]);
-        kid.animations.add('left',[23,22,21,20,19,18,17,16,15,14,13,12]);
-        kidDirection = 'right';
-        kid.animations.play('right', 6, true);
+        //kid.animations.add('right',[0,1,2,3,4,5,6,7,8,9,10,11]);
+        //kid.animations.add('left',[23,22,21,20,19,18,17,16,15,14,13,12]);
+        kid.animations.add('front', [3,4,5])
+        kidDirection = 'front';
+        kidLeftLimit  = 100;
+        kidRightLimit = 800;
+        kid.animations.play('front', 6, true);
                 
         //Control variables
         sizeA = 0; //Size of first block
@@ -577,25 +579,32 @@ var gameSquareTwo = {
 
     },
     
-    update: function() {
-        
-        // kid walking cycle during the phase
-        if(!(clickA && clickB) && !animate){
-            if(kidDirection=='right'){
-                kid.x += 1;
-                if(kid.x>=800){
-                    kidDirection='left';
-                    kid.animations.play('left', 8, true);
-                }
-            }else{
-                kid.x -= 1;
-                if(kid.x<=100){
-                    kidDirection='right';
-                    kid.animations.play('right', 8, true);
-                }
-            }
+    update: function() 
+    {
+    	if (game.physics.arcade.distanceToPointer(kid, game.input.activePointer) > 20 )
+	    {	
+    		    		
+        	var xPos = game.input.mousePointer.x;
+        	
+        	/*if (xPos < kid.x + 10){
+        		kidDirection='right';
+        		kid.animations.play('right', 8, true);
+        	}else if (xPos > kid.x){
+        		kidDirection='right';
+        		kid.animations.play('right', 8, true);
+        	}*/
+        			
+        	//set limit to the arrow  
+        	if  (xPos < kidLeftLimit){
+        		xPos = kidLeftLimit;
+        	}
+        	if  (xPos > kidRightLimit){
+        		xPos = kidRightLimit;
+        	}
+            
+        	kid.x = xPos;
         }
-
+    	
         //If clicked A only, animate
         if(animateA){
             for(var i=0;i<valueA;i++){
@@ -635,6 +644,7 @@ var gameSquareTwo = {
                     if(audioStatus){
                         okSound.play();
                     }
+                    kid.animations.stop();
                     okImg.alpha = 1;
                 //fractions are not equivalent
                 }else{
@@ -656,9 +666,9 @@ var gameSquareTwo = {
         if(animate){
             counter++;
             if(result){
-                kid.x += 2;
-                kidDirection='right';
-                kid.animations.play('right', 8, true);
+//              kid.x += 2;
+//            	kidDirection='right';
+//				kid.animations.play('right', 8, true);
             }
             if(counter>endCounter){
                 game.state.start('mapSTwo');
@@ -791,12 +801,13 @@ var gameSquareTwo = {
     postScore: function (){
         
         var abst = "numBlocksA:"+sizeA+", valueA: " + valueA +", numBlocksB: " + sizeB + ", valueB: " + valueB;
-        
+
+        var lang_str = "pt_BR"; //TODO NAO esta pegando a lingua definida pelo usuario!
         var hr = new XMLHttpRequest();
         // Create some variables we need to send to our PHP file
         var url = "assets/cn/save.php";
-        var vars = "s_ip="+hip+"&s_name="+name+"&s_lang="+lang+"&s_game="+twoShape+"&s_mode="+twoType;
-        vars += "&s_oper=Equal&s_leve="+twoDifficulty+"&s_posi="+twoPosition+"&s_resu="+result+"&s_time="+totalTime+"&s_deta="+abst;
+        var vars = "s_ip="+hip+"&s_name=" + username + "&s_lang=" + lang_str + "&s_game=" + twoShape + "&s_mode=" + twoType;
+        vars += "&s_oper=Equal&s_leve=" + twoDifficulty + "&s_posi=" + twoPosition + "&s_resu=" + result + "&s_time=" + totalTime + "&s_deta=" + abst;
         
         hr.open("POST", url, true);
         hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
@@ -863,12 +874,12 @@ var endSquareTwo = {
         
         // Progress bar
         for(var p=1;p<=5;p++){
-            var block = game.add.image(672+(p-1)*30, 10, 'block');
+            var block = game.add.image(660+(p-1)*30, 10, 'block');
             block.scale.setTo(2, 1); //Scaling to double width
         }
         game.add.text(820, 10, '100%', styleMenu);
-        game.add.text(660, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
-        game.add.image(670, 10, 'pgbar');
+        game.add.text(650, 10, lang.difficulty + ' ' + oneDifficulty, styleMenu).anchor.setTo(1,0);
+        game.add.image(660, 10, 'pgbar');
         
         //School and trees
         game.add.sprite(600, 222 , 'school').scale.setTo(0.7);

+ 5 - 0
temp/file_2019_04_09_12_18.txt

@@ -0,0 +1,5 @@
+nome=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', '', '2019-04-09 12:42:18', 'pt', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')

+ 5 - 0
temp/file_2019_04_09_12_29.txt

@@ -0,0 +1,5 @@
+nome=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', '', '2019-04-09 12:43:29', 'pt', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')

+ 4 - 0
temp/file_2019_04_09_12_31.txt

@@ -0,0 +1,4 @@
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', '', '2019-04-09 12:37:31', 'pt', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')

+ 5 - 0
temp/file_2019_04_09_12_51_54.txt

@@ -0,0 +1,5 @@
+nome=name=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', '', '2019-04-09 12:51:54', 'pt', 'Square', 'A', 'Plus', 1, 1, 'true', 4, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')

+ 5 - 0
temp/file_2019_04_09_16_54_55.txt

@@ -0,0 +1,5 @@
+nome=name=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', '', '2019-04-09 16:54:55', 'pt', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')

+ 5 - 0
temp/file_2019_04_09_17_02_50.txt

@@ -0,0 +1,5 @@
+nome=, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', '', '2019-04-09 17:02:50', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')

+ 5 - 0
temp/file_2019_04_09_17_05_43.txt

@@ -0,0 +1,5 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+( '::1; localhost', 'LeYEnidas de Oliveira BrandYeo', '2019-04-09 17:05:43', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')

+ 7 - 0
temp/file_2019_04_09_17_27_05.txt

@@ -0,0 +1,7 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas de Oliveira BrandYeo', '2019-04-09 17:27:05', 'undefined', 'Square', 'A', 'Plus', 1, 1, 'true', 5, 'numBlocks:5, valBlocks: 1,1,1,1,1, blockIndex: 4, floorIndex: 4')
+Resultado: Erro: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_oper' at line 1

+ 7 - 0
temp/file_2019_04_09_17_30_01.txt

@@ -0,0 +1,7 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas de Oliveira BrandYeo', '2019-04-09 17:30:01', 'undefined', 'Square', 'A', 'Plus', 1, 1, 'true', 4, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')
+Resultado: Erro: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_oper' at line 1

+ 7 - 0
temp/file_2019_04_09_17_33_19.txt

@@ -0,0 +1,7 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas de Oliveira BrandYeo', '2019-04-09 17:33:19', 'undefined', 'Square', 'A', 'Plus', 1, 1, 'true', 4, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')
+Resultado: Erro: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_oper' at line 1

+ 7 - 0
temp/file_2019_04_09_17_35_16.txt

@@ -0,0 +1,7 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas de Oliveira BrandYeo', '2019-04-09 17:35:16', 'undefined', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')
+Resultado: Erro: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_oper' at line 1

+ 7 - 0
temp/file_2019_04_09_18_11_26.txt

@@ -0,0 +1,7 @@
+nome=Leônidas, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas', '2019-04-09 18:11:26', 'CARREGANDOFraçõesSELECIONE UM JOGODificuldadeNívelSELECINAR OPERAÇÃO E DIFICULDADEBom trabalho!Tente novamente!SELECIONAR IDIOMAMENU PRINCIPALVOLTARVER SOLUÇÃOCírculosQuadriláteroslegendaMODOCOMSEMDIGITE SEU NOMEPRONTOOláVocê deve selecionar uma porção menor que o seu tamanho totalVocê esqueceu de digitar seu nomeÁUDIO', 'Square', 'A', 'Plus', 1, 1, 'true', 4, 'undefined')
+Resultado: Erro: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_oper' at line 1

+ 7 - 0
temp/file_2019_04_09_18_12_44.txt

@@ -0,0 +1,7 @@
+nome=Leônidas, name=, username=
+INSERT INTO 'ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas', '2019-04-09 18:12:44', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')
+Resultado: Erro: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ifractions'
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_oper' at line 1

+ 6 - 0
temp/file_2019_04_09_18_20_29.txt

@@ -0,0 +1,6 @@
+nome=Leônidas, name=, username=
+INSERT INTO ifractions
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas', '2019-04-09 18:20:29', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 3, 'numBlocks:3, valBlocks: 1,1,1, blockIndex: 2, floorIndex: 2')
+Resultado: OK

+ 6 - 0
temp/file_2019_04_09_18_23_37.txt

@@ -0,0 +1,6 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO ifractions
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'Lenidas de Oliveira Brando', '2019-04-09 18:23:37', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 5, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')
+Resultado: 

+ 6 - 0
temp/file_2019_04_09_18_26_51.txt

@@ -0,0 +1,6 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO ifractions
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'LeYEnidas de Oliveira BrandYeo', '2019-04-09 18:26:51', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 4, 'numBlocks:4, valBlocks: 1,1,1,1, blockIndex: 3, floorIndex: 3')
+Resultado: 

+ 6 - 0
temp/file_2019_04_09_18_27_44.txt

@@ -0,0 +1,6 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO ifractions
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'Leônidas de Oliveira Brandão', '2019-04-09 18:27:44', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 5, 'numBlocks:5, valBlocks: 1,1,1,1,1, blockIndex: 4, floorIndex: 4')
+Resultado: 

+ 6 - 0
temp/file_2019_04_09_18_28_42.txt

@@ -0,0 +1,6 @@
+nome=Leônidas de Oliveira Brandão, name=, username=
+INSERT INTO ifractions
+(s_hostip, s_playername, s_datetime, s_lang, s_game, s_mode, s_operator, s_level, s_mappos, s_result, s_time, s_details)
+VALUES
+('::1; localhost', 'Leônidas de Oliveira Brandão', '2019-04-09 18:28:42', 'pt_BR', 'Square', 'A', 'Plus', 1, 1, 'true', 5, 'numBlocks:5, valBlocks: 1,1,1,1,1, blockIndex: 4, floorIndex: 4')
+Resultado: OK