Aufgabe 9 fertig
This commit is contained in:
1
M2/Werbeseite/besucher.txt
Normal file
1
M2/Werbeseite/besucher.txt
Normal file
@@ -0,0 +1 @@
|
||||
10
|
||||
@@ -6,6 +6,22 @@
|
||||
*/
|
||||
|
||||
include "gerichte.php";
|
||||
|
||||
$besucherCount = 0;
|
||||
|
||||
if(file_exists("besucher.txt")){
|
||||
$besucherFile = fopen("besucher.txt", "r");
|
||||
$besucherCount = fgets($besucherFile) +1;
|
||||
fclose($besucherFile);
|
||||
$besucherFile = fopen("besucher.txt", "w");
|
||||
fwrite($besucherFile, $besucherCount);
|
||||
fclose($besucherFile);
|
||||
}else{
|
||||
$besucherFile = fopen("besucher.txt", "w");
|
||||
fwrite($besucherFile, 1);
|
||||
fclose($besucherFile);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -158,9 +174,9 @@ include "gerichte.php";
|
||||
</table>
|
||||
<h1 id="zahlen">E-Mensa in Zahlen</h1>
|
||||
<div class="zahlen">
|
||||
<p>X Besuche</p>
|
||||
<p><?php echo $besucherCount;?> Besuche</p>
|
||||
<p>Y Anmeldungen zum Newsletter</p>
|
||||
<p>Z Speisen</p>
|
||||
<p><?php echo count($gerichte);?> Speisen</p>
|
||||
</div>
|
||||
<h1 id="kontakt">Interesse geweckt? Wir informieren</h1>
|
||||
<div class="formular">
|
||||
|
||||
Reference in New Issue
Block a user