|
|
|
ดูโค้ดสถานะให้หน่อยค่ะมันขึ้นแค่สถานะเดียวเองอ่ะ เวลาจะกดเปลี่ยนสถานะมันก้อไม่เปลี่ยนเป็นเพราะอะไรค่ะ |
|
|
|
|
|
|
|
<? include"ck_session.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>HOME RESEARCH & DEVELOP</title>
<link href="../fuction/style_1.css" rel="stylesheet" type="text/css" />
</head>
<body ><center>
<? include"header.php";?>
<? include"menu_top.php";?>
<? include"menu_tops.php";?>
<?
$id=$_GET[id];
$st=$_GET[st];
$even=$_GET[even];
if($st!="" and $id!=""){
if($st==1) $s=2;
if($st==2) $s=3;
if($st==3) $s=1;
$sql="UPDATE `tb_project` SET `status` = '$s' WHERE `id` =$id LIMIT 1 ;";
$res_de=mysql_db_query($dbname,$sql);
}
if($even=="del"){
$sql="delete from `tb_project` WHERE `id` =$id LIMIT 1 ;";
$res_de=mysql_db_query($dbname,$sql);
}
?>
<table width="1032" border="0">
<tr>
<td width="186" height="425"><table width="180" border="0">
<tr>
<td><img src="../img/buttonleft/22.jpg" alt="" width="180" height="330" border="0" usemap="#MapMap" /></td>
</tr>
</table>
<table width="186" border="0">
<tr>
<td width="180"><img src="../img/buttonleft/23.jpg" alt="" width="180" height="26" /></td>
</tr>
<tr>
<td><? include"calendar.php";?></td>
</tr>
</table>
<p><map name="MapMap" id="MapMap">
<area shape="rect" coords="45,33,100,65" href="main.php" target="_parent" alt="Homepage" />
<area shape="rect" coords="44,70,135,95" href="project_input.php" target="_parent" alt="Document" />
<area shape="rect" coords="45,97,135,124" href="report.php" target="_parent" alt="Report" />
<area shape="rect" coords="45,130,175,160" href="project_complete.php" target="_parent" alt="Status complete" />
<area shape="rect" coords="45,163,174,189" href="admin.php" target="_parent" alt="Webboard" />
<area shape="rect" coords="44,192,173,221" href="about.php" target="_parent" alt="Contact as" />
<area shape="rect" coords="44,223,170,254" href="user.php" target="_new" alt="Member" />
<area shape="rect" coords="44,257,174,288" href="profile.php" target="_parent" alt="Chang password" />
<area shape="rect" coords="45,292,141,318" href="logout.php" target="_parent" alt="logout" />
</map>
</p></td>
<td width="836" align="center" valign="top" bgcolor="#CCCCCC"><p> </p>
<p><table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="702" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr bgcolor="#333333">
<td width="27" align="center" class="whi12">NO.</td>
<td width="77" align="center" class="whi12">Project Name</td>
<td width="70" align="center" class="whi12">NRE No.</td>
<td width="60" align="center" class="whi12">Start Date</td>
<td width="57" align="center" class="whi12">Due Date</td>
<td width="47" align="center" class="whi12">Total</td>
<td width="139" align="center" class="whi12">Remark</td>
<td width="121" align="center" class="whi12">Status</td>
<td width="48" align="center" class="whi12">DELETE</td>
</tr><?
$type_s=$_GET[type];
if(type_s)
$vb=" where status=$type_s";
$id_project=$_GET[id_project];
$sql_project="select * from tb_project ORDER BY `status` ";
$res_project=mysql_db_query($dbname,$sql_project);
$num_project=mysql_num_rows($res_project);
while($row_project=mysql_fetch_row($res_project)){
$status_project=$row_project[7];
if ($status_project==1)
$status_text="Wait......";
if ($status_project==2)
$status_text="Complete";
if ($status_project==3)
$status_text="cancle";
?>
<tr align="center" bgcolor="#999999">
<td><?=$row_project[1]?></td>
<td><?=$row_project[2]?></td>
<td><?=$row_project[9]?></td>
<td><?=$row_project[4]?></td>
<td><?=$row_project[5]?></td>
<td><?=$row_project[6]?></td>
<td><?=$row_project[7]?></td>
<td class="sub_menu"> <a href="project_complete.php?id=<?=$row_project[0]?>&st=<?=$status_project?>">
<?=$status_text?>
</a></td>
<td class="del"><a href="project_complete.php?id=<?=$row_project[0]?>&even=del">DELETE</a></td>
</tr>
<?
$sum=$sum+$row_project[0];
}
?>
<td align="center"> </td>
<td align="left"> </td>
<td align="center" class="sub_menu"> </td>
<td align="center" class="del"> </td>
</table>
<br /></p></td>
</tr>
</table>
<table width="1030" border="0">
<tr>
<td><img src="../img/banner/template_10.jpg" width="1024" height="90" border="0" usemap="#Map2" /></td>
</tr>
</table>
<p> </p>
<blockquote> </blockquote>
<map name="Map2" id="Map2">
<area shape="rect" coords="151,8,208,42" href="main.php" target="_parent" alt="Home page" />
<area shape="rect" coords="216,6,303,44" href="project_input.php" target="_parent" alt="Document" />
<area shape="rect" coords="310,6,371,43" href="report.php" target="_parent" alt="Report" />
<area shape="rect" coords="380,6,516,46" href="project_complete.php" target="_parent" alt="Status complete" />
<area shape="rect" coords="525,6,613,45" href="admin.php" target="_parent" alt="Webboard" />
</map>
</body>
</html>
Tag : PHP, MySQL, CakePHP
|
|
|
|
|
|
Date :
2010-09-04 09:26:07 |
By :
puwin |
View :
835 |
Reply :
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|