|
|
|
ช่วยดูโคด้ให้หน่อยค่ะ..เป็นการตรวจสอบการ login แต่มันลันแล้วติด erroe น่ะค่ะ |
|
|
|
|
|
|
|
Code (PHP)
<?php
session_start();
?>
<?
$smicro = microtime();
$stime = date("h:i:s a");
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
?>
<BODY onLoad="clock() & window.setTimeout('getSecs()',1)">
<div align="right"><span id="pendule" style="position:absolute;left:1080;top:18;"></span>
<script LANGUAGE="JavaScript">
function clock() {
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all)
pendule.innerHTML = dispTime;
setTimeout("clock()", 1000);
}
startday = new Date();
clockStart = startday.getTime();
function initStopwatch()
{
var myTime = new Date();
var timeNow = myTime.getTime();
var timeDiff = timeNow - clockStart;
this.diffSecs = timeDiff/1000;
return(this.diffSecs);
}
function getSecs()
{
var mySecs = initStopwatch();
var mySecs1 = ""+mySecs;
mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " ";
document.frmMain.timespent.value = mySecs1
window.setTimeout('getSecs()',1000);
}
// End -->
</script>
<div align="right">
<table width="507" border="1" bordercolor="#FF00FF" bgcolor="#FFFFFF">
<tr>
<td width="254"><?
$date = date("d F Y h:i:s a");
echo $date;
?></td>
<td width="237"> </td>
</tr>
<tr>
<td>
<?
ob_start();
if(empty($u_user)) // ตรวจสอบว่าผ่านการ login หรือไม่
{
header("location:formlogin.php");
exit();
}
echo"ยินดีต้องรับ คุณ $u_user ";
?></td>
<td>
<?
$addr = $_SERVER['REMOTE_ADDR' ];
echo $addr;
?></td>
</tr>
<tr>
<td>
<?php
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "<b>หน้านี้ประมวลผล</b> ".$totaltime." <b>ไมโครวินาที</b>";
?></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href="http://localhost/IRPUT/viewdata11.php">REPORT</a></td>
</tr>
</table>
<?
/*$self = $_SERVER['PHP_SELF'];
$host = $_SERVER['HTTP_HOST' ];
$referer = $_SERVER['HTTP_REFERER' ];
?>
</boby>
<?
include "conn.inc.php";
include("font_thai.inc.php");
$SQL="INSERT INTO time
(u_user,smicro,stime) VALUES ('$u_user','$smicro','$stime')";
$sqlquery=mysql_db_query($dbname,$SQL);
echo"<BR>";
include "conn.inc.php";
include("font_thai.inc.php");
$SQL="INSERT INTO report
(u_user,smicro,self) VALUES ('$u_user','$smicro','$self')";
$sqlquery=mysql_db_query($dbname,$SQL);
echo"<BR>";
include "conn.inc.php";
$SQL="INSERT INTO datatime
(u_user,date,self,host,referer,addr,totaltime) VALUES ('$u_user','$date','$self','$host','$referer','$addr','$totaltime')";
$sqlquery=mysql_db_query($dbname,$SQL);
echo"<BR>";
mysql_close();
*/
?>
</div>
ช่วยดูให้หน่อยนะค่ะ
Tag : - - - -
|
|
|
|
|
|
Date :
2009-06-29 09:44:12 |
By :
krataiss |
View :
1030 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Error ว่าอะไร? ครับ
|
|
|
|
|
Date :
2009-06-29 10:07:02 |
By :
panyapol |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
นั่นสิ เออเร่ออะไร
|
|
|
|
|
Date :
2009-06-29 10:53:48 |
By :
monotakari |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|