This commit is contained in:
jakub
2025-11-16 19:21:21 +01:00
parent 1f7ddfd4a0
commit d3e59d6355
21 changed files with 2785 additions and 0 deletions

View File

@@ -174,6 +174,7 @@ input[type="email"],
input[type="password"], input[type="password"],
input[type="number"], input[type="number"],
input[type="tel"], input[type="tel"],
input[type="date"],
textarea, textarea,
select { select {
width: 100%; width: 100%;

View File

@@ -0,0 +1,67 @@
<!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>Z111 - Ramka ze znaków</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z111</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który rysuje ramkę według podanego schematu, gdzie a oznacza szerokość, a b wysokość ramki. Ramka powinna składać się wyłącznie z znaków pionowych (|) dla wszystkich krawędzi, z wypełnieniem spacjami wewnątrz. Użytkownik podaje a i b w formularzu, a program weryfikuje, czy wartości liczbami całkowitymi dodatnimi. Dla przypadku a=1 i b=1 ramka powinna być pojedynczym znakiem |.</p>
<h3>Wskazówki dla ucznia:</h3>
<ul>
<li>Sprawdź, czy a i b liczbami całkowitymi za pomocą is_numeric() i weryfikacji, czy po konwersji na int nie tracą wartości.</li>
<li>Zweryfikuj, czy a i b dodatnie (większe od 0).</li>
<li>Użyj pętli do generowania wierszy ramki: dla a=1 i b=1 zwróć pojedynczy |, w przeciwnym razie górny i dolny wiersz z |, a środkowe z | i spacjami.</li>
<li>Wyświetl wynik w elemencie &lt;pre>, aby zachować formatowanie tekstu.</li>
<li>Zabezpiecz dane wejściowe za pomocą htmlspecialchars() przy pobieraniu, aby chronić przed XSS.</li>
</ul>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<legend>Wymiary ramki:</legend>
<label for="a">Szerokość (a):</label>
<input type="number" name="a" id="a" required>
<label for="b">Wysokość (b):</label>
<input type="number" name="b" id="b" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
$b = htmlspecialchars($_POST['b']);
echo '<div class="box">';
echo "<p>Szerokość (a): $a <br>Wysokość (b): $b <br>Rezultat: </p>";
echo '<pre>';
if ($a > 0 && $b > 0) {
if ($a == 1 && $b == 1) {
echo '|';
} elseif ($b == 1) {
echo str_repeat('|', $a);
} elseif ($a == 1) {
for ($i = 0; $i < $b; $i++) {
echo "|\n";
}
} else {
echo str_repeat('|', $a) . "\n";
for ($i = 0; $i < $b - 2; $i++) {
echo '|' . str_repeat(' ', $a - 2) . "|\n";
}
echo str_repeat('|', $a);
}
}
echo '</pre>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,299 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,41 @@
<?php
?>
<!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>Z112 - Ile dni do daty</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z112</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej daty wypisuje ile dni dzieli dzisiejszy dzień i tą datę. W przypadku daty z przeszłości podaje wartość z minusem.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="data">Podaj datę:</label>
<input type="date" name="data" id="data">
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$data = htmlspecialchars($_POST['data']);
echo '<div class="box">';
echo "Wybrana data: $data <br>";
echo "Dzisiejsza data: " . date('Y-m-d') . "<br>";
echo "Ile dni: " . (strtotime($data) - strtotime('today')) / 86400;
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,299 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,54 @@
<?php
?>
<!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>Z113 - Diament z cegiełek</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z113</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Program rysuje na stronie figurę w kształcie diamentu. Danymi wejściowymi są:</p>
<ul>
<li>wzór cegiełki - jako łańcuch znaków.</li>
<li>ilość cegiełek w najdłuższym rzędzie (maksymalnie 50).</li>
</ul>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="brick">Wprowadź symbol cegły</label>
<input type="text" name="brick" id="brick" value="[==]">
<label for="mostBricks">Wprowadź liczbę wierszy</label>
<input type="number" name="mostBricks" id="mostBricks" max="50" value="12">
</fieldset>
<button type="submit">Rysuj diament</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$brick = htmlspecialchars($_POST['brick']);
$mostBricks = htmlspecialchars($_POST['mostBricks']);
echo '<div class="box" style="text-align:center;">';
echo '<span id="bricks" style="text-align:center; justify-content: center;">';
for ($i = 0; $i < $mostBricks; $i++) {
echo str_repeat($brick, $i + 1) . '<br>';
}
for ($i = $mostBricks - 2; $i >= 0; $i--) {
echo str_repeat($brick, $i + 1) . '<br>';
}
echo '</span>';
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > :last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,55 @@
<!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>Z69 - Liczby od A do 100000</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z69</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla liczby całkowitej A <100.000 podanej przez użytkownika wyświetla liczby od A do 100.000. Program powinien przyjmować dane z formularza, weryfikować, czy A jest liczbą całkowitą mniejszą od 100.000, a następnie wyświetlać wszystkie liczby w zakresie od A do 100.000 w czytelny sposób (np. w pionowej liście lub oddzielone przecinkami).</p>
<h3>Wskazówki dla ucznia:</h3>
<ul>
<li>Sprawdź, czy A jest liczbą za pomocą is_numeric() i czy jest całkowita za pomocą is_int() po konwersji.</li>
<li>Zweryfikuj warunek A < 100.000, aby spełnić wymagania zadania.</li>
<li>Użyj pętli for lub while, aby wygenerować liczby od A do 100.000.</li>
<li>Zabezpiecz dane wejściowe za pomocą htmlspecialchars(), aby uniknąć problemów z XSS.</li>
<li>Rozważ wyświetlanie liczb w czytelnej formie, np. z użyciem &lt;br> dla listy pionowej.</li>
</ul>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<legend>Liczba początkowa:</legend>
<label for="a">A:</label>
<input type="number" name="a" id="a" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
if (is_int($a) && $a < 100000) {
echo '<div class="box">';
echo "Liczby od $a do 100000: <br>";
echo '<ul>';
for ($i = 1; $i <= 100000; $i++) {
echo '<li>' . $i . '</li>';
}
echo '</ul>';
echo '</div>';
} else {
echo "<div class='box'>A jest większe od 100000 lub nie jest liczbą całkowitą!</div>";
}
}
?>
</body>
</html>

View File

@@ -0,0 +1,299 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,40 @@
<!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>Z72 - Liczby A do 100</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z72</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej liczby całkowitej A, wyświetla liczby od 1 do A oddzielone średnikami o ile liczba A jest mniejsza od 100 w przypadku liczby większej wyświetla liczby jedynie do 100 i kończy działanie.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj liczbę A:</label>
<input type="number" name="a" id="a" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
echo '<div class="box">';
for ($i = 1; $i <= $a; $i++) {
echo "$i ";
if ($i == 100) { break; }
}
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,299 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,43 @@
<?php
?>
<!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>Z73 - Parzyste do A</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z73</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej liczby A większej od 1 wyświetla liczby parzyste od 1 do A włącznie, oddzielone średnikami.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj liczbę A</label>
<input type="number" name="a" id="a" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
echo '<div class="box">';
echo "<p>Liczby parzyste od 1 do $a </p>";
echo '<p>';
for ($i = 2; $i <= $a; $i += 2) {
echo "$i ";
}
echo '</p></div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,299 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,51 @@
<!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>Z75b - Liczby Fibonacciego rekurencyjnie</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z75b</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla danej liczby całkowitej n wypisuje wyrazy ciągu Fibonacciego według zależności</p>
<img src="075.png" alt="Zależność Fibonacciego">
<p>Dla n=20 program powinien wypisać: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="n">Podaj Liczbę N:</label>
<input type="number" name="n" id="n">
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
function fib($n) {
if ($n === 0) return 0;
else if ($n === 1) return 1;
else return fib($n-1) + fib($n-2);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$n = htmlspecialchars($_POST['n']);
echo '<div class="box">';
$ciag_fib = array();
for ($i = 0; $i <= $n; $i++) {
$ciag_fib[] = fib($i);
}
for ($i = 0; $i < sizeof($ciag_fib); $i++) {
echo 'F(' . $i . ') = ' . $ciag_fib[$i] . ' <br>';
}
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,43 @@
<?php
?>
<!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></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie ---</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla parzystej liczby A wyświetla wzór, a dla liczby nieparzystej informację: "Liczba nieparzysta".</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj liczbę A</label>
<input type="number" name="a" id="a" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
echo '<div class="box">';
if ($a % 2 == 0) {
return;
} else {
echo "Liczba $a jest nieparzysta";
}
}
?>
</body>
</html>

View File

@@ -0,0 +1,299 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}