|
|
|
ไม่ไหวงงมากเลยต้องถาม เรื่อง .htaccess คือว่า Project ก่อนๆที่ผมทำ ก็เขียนแบบเดิม ใช้งานได้ ปกติ ทั้ง 2 ระบบที่เขียนมาแต่ |
|
|
|
|
|
|
|
login (PHP)
<?php
session_start();
require('include/db_Connect2.php');
require('include/function.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo TITLE_LOGIN;?> </title>
<meta name="description" content="Custom Login Form Styling with CSS3" />
<meta name="keywords" content="css3, login, form, custom, input, submit, button, html5, placeholder" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="js/modernizr.custom.63321.js"></script>
<!--[if lte IE 7]><style>.main{display:none;} .support-note .note-ie{display:block;}</style><![endif]-->
<style>
@import url(http://fonts.googleapis.com/css?family=Raleway:400,700);
body {
background: #7f9b4e url(images/original_login.jpg) no-repeat center top;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
}
.container > header h1,
.container > header h2 {
color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,0.7);
}
</style>
</head>
<body>
<div class="container">
<!-- Codrops top bar -->
<div class="codrops-top">
<strong> ⇒ Welcome </strong>Please Login to Use Service
<span class="right">
Design By
<strong> TEAM HR IT Programmer</strong>
</span>
</div><!--/ Codrops top bar -->
<header>
<h1>Form <strong>Login Form</strong> HR CLINIC</h1>
<h2>NEVER ENDING CHALLENGE !!!</h2>
<div class="support-note">
<span class="note-ie">Sorry, only modern browsers.</span>
</div>
</header>
<section class="main">
<form class="form-4" action="" method="post" name="Form1" id="Form1">
<h1>Login</h1>
<p>
<label for="login">Username or email</label>
<input type="text" name="Username" id="Username" placeholder="Username !!!" required>
</p>
<p>
<label for="password">Password</label>
<input type="password" name='password' id="password" placeholder="Password !!!" required>
</p>
<p>
<input type="submit" name="submit" value="Continue">
<input name="login" type="hidden" id="login" value="login">
</p>
<?php
ini_set('display_errors', 1);
error_reporting(~0);
if(isset($_POST["Username"]))
{
$UserName = $_POST["Username"];
}
if(isset($_POST["txtKeyword"]))
{
$Pass = $_POST["password"];
}
if(isset($_POST["login"]))
{
$UserName = $_POST["Username"];
$Pass = $_POST["password"];
$SELECT = "SELECT * FROM clinicdb.wtbllogin WHERE UserName ='$UserName' AND Password = '$Pass'";
$SQL = mysql_query($conn1,$SELECT);
$NumAdmin = mysql_num_rows($SQL);
$rAdmin = mysql_fetch_assoc($SQL);
if($NumAdmin>'0'){
//SESSION
$_SESSION['S_ID']=$rAdmin['LogID'];
$_SESSION['S_UserName']=$rAdmin['UserName'];
$_SESSION['S_Password']=$rAdmin['Password'];
$_SESSION['S_lstatus']='User';
//SESSION(END)
echo "<img src='img_loader/loading3.gif' width='280' height='30' />";
echo "<BR>";
echo "<span style='color:#000099;'>";
echo " $rAdmin[UserName] !!!";
echo "</span>";
echo "<BR>";
echo "<meta http-equiv='refresh' content='2;url=./main.php'>";
exit();
}else{
echo "<img src='img_loader/loading2.gif' width='280' height='200' align='center' />";
echo "<BR>";
echo "<span style='color:#FF0000;'>";
echo "Noooo";
echo "Noooo";
echo "</span>";
echo "<meta http-equiv='refresh' content='2;url=./Login.php'>";
}
}
?>
</form>
</section>
</div>
</body>
</html>
|
|
|
|
|
Date :
2018-01-03 15:44:46 |
By :
Hararock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
login_true (PHP)
<?php
session_start();
ob_start();
require('include/db_Connect2.php');
require('include/function.php');
if(isset($_SESSION['S_ID'])){
//echo $_SESSION['S_ID'];
//echo $_SESSION['S_UserName'];
//echo $_SESSION['S_Password'];
//echo $_SESSION['S_lstatus'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/textcss.css" type="text/css" rel="stylesheet" >
<link href="css/styleinput.css" type="text/css" rel="stylesheet" >
<link href="css/stylelink.css" type="text/css" rel="stylesheet">
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<style type="text/css">
body {
background-image: url(icon/All-White-Background-for-Desktop-wallpaper-desktop-images-download-hd-windows-wallpaper-samsung-iphone-mac-1920x1200.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position:bottom;
background-size: 100%;
margin:auto;
margin-left: 10%;
margin-right: 10%;
}
div.iBannerFix{
height:80px;
position: fixed;
left:50px;
right:20px;
bottom: 5px;
right:100px;
width: 96%;
z-index: 99;
color: #333;
text-align:center;
}
</style>
<body>
<table align="center" width="90%" border="0" cellspacing="0" cellpadding="0" class="table-responsive">
<tr>
<td width="30" height="30"><img src="img/z_admin.png" width="30" height="30" /></td>
<td valign="bottom" class="Text-Comment4-1">Show information Login</td>
</tr>
<tr>
<td height="5" colspan="3" background="img/dothlineL.gif"></td>
</tr>
<tr>
<td height="3" colspan="3">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30"><span class="Text-Comment4-1"> ID Login :</span></td>
<td width="68%"><span class="Text-Lao2">
<?php echo $_SESSION['S_ID'];?></span></td>
</tr>
<td height="7" colspan="2" background="img/dothlineL.gif" ></td>
<tr>
<td width="32%" height="30"><span class="Text-Comment4-1">Name :</span></td>
<td width="68%"><span class="Text-Lao2"><?php echo $_SESSION['S_UserName'];?> </span></td>
</tr>
<tr>
<td height="7" colspan="2" background="img/dothlineL.gif"></td>
</tr>
<tr>
<td height="30" width="32%"><span class="Text-Comment4-1">Username :</span></td>
<td><span class="Text-Lao2"><?php echo $_SESSION['S_UserName'];?></span></td>
</tr>
<tr>
<td height="7" colspan="2" background="img/dothlineL.gif"></td>
</tr>
<tr>
<td width="32%" height="30"><span class="Text-Comment4-1">Status :</span></td>
<td><span class="Text-Lao2"><?php echo $_SESSION['S_lstatus']; ?></span></td>
</tr>
</tr>
</table>
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" class="table-responsive" style="background-color:transparent">
<tr>
<td>
<div class="iBannerFix">
</div></div>
</td>
</tr>
</table>
</body>
</html>
<?php } ?>
|
|
|
|
|
Date :
2018-01-03 15:46:12 |
By :
Hararock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Main (PHP)
<?php
require('include/db_connect.php');
require('include/function.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/textcss.css" type="text/css" rel="stylesheet" >
<link href="css/styleinput.css" type="text/css" rel="stylesheet" >
<link href="css/stylelink.css" type="text/css" rel="stylesheet">
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo TITLE;?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<script src="../../assets/js/ie-emulation-modes-warning.js"></script>
</head>
<style type="text/css">
div.iBannerFix{
height:80px;
position: fixed;
left:50px;
right:20px;
bottom: 5px;
right:100px;
width: 96%;
z-index: 99;
color: #333;
text-align:center;
}
</style>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table-responsive">
<tr>
<!--1 -->
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table-responsive" style="background-color:transparent">
<tr>
<td align="center"> <img src="icon/Logo SYS.bmp" class="img-responsive"></td>
</tr>
</table>
</td>
<!--1 end-->
</tr>
<tr>
<!--2 -->
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" onDblClick="1" class="table-responsive">
<tr class="bg-success" align="center" >
<td width="10%">
<ul class="nav nav-justified" >
<li class="active"><a href="main.php">Home</a>
</li>
</ul>
</td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="menu_drug.php">Menu Drug</a></li></ul></td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="data_history_healing.php" target="new">history_healing</a>
</li></ul></td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="data_drug_type.php">Add Type Drug</a></li></ul></td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="menu_report.php">Menu Report</a></li></ul></td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="#">user manual</a></li></ul></td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="logout.php">Log Out</a></li></ul></td>
<td width="10%">
<ul class="nav nav-justified" >
<li class="active">
<a href="menu.php">Log Out</a></li></ul></td>
</nav>
</div>
</tr>
</table>
</td>
<!--2 end-->
</tr>
<tr>
<!--3 -->
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table-responsive" >
<tr>
<td height="1000" align="center" valign="top">
<!-- Show form htacess show all here -->
<?Php
if(empty($option)){
require('login_true.php');
}else if($option=='login_true'){
require('login_true.php');
}else if($option=='data_drug'){
require('data_drug.php');
}else if($option=='data_history_healing'){
require('data_history_healing.php');
}else if($option=='menu'){
require('menu.php');
}else if($option=='data_drug_type'){
require('data_drug_type.php');
}
?>
<!-- Show form htacess -->
</td>
</tr>
</table>
</td>
<!--3 end-->
</tr>
<tr>
<!--4 -->
<td>
<table width="100%" border="1" cellspacing="0" cellpadding="0" align="center" class="table-responsive" style="background-color:transparent">
<tr>
<td>
<div class="iBannerFix">
© Copyright 2017 Team IT Programmer. All Rights Reserved <br>contact : <img src="Img/21520.png" width="15" height="15"> : 020 96140096 <br>
Whatapp : <img src="Img/whatsapp.png" width="15" height="15"> : 020 96140096
</div>
</td>
</tr>
</table>
<!--4 end-->
</td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
Date :
2018-01-03 15:47:38 |
By :
Hararock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|