Commit f170a90b authored by wutthichai sritonwong's avatar wutthichai sritonwong

15/3/62

parent a8fb4291
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>ร้อยทิป</title>
<link rel="shortcut icon" href="{{{ asset('img/find_user.png') }}}">
<link href="{{ asset('vendor\bootstrap\css\bootstrap.min.css') }}" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Muli:400,400i,800,800i" rel="stylesheet">
<link href="{{ asset('vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet">
<link href="{{ asset('css/resume.min.css') }}" rel="stylesheet">
<style>
.bg {
background-image: url("img/conn.jpg");
}
.bt {
text-align: center;
font-size: 20px;
width: 300px;
height: 100px;
}
</style>
</head>
<body id="page-top">
<?php
$color = ["btn btn-primary", "btn btn-secondary", "btn btn-success", "btn btn-info", "btn btn-warning", "btn btn-danger"];
shuffle($color);
?>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top" id="sideNav">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<span class="d-block d-lg-none">พันทิป</span>
<span class="d-none d-lg-block">
<img class="img-fluid img-profile rounded-circle mx-auto mb-2" src="img/find_user.png" alt="">
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/">หน้าหลัก</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/Category">เลือกหมวดหมู่</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/Create">ตั้งกระทู้</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#Check">เช็คกระทู้</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link js-scroll-trigger" href="">Interests</a>
</li> -->
<li class="nav-item">
<br><br><br><br><br><br><br><br>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/login">เข้าสู่ระบบ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/register">สมัครสมาชิก</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid p-0">
<hr class="m-0">
<!-- Category -->
<section class="resume-section p-3 p-lg-5 d-flex justify-content-center bg" id="Category">
<div class="w-100">
<center>
<h1>หมวดหมู่</h1><br><br><br>
<div>
<button type="button" id="sport" class="col-3 bt <?php print_r($color[0]); ?>">กีฬา</button>
<button type="button" id="cartoon" class="col-3 bt <?php print_r($color[1]); ?>">การ์ตูน</button>
<button type="button" id="love" class="col-3 bt <?php print_r($color[2]); ?>">ความรัก</button>
<button type="button" id="it" class="col-3 bt <?php print_r($color[3]); ?>">ไอที</button>
<button type="button" id="paryut" class="col-3 bt <?php print_r($color[4]); ?>">การเมือง</button>
<button type="button" id="food" class="col-3 bt <?php print_r($color[3]); ?>">อาหาร</button>
<button type="button" id="animal" class="col-3 bt <?php print_r($color[2]); ?>">สัตว์</button>
<button type="button" id="music" class="col-3 bt <?php print_r($color[1]); ?>">เพลง</button>
<button type="button" id="movie" class="col-3 bt <?php print_r($color[0]); ?>">ภาพยนตร์</button>
</div>
</center>
</div>
</section>
</div>
<!-- Bootstrap core JavaScript -->
<script src="{{ asset('vendor/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('vendor/jquery-easing/jquery.easing.min.js') }}"></script>
<script src="{{ asset('js/resume.min.js') }}"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>ร้อยทิป</title>
<link rel="shortcut icon" href="{{{ asset('img/find_user.png') }}}">
<link href="{{ asset('vendor\bootstrap\css\bootstrap.min.css') }}" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Muli:400,400i,800,800i" rel="stylesheet">
<link href="{{ asset('vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet">
<link href="{{ asset('css/resume.min.css') }}" rel="stylesheet">
<style>
.bg {
background-image: url("img/conn.jpg");
}
.bt {
text-align: center;
font-size: 20px;
width: 300px;
height: 100px;
}
</style>
</head>
<body id="page-top">
<?php
$color = ["btn btn-primary", "btn btn-secondary", "btn btn-success", "btn btn-info", "btn btn-warning", "btn btn-danger"];
shuffle($color);
?>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top" id="sideNav">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<span class="d-block d-lg-none">พันทิป</span>
<span class="d-none d-lg-block">
<img class="img-fluid img-profile rounded-circle mx-auto mb-2" src="img/find_user.png" alt="">
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/">หน้าหลัก</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/Category">เลือกหมวดหมู่</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/Create">ตั้งกระทู้</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#Check">เช็คกระทู้</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link js-scroll-trigger" href="">Interests</a>
</li> -->
<li class="nav-item">
<br><br><br><br><br><br><br><br>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/login">เข้าสู่ระบบ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/register">สมัครสมาชิก</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid p-0">
<hr class="m-0">
<!-- Create -->
<section class="resume-section p-3 p-lg-5 d-flex align-items-center" id="Create">
<div class="w-100">
<form>
<fieldset>
<legend>ตั้งกระทู้</legend>
<div class="form-group">
<label for="exampleSelect1">เลือกหมวดหมู่</label>
<select class="form-control" id="menu">
<option>กีฬา</option>
<option>การ์ตูน</option>
<option>ความรัก</option>
<option>ไอที</option>
<option>การเมือง</option>
<option>อาหาร</option>
<option>สัตว์</option>
<option>เพลง</option>
<option>ภาพยนตร์</option>
</select>
</div>
<div class="form-group">
<label for="exampleTextarea">หัวข้อกระทู้</label>
<textarea class="form-control" id="exampleTextarea" rows="1"></textarea>
<label for="exampleTextarea">ข้อความ</label>
<textarea class="form-control" id="exampleTextarea" rows="10"></textarea>
</div>
<div class="col-5">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</fieldset>
</form>
</div>
</section>
</div>
<!-- Bootstrap core JavaScript -->
<script src="{{ asset('vendor/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('vendor/jquery-easing/jquery.easing.min.js') }}"></script>
<script src="{{ asset('js/resume.min.js') }}"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>ร้อยทิป</title>
<link rel="shortcut icon" href="{{{ asset('img/find_user.png') }}}">
<link href="{{ asset('vendor\bootstrap\css\bootstrap.min.css') }}" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Muli:400,400i,800,800i" rel="stylesheet">
<link href="{{ asset('vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet">
<link href="{{ asset('css/resume.min.css') }}" rel="stylesheet">
<style>
.bg {
background-image: url("img/conn.jpg");
}
.bt {
text-align: center;
font-size: 20px;
width: 300px;
height: 100px;
}
</style>
</head>
<body id="page-top">
<?php
$color = ["btn btn-primary", "btn btn-secondary", "btn btn-success", "btn btn-info", "btn btn-warning", "btn btn-danger"];
shuffle($color);
?>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top" id="sideNav">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<span class="d-block d-lg-none">พันทิป</span>
<span class="d-none d-lg-block">
<img class="img-fluid img-profile rounded-circle mx-auto mb-2" src="img/find_user.png" alt="">
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#Home">หน้าหลัก</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/Category">เลือกหมวดหมู่</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/Create">ตั้งกระทู้</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#Check">เช็คกระทู้</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link js-scroll-trigger" href="">Interests</a>
</li> -->
<li class="nav-item">
<br><br><br><br><br><br><br><br>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/LG">เข้าสู่ระบบ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/register">สมัครสมาชิก</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid p-0">
<!-- Home -->
<section class="resume-section p-3 p-lg-5 d-flex align-items-center" id="Home">
<div class="w-100">
<h1 class="mb-0">ร้อยทิป
<span class="text-primary">Roytip</span>
</h1><br><br>
<div class="social-icons">
<a href="#">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="#">
<i class="fab fa-github"></i>
</a>
<a href="#">
<i class="fab fa-twitter"></i>
</a>
</div>
</div>
</section>
<hr class="m-0">
<!-- Category -->
<section class="resume-section p-3 p-lg-5 d-flex justify-content-center bg" id="Category">
<div class="w-100">
<center>
<h1>หมวดหมู่</h1><br><br><br>
<div>
<button type="button" id="sport" class="col-3 bt <?php print_r($color[0]); ?>">กีฬา</button>
<button type="button" id="cartoon" class="col-3 bt <?php print_r($color[1]); ?>">การ์ตูน</button>
<button type="button" id="love" class="col-3 bt <?php print_r($color[2]); ?>">ความรัก</button>
<button type="button" id="it" class="col-3 bt <?php print_r($color[3]); ?>">ไอที</button>
<button type="button" id="paryut" class="col-3 bt <?php print_r($color[4]); ?>">การเมือง</button>
<button type="button" id="food" class="col-3 bt <?php print_r($color[3]); ?>">อาหาร</button>
<button type="button" id="animal" class="col-3 bt <?php print_r($color[2]); ?>">สัตว์</button>
<button type="button" id="music" class="col-3 bt <?php print_r($color[1]); ?>">เพลง</button>
<button type="button" id="movie" class="col-3 bt <?php print_r($color[0]); ?>">ภาพยนตร์</button>
</div>
</center>
</div>
</section>
<hr class="m-0">
<!-- Create -->
<section class="resume-section p-3 p-lg-5 d-flex align-items-center" id="Create">
<div class="w-100">
<form>
<fieldset>
<legend>ตั้งกระทู้</legend>
<div class="form-group">
<label for="exampleSelect1">เลือกหมวดหมู่</label>
<select class="form-control" id="menu">
<option>กีฬา</option>
<option>การ์ตูน</option>
<option>ความรัก</option>
<option>ไอที</option>
<option>การเมือง</option>
<option>อาหาร</option>
<option>สัตว์</option>
<option>เพลง</option>
<option>ภาพยนตร์</option>
</select>
</div>
<div class="form-group">
<label for="exampleTextarea">หัวข้อกระทู้</label>
<textarea class="form-control" id="exampleTextarea" rows="1"></textarea>
<label for="exampleTextarea">ข้อความ</label>
<textarea class="form-control" id="exampleTextarea" rows="10"></textarea>
</div>
<div class="col-5">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</fieldset>
</form>
</div>
</section>
<hr class="m-0">
<!-- Check -->
<section class="resume-section p-3 p-lg-5 d-flex align-items-center" id="Check">
<div class="w-100">
</div>
</section>
</div>
<!-- Bootstrap core JavaScript -->
<script src="{{ asset('vendor/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('vendor/jquery-easing/jquery.easing.min.js') }}"></script>
<script src="{{ asset('js/resume.min.js') }}"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
<style>
body, html{
background-color:#34515E;
font-family: 'Open Sans Condensed', sans-serif;
font-size: 18px;
}
.register-form{
font-size: 16px;
left: 50%;
top: 50%;
position: absolute;
-webkit-transform: translate3d(-50%, -50%, 0);
-moz-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
}
.regbutton{
height: 50px;
width: 200px;
background-color:tomato;
border-radius: 0px;
font-size: 18px;
color:white;
border: none !important;
margin-bottom: 5px;
}
.regbutton:hover{
color: white;
background-color:#aa422f;
}
.regbutton:active{
color: white;
background-color:#aa422f;
}
.logbutton{
height: 50px;
width: 200px;
background-color:yellowgreen;
border-radius: 0px;
font-size: 18px;
color:white;
border: none !important;
margin-bottom: 5px;
}
.logbutton:hover{
color: white;
background-color:darkolivegreen;
}
.logbutton:active{
color: white;
background-color:darkolivegreen;
}
.register-form label{
color: aliceblue;
}
.register-form input{
margin-bottom: 5px;
width: 430px;
height: 40px;
border-radius: 0px;
}
</style>
</head>
<body>
<div class="container-fluid">
<form action="#" method="get" class="register-form">
<div class="row">
<div class="col-md-4 col-sm-4 col-lg-4">
<label for="firstName">Username</label>
<input name="Username" class="form-control" type="text">
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4 col-lg-4">
<label for="password">Password</label>
<input name="password" class="form-control" type="password">
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4 col-lg-4">
<label for="name">Nickname</label>
<input name="name" class="form-control" type="text">
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-6 col-lg-6">
<a class="btn btn-default regbutton" href="/">กลับ</a>
<!-- <button class="btn btn-default regbutton">กลับ</button> -->
</div>
<div class="col-md-6 col-sm-6 col-xs-6 col-lg-6">
<button class="btn btn-default regbutton" type="submit" name="submit" onclick="login">สมัครใช้งาน</button>
</div>
</div>
<center><div class="col-md">
<a class="btn btn-default regbutton" href="login/">Login</a>
</div></center>
</form>
</div>
<?php
$servername = "localhost";
$username = "dbAdmin";
$password = "P@ss1234";
$dbname = "projectweb";
$conn = new mysqli($servername,$username,$password,$dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}else{
if (isset($_GET['submit'])){
$U_USER = $_GET['Username'];
$U_PASS = $_GET['password'];
$U_NAME = $_GET['name'];
$sql = "INSERT INTO `USERS` (`Name_U`, `Password_U`, `U_Name`)
VALUES ('$U_USER','$U_PASS','$U_NAME')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
}else{
// echo 'กรุณากรอกข้อมูล';
}
}
?>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- <link rel="stylesheet" href="style.css"> -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<style>
*{
font-family: "montserrat",sans-serif;
}
.login-box{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-image: linear-gradient(45deg,#9fbaa8,#31354c);
transition: 0.4s;
}
.login-form{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
color: white;
text-align: center;
}
.login-form h1{
font-weight: 400;
margin-top: 0;
}
.txtb{
display: block;
box-sizing: border-box;
width: 240px;
background: #ffffff28;
border: 1px solid white;
padding: 10px 20px;
color: white;
outline: none;
margin: 10px 0;
border-radius: 6px;
text-align: center;
}
.login-btn{
width: 240px;
background: #2c3e50;
border: 0;
color: white;
padding: 10px;
border-radius: 6px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="login-box">
<form class="login-form" action="#" method="get">
<h1>Welcome</h1>
<input class="txtb" type="text" name="Username" placeholder="Username">
<input class="txtb" type="password" name="password" placeholder="Password">
<input class="login-btn" type="submit" name="submit" value="submit">
<p></p>
</form>
</div>
<?php
$servername = "localhost";
$username = "dbAdmin";
$password = "P@ss1234";
$dbname = "projectweb";
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (isset($_GET['submit'])){
$users = $_GET['Username'];
$Passs = $_GET['password'];
$sql = "SELECT * FROM `USERS`";
$result = mysqli_query($conn, $sql);
$a=array();
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_array($result, MYSQLI_BOTH)) {
$a[$row[1]]=$row[2];
}
if (array_key_exists($users,$a)){
if($Passs==$a[$users]){
print("<script language='javascript'>alert(\"สวัสดี \ $users \\ยินดีต้อนรับสู่เว็บไซต์ ร้อยทิป\");</script>");
print("<script language='javascript'>window.location = '/';</script>");
}else{
print("<script language='javascript'>alert(\"พาสเวิร์ดของ \ $users \\ไม่ถูกต้อง\");</script>");
}
}
else{
print("<script language='javascript'>alert(\"ไม่มีผู้ใช้ \ $users \\ในระบบนี้\");</script>");
}
} else {
echo "0 results";
}}
mysqli_close($conn);
?>
</body>
</html>
\ No newline at end of file
......@@ -63,10 +63,10 @@
<br><br><br><br><br><br><br><br>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/login">เข้าสู่ระบบ</a>
<a class="nav-link js-scroll-trigger" href="/LG">เข้าสู่ระบบ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/register">สมัครสมาชิก</a>
<a class="nav-link js-scroll-trigger" href="/Register">สมัครสมาชิก</a>
</li>
</ul>
</div>
......
......@@ -63,10 +63,10 @@
<br><br><br><br><br><br><br><br>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/login">เข้าสู่ระบบ</a>
<a class="nav-link js-scroll-trigger" href="/LG">เข้าสู่ระบบ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/register">สมัครสมาชิก</a>
<a class="nav-link js-scroll-trigger" href="/Register">สมัครสมาชิก</a>
</li>
</ul>
</div>
......
......@@ -106,7 +106,7 @@
</div>
</div>
<center><div class="col-md">
<a class="btn btn-default regbutton" href="login/">Login</a>
<a class="btn btn-default regbutton" href="/LG">Login</a>
</div></center>
</form>
</div>
......
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
<meta charset="UTF-8">
<!-- <link rel="stylesheet" href="style.css"> -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<style>
*{
font-family: "montserrat",sans-serif;
}
.login-box{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-image: linear-gradient(45deg,#9fbaa8,#31354c);
transition: 0.4s;
}
.login-form{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
color: white;
text-align: center;
}
.login-form h1{
font-weight: 400;
margin-top: 0;
}
.txtb{
display: block;
box-sizing: border-box;
width: 240px;
background: #ffffff28;
border: 1px solid white;
padding: 10px 20px;
color: white;
outline: none;
margin: 10px 0;
border-radius: 6px;
text-align: center;
}
.login-btn{
width: 240px;
background: #2c3e50;
border: 0;
color: white;
padding: 10px;
border-radius: 6px;
cursor: pointer;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="img/icons/favicon.ico" />
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<div class="login-box">
<form class="login-form" action="#" method="get">
<h1>Welcome</h1>
<input class="txtb" type="text" name="Username" placeholder="Username">
<input class="txtb" type="password" name="password" placeholder="Password">
<input class="login-btn" type="submit" name="submit" value="submit">
<p></p>
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<div class="login100-pic js-tilt" data-tilt>
<img src="img/img-01.png" alt="IMG">
</div>
<form class="login100-form validate-form">
<span class="login100-form-title">
Roytip Login
</span>
<div class="wrap-input100 validate-input" data-validate="Valid email is required: ex@abc.xyz">
<input class="input100" type="text" name="Username" placeholder="Email">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-envelope" aria-hidden="true"></i>
</span>
</div>
<div class="wrap-input100 validate-input" data-validate="Password is required">
<input class="input100" type="password" name="password" placeholder="Password">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock" aria-hidden="true"></i>
</span>
</div>
<div class="container-login100-form-btn">
<button class="login100-form-btn" type="submit" name="submit" value="submit">
Login
</button>
</div>
<!-- <div class="text-center p-t-12">
<span class="txt1">
Forgot
</span>
<a class="txt2" href="#">
Username / Password?
</a>
</div> -->
<div class="text-center p-t-136">
<a class="txt2" href="/Register">
Create your Account
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</a>
</div>
</form>
</div>
<?php
</div>
</div>
</div>
<?php
$servername = "localhost";
$username = "dbAdmin";
$password = "P@ss1234";
......@@ -84,7 +83,7 @@
}
if (array_key_exists($users,$a)){
if($Passs==$a[$users]){
print("<script language='javascript'>alert(\"สวัสดี \ $users \\ยินดีต้อนรับสู่เว็บไซต์ ร้อยทิป\");</script>");
// print("<script language='javascript'>alert(\"สวัสดี \ $users \\ยินดีต้อนรับสู่เว็บไซต์ ร้อยทิป\");</script>");
print("<script language='javascript'>window.location = '/';</script>");
}else{
print("<script language='javascript'>alert(\"พาสเวิร์ดของ \ $users \\ไม่ถูกต้อง\");</script>");
......@@ -99,5 +98,30 @@
}}
mysqli_close($conn);
?>
<!----------------------------------------------------------------JS---------------------------------------------------------------------------- -->
<script src="vendor/jquery/jquery-3.2.1.min.js" type="9965159fe884f58a103521bc-text/javascript"></script>
<script src="vendor/bootstrap/js/popper.js" type="9965159fe884f58a103521bc-text/javascript"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js" type="9965159fe884f58a103521bc-text/javascript"></script>
<script src="vendor/select2/select2.min.js" type="9965159fe884f58a103521bc-text/javascript"></script>
<script src="vendor/tilt/tilt.jquery.min.js" type="9965159fe884f58a103521bc-text/javascript"></script>
<script type="9965159fe884f58a103521bc-text/javascript">
$('.js-tilt').tilt({
scale: 1.1
})
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-23581568-13" type="9965159fe884f58a103521bc-text/javascript"></script>
<script type="9965159fe884f58a103521bc-text/javascript">
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-23581568-13');
</script>
<script src="js/main.js" type="9965159fe884f58a103521bc-text/javascript"></script>
<script src="https://ajax.cloudflare.com/cdn-cgi/scripts/a2bd7673/cloudflare-static/rocket-loader.min.js" data-cf-settings="9965159fe884f58a103521bc-|49" defer=""></script>
</body>
</html>
\ No newline at end of file
......@@ -15,20 +15,12 @@ Route::get('/', function () {
return view('Home');
});
Route::get('/login', function () {
return view('Login');
});
Route::get('/register', function () {
Route::get('/Register', function () {
return view('Register');
});
Route::get('/T', function () {
return view('Test');
});
Route::get('/LG', function () {
return view('Loginnew');
return view('Login');
});
Route::get('/Category', function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment