|
|
|
ระบบแอดมินผิดพลาด ขอรบกวนหน่อยครับ งงอยู่แก้ไม่ได้ |
|
|
|
|
|
|
|
ขอดูส่วน login แบบเต็มๆทีครับ
|
|
|
|
|
Date :
2013-09-04 15:10:49 |
By :
Manussawin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ถูกครับ เขาเลิกใช้กันแล้วครับ
session_register("valid_uname");
session_register("valid_pwd");
session_register("valid_id");
$_SESSION['valid_uname'];
$_SESSION['valid_pwd'];
$_SESSION['valid_id'];
$db_conn = mysql_connect("localhost","ชื่อ","123456")
ใช้ชื่อตามที่ตั้งมาเลยครับ
if($row>0){ ลองใช้แบบนี้ครับ
|
|
|
|
|
Date :
2013-09-04 15:11:13 |
By :
Dragons_first |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>= ระบบ แอดมิน=</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="731" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
<table width="731" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td valign="top" bgcolor="#FFFFFF"><p> </p>
<p><?
$_SESSION['valid_uname'];
$_SESSION['valid_pwd'];
$_SESSION['valid_id'];
if($uname && $pwd){
$db_conn = mysql_connect("localhost","ngamtahotel_db","Ngamta123")
or die("<font face=\"Cordia New\"size=\"6\" color=\"red\">Could not connect.</font>");
mysql_select_db("ngamtahotel_db",$db_conn);
$query = "select * from admin where name='$uname' and password='$pwd'";
$result = mysql_query($query,$db_conn);
$rows = mysql_num_rows($result);
if($rows >0){
?>
</font><font size="-1">
<center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><BR>
<IMG SRC="../images/wrong.jpg" WIDTH="84" HEIGHT="83" BORDER="0" ALT=""> </font>
</center>
<font face="Cordia New" size="6" color="red">
<center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><B><BR>
ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง</B> </font>
</center>
</font><font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><br>
</font><font face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><a href="index.php" target="_parent">
<center>
<font size="-1"> เข้าระบบ </font>
</center>
</a></font></font> <font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<?
}
else{
$valid_user = $uname;
session_register("valid_user");
/*include ("thai1.php");
$datein = ThaiDate();
$timein = date( "H:i:s" );
$strSQL = " INSERT INTO memuse ( name, datein, timein ) VALUES ( '$uname', '$datein', '$timein' ) ";
mysql_query( $strSQL, $conn )
or die ( "INSERT มีข้อผิดพลาดเกิดขึ้น") . mysql_error();
$sql = "SELECT * FROM memuse";
$rs = mysql_query( $sql, $conn );
$num = mysql_num_rows($rs);
$out = $num;
session_register("out");*/
?>
</font><font size="-1">
<center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"> <IMG SRC="../images/true.jpg" WIDTH="108" HEIGHT="101" BORDER="0" ALT="">
</font>
</center>
<font face="Cordia New" size="6" color="green">
<center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><B><BR>
<font color="#FF0000"> ผู้ดูแลระบบ</font></B> </font>
</center>
</font><font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><br><a href="phpmenuuser.php" target="_parent">
<font face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<CENTER>
<font size="-1"> <a href="admin.php">เข้าใช้โปรแกรม</a> <a href="getpwdadmin.php">เปลี่ยนรหัสผ่าน</a>
</font>
</CENTER>
<font size="-1">
<?
}
}
else{
?>
<BR>
</font></font>
<center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><IMG SRC="../images/no.jpg" WIDTH="110" HEIGHT="112" BORDER="0" ALT="">
</font>
</center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><BR>
</font><font face="Cordia New" size="5" color="red">
<center>
<font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><B>ป้อนชื่อผู้ใช้หรือรหัสผ่านไม่ครบ</B>
</font>
</center>
</font><font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><br>
</font><font face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><a href="index.php" target="_parent">
<center>
<font size="-1"> เข้าระบบ </font>
</center>
</a></font></font> <font size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<?
}
?>
</font></p></td>
</tr>
</table></td>
</tr>
</table>
<table width="731" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
Date :
2013-09-04 15:20:25 |
By :
Mistertop |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|