PHP practical exam.
8
2/IAW/exams/1er-trimestre/imgs/1.svg
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="140" height="140" viewBox="-10 -10 140 140">
|
||||||
|
<rect x="0" y="0" width="120" height="120" rx="10" ry="10"
|
||||||
|
fill="#E0E0E0" stroke="black" stroke-width="5" />
|
||||||
|
<circle cx="60" cy="62" r="9" fill="white" />
|
||||||
|
<circle cx="60" cy="60" r="9" fill="black" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 382 B |
11
2/IAW/exams/1er-trimestre/imgs/2.svg
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="140" height="140" viewBox="-10 -10 140 140">
|
||||||
|
<rect x="0" y="0" width="120" height="120" rx="10" ry="10"
|
||||||
|
fill="#E0E0E0" stroke="black" stroke-width="5" />
|
||||||
|
<circle cx="30" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="90" r="9" fill="black" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 479 B |
14
2/IAW/exams/1er-trimestre/imgs/3.svg
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="140" height="140" viewBox="-10 -10 140 140">
|
||||||
|
<rect x="0" y="0" width="120" height="120" rx="10" ry="10"
|
||||||
|
fill="#E0E0E0" stroke="black" stroke-width="5" />
|
||||||
|
<circle cx="30" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="60" cy="62" r="9" fill="white" />
|
||||||
|
<circle cx="60" cy="60" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="90" r="9" fill="black" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 576 B |
17
2/IAW/exams/1er-trimestre/imgs/4.svg
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="140" height="140" viewBox="-10 -10 140 140">
|
||||||
|
<rect x="0" y="0" width="120" height="120" rx="10" ry="10"
|
||||||
|
fill="#E0E0E0" stroke="black" stroke-width="5" />
|
||||||
|
<circle cx="30" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="30" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="90" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="90" r="9" fill="black" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 673 B |
20
2/IAW/exams/1er-trimestre/imgs/5.svg
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="140" height="140" viewBox="-10 -10 140 140">
|
||||||
|
<rect x="0" y="0" width="120" height="120" rx="10" ry="10"
|
||||||
|
fill="#E0E0E0" stroke="black" stroke-width="5" />
|
||||||
|
<circle cx="30" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="30" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="90" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="60" cy="62" r="9" fill="white" />
|
||||||
|
<circle cx="60" cy="60" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="90" r="9" fill="black" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 770 B |
23
2/IAW/exams/1er-trimestre/imgs/6.svg
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="140" height="140" viewBox="-10 -10 140 140">
|
||||||
|
<rect x="0" y="0" width="120" height="120" rx="10" ry="10"
|
||||||
|
fill="#E0E0E0" stroke="black" stroke-width="5" />
|
||||||
|
<circle cx="30" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="30" cy="62" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="60" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="30" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="30" cy="90" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="32" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="30" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="62" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="60" r="9" fill="black" />
|
||||||
|
|
||||||
|
<circle cx="90" cy="92" r="9" fill="white" />
|
||||||
|
<circle cx="90" cy="90" r="9" fill="black" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 867 B |
1
2/IAW/exams/1er-trimestre/imgs/dns.svg
Normal file
After Width: | Height: | Size: 5.2 KiB |
1
2/IAW/exams/1er-trimestre/imgs/docker.svg
Normal file
After Width: | Height: | Size: 9.3 KiB |
1
2/IAW/exams/1er-trimestre/imgs/mysql.svg
Normal file
After Width: | Height: | Size: 4.9 KiB |
1
2/IAW/exams/1er-trimestre/imgs/php.svg
Normal file
After Width: | Height: | Size: 324 KiB |
1
2/IAW/exams/1er-trimestre/imgs/simfony.svg
Normal file
After Width: | Height: | Size: 124 KiB |
1
2/IAW/exams/1er-trimestre/imgs/wordpress.svg
Normal file
After Width: | Height: | Size: 36 KiB |
36
2/IAW/exams/1er-trimestre/nicolas-ej1.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Dice Game</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Ejercicio 1: El Juego del Dado Más Alto</h1>
|
||||||
|
<p>Actualice la página para una nueva tirada.</p>
|
||||||
|
<?php
|
||||||
|
$player1 = rand(1,6);
|
||||||
|
$player2 = rand(1,6);
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Jugador 1</th>
|
||||||
|
<th>Jugador 2</th>
|
||||||
|
<th>Resultado</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="imgs/<?= $player1 ?>.svg" /></td>
|
||||||
|
<td><img src="imgs/<?= $player2 ?>.svg" /></td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if($player1 > $player2)
|
||||||
|
echo "Ha ganado el jugador 1";
|
||||||
|
else if($player2 > $player1)
|
||||||
|
echo "Ha ganado el jugador 2";
|
||||||
|
else
|
||||||
|
echo "Han empatado";
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>Última modificación de esta página: <?= date('Y-m-d', filemtime(__FILE__)) ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
19
2/IAW/exams/1er-trimestre/nicolas-ej2.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Encuesta</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Encuesta (Formulario)</h1>
|
||||||
|
<form action="resultado.php" method="post" >
|
||||||
|
Indique cuál es su opción preferida:<br />
|
||||||
|
<input type="radio" name="favorite" value="docker" >Docker</input><br />
|
||||||
|
<input type="radio" name="favorite" value="dns" >DNS</input><br />
|
||||||
|
<input type="radio" name="favorite" value="php" >PHP</input><br />
|
||||||
|
<input type="radio" name="favorite" value="mysql" >MySQL</input><br />
|
||||||
|
<input type="radio" name="favorite" value="simfony" >Simfony</input><br />
|
||||||
|
<input type="radio" name="favorite" value="wordpress" >WordPress</input><br />
|
||||||
|
<input type="submit" /><input type="reset" />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
23
2/IAW/exams/1er-trimestre/resultado.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Resultado</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Encuesta (Resultado)</h1>
|
||||||
|
<?php
|
||||||
|
if(isset($_POST["favorite"])) {
|
||||||
|
?>
|
||||||
|
<p>Su opción es:</p>
|
||||||
|
<img src="imgs/<?= $_POST["favorite"] ?>.svg" width="100px" />
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<p><b>ERROR:</b> No ha seleccionado ninguno.</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<p><a href="nicolas-ej2.php" >Volver al formulario</a></p>
|
||||||
|
<p>Última modificación de esta página: <?= date('Y-m-d', filemtime(__FILE__)) ?>
|
||||||
|
</body>
|
||||||
|
</html>
|