commit e33afe7c0ff0e3d7b45cbd046748d397ba884385 Author: erdeilevente Date: Fri Jan 27 11:57:08 2023 +0100 final diff --git a/db/test_db.sql b/db/test_db.sql new file mode 100644 index 0000000..8ce71d0 --- /dev/null +++ b/db/test_db.sql @@ -0,0 +1,69 @@ +-- phpMyAdmin SQL Dump +-- version 4.9.0.1 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Generation Time: Dec 14, 2020 at 12:51 PM +-- Server version: 10.4.6-MariaDB +-- PHP Version: 7.3.9 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +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 */; + +-- +-- Database: `test_db` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `users` +-- + +CREATE TABLE `users` ( + `id` int(11) NOT NULL, + `user_name` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `users` +-- + +INSERT INTO `users` (`id`, `user_name`, `password`, `name`) VALUES +(3, 'asd', '202cb962ac59075b964b07152d234b70', 'Asd'), +(4, 'Asd', '202cb962ac59075b964b07152d234b70', 'asd'); + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `users` +-- +ALTER TABLE `users` + ADD PRIMARY KEY (`id`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `users` +-- +ALTER TABLE `users` + MODIFY `id` int(11) 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 */; diff --git a/db_conn.php b/db_conn.php new file mode 100644 index 0000000..1309bbe --- /dev/null +++ b/db_conn.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/home.php b/home.php new file mode 100644 index 0000000..d6bd27c --- /dev/null +++ b/home.php @@ -0,0 +1,24 @@ + + + + + + HOME + + + +

Hello,

+ Logout + + + + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..ae14ac4 --- /dev/null +++ b/index.php @@ -0,0 +1,24 @@ + + + + + Belépés + + + +
+

Bejelentkezés

+ +

+ + +
+ + +
+ + + Regisztrálj egy fiókot! +
+ + \ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..1862f28 --- /dev/null +++ b/login.php @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..48b9a63 --- /dev/null +++ b/logout.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/signup-check.php b/signup-check.php new file mode 100644 index 0000000..4a28cb6 --- /dev/null +++ b/signup-check.php @@ -0,0 +1,74 @@ + 0) { + header("Location: signup.php?error=A felhasználónév már foglalt, próbálj másikat!&$user_data"); + exit(); + }else { + $sql2 = "INSERT INTO users(user_name, password, name) VALUES('$uname', '$pass', '$name')"; + $result2 = mysqli_query($conn, $sql2); + if ($result2) { + header("Location: signup.php?success=A fiókod sikeresen létrehozva!"); + exit(); + }else { + header("Location: signup.php?error=Ismeretlen hiba lépett fel!&$user_data"); + exit(); + } + } + } + + }else{ + header("Location: signup.php"); + exit(); + } +?> \ No newline at end of file diff --git a/signup.php b/signup.php new file mode 100644 index 0000000..d681c86 --- /dev/null +++ b/signup.php @@ -0,0 +1,58 @@ + + + + + Regisztráció + + + +
+

Regisztráció

+ +

+ + + +

+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ + +
+ + + Van már fiókja? +
+ + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..0c85c47 --- /dev/null +++ b/style.css @@ -0,0 +1,86 @@ +body { + background: #1690A7; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + flex-direction: column; +} + +*{ + font-family: sans-serif; + box-sizing: border-box; +} + +form { + width: 500px; + border: 2px solid #ccc; + padding: 30px; + background: #fff; + border-radius: 15px; +} + +h2 { + text-align: center; + margin-bottom: 40px; +} + +input { + display: block; + border: 2px solid #ccc; + width: 95%; + padding: 10px; + margin: 10px auto; + border-radius: 5px; +} +label { + color: #888; + font-size: 18px; + padding: 10px; +} + +button { + float: right; + background: #555; + padding: 10px 15px; + color: #fff; + border-radius: 5px; + margin-right: 10px; + border: none; +} +button:hover{ + opacity: .7; +} +.error { + background: #F2DEDE; + color: #A94442; + padding: 10px; + width: 95%; + border-radius: 5px; + margin: 20px auto; +} + +.success { + background: #D4EDDA; + color: #40754C; + padding: 10px; + width: 95%; + border-radius: 5px; + margin: 20px auto; +} + +h1 { + text-align: center; + color: #fff; +} + +.ca { + font-size: 14px; + display: inline-block; + padding: 10px; + text-decoration: none; + color: #444; +} +.ca:hover { + text-decoration: underline; +} \ No newline at end of file