-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
152 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
Options -Indexes | ||
Options -Indexes | ||
RewriteEngine On | ||
RewriteCond %{HTTPS} off | ||
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Kanit&display=swap'); | ||
html, | ||
body { | ||
|
||
/* หากต้องการใส่รูปพื้นหลัง กรุณาแก้ตรงนี้ | ||
background: url(img/bg.jpg) no-repeat top center fixed; | ||
color: #ffffff; | ||
*/ | ||
/* และ Comment บรรทัดนี้*/ | ||
background-color: #f5f5f5; | ||
|
||
font-family: 'Kanit' !important; | ||
|
||
height: 100%; | ||
-webkit-background-size: cover; | ||
-moz-background-size: cover; | ||
-o-background-size: cover; | ||
background-size: cover; | ||
} | ||
|
||
|
||
body { | ||
display: -ms-flexbox; | ||
display: -webkit-box; | ||
display: flex; | ||
-ms-flex-align: center; | ||
-ms-flex-pack: center; | ||
-webkit-box-align: center; | ||
align-items: center; | ||
-webkit-box-pack: center; | ||
justify-content: center; | ||
padding-top: 40px; | ||
padding-bottom: 40px; | ||
/*background-color: #f5f5f5; */ | ||
} | ||
|
||
.form-signin { | ||
width: 100%; | ||
max-width: 330px; | ||
padding: 15px; | ||
margin: 0 auto; | ||
} | ||
.form-signin .checkbox { | ||
font-weight: 400; | ||
} | ||
.form-signin .form-control { | ||
position: relative; | ||
box-sizing: border-box; | ||
height: auto; | ||
padding: 10px; | ||
font-size: 16px; | ||
} | ||
.form-signin .form-control:focus { | ||
z-index: 2; | ||
} | ||
.form-signin input[type="email"] { | ||
margin-bottom: -1px; | ||
border-bottom-right-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} | ||
.form-signin input[type="password"] { | ||
margin-bottom: 10px; | ||
border-top-left-radius: 0; | ||
border-top-right-radius: 0; | ||
} | ||
|
||
a:hover{ | ||
text-decoration: none; | ||
} | ||
|
||
.custom-file-label{ | ||
font-weight: 400; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
</body> | ||
</html> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<?php | ||
session_start(); | ||
require('structure/head.php'); ?> | ||
<link rel="stylesheet" type="text/css" href="css/login.css"> | ||
</head> | ||
<body class="text-center"> | ||
<form class="form-signin"> | ||
|
||
<img class="mb-3" src="img/fav.ico" alt="" width="100" height="100"> | ||
<h2 class="h2 mb-1">ล็อกอินเข้าสู่ระบบ</h2> | ||
<h3 class="h4 mb-3 op-7">ระบบพิมพ์เกียรติบัตรออนไลน์</h3> | ||
|
||
<label for="username" class="sr-only">ชื่อผู้ใช้งาน</label> | ||
<input type="text" id="username" name="username" class="form-control" placeholder="ชื่อผู้ใช้งาน" > | ||
|
||
<label for="password" class="sr-only">รหัสผ่าน</label> | ||
<input type="password" id="password" name="password" class="form-control" placeholder="รหัสผ่าน" > | ||
|
||
<div id="div-msg" name="div-msg" style="display:none;" class="alert alert-warning alert-custom m-1" role="alert"> | ||
<div id="text-msg" class="alert-text"></div> | ||
</div> | ||
|
||
|
||
<button class="btn btn-primary btn-block mt-2" name="submit" id="submit" type="button" onclick="cklogin();">เข้าสู่ระบบ</button> | ||
</div> | ||
|
||
<h5 class="mt-4 text-primary"><a href="index.php"><i class="fas fa-home"></i> กลับสู่หน้าหลัก</a></h5> | ||
<h5 class="mt-1">สงวนลิขสิทธิ์ © <?=date('Y')+543?> <?= $nameschool_data ?></h5> | ||
|
||
</form> | ||
|
||
<!-- Script--> | ||
<?php require('structure/script.php'); ?> | ||
<script type="text/javascript"> | ||
function cklogin(){ | ||
var username = $("#username").val().trim(); | ||
var password = $("#password").val().trim(); | ||
|
||
if( username != "" && password != "" ){ | ||
$.ajax({ | ||
url:'sql/index/checklogin.php', | ||
method:'POST', | ||
data:{username:username,password:password}, | ||
success:function(response){ | ||
if(response == "S"){ | ||
location.replace("index.php"); | ||
}else{ | ||
$("#div-msg").show(); | ||
$("#text-msg").html(response); | ||
} | ||
|
||
} | ||
}); | ||
}else{ | ||
$("#div-msg").show(); | ||
$("#text-msg").html("กรุณากรอกชื่อ และ รหัสผ่านให้ถูกต้อง"); | ||
} | ||
} | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
function thainumDigit($num){ | ||
return str_replace(array( '0' , '1' , '2' , '3' , '4' , '5' , '6' ,'7' , '8' , '9' ), | ||
array( "o" , "๑" , "๒" , "๓" , "๔" , "๕" , "๖" , "๗" , "๘" , "๙" ), | ||
array( "๐" , "๑" , "๒" , "๓" , "๔" , "๕" , "๖" , "๗" , "๘" , "๙" ), | ||
$num); | ||
}; | ||
?> |