"debut tp4"

This commit is contained in:
JunkJumper 2020-10-19 10:35:29 +02:00
parent 00bcd86bb4
commit 032f990057
6 changed files with 93 additions and 2 deletions

View File

@ -108,7 +108,7 @@ function generatePsw(String $s) : String {
<html>
<head>
<title>M314 - TD1</title>
<title>M314 - TD2</title>
<link rel="icon" type="image/png" href="https://www.junkjumper-projects.com/umming_lines_paint.png" />
<h1>M314 - TD2 : Manipulation des boucles, expressions conditionnelles et introduction aux tables globales</h1>
<meta charset="UTF-8" />

View File

@ -74,6 +74,8 @@ if ($checkE && $checkN) {
echo '<p id="rep">Bonjour ' . $denom . ' ' . $tab['nom'] . ' ' . $tab['prenom'] . ',<br />
Nous vous remercions davoir commandé ' . $v . '<br />'
. 'Un mail de conformation vous a été envoyé à ladresse : ' . $tab['email'] . '</p>';
} else {
echo "NIKTONKU";
}

View File

@ -15,7 +15,7 @@ file_put_contents('./voiture.txt', "");
<html>
<head>
<title>M314 - TD1</title>
<title>M314 - TD3</title>
<link rel="icon" type="image/png" href="https://www.junkjumper-projects.com/umming_lines_paint.png" />
<h1>M314 - TD3 : Manipulation des boucles, expressions conditionnelles et introduction aux tables globales</h1>
<meta charset="UTF-8" />

BIN
2020-2021/TD4/TP4-eno.pdf Normal file

Binary file not shown.

5
2020-2021/TD4/Voitures.txt Executable file
View File

@ -0,0 +1,5 @@
Renault Peugeot Citroen Volkswagen
Twingo 107 C1 Lupo
Clio 207 C3 Polo
Megane 308 C4 Golf
Laguna 508 C5 Passat

84
2020-2021/TD4/index.php Executable file
View File

@ -0,0 +1,84 @@
<!DOCTYPE html>
<?php
/**
* @Author: JunkJumper
* @Link: https://github.com/JunkJumper
* @Copyright: Creative Common 4.0 (CC BY 4.0)
* @Create Time: 05-10-2020 10:26
* @Description: M314 - TD3
*/
$entree = "./Voitures.txt";
function openFile($input) {
$voitures = fopen($input, "r");
$lecture = file($input);
}
function closeFile($input) {
fclose($input);
}
function displayLines($input) {
openFile($input);
while(! feof($input)) {
$line = fgets($input);
echo $line. '<br />';
}
}
?>
<html>
<head>
<title>M314 - TD4</title>
<link rel="icon" type="image/png" href="https://www.junkjumper-projects.com/umming_lines_paint.png" />
<h1>M314 - TD4 Manipulation de fichiers et de répertoire</h1>
<meta charset="UTF-8" />
</head>
<?php
echo displayLines($entree);
?>
<body>
<a href="..">
<button class="button blue">Retour à la page précédente</button>
</a>
</body>
<style>
h1, h2, h3, h4, h5, h6 {
color: #4c6e8a;
}
.button {
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.blue {
background-color: #4c6e8a;
}
b {
color: red;
}
strong.mandatory {
color : red;
}
</style>
</html>