|
|
|
รบกวนขอโค๊ด checkbox เปลี่ยนค่าstatus แล้วทำการซ่อนข้อความไปพร้อมกันหน่อยครับ |
|
|
|
|
|
|
|
ขอบคุณครับ
|
|
|
|
|
Date :
2011-12-08 16:48:47 |
By :
cit |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<!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">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
body {
margin-left: 50px;
margin-right: 50px;
background-color: #f5f5f5;
}
.style1 {
font-size: 16px;
font-weight: bold;
color: #0000FF;
}
.style5 {font-size: 15px; }
.style7 {font-size: 15px; font-weight: bold; }
.style8 {color: #0000FF; font-weight: bold; }
.style9 {
color: #FF0000;
font-weight: bold;
}
.style10 {font-size: 12px}
.menu1 {
color: #FFF;
font-weight: bold;
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
}
.menu {
color: #FFF;
}
#menu_admin tr .menu .menu .menu .menu {
text-align: center;
font-weight: bold;
}
.menu2 {
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
font-weight: bold;
color: #FFF;
text-align: center;
}
.user {
color: #000;
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
text-align: right;
}
.namelogin {
text-align: left;
}
.namelogin {
font-size: 14px;
}
.namelogin {
font-family: Tahoma, Geneva, sans-serif;
}
.namelogin {
color: #F00;
}
.namelogin {
font-weight: normal;
}
.namelogin {
font-weight: bold;
}
.namelogin {
text-align: center;
}
.logout {
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
font-style: normal;
font-weight: normal;
color: #60F;
text-decoration: underline;
text-align: center;
}
.lock {
color: #000;
font-size: 12px;
}
.lock .lock {
font-family: Tahoma, Geneva, sans-serif;
text-align: left;
}
.teble14 {
text-align: left;
}
.table4 {
text-align: center;
color: #0FF;
}
.table4 th {
color: #00F;
}
.table4 th {
color: #60F;
}
.table4 th {
font-family: Tahoma, Geneva, sans-serif;
}
.table4 th {
font-size: 12px;
}
.table4 th {
font-size: 14px;
}
.teble14 td {
font-size: 10px;
color: #CCC;
}
.teble14 td {
font-size: 12px;
}
.teble14 td {
color: #000;
}
.teble14 td {
font-size: 14px;
}
-->
</style>
</head>
<LINK href="images/sty.css" type=text/css rel=stylesheet>
<body>
<table width="1150" border="0" bgcolor="#E5E5E5">
<tr>
<td bgcolor="#F5F5F5"><table width="1150" border="0">
<tr>
<td colspan="2" bgcolor="#D5FBFD"><table width="1108" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1128"><table width="240" height="45" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="73" class="user">สวัสดีคุณ </td>
<td width="83" class="namelogin"><? echo $Name ?></td>
<td width="82"> <a href="logout.php" target="_parent" class="blue1"><span class="logout">ออกจากระบบ</span></a>
</td>
</tr>
</table>
<p> </p>
<p><img src="images/bander-menu.jpg" width="1128" height="200" /></p></td>
</tr>
</table></td>
</tr>
<tr>
<td width="164" valign="top"><table width="180" cellpadding="0" cellspacing="1">
<tr>
<td colspan="2" bgcolor="#9933FF" class="menu2">เมนู</td>
</tr>
<tr>
<td width="30" height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_regis.php" >เพิ่มข้อมูลพนักงาน</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_sale.php" > ขายสินค้า</a></span></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_product_type.php" >เพิ่มชนิดสินค้า</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_brand.php" >เพิ่มยี่ห้อสินค้า</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_color.php" >เพิ่มสีสินค้า</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_model.php" >เพิ่มรุ่นสินค้า</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_product.php" >เพิ่มข้อมูลสินค้า</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_supply.php" >บริษัทขนส่ง</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_warranty.php" >การรับประกัน</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_stock.php" >ใบสั่งซื้อ</a></span></span></span></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="lock"> แก้ไขใบสั่งซื้อ</td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_permis.php" >ระดับสิทธิ์การใช้งาน</a></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="edit_employee.php">แก้ไขข้อมูลพนักงาน</a></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="main_position.php">ตำแหน่งงาน</a></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="print_sale_day.php" target="_blank">รายงานการขายประจำวัน</a></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td width="148" span class="blue12"> <a href="report_month.php">รายงานการขายประจำเดือน</a></td>
</tr>
<tr>
<td height="28"><div align="right"><img src="images/bul01.gif" alt="" width="8" height="8" /></div></td>
<td span class="blue12"> <a href="report_space.php"> รายงานการขายเป็นช่วง ๆ</a></td>
</tr>
</table></td>
<td width="976" valign="top"><table width="939" border="0" align="center" bgcolor="#84A4AE">
<tr>
<td colspan="6" bgcolor="#F5F5F5"><p><?
require "config.php";
$strSQL = "SELECT * FROM session_stock";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<table width="827" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="823"><img src="images/edit_stock.jpg" width="823" height="201" /></td>
</tr>
</table>
<div align="center"><br />
</div>
<table width="818" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#CC0000">
<tr class="table4">
<th width="111"> <div align="center">รหัสสินค้า</div></th>
<th width="94"> <div align="center">วันที่สั่งซื้อ</div></th>
<th width="108"> <div align="center">รหัสพนักงาน</div></th>
<th width="81"> <div align="center">จำนวน</div></th>
<th width="81"> <div align="center">รหัสบริษัท</div></th>
<th width="88"><div align="center">เลขที่ใบสั่งซื้อ</div></th>
<th width="72"><div align="center">สถานะ </div></th>
<th width="64"><div align="center">Edit </div></th>
<th width="71"><div align="center">Delete</div></th>
</tr>
<?
while($objResult = mysql_fetch_array($objQuery))
{
?>
<tr class="teble14">
<td align="center" bgcolor="#FFCCFF"><?=$objResult["Product_id"];?></td>
<td align="center" bgcolor="#FFCCFF"><?=$objResult["Date_in"];?></td>
<td bgcolor="#FFCCFF"><div align="center"><?=$objResult["Register_id"];?></div></td>
<td align="center" bgcolor="#FFCCFF"><?=$objResult["Unit"];?></td>
<td align="center" bgcolor="#FFCCFF"><?=$objResult["Sup_id"];?></td>
<td align="center" bgcolor="#FFCCFF"><?=$objResult["buy_number"];?></td>
<td align="center" bgcolor="#FFCCFF">
<input type="checkbox" name="status" value="1" id="status" <?
if($objResult["status"] == 1)
{
$chk = "checked";
}
else
{
$chk = "";
}
?><?=$chk;?> disabled />
</td>
<td align="center" bgcolor="#FFCCFF"><a href="phpMySQLEditRecordForm_stck.php?Session_id=<?=$objResult["Session_id"];?>&Product_id=<?=$objResult["Product_id"];?>&Unit=<?=$objResult["Unit"];?>">แก้ไข</a></td>
<td align="center" bgcolor="#FFCCFF"><a href="edit_stock.php?Session_id=<?=$objResult["Session_id"];?>">ลบ</a></td>
</tr>
<?
}
?>
</table>
<?
//mysql_close($objConnect);
?>
|
|
|
|
|
Date :
2011-12-08 17:04:35 |
By :
cit |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
พี่ครับ นี่คือโค๊ดของผม ซึ่ง checkbox diable อยู่ครับ แล้วจะมีวิธีไหนซ่อนลิงค์แก้ไขไหมครับ
เพราะโค๊ดของพี่ mangkunzo ผมลองเอามาใช้แล้ว ก้ได้ผล แต่มันยังไม่ใช่ความต้องการของผมครับ
|
|
|
|
|
Date :
2011-12-08 17:06:25 |
By :
cit |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|