-
Notifications
You must be signed in to change notification settings - Fork 0
/
juego.php
55 lines (48 loc) · 1.45 KB
/
juego.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
include_once "conexionbd.php";
include_once "Tablero.php";
//Obtención de datos de disparos
if(empty($_POST["celda_x"])){
$celda_x = 0;
$celda_y = 0;
}
else{
$celda = explode("-",$_POST["celda_x"]);
$celda_x = $celda[0];
$celda_y = $celda[1];
}
//--------------------------------
?>
<html>
<head>
<meta http-equiv='Content-type' content='text/html;charset=UTF-8'>
<link rel="stylesheet" href="estiloBase.css">
<link rel="stylesheet" href="jquery-ui/jquery-ui.css">
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='juego.js'></script>
<script type="text/javascript" src="jquery-ui/jquery-ui.js"></script>
</head>
<body>
<div id="contenedor_tablero">
<?php
crearTablero("max");
?>
</div>
<div id="caja_gatillo">
<div class="cerrar"></div>
<div id="gatillo">
Fuego en <b><span id="casilla"></span></b>
<form action="juego.php" method="post">
<input type="hidden" name= "celda_x" id="datoC">
<input type="submit" value="" class="disparar">
</form>
</div>
</div>
<?php
echo "<script>";
echo "probarDisparo('$celda_x','$celda_y');";
echo "</script>";
echo "x:$celda_x - y:$celda_y";
?>
</body>
</html>