This commit is contained in:
3p01
2026-04-16 09:28:30 +02:00
parent 77de233551
commit e9d1debeec
11 changed files with 232 additions and 0 deletions

View File

@@ -0,0 +1,115 @@
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 17 Lut 2022, 11:52
-- Wersja serwera: 10.4.22-MariaDB
-- Wersja PHP: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Baza danych: `notatki`
--
-- --------------------------------------------------------
--
-- Struktura tabeli dla tabeli `notatki`
--
CREATE TABLE `notatki` (
`id` int(10) UNSIGNED NOT NULL,
`Osoby_id` int(10) UNSIGNED NOT NULL,
`nazwa` varchar(20) DEFAULT NULL,
`tresc` text DEFAULT NULL,
`priorytet` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Zrzut danych tabeli `notatki`
--
INSERT INTO `notatki` (`id`, `Osoby_id`, `nazwa`, `tresc`, `priorytet`) VALUES
(1, 1, 'Wyprowadzić psa', NULL, 5),
(2, 1, 'Gimnastyka', NULL, 1),
(3, 1, 'Spacer z kumplem', NULL, 5),
(4, 1, 'Odrabianie lekcji z ', NULL, 4),
(5, 2, 'Zakupy', NULL, 2),
(6, 2, 'Wyprowadzić psa', NULL, 4),
(7, 2, 'Projekt na geografię', NULL, 2),
(8, 3, 'Wyjazd na wakacje', NULL, 5),
(9, 3, 'Weterynarz Brutus', NULL, 5),
(10, 3, 'Kawiarnia', NULL, 3),
(11, 3, 'Kino', NULL, 2),
(12, 3, 'Lekarz', NULL, 5),
(13, 4, 'Odrabianie lekcji', NULL, 3);
-- --------------------------------------------------------
--
-- Struktura tabeli dla tabeli `osoby`
--
CREATE TABLE `osoby` (
`id` int(10) UNSIGNED NOT NULL,
`imie` varchar(20) DEFAULT NULL,
`nazwisko` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Zrzut danych tabeli `osoby`
--
INSERT INTO `osoby` (`id`, `imie`, `nazwisko`) VALUES
(1, 'Krzysiek', 'Nowak'),
(2, 'Paula', 'Włodarska'),
(3, 'Ewelina', 'Konieczna'),
(4, 'Grześ', 'Kowalski');
--
-- Indeksy dla zrzutów tabel
--
--
-- Indeksy dla tabeli `notatki`
--
ALTER TABLE `notatki`
ADD PRIMARY KEY (`id`),
ADD KEY `Notatki_FKIndex1` (`Osoby_id`);
--
-- Indeksy dla tabeli `osoby`
--
ALTER TABLE `osoby`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT dla zrzuconych tabel
--
--
-- AUTO_INCREMENT dla tabeli `notatki`
--
ALTER TABLE `notatki`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT dla tabeli `osoby`
--
ALTER TABLE `osoby`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

View File

@@ -0,0 +1,4 @@
SELECT MIN(priorytet) FROM notatki WHERE Osoby_id = 3;
SELECT nazwa, priorytet FROM notatki WHERE nazwa LIKE "%na%";
SELECT imie, nazwa FROM notatki JOIN osoby ON osoby.id = Osoby_id WHERE priorytet=5;
SELECT imie, COUNT (Osoby_id) FROM notatki JOIN osoby ON Osoby_id = osoby.id GROUP BY imie;

View File

@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Planer zadań</title>
<link rel="stylesheet" href="styl.css">
<script>
function addTask() {
const list = document.querySelector("ul");
const input = document.querySelector("#add-task");
const newTask = document.createElement("li");
newTask.textContent = input.value;
const button = document.createElement("button");
button.textContent = "Wykonane";
const taskNumber = list.childElementCount + 1;
button.onclick = () => markTaskDone(taskNumber);
newTask.appendChild(button);
list.appendChild(newTask);
input.value = "";
}
function markTaskDone(taskNumber) {
const task = document.querySelector(`li:nth-child(${taskNumber})`);
if (!task) return;
task.style.textDecoration = "line-through";
}
</script>
</head>
<body>
<aside>
<img src="obraz.jpg" alt="notatki">
</aside>
<header>
<h2>Moje zadania</h2>
</header>
<nav>
<label for="add-task"></label>
<input id="add-task" type="text" placeholder="Dodaj zadanie..." required>
<button onclick="addTask()">Dodaj</button>
</nav>
<main>
<ul>
<li>Wyprowadzić psa<button onclick="markTaskDone(1)">Wykonane</button></li>
<li>Gimnastyka<button onclick="markTaskDone(2)">Wykonane</button></li>
<li>Zakupy<button onclick="markTaskDone(3)">Wykonane</button></li>
<li>Spacer z kumplem<button onclick="markTaskDone(4)">Wykonane</button></li>
<li>Odrabianie lekcji z młodszą siostrą<button onclick="markTaskDone(5)">Wykonane</button></li>
<li>Projekt na geografię<button onclick="markTaskDone(6)">Wykonane</button></li>
</ul>
</main>
<footer><h3>Notatki: Jakub Grzegorczyk 3p/1</h3></footer>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -0,0 +1,53 @@
* {
font-family: Verdana,serif;
}
aside {
width: 20%;
height: 610px;
float: left;
}
img {
width: 100%;
height: 610px;
}
header, footer, nav {
background: mediumpurple;
color: white;
width: 80%;
height: 50px;
text-align: center;
text-shadow: 4px 4px dimgray;
float: left;
}
nav {
padding-top: 10px;
}
main {
background: thistle;
width: 80%;
height: 450px;
overflow: auto;
}
li > button {
float: right;
background: mediumpurple;
color: white;
border: none;
height: 30px;
}
li {
padding: 10px;
}
li:nth-child(odd) {
background: #DDCADD;
}
li:hover {
background: lavender;
}
ul {
margin: 40px auto;
width: 70%;
font-size: 25px;
list-style: none;
border: 2px solid mediumpurple;
}

View File

@@ -0,0 +1,6 @@
Wyprowadzić psa
Gimnastyka
Zakupy
Spacer z kumplem
Odrabianie lekcji z młodszą siostrą
Projekt na geografię