This commit is contained in:
3p01
2025-09-24 08:59:35 +02:00
parent 1c161458ae
commit 11dfe36b0c
4 changed files with 244 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>T59a</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie T59a</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz skrypt tworzący plik cookie wizyta - określający datę ostatnich odwiedzin strony przez użytkownika oraz skrypt odczytujący informację.</p>
</div>
<div class="box">
<?php
setcookie("wizyta", date("Y-m-d H:i:s"), time() + 3600);
if (isset($_COOKIE["wizyta"])) {
echo "Ostatnia wizyta: " . $_COOKIE["wizyta"];
}
?>
</div>
</body>
</html>
<?php

View File

@@ -0,0 +1,68 @@
* {
box-sizing: border-box;
}
body {
font-family: Verdana, serif;
background: #ffffff;
margin: 15px;
font-size: 0.9em;
}
header {
border: 2px solid black;
border-radius: 1em;
padding: 10px 20px;
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
background: #f0f0f0;
}
input {
margin-top: 5px;
margin-bottom: 5px;
width: 30%;
border: black 2px solid;
border-radius: 0.5em;
height: 2em;
}
button {
padding: 5px;
width: 30%;
border: black 2px solid;
border-radius: 0.5em;
font-weight: bold;
margin-top: 10px;
}
pre {
font-family: Verdana, serif;
}
.box {
border: 2px solid black;
padding: 15px 20px;
border-radius: 1em;
margin: 15px 0 10px 0;
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
}
.box h3 {
cursor: pointer;
}
td {
width: 50px;
height: 50px;
margin: 0;
padding: 0;
}
tr {
padding: 0;
}
.y {
background: yellow;
}
.b {
background:blue;
}