|
|
|
ดึงรายละเอียดข้อมูลจากหน้า home ไม่ได้คะแต่ทำไมดึงรายละเอียดข้อมูลจากหน้า femShow ได้คะช่วยหน่อยนะคะไม่เก่ง Code เรยคะ>o< |
|
|
|
|
|
|
|
Code (PHP)home.php
<?php require('cricom.php'); ?>
<!DOCTYPE HTML>
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="webpage">
<div><?php require("_top.php"); ?></div>
<div id="left-control"><?php require('navigation-menu.php'); ?></div>
<div id="content">
<table id="data-stream" cellpadding="0" cellspacing="0">
<tr id="data-stream-header">
<td>Ref.No.</td>
<td>Ref.Date</td>
<td>user</td>
<td>office</td>
<td>device</td>
<td>detail</td>
<td>staff</td>
<td>status</td>
</tr>
<?php
$sql = mysql_query("SELECT * FROM cstservice ORDER BY sv_refno desc limit 7;");
while ($data = mysql_fetch_assoc($sql)) {
echo '<tr>';
echo '<td>
<a href="frmUpdate.php?txtRefNo=$RefNo"','>',
$data[sv_refno],'</a></td>';
echo '<td>',$data[sv_ref_date],'</td>';
echo '<td>',$data[sv_user],'</td>';
echo '<td>',$data[sv_office],'</td>';
echo '<td>',$data[sv_devtype],'</td>';
echo '<td>',$data[sv_cdetail],'</td>';
echo '<td>',$data[sv_staff],'</td>';
echo '<td>',$data[sv_status],'</td>';
echo '</tr>';
}
?><a href="frmUpdate.php?txtRefNo=<? echo $RefNo ?>">
<?php echo $RefNo ?>
</table>
</div>
<div class="clear"></div>
</div>
<div><?php require("_footer.php"); ?></div>
</body>
</html>
frmUpdate.php
<?php require('cricom.php');
// cricom is a file connect database
session_start();
if ($_SESSION['L_username']=="") {
echo'<script langugue="javascript1.3">';
echo'alert("no username");';
echo'location.replace("index.php");';
echo'</script>';
}
mysql_connect($host,$username,$password)or die("Can't connect to $host");
mysql_select_db($db)or die("Can't select");?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ข้อมูลการให้บริการ</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body bgcolor="#ffffff">
<?php require("_top.php"); ?>
<div id="webpage">
<div id="left-control">
<?php require('navigation-menu.php'); ?></div>
<div id="content">
<script language = "javascript1.3">
function init() {
document.form2.txtRefNo.focus();
document.form1.txtRefDt.disabled=true;
document.form1.txtUser.disabled=true;
document.form1.selOFF.disabled=true;
document.form1.txtTel.disabled=true;
document.form1.txtLoc.disabled=true;
document.form1.txtEQID.disabled=true;
document.form1.txtVersion.disabled=true;
document.form1.txtCDetail.disabled=true;
document.form1.txtRcv.disabled=true;
document.form1.txtRcvDt.disabled=true;
document.form1.rbtDevice.disabled=true;
document.form1.selStaff.disabled=true;
}
function LoadFrm() {
if(document.form2.txtRefNo.value!=document.form1.txtRefNo.value)
location.replace('frmUpdate.php?txtRefNo='+document.form2.txtRefNo.value);
}
function reset_all() {
document.form2.txtRefNo.value="";
document.form2.txtRefNo.focus();
document.form1.txtRefDt.value="";
document.form1.txtUser.value="";
document.form1.txtTel.value="";
document.form1.txtEQID.value="";
document.form1.txtLoc.value="";
document.form1.txtVersion.value="";
document.form1.txtCDetail.value="";
document.form1.txtRcv.value="";
document.form1.txtRcvDt.value="";
document.form1.selOFF.value="";
document.form1.Staff.value="";
}
</script>
<table border="0" bordercolor="#000066" bgcolor="#ccffff"
width="100%" height="100%">
<td valign="top">
<table align="center">
<tr>
<td height="33" align="center"><h2>ข้อมูลการให้บริการ</h2></td>
</tr>
</table>
<table width="100%" border="0">
<tr align="left">
<td > </td>
<td > </td>
<td align="right">Ref.No.:</td>
<td><form name="form2" method="post" action="">
<table width="100%">
<input name="txtRefNo" type="text" id="txtRefNo"
value="<?print $txtRefNo?>" onblur="LoadFrm()">
</tr>
<?php
if ($txtRefNo!="") {
$result=mysql_query("SELECT* FROM cstservice WHERE sv_refno='$txtRefNo'");
if ($tmp=mysql_fetch_array($result)) {
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'document.form1.cmdSave.disabled = true;';
echo 'document.form1.txtRefDt.focus();';
echo '</SCRIPT>';
}
else {
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'alert("No RefNo : ',$txtRefNo,'");';
echo 'document.form2.txtRefNo.focus();';
echo '</SCRIPT>';
}
}
else {
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'document.form2.txtRefNo.focus();';
echo '</SCRIPT>';
}
?>
</table>
</form>
<form name="form1" method="post" action="frmUpdateProcess.php">
<input name="hdDevice" type="hidden" value="">
<input name="hdOFF" type="hidden" value="">
<input name = "txtRefNo" type = "hidden" value="<?print $txtRefNo?>">
</td>
</tr>
<tr align="left">
<td > </td>
<td > </td>
<td align="right">Ref. Date:</td>
<td>
<?php $txtRefDt=$tmp["sv_ref_date"];
if ($txtRefDt!="") {
$txtRefDt=substr($txtRefDt,8,2) . '/' . substr($txtRefDt,5,2) . '/' . substr($txtRefDt,0,4);
}
?>
<input name="txtRefDt" type="text" id="txtRefDt" value="<? print$txtRefDt ?>">
</td>
</tr>
<tr>
<td width="30%" align="right">ผู้แจ้ง</td>
<td width="20%" align="Left">
<?php $txtUser=$tmp["sv_user"]; ?>
<input name="txtUser" type="text" id="txtUser" value="<? print$txtUser ?>">
</td>
<td width="20%" align="right">สังกัด</td>
<?php $hdOFF=$tmp["sv_office"]; ?>
<td width="40%">
<?php $result=mysql_query
("SELECT*
FROM cstoffice"); ?>
<select name="selOFF">
<?php
while ($dbarr = mysql_fetch_array($result)) {
?>
<option value = "<? print $dbarr["of_id"];?>" ><? print $dbarr["of_name"];?></option>
<?php } ?>
</select>
<?php
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'document.form1.selOFF.value="',$hdOFF,'";';
echo '</SCRIPT>';
?>
</td>
</tr>
<tr>
<td align="right">โทรศัพท์</td>
<td>
<?php $txtTel=$tmp["sv_tel"]; ?>
<input name="txtTel" type="text" id="txtTel" value="<? print$txtTel ?>">
</td>
<td align="right">ที่ตั้ง</td>
<td>
<?php $txtLoc=$tmp["sv_location"]; ?>
<input name="txtLoc" type="text" id="txtLoc"value="<? print$txtLoc ?>">
</td>
</tr>
<tr>
<td align="right">เลขครุภัณฑ์</td>
<td>
<?php $txtEQID=$tmp["sv_id"]; ?>
<input name="txtEQID" type="text" id="txtEQID" value="<? print$txtEQID ?>">
</td>
<td align="right">ยี่ห้อ/รุ่น </td>
<td>
<?php $txtVersion=$tmp["sv_version"]; ?>
<input name="txtVersion" type="text" id="txtVersion" value="<? print$txtVersion ?>">
</td>
</tr>
<tr>
<td colspan="4">ประเภท
<?php $hdDevice=$tmp["sv_devtype"]; ?>
<input name="rbtDevice" type="radio" value="PC" checked> computer
<input name="rbtDevice" type="radio" value="PT"> printer
<input name="rbtDevice" type="radio" value="MT"> monitor
<input name="rbtDevice" type="radio" value="NT"> network
<input name="rbtDevice" type="radio" value="OT"> อื่นๆ
</td>
<?php
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'switch ("',$hdDevice,'") {';
echo 'case "PC" : document.form1.rbtDevice(0).checked = true;break;';
echo 'case "PT" : document.form1.rbtDevice(1).checked = true;break;';
echo 'case "MT" : document.form1.rbtDevice(2).checked = true;break;';
echo 'case "NT" : document.form1.rbtDevice(3).checked = true;break;';
echo 'case "OT" : document.form1.rbtDevice(4).checked = true;break;';
echo '}';
echo '</SCRIPT>'
?>
</tr>
<tr>
<td colspan="4">อาการ
<?php $txtCDetail=$tmp["sv_cdetail"]; ?>
<textarea name="txtCDetail" cols="100" rows="4" wrap="VIRTUAL" id="txtCDetail"><? print$txtCDetail ?></textarea></td>
</tr>
<tr>
<td colspan="4">ผู้รับเรื่อง
<?php $txtRcv=$tmp["sv_receiver"]; ?>
<input name="txtRcv" type="text" id="txtRcv" size="20"
value="<? print$txtRcv ?>">
</td>
</tr>
</table>
<hr>
<table width="560">
<tr>
<td colspan="5"> ผู้รับผิดชอบ :
<?php
if ($tmp["sv_staff"]=="") {
$selStaff=$_SESSION["L_username"];
}
else {
$selStaff=$tmp["sv_staff"];
}
?>
<?php $result=mysql_query("SELECT* FROM cststaff"); ?>
<select name="selStaff">
<?php
while ($dbarr = mysql_fetch_array($result)) {
?>
<option value = "<? print $dbarr["st_login"];?>" ><? print $dbarr["st_login"];?></option>
<?php } ?>
</select>
<?php
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'document.form1.selStaff.value="',$selStaff,'";';
echo '</SCRIPT>';
?>
<input name="hdStaff" type="hidden" value="<? print $selStaff ?>">
</td>
</tr>
<tr>
<td height="25" colspan="5">Hardware</td>
</tr>
<tr>
<td height="23" colspan="4">
<?php $cbx01=$tmp["01"]; ?>
<input name="cbx01" type="checkbox" id="cbx01" value="1">
ตรวจสอบอุปกรณ์-แก้ไข
<?php
if ($cbx01=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx01.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
<td width="303">
<?php $cbx02=$tmp["02"]; ?>
<input name="cbx02" type="checkbox" id="cbx02" value="1">
เปลี่ยนอุปกรณ์ (RAM, DRIVE, HD,etc)
<?php
if ($cbx02=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx02.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
</tr>
<tr>
<td height="22" colspan="4">
<?php $cbx03=$tmp["03"]; ?>
<input name="cbx03" type="checkbox" id="cbx03" value="1">
ติดตั้งอุปกรณ์ต่อพ่วง
</td>
<?php
if ($cbx03=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx03.checked=true;';
echo '</SCRIPT>';
}
?>
<td>
<?php $cbx04=$tmp["04"]; ?>
<input name="cbx04" type="checkbox" id="cbx04" value="1">
ติดตั้งระบบ Network
<?php
if ($cbx04=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx04.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
</tr>
<tr>
<td height="27" colspan="5">Software</td>
</tr>
<tr>
<td height="21" colspan="4">
<?php $cbx05=$tmp["05"]; ?>
<input name="cbx05" type="checkbox" id="cbx05" value="1">
ติดตั้ง Driver
<?php
if ($cbx05=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx05.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
<td>
<?php $cbx06=$tmp["06"]; ?>
<input name="cbx06" type="checkbox" id="cbx06" value="1">
Format HD + OS
<?php
if ($cbx06=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx06.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
</tr>
<tr>
<td height="24" colspan="4">
<?php $cbx07=$tmp["07"]; ?>
<input name="cbx07" type="checkbox" id="cbx07" value="1">
ติดตั้ง Application Program
<?php
if ($cbx07=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx07.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
<td>
<?php $cbx08=$tmp["08"]; ?>
<input name="cbx08" type="checkbox" id="cbx08" value="1">
Check Virus
<?php
if ($cbx08=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx08.checked=true;';
echo '</SCRIPT>';
}
?> </td>
</tr>
<tr>
<td height="21" colspan="4">
<?php $cbx09=$tmp["09"]; ?>
<input name="cbx09" type="checkbox" id="cbx09" value="1">
Config Network
<?php
if ($cbx09=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx09.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
<td>
<?php $cbx10=$tmp["10"]; ?>
<input name="cbx10" type="checkbox" id="cbx10" value="1">
Config Sharing (file, Printer, etc)
<?php
if ($cbx10=="1")
{
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx10.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
</tr>
<tr>
<td height="21" colspan="4">
<?php $cbx13=$tmp["13"]; ?>
<input name="cbx13" type="checkbox" id="cbx13" value="1">
Recovery
<?php
if ($cbx13=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx13.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
<td>
</td>
</tr>
<tr>
<td height="28" colspan="5">Other</td>
</tr>
<tr>
<td height="22" colspan="4">
<?php $cbx11=$tmp["11"]; ?>
<input name="cbx11" type="checkbox" id="cbx11" value="1">
ให้คำปรึกษา
<?php
if ($cbx11=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx11.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
<td>
<?php $cbx12=$tmp["12"]; ?>
<input name="cbx12" type="checkbox" id="cbx12" value="1">
ส่งซ่อมร้ายภายนอก
<?php
if ($cbx12=="1") {
echo '<SCRIPT LANGUAGE="JavaScript1.3">';
echo 'document.form1.cbx12.checked=true;';
echo '</SCRIPT>';
}
?>
</td>
</tr>
<tr valign="top">
<td height="50" colspan="5">รายละเอียด :
<?php $txtFDetail=$tmp["sv_cdetail"]; ?>
<textarea name="txtFDetail" cols="70" rows="4" wrap="VIRTUAL" id="txtFDetail"><? print $txtFDetail ?></textarea> </td>
</tr>
<tr>
<td width="38">สถานะ</td>
<?php $rbtStatus=$tmp["sv_status"]; ?>
<td width="65"><input name="rbtStatus" type="radio" value="Q" checked>งานเข้าระบบ</td>
<td width="67"><input name="rbtStatus" type="radio" value="P">
กำลังดำเนินการ</td>
<td width="63"><input name="rbtStatus" type="radio" value="S">
เสร็จแล้ว</td>
<?php
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'switch ("',$rbtStatus,'") {';
echo 'case "Q" : document.form1.rbtStatus(0).checked = true;break;';
echo 'case "P" : document.form1.rbtStatus(1).checked = true;break;';
echo 'case "S" : document.form1.rbtStatus(2).checked = true;break;';
echo '}';
echo '</SCRIPT>'
?>
</tr>
<tr>
<td colspan="4">วันที่เริ่มทำ :
<?php $txtFRPMDt=$tmp["sv_start_date"];
if ($txtFRPMDt!="") {
$txtFRPMDt=substr($txtFRPMDt,8,2) . '/' . substr($txtFRPMDt,5,2) . '/' . substr($txtFRPMDt,0,4);
}
?> <input name="txtFRPMDt" type="text" id="txtFRPMDt" value="<? print $txtFRPMDt ?>" maxlength="10"></td>
<td>วันที่ทำเสร็จ :
<?php $txtTODt=$tmp["sv_finish_date"];
if ($txtTODt!="") {
$txtTODt=substr($txtTODt,8,2) . '/' . substr($txtTODt,5,2) . '/' . substr($txtTODt,0,4);
}
?>
<input name="txtTODt" type="text" id="txtTODt"
value="<? print $txtTODt ?>" maxlength="10"></td>
</tr>
<tr>
<td colspan="4">ระยะเวลา :
<?php $txtDuration=$tmp["sv_duration"]; ?> <input name="txtDuration" type="text" id="txtDuration" size="10" maxlength="5" value="<? print $txtDuration ?>">
Hrs </td>
</tr>
<tr>
<td height="28" colspan="5">หมายเหตุ :
<?php $txtRemark=$tmp["sv_remark"]; ?>
<input name="txtRemark" type="text" size="75" maxlength="100" value="<? print $txtRemark ?>"></td>
</tr>
</table>
<hr>
<table width="563">
<tr>
<td colspan="4">กรณีส่งร้านภายนอก</td>
</tr>
<tr>
<td>สถานะ</td>
<td colspan="3">
<?php $rbtShop=$tmp["sv_shopstt"]; ?>
<input name="rbtShop" type="radio" value="1"> รอการส่งซ่อม
<input name="rbtShop" type="radio" value="2"> รอซ่อม
<input name="rbtShop" type="radio" value="3"> ส่งคืน User
<?php
echo '<SCRIPT LANGUAGE="JavaScript">';
echo 'switch ("',$rbtShop,'") {';
echo 'case "1" : document.form1.rbtShop(2).checked = true;break;';
echo 'case "2" : document.form1.rbtShop(3).checked = true;break;';
echo 'case "3" : document.form1.rbtShop(1).checked = true;break;';
echo '}';
echo '</SCRIPT>'
?>
</td>
</tr>
</table>
<hr><br>
<table width="529">
<tr>
<td width="132" align="center"><input name="cmdSave" type="submit" id="cmdSave" value="Save"></td>
<td width="153" align="center"><input name="cmdReset" type="button" id="cmdReset" value="Reset" onclick="location.replace('frmUpdate.php')"></td>
<td width="194" align="center"><input name="cmdExit" type="button" id="cmdExit" value="Exit" onclick="location.replace('home.php')"></td>
<td width="194" align="center"><input name="cmdEdit" type="button" id="cmdEdit" value="Edit" onclick="location.replace('frmnewedit.php')"></td>
</tr>
</table>
</form>
<form name="form3" method="post" action="frmPrintDetail.php">
<input name = "txtRefNo" type = "hidden" value="<?php print $txtRefNo?>">
<table width="200" border="0">
<tr>
<td><input name="cmdPrint" type="submit" id="cmdPrint" value="Print"></td>
</tr>
</table>
</form>
<p> </p></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
</body>
</div>
</html>
frmShow
<?php require('cricom.php'); ?>
<!DOCTYPE HTML>
<html>
<head>
<title>ข้อมูลการให้บริการ</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="webpage">
<div><?php require("_top.php"); ?></div>
<div id="left-control">
<?php require('navigation-menu.php'); ?></div>
<div id="content"><div id="webpage">
<table id="data-stream" cellpadding="0" cellspacing="0" >
<tr>
<td valign="center" colspan="7">
<body>
<?php
if ($rbtchoice=="a") {
$sql = "SELECT * FROM cstservice";
}
else if($rbtchoice=="q") {
$sql = "SELECT * FROM cstservice WHERE sv_status<>'S'";
}
$dbquery = mysql_db_query($db,$sql);
$num_rows=mysql_num_rows($dbquery);
$Gopage=$HTTP_GET_VARS["Page"];
if($Gopage=="") {
$Gopage=1;
}
$Pagesize=$HTTP_GET_VARS["Pagesize"];
$Pagesize=30;
$Maxcount=ceil($num_rows/$Pagesize);
$Gopage=(($Gopage-1)*$Pagesize)+$Recs;
$Recs=1;
if ($rbtchoice=="a") {
echo "<b>ข้อมูลการให้บริการ ICT (รายการทั้งหมด)</b>";
}
else if($rbtchoice=="q") {
echo "<b>ข้อมูลการให้บริการ ICT (รายการที่ยังทำไม่เสร็จ)</b>";
}
echo "<br>";
$bg="skyblue";
$Checkpage=($Gopage/$Pagesize)+1;
if($Checkpage==$Maxcount) {
$Newsize=$num_rows % $Pagesize;
$Pagesize=$Newsize;
}
if ($rbtchoice=='a') {
$sql2="SELECT* FROM cstservice ORDER BY sv_refno desc limit $Gopage, $Pagesize";
}
else if ($rbtchoice=='q') {
$sql2="SELECT * FROM cstservice WHERE sv_status<>'S' ORDER BY sv_refno
desc limit $Gopage, $Pagesize";
}
$dbquery2=mysql_db_query($db,$sql2);
while ($Recs <= $Pagesize) {
$result=mysql_fetch_array($dbquery2);
$RefNo = $result[sv_refno];
$RefDt = $result[sv_ref_date];
$user = $result[sv_user];
$office = $result[sv_office];
$device = $result[sv_devtype];
$detail = $result[sv_cdetail];
$staff = $result[sv_staff];
$status = $result[sv_status];
If ($bg=="skyblue") {
$bg="white";
}
else {
$bg="skyblue";
}
?>
<tr bgcolor=<?php echo $bg ?> >
<td><a href="frmUpdate.php?txtRefNo=<? echo $RefNo ?>">
<?php echo $RefNo ?></a></td>
<td><?php echo $RefDt;?></td>
<td><?php echo $user ?></td>
<td><?php echo $office ?></td>
<td><?php echo $device ?></td>
<td><?php echo $detail ?></td>
<td><?php echo $staff ?></td>
<td><?php echo $status ?></td>
</tr>
<?php
$Recs++;
}
echo "</table>";
echo "<br>page ".$Checkpage."/".$Maxcount;
echo "<Br>";
if ($Checkpage>1)
{
echo "[ <a href=".$Scriptname."?Page=".($Checkpage-1)."&Pagesize=".$Pagesize."&rbtchoice=".$rbtchoice.">Previous</a> ]";
}
if ($Checkpage<$Maxcount)
{
echo "[ <a href=".$Scriptname."?Page=".($Checkpage+1)."&Pagesize=".$Pagesize."&rbtchoice=".$rbtchoice.">Next</a> ]";
}
echo "<br><br>";
echo "[";
$Pad="";
$Scriptname=${"Script_Name"};
for ($N=1; $N<=$Maxcount; $N=$N+1)
{
if ($N>=10)
{
$Pad="";
}
$Ref="<a href=".$Scriptname."?Page=".$N."&Pagesize=".$Pagesize."&rbtchoice=".$rbtchoice.">".$Pad.$N."</a>";
echo " ".$Ref." ";
}
echo "]";
mysql_close();?>
<a href="home.php">กลับสู่หน้าหลัก </a>
</body>
</table>
</div>
</div>
<div class="clear"></div>
<div><?php require("_footer.php"); ?></div>
</body>
</html>
Tag : PHP
|
|
|
|
|
|
Date :
2011-09-08 12:21:33 |
By :
Arni |
View :
1035 |
Reply :
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ($data = mysql_fetch_assoc($sql)) {
echo '<tr>';
echo '<td>
<a href="frmUpdate.php?txtRefNo=$data[sv_refno]"','>',
$data[sv_refno],'</a></td>';
echo '<td>',$data[sv_ref_date],'</td>';
echo '<td>',$data[s,/color]'</td>';
echo '<td>',$data[sv_,/color]'</td>';
echo '<td>',$data[sv_devtype],'</td>';
echo '<td>',$data[sv_cdetail],'</td>';
echo '<td>',$data[sv_staff],'</td>';
echo '<td>',$data[sv_status],'</td>';
echo '</tr>';
}
|
|
|
|
|
Date :
2011-09-08 12:33:20 |
By :
ikikkok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไฟล์ที่แก้ไขที่ home.php คะ
<?php require('cricom.php'); ?>
<!DOCTYPE HTML>
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="webpage">
<div><?php require("_top.php"); ?></div>
<div id="left-control"><?php require('navigation-menu.php'); ?></div>
<div id="content">
<table id="data-stream" cellpadding="0" cellspacing="0">
<tr id="data-stream-header">
<td>Ref.No.</td>
<td>Ref.Date</td>
<td>user</td>
<td>office</td>
<td>device</td>
<td>detail</td>
<td>staff</td>
<td>status</td>
</tr>
<?php
$sql = mysql_query
("SELECT *
FROM cstservice
ORDER BY sv_refno desc limit 7;");
while ($data = mysql_fetch_assoc($sql)) {
echo '<tr>';
echo '<td>
<a href="frmUpdate.php?txtRefNo=$data[sv_refno]"','>',
$data[sv_refno],'</a></td>';
echo '<td>',$data[sv_ref_date],'</td>';
echo '<td>',$data[sv_user]'</td>';
echo '<td>',$data[sv_office]'</td>';
echo '<td>',$data[sv_devtype],'</td>';
echo '<td>',$data[sv_cdetail],'</td>';
echo '<td>',$data[sv_staff],'</td>';
echo '<td>',$data[sv_status],'</td>';
echo '</tr>';
}
</table>
</div>
<div class="clear"></div>
</div>
<div><?php require("_footer.php"); ?></div>
</body>
</html>
|
|
|
|
|
Date :
2011-09-08 12:43:32 |
By :
Arni |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="frmUpdate.php?txtRefNo=$data[sv_refno]"','>',
$data[sv_refno],'</a></td>';
echo '<td>',$data[sv_ref_date],'</td>';
echo '<td>',$data[sv_user]'</td>';
echo '<td>',$data[sv_office]'</td>';
echo '<td>',$data[sv_devtype],'</td>';
echo '<td>',$data[sv_cdetail],'</td>';
echo '<td>',$data[sv_staff],'</td>';
echo '<td>',$data[sv_status],'</td>';
echo '</tr>';
เปลี่ยนจาก , เป็น . ครับ
|
ประวัติการแก้ไข 2011-09-08 13:57:59 2011-09-08 14:00:59
|
|
|
|
Date :
2011-09-08 13:55:34 |
By :
arm8957 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่ได้อยุดีคะ
|
|
|
|
|
Date :
2011-09-08 15:15:06 |
By :
Arni |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|