From 289e706cd13f8f5b9db01b6eca0e0850b51a951c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=81opata?= Date: Fri, 8 Jan 2021 13:24:54 +0100 Subject: [PATCH] Upload files to 'projektpp' --- projektpp/ucz.php | 57 +++++++++++++++++++ projektpp/uzytkownicy.sql | 77 +++++++++++++++++++++++++ projektpp/voucher.php | 60 ++++++++++++++++++++ projektpp/witamy.php | 76 +++++++++++++++++++++++++ projektpp/zaloguj.php | 116 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 386 insertions(+) create mode 100644 projektpp/ucz.php create mode 100644 projektpp/uzytkownicy.sql create mode 100644 projektpp/voucher.php create mode 100644 projektpp/witamy.php create mode 100644 projektpp/zaloguj.php diff --git a/projektpp/ucz.php b/projektpp/ucz.php new file mode 100644 index 0000000..4ebce88 --- /dev/null +++ b/projektpp/ucz.php @@ -0,0 +1,57 @@ + +
+ + + +
+ AKTUALNOŚCI + +
+ + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia mollis odio eu bibendum. Praesent non hendrerit risus. Nulla id semper sem. Mauris risus mauris, ultrices sed ullamcorper sed, vulputate vel nisi. Aliquam augue ante, mattis in pulvinar vitae, ultrices nec leo. Nulla ultricies augue enim, sit amet semper tellus vulputate sit amet. Maecenas tincidunt, ex eu viverra scelerisque, quam lectus auctor nunc, at pretium nibh lacus in ligula. Cras condimentum felis ac aliquet tristique. Sed elementum eu nulla vel rutrum. Cras feugiat nulla non congue malesuada. + +

+ Cras et nulla vehicula, efficitur enim non, fermentum tortor. Curabitur id elementum leo. Sed eget turpis accumsan dolor mollis imperdiet. Praesent pellentesque laoreet lectus, at commodo magna varius vitae. Aliquam erat volutpat. Curabitur commodo, tortor laoreet sagittis cursus, nulla enim laoreet libero, et egestas risus ante vel orci. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc quis posuere massa, sed sollicitudin lorem. Mauris lacinia, massa efficitur malesuada luctus, arcu ex mattis erat, a venenatis magna risus nec neque. Nulla vulputate nisl urna, quis egestas orci suscipit tristique. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras auctor nec elit at ultricies. Morbi aliquam pharetra diam, vitae porta felis. Pellentesque vel arcu tincidunt, luctus justo quis, ultrices erat. Vivamus efficitur leo vitae dui molestie, eu varius sapien iaculis. In quis pharetra mauris. + +

