Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > Loin เข้าสู้ระบบไม่ได้เป็นเพราะอะไรอะช่วยดูโค๊ตให้ที ขอบคุณคราบ



 

Loin เข้าสู้ระบบไม่ได้เป็นเพราะอะไรอะช่วยดูโค๊ตให้ที ขอบคุณคราบ

 



Topic : 045763



โพสกระทู้ ( 16 )
บทความ ( 0 )



สถานะออฟไลน์




<?
include("config.php");
require("banner.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?=$titleonweb?></title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="css2/template_css.css" rel="stylesheet" type="text/css">

<script language="Javascript">
function checkSubmit()
{
var username;
var password;
username=document.myform.username.value;
password=document.myform.password.value;
if(username == "" || password == "" )
{
alert("กรุณากรอกชื่อและพาสเวิร์ด !!!");
return false;
}
}
</script>
<script language="Javascript">
function setfocus()
{
window.myform.username.select();
window.myform.password;
}
</script>
</head>
<body onLoad="setfocus()">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="45%" border="0" align="center" cellspacing="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="46%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td><div align="center">
<p>
<? // แบบฟอร์มล็อกอิน ?>
</p>
</div>
<form name='myform' onSubmit="return checkSubmit()" action="index.php" method="post">
<table width="96%" border="0">
<tr>
<td>
<table width="92%" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="50%" rowspan="3"><div align="center"><font size="3"><img src="images/security.png" width="64" height="64"></font></div></td>
<td width="50%">&nbsp;</td>
</tr>
<tr>
<td><img src="images/login.gif" width="74" height="33"></td>
</tr>
<tr>
<td><strong>ชื่อสมาชิก</strong></td>
</tr>
<tr>
<td><div align="center">กรุณาใส่รายละเอียดเพื่อล็อกอิน</div></td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td><div align="center"></div></td>
<td><strong>รหัสผ่าน</strong></td>
</tr>
<tr>
<td><div align="center">หากคุณไม่มีหน้าที่เกี่ยวข้อง<br>
กรุณาปิดหน้าต่างนี้ด้วยครับ<br>
</div></td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td><div align="center"><font size="2">
<input name="button" type=button onclick='window.close()' value=' ปิดหน้านี้ '>
</font></div></td>
<td><input type="submit" name="submit" value="เข้าสู่ระบบ"></td>
</tr>
</table></td>
</tr>
</table>
</form>
<? // จบแบบฟอร์มล็อกอิน ?>
<p>
<?
if(isset($submit))
{
$sql = "select * from $tb_member where use_mem = '$use_mem' and pass_mem = '$pass_mem' and status='administrator'";
$res= mysql_query($sql);
$n= mysql_num_rows($res);
if($n>=1)
{
session_register("username");
session_register("password");
$_SESSION[active] = "ok";
$_SESSION[who] = "administrator";
if ($_SERVER["HTTP_X_FORWARDED_FOR"]) {
$IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
$IP = $_SERVER["REMOTE_ADDR"];
}
$_SESSION[ip_admin] = $IP;
echo "<script language='javascript'>alert('ยินดีต้อนรับผู้ดูแลระบบ $username');location.href='./front.php';</script>";
}
else
{
/*echo "<script language='javascript'>alert('username and password ไม่ถูกต้อง');location.href='./index.php';</script>";*/
$sql = "select * from $tb_member where use_mem = '$use_mem' and pass_mem = '$pass_mem' and status='user'";
$res= mysql_query($sql);
$n= mysql_num_rows($res);
if($n>=1){
session_register("username");
session_register("password");
$_SESSION[active] = "ok";
$_SESSION[who] = "user";
// $_SESSION[who] = "username_use"; ///--------

echo "<script language='javascript'>alert('ยินดีต้อนรับ $username');location.href='./front.php?select=searching';</script>";
}
else

{
/*echo "<script language='javascript'>alert('username and password ไม่ถูกต้อง');location.href='./index.php';</script>";*/
$sql = "select * from $tb_member where use_mem = '$use_mem' and pass_mem = '$pass_mem' and status='Superviser'";
$res= mysql_query($sql);
$n= mysql_num_rows($res);
if($n>=1){
session_register("username");
session_register("password");
$_SESSION[active] = "ok";
$_SESSION[who] = "Superviser";
// $_SESSION[who] = "username_sup"; ///--------

echo "<script language='javascript'>alert('ยินดีต้อนรับ $username');location.href='./front.php?select=searching';</script>";
}
else

{
/*echo "<script language='javascript'>alert('username and password ไม่ถูกต้อง');location.href='./index.php';</script>";*/
$sql = "select * from $tb_member where use_mem = '$use_mem' and pass_mem = '$pass_mem' and status='Superuser'";
$res= mysql_query($sql);
$n= mysql_num_rows($res);
if($n>=1){
session_register("username");
session_register("password");
$_SESSION[active] = "ok";
$_SESSION[who] = "Superuser";
// $_SESSION[who] = "username_sup"; ///--------

echo "<script language='javascript'>alert('ยินดีต้อนรับ $username');location.href='./front.php?select=searching';</script>";
}
else{
echo "<script language='javascript'>alert('username and password ไม่ถูกต้อง');location.href='./index.php';</script>";
}
}
}
}
}
?>
</p> </td>
</tr>
</table>
<p>&nbsp;</p>
<p><? //require"lastest_news.php" ;?></p>
<table width="100%" border="0" align="center">
<tr>
<td> <? //require("footer.php"); ?></td>
</tr>
</table>
</body>
</html>



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2010-07-20 19:32:08 By : geedoo View : 735 Reply : 3
 

 

No. 1



โพสกระทู้ ( 16 )
บทความ ( 0 )



สถานะออฟไลน์


นี่คือ config.php คราบลืมไป
[<meta http-equiv="Content-Type" content="text/html; charset=tis-620">

<?php
error_reporting(0);
//------------???????????????????----------------
$dbhost = 'localhost'; //?????????
$dbuser = 'root'; // ???????????
$dbpass = ''; //???????
$db_name = 'loc_per'; //????????????
//-------------------------------------------------------
//---------???????????????????????????????-----
$tb_user = "user";
$tb_gen_pers ="tb_gen_pers";
$tb_family ="tb_family";
$tb_type_gen_pers ="tb_type_gen_pers";
$tb_recorder ="tb_recorder";
$tb_type_crime_pers ="tb_type_crime_pers";
$tb_crime_pers ="tb_crime_pers";
$tb_caractor ="tb_caractor";
$tb_place ="place";
$tb_place_cri ="place_cri";
$tb_type_loca_cri ="type_loca_cri";
$tb_family_crim ="tb_family_crim";
$tb_family_cri_cro ="tb_family_cri_cro";
$tb_tumbon ="tb_tumbon";
$tb_news ="news";
$tb_offi_pers ="offi_pers";
$tb_dep="department";
$questions="questions";
$answers="answers";
$base_pol="base_pol";
$station="station";
$bos_tel = "bos_tel";

//----------------ฐานข้อมูลคดีอาญา 5 กลุ่ม
$g1="g1_name_crim";
$g2="g2_name_crim";
$g3="g3_name_crim";
$g4="g4_name_crim";
$g5="g5_name_crim";
$g5_criminal="g5_criminal";
//-----------------------------------------------------------
$titleonweb = "::ระบบข้อมูลบุคคลและสถานที่ ตำรวจภูธรจังหวัดนครปฐม::";
$titlew = "::Web_Board::";

$date=date("Y-m-d");
$datey = date("Y");
$timeon=date("h:i:A");
$title_offi_pers="เพิ่มบุคลากรประจำงาน";

$GTH1=date("dS");
$GTH2=date("l");
$GTH3=date("F");
$GTH4=date("Y")+543;
$GETG=("$GTH1 $GYH2 $GTH3 $GTH4");

//--------???????????????????????????------------------------
$conn = mysql_connect ($dbhost, $dbuser, $dbpass);
/*if(!$conn)
echo "Connect Error<br>";
else
echo "Connect OK<br>";*/
//------------------------------------------------------------------
//-------???????????????????????---------------------
$select_db=mysql_select_db($db_name);
/*if(!$select_db)
echo "Select Error<br>";
else
echo "Select OK<br>";*/
mysql_query( "SET NAMES tis620", $conn );
//---------------------------------------------------------
$timeformat="j/m/y-h:i";
$THdt=mktime(gmdate("H")+7,gmdate("i")+4,gmdate("s"),gmdate("m"),gmdate("d"),gmdate("y")); //ค่าวันเวลาสำหรับไทย
$bkk= mktime(gmdate("H")+7,gmdate("i")+0,gmdate("s"),
gmdate("m") ,gmdate("d"),gmdate("Y"));
$datetimeformat="j/m/y - H:i";
$now = date($datetimeformat,$bkk) ;
error_reporting(E_ALL ^ E_NOTICE); //ตั้งค่ารายงานความผิดพลาด

// ????????????????????????????????????? (????????????? ??? 1024 x 50 == 51200 ???? 50 Kb)
$config[imgSize_limit] = 51200;
$config[imgWidth] = 600; //????????????????? ????????????????????...

// ??????????????????????????
$config[fileSize_limit] = 102400;

$IP = getenv("REMOTE_ADDR");
$IP = "(".substr($IP,0,strrpos($IP,".")).".*)";

//????? IP Address ??????????????????????
if ($_SERVER["HTTP_X_FORWARDED_FOR"]) {
$IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
$IP = $_SERVER["REMOTE_ADDR"];
}

$pagelen = 20;
$page = $_REQUEST['page'];
if (empty($page)) { $page=1; }

//????????????????????
//??????????????????????????????????????????????????????????
$parth = "c:/appserv/www/ynpt/images_gen";
$parths = "c:/appserv/www/ynpt/images_crime";
$parthss = "c:/appserv/www/ynpt/images_loca_gen";
$parthes = "c:/appserv/www/ynpt/images_loca_cri";
$p_parthes = "c:/appserv/www/ynpt/picpost";
$op_parthes = "c:/appserv/www/ynpt/pic_offic_pers";

if($birth_month == "01" || $birth_month == "1")
{
$month = "January";
}
if($birth_month == "02" || $birth_month == "2")
{
$month = "February";
}
if($birth_month == "03" || $birth_month == "3")
{
$month = "March";
}
if($birth_month == "04" || $birth_month == "4")
{
$month = "April";
}
if($birth_month == "05" || $birth_month == "5")
{
$month = "May";
}
if($birth_month == "06" || $birth_month == "6")
{
$month = "June";
}
if($birth_month == "07" || $birth_month == "7")
{
$month = "July";
}
if($birth_month == "08" || $birth_month == "8")
{
$month = "August";
}
if($birth_month == "09" || $birth_month == "9")
{
$month = "September";
}
if($birth_month == "10" || $birth_month == "10")
{
$month = "October";
}
if($birth_month == "11" || $birth_month == "11")
{
$month = "November";
}
if($birth_month == "12" || $birth_month == "12")
{
$month = "December";
}
?>






Date : 2010-07-20 19:47:05 By : geedoo
 


 

No. 2



โพสกระทู้ ( 3,748 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์
Facebook

ไม่อยากอ่านเยอะ มันขึ้นว่าไรครับถึงเข้าไม่ได้ หรือลอง echo $sql; ออกมาดูนะครับเผื่อช่วยได้
Date : 2010-07-20 21:16:03 By : Dragons_first
 

 

No. 3

Guest


ชื่อ input form กับตัวแปรไม่ตรงกันนะ
input form ใช้ username , password
ส่วนตัวแปรใน sql ใช้ $use_mem , $pass_mem
ตั้งให้เหมือนกันนะ
Date : 2010-07-20 22:31:07 By : heng
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : Loin เข้าสู้ระบบไม่ได้เป็นเพราะอะไรอะช่วยดูโค๊ตให้ที ขอบคุณคราบ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่