diff --git a/src/PHPMailer b/src/PHPMailer index 7c8b786..1d85f9e 160000 --- a/src/PHPMailer +++ b/src/PHPMailer @@ -1 +1 @@ -Subproject commit 7c8b786228bb9e1561ff60a2d6f7f6ce91be6fee +Subproject commit 1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a diff --git a/src/arenas/tictactoe/act.php b/src/arenas/tictactoe/act.php index e6b8f78..45c73d7 100644 --- a/src/arenas/tictactoe/act.php +++ b/src/arenas/tictactoe/act.php @@ -78,10 +78,20 @@ switch ($_POST['act']){ $playerResponse = -1; } + + if($_POST['fullLogs'] == "true"){ + $fullLogs='Arena send to '.$playerName.''.htmlentities($tempPlayer['messageSend']).'
+ HTTP status: '.htmlentities($tempPlayer['httpStatus']).'
+ Bot anwser: '.htmlentities($tempPlayer['response']).'
'; + + }else{ + $fullLogs=''; + } + //tester la validité de la réponse if((isset($map[$playerResponse])) && ($map[$playerResponse]=="")){ //reponse conforme - echo "

".$playerName." joue en ".$playerResponse." la nouvelle grille est
"; + echo "

".$fullLogs.$playerName." joue en ".$playerResponse." la nouvelle grille est
"; $map[$playerResponse]=$playerCHAR; echo ""; for($j=0;$j<3;$j++){ diff --git a/src/arenas/tictactoe/js.js b/src/arenas/tictactoe/js.js index 27908da..97bee88 100644 --- a/src/arenas/tictactoe/js.js +++ b/src/arenas/tictactoe/js.js @@ -12,7 +12,7 @@ function Ajx(){ } return request; } -function tictactoe(bot1,bot2,xd_check){ +function tictactoe(bot1,bot2,xd_check,fullLogs){ document.getElementById('fightResult').innerHTML = '

Please wait...

'; var xhr = Ajx(); xhr.onreadystatechange = function(){if(xhr.readyState == 4){ @@ -22,5 +22,5 @@ function tictactoe(bot1,bot2,xd_check){ }}; xhr.open("POST", '/tictactoe', true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - xhr.send('act=fight&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check); + xhr.send('act=fight&bot1=' + bot1 + '&bot2=' + bot2 + '&fulLLog' = fullLogs + '&xd_check=' + xd_check); } diff --git a/src/arenas/tictactoe/public.php b/src/arenas/tictactoe/public.php index 87372db..2f965dc 100644 --- a/src/arenas/tictactoe/public.php +++ b/src/arenas/tictactoe/public.php @@ -40,6 +40,7 @@ if(!$postParams){ ?>

+