2016-06-17 19:06:09 +02:00
|
|
|
<!--<article>
|
2016-06-11 17:52:13 +02:00
|
|
|
<h2>Cette arène est en cours de maintenance, elle sera de nouveau prête dans les prochains jours</h2>
|
2016-06-11 17:54:00 +02:00
|
|
|
<p><img style="width: 100%;" src="/imgs/Arenes-Nimes.jpg" alt="travaux sur les arènes de Nimes"/></p>
|
2016-06-11 17:52:13 +02:00
|
|
|
|
2016-06-17 19:06:09 +02:00
|
|
|
</article>-->
|
2015-12-10 20:50:19 +01:00
|
|
|
<?php
|
2016-06-17 19:06:09 +02:00
|
|
|
|
2015-12-10 20:53:48 +01:00
|
|
|
require_once(__DIR__."/functions.php");
|
2015-12-10 20:50:19 +01:00
|
|
|
|
2015-12-11 12:16:17 +01:00
|
|
|
$bots=get_Bots_Array('Battleship');
|
2015-12-10 20:50:19 +01:00
|
|
|
$postParams=get_Post_Params(count($bots));
|
|
|
|
if(!$postParams){
|
|
|
|
$bot1="";
|
|
|
|
$bot2="";
|
|
|
|
}else{
|
|
|
|
$bot1=$postParams['bot1'];
|
|
|
|
$bot2=$postParams['bot2'];
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
<article>
|
|
|
|
<h2><?php echo $lang['MAKE_DUEL'];?></h2>
|
2015-12-11 09:46:52 +01:00
|
|
|
<p><label for="width">Largeur de la grille:</label><?php echo generate_numeric_select(1,100,10,'width','width'); ?></p>
|
|
|
|
<p><label for="height">Hauteur de la grille:</label><?php echo generate_numeric_select(1,100,10,'height','height'); ?></p>
|
2015-12-10 22:40:08 +01:00
|
|
|
<p><label for="ship1">Nombre de navires de 1 case:</label><?php echo generate_numeric_select(0,10,0,'ship1','ship1'); ?></p>
|
|
|
|
<p><label for="ship2">Nombre de navires de 2 cases:</label><?php echo generate_numeric_select(0,10,1,'ship2','ship2'); ?></p>
|
|
|
|
<p><label for="ship3">Nombre de navires de 3 cases:</label><?php echo generate_numeric_select(0,10,2,'ship3','ship3'); ?></p>
|
|
|
|
<p><label for="ship4">Nombre de navires de 4 cases:</label><?php echo generate_numeric_select(0,10,1,'ship4','ship4'); ?></p>
|
|
|
|
<p><label for="ship5">Nombre de navires de 5 cases:</label><?php echo generate_numeric_select(0,10,1,'ship5','ship5'); ?></p>
|
|
|
|
<p><label for="ship6">Nombre de navires de 6 cases:</label><?php echo generate_numeric_select(0,10,0,'ship6','ship6'); ?></p>
|
2015-12-11 09:47:48 +01:00
|
|
|
<p><label> </label><em>
|
2015-12-10 22:40:08 +01:00
|
|
|
<select name="bot1" id="bot1">
|
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bots);$i++){
|
|
|
|
if($i==$bot1)
|
2015-12-11 13:16:40 +01:00
|
|
|
$selected='selected="selected"';
|
2015-12-10 22:40:08 +01:00
|
|
|
else
|
2015-12-11 13:16:40 +01:00
|
|
|
$selected='';
|
2015-12-10 22:40:08 +01:00
|
|
|
|
2015-12-12 10:46:38 +01:00
|
|
|
echo '<option value="'.$bots[$i]['id']."-".htmlentities($bots[$i]['name']).'" '.$selected.'>'.htmlentities($bots[$i]['name']).'</option>';
|
2015-12-10 22:40:08 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
VS
|
|
|
|
<select name="bot2" id="bot2">
|
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bots);$i++){
|
|
|
|
if($i==$bot2)
|
2015-12-11 13:16:40 +01:00
|
|
|
$selected='selected="selected"';
|
2015-12-10 22:40:08 +01:00
|
|
|
else
|
2015-12-11 13:16:40 +01:00
|
|
|
$selected='';
|
|
|
|
|
2015-12-12 10:46:38 +01:00
|
|
|
echo '<option value="'.$bots[$i]['id']."-".htmlentities($bots[$i]['name']).'" '.$selected.'>'.htmlentities($bots[$i]['name']).'</option>';
|
2015-12-10 22:40:08 +01:00
|
|
|
}
|
|
|
|
?>
|
2015-12-11 09:46:52 +01:00
|
|
|
</select></em>
|
2015-12-10 22:40:08 +01:00
|
|
|
</p>
|
2016-06-17 19:06:09 +02:00
|
|
|
<p><input type="checkbox" id="fullLogs"/><label for="fullLogs">view the full logs</label></p>
|
2016-06-19 21:29:54 +02:00
|
|
|
<p><label> </label><input type="button" value="<?php echo $lang['FIGHT']; ?>" onclick="battleship(document.getElementById('bot1').value,document.getElementById('bot2').value,getElementById('width').value,getElementById('height').value,getElementById('ship1').value,getElementById('ship2').value,getElementById('ship3').value,getElementById('ship4').value,getElementById('ship5').value,getElementById('ship6').value,'<?php echo xd_check_input(2); ?>',document.getElementById('fullLogs').checked);"></p>
|
2015-12-10 20:50:19 +01:00
|
|
|
<div id="fightResult"></div>
|
2016-06-17 19:06:09 +02:00
|
|
|
</article>
|