+ Nam ullamcorper turpis non tristique sollicitudin. Etiam id magna lacus. Pellentesque vestibulum ex eget quam consectetur, sit amet luctus erat feugiat. Sed gravida tellus tempus consequat rhoncus. Phasellus lobortis magna et risus pharetra, facilisis blandit sapien tristique. Vivamus aliquam interdum arcu, eget facilisis ante gravida ut. Proin nec nisl ut lacus finibus sagittis id non nibh. Donec volutpat pretium libero. Sed fermentum vel ante vitae mattis. Curabitur porttitor turpis at scelerisque auctor. Sed vitae iaculis risus, ut iaculis nibh. +
+ + + +
\ No newline at end of file diff --git a/projektpp/uzytkownicy.sql b/projektpp/uzytkownicy.sql new file mode 100644 index 0000000..a98b2c2 --- /dev/null +++ b/projektpp/uzytkownicy.sql @@ -0,0 +1,77 @@ +-- phpMyAdmin SQL Dump +-- version 4.2.11 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Czas generowania: 28 Gru 2015, 18:26 +-- Wersja serwera: 5.6.21 +-- Wersja PHP: 5.6.3 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +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 utf8 */; + +-- +-- Baza danych: `osadnicy` +-- + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `uzytkownicy` +-- + +CREATE TABLE IF NOT EXISTS `uzytkownicy` ( +`id` int(11) NOT NULL, + `user` text COLLATE utf8_polish_ci NOT NULL, + `pass` text COLLATE utf8_polish_ci NOT NULL, + `email` text COLLATE utf8_polish_ci NOT NULL, + `drewno` int(11) NOT NULL, + `kamien` int(11) NOT NULL, + `zboze` int(11) NOT NULL, + `dnipremium` int(11) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci; + +-- +-- Zrzut danych tabeli `uzytkownicy` +-- + +INSERT INTO `uzytkownicy` (`id`, `user`, `pass`, `email`, `drewno`, `kamien`, `zboze`, `dnipremium`) VALUES +(1, 'adam', 'qwerty', 'adam@gmail.com', 213, 5675, 342, 0), +(2, 'marek', 'asdfg', 'marek@gmail.com', 324, 1123, 4325, 15), +(3, 'anna', 'zxcvb', 'anna@gmail.com', 4536, 17, 120, 25), +(4, 'andrzej', 'asdfg', 'andrzej@gmail.com', 5465, 132, 189, 0), +(5, 'justyna', 'yuiop', 'justyna@gmail.com', 245, 890, 554, 0), +(6, 'kasia', 'hjkkl', 'kasia@gmail.com', 267, 980, 109, 12), +(7, 'beata', 'fgthj', 'beata@gmail.com', 565, 356, 447, 77), +(8, 'jakub', 'ertyu', 'jakub@gmail.com', 2467, 557, 876, 0), +(9, 'janusz', 'cvbnm', 'janusz@gmail.com', 65, 456, 2467, 0), +(10, 'roman', 'dfghj', 'roman@gmail.com', 97, 226, 245, 23); + +-- +-- Indeksy dla zrzutów tabel +-- + +-- +-- Indexes for table `uzytkownicy` +-- +ALTER TABLE `uzytkownicy` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT dla tabeli `uzytkownicy` +-- +ALTER TABLE `uzytkownicy` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11; +/*!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 */; diff --git a/projektpp/voucher.php b/projektpp/voucher.php new file mode 100644 index 0000000..e4bc09e --- /dev/null +++ b/projektpp/voucher.php @@ -0,0 +1,60 @@ + + + + + + GymFit + + + + + + + + + +
+ + + +
+ + Kup Voucher +
+ +
+ +
+ +
+ +
+
+ + + \ No newline at end of file diff --git a/projektpp/witamy.php b/projektpp/witamy.php new file mode 100644 index 0000000..9d27210 --- /dev/null +++ b/projektpp/witamy.php @@ -0,0 +1,76 @@ + + + + + + + GymFit + + + + + + + + + +
+ + + +
+ Dziękujemy za rejestrację w serwisie! Możesz już zalogować się na swoje konto!

+ + Zaloguj się na swoje konto! +

+
+ + + +
+ + + \ No newline at end of file diff --git a/projektpp/zaloguj.php b/projektpp/zaloguj.php new file mode 100644 index 0000000..46e59b4 --- /dev/null +++ b/projektpp/zaloguj.php @@ -0,0 +1,116 @@ +connect_errno!=0) + { + echo "Error: ".$polaczenie->connect_errno; + } + else + { + $login = $_POST['login']; + $haslo = $_POST['haslo']; + + $login = htmlentities($login, ENT_QUOTES, "UTF-8"); + + if ($rezultat = @$polaczenie->query( + sprintf("SELECT * FROM uzytkownicy WHERE user='%s'", + mysqli_real_escape_string($polaczenie,$login)))) + { + + $ilu_userow = $rezultat->num_rows; + if($ilu_userow>0) + { + $wiersz = $rezultat->fetch_assoc(); + + if (password_verify($haslo, $wiersz['pass'])) + { + $aa = $wiersz['perm']; + if($aa==1) + { + $_SESSION['zalogowany1'] = true; + $_SESSION['id'] = $wiersz['id']; + $_SESSION['user'] = $wiersz['user']; + $_SESSION['imie'] = $wiersz['imie']; + $_SESSION['nazwisko'] = $wiersz['nazwisko']; + $_SESSION['perm'] = $wiersz['perm']; + $_SESSION['kamien'] = $wiersz['kamien']; + $_SESSION['zboze'] = $wiersz['zboze']; + $_SESSION['email'] = $wiersz['email']; + $_SESSION['dnipremium'] = $wiersz['dnipremium']; + + + + + unset($_SESSION['blad']); + $rezultat->free_result(); + header('Location: admin.php'); + + } + + elseif($aa==2) + { + $_SESSION['zalogowany2'] = true; + $_SESSION['id'] = $wiersz['id']; + $_SESSION['user'] = $wiersz['user']; + $_SESSION['imie'] = $wiersz['imie']; + $_SESSION['nazwisko'] = $wiersz['nazwisko']; + $_SESSION['perm'] = $wiersz['perm']; + $_SESSION['kamien'] = $wiersz['kamien']; + $_SESSION['zboze'] = $wiersz['zboze']; + $_SESSION['email'] = $wiersz['email']; + $_SESSION['dnipremium'] = $wiersz['dnipremium']; + + + unset($_SESSION['blad']); + $rezultat->free_result(); + header('Location: ucz.php'); + } + + else + { + $_SESSION['zalogowany3'] = true; + $_SESSION['id'] = $wiersz['id']; + $_SESSION['user'] = $wiersz['user']; + $_SESSION['imie'] = $wiersz['imie']; + $_SESSION['nazwisko'] = $wiersz['nazwisko']; + $_SESSION['perm'] = $wiersz['perm']; + $_SESSION['kamien'] = $wiersz['kamien']; + $_SESSION['zboze'] = $wiersz['zboze']; + $_SESSION['email'] = $wiersz['email']; + $_SESSION['dnipremium'] = $wiersz['dnipremium']; + + + unset($_SESSION['blad']); + $rezultat->free_result(); + header('Location: klient.php'); + } + } + + else { + + $_SESSION['blad'] = 'Nieprawidłowy login lub hasło!'; + header('Location: login.php'); + } + } + else { + + $_SESSION['blad'] = 'Nieprawidłowy login lub hasło!'; + header('Location: login.php'); + } + + } + $polaczenie->close(); + } + +?> \ No newline at end of file