|
|
|
สอบถามสองเรื่องคร่าาา เรื่องการบันทึกคะแนนกับวิธีการเปรียบเทียบคะแนนทำไงค่ะ |
|
|
|
|
|
|
|
โค้ดหน้ากรอกคะแนนเป็นแบบนี้นะค่ะ แล้วจึงส่งค่าไปให้โค้ดอันแรกที่่ให้ดูอ่ะค่ะ
Code (PHP)
<?php
include("connect_db.php");
session_start();
function get_project(){
$sql = "SELECT *
FROM project
ORDER BY project_id
";
if(!$result = mysql_query($sql)){
echo mysql_error();
exit;
}
return $result;
}
/*-------------------------------------- Main Program --------------------------------------------*/
$project_rs = get_project();
$row_array = mysql_fetch_array($project_rs);
?>
<?php include("inc_meta.php");?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Balanced Scorecard</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {
color: #FFFFFF;
font-size: large;
}
.style4 {font-size: 14px}
.style11 {font-family: Arial}
.style12 {font-size: 9}
.style14 {color: #CC00FF}
-->
</style>
</head>
<body style="background: #ffffff">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="1000">
<tr>
<td height="155" style="background: url(images/H.jpg)" valign="top"><div style="padding: 38px 0 0 75px"></div></td>
</tr>
<tr><td style="background: #cc00cc"></td></tr>
<tr>
<td style="background: #990099" height="20">
<table border ="0" bordercolor="#cc00cc"cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> </td>
</tr>
</table> </td>
</tr>
<tr><td style="background: #33393C"><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td></tr>
</table>
<table style="background: #990099" border ="0" cellpadding="0" cellspacing="0" width="1000">
<tr>
<td valign="top" style="background: #990099" >
<table style="background: #990099" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td ><img src="images/main.gif" height="30" width="215" border="0" alt=""></td>
</tr>
<tr>
<td ><a href="home.php"><img src="images/home.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><a href="http://www.pea4-padang.com/HTML/About.html"><img src="images/pawat.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><a href="project.php"><img src="images/project.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><a href="task.php"><img src="images/task.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><a href="bsc.php"><img src="images/bsc1.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><a href="report.php"><img src="images/report.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><img src="images/user.gif" height="30" width="215" border="0" alt=""></td>
</tr>
<tr>
<td ><a href="profile.php"><img src="images/profile.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr>
<td ><a href="logout.php"><img src="images/logout.gif" height="30" width="215" border="0" alt=""></a></td>
</tr>
<tr><td style="background: #990099"> <img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td><td rowspan="4"><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td></tr>
<tr><td style="background: #990099"> </td></tr>
<tr><td width="215">
</td></tr>
</table></td>
<td valign="top" width="80%">
<table width="100%" border="1" bordercolor="#ff66ff" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" style="background: #ff66ff"> <div align="center" class="tblb style2 style4">Welcome to Balanced Scorecard System </div></td>
</tr>
<tr>
<td style="background: #ffffff"align="center"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td> <div align="left" >
<form name="form1" action="<?php echo $server_host;?>/bsc_budget2_save.php" method="post" onSubmit="return validate_form(this);">
<p> </p>
<p><span class="tblb"><span class="style14">Balanced Scorecard > เปรียบเทียบการใช้งบประมาณ :</span><br>
<br>
<img src="images/ico.gif" width="11" height="13"> โครงการที่ต้องการตรวจสอบ </span><br> </td>
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td>
<p> <table width="100%" border="0" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" align="center">
<tr>
<!-- <td><font face="verdana,arial" size=-1><?php echo $row_array["project_id"];?></font></td>-->
<td width="15%" ><font size=-1 face="verdana,arial" class="tblb"><b>โครงการ :</b></font></td>
<td width="15%" ><font face="verdana,arial" size=-1><?php echo $row_array["project_name"];?></font></td>
<td width="35%" ><font size=-1 face="verdana,arial" class="tblb"><b>รายละเอียดโครงการ :</b></font></td>
<td width="35%" ><font face="verdana,arial" size=-1><?php echo $row_array["description"];?></font></td>
</tr>
</table>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<br><br>
<table width="100%" border="0" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" >
<tr>
<!-- <td><font face="verdana,arial" size=-1><?php echo $row_array["project_id"];?></font></td>-->
<td width="15%" ><font size=-1 face="verdana,arial" class="tblb"><b>งบประมาณตั้งต้น :</b></font></td>
<td width="15%" ><font face="verdana,arial" size=-1><?php echo $row_array["project_Budget"];?></font></td>
</tr><tr>
<td width="15%" ><font size=-1 face="verdana,arial" class="tblb"><b>งบประมาณใช้จริง :</b></font></td>
<td >
<font face="verdana,arial" size=-1><input type="text" size = "5" name="b_score " value="<?php echo $budget_true;?>"></font>
</td>
</tr>
</table>
<tr style="height:30px" >
<td align="center"><button onClick="javascript:window.location='<?php echo $server_host;?>/bsc_budget2_save.php?project_id=<?php echo $project_id;?>'" name="add">ตกลง</button>
<button onClick="javascript:window.location='<?php echo $server_host;?>/bsc_budget.php'" name="add">กลับ</button></td></tr>
</table>
<p> </p> <p> </p> <p> </p> <p> </p> <p> </p>
</table>
</td>
</tr> </table>
</td>
</tr>
</table>
<input type="hidden" name="project_id" value="<?php echo $project_id;?>">
</form>
<?php
include("footer.php");
?>
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1952940;
var sc_invisible=1;
var sc_partition=17;
var sc_security="fa1db912";
</script>
<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script>
<noscript>
<a href="http://icetemplates.com/" target="_blank"><img src="http://c18.statcounter.com/counter.php?sc_project=1952940&java=0&security=fa1db912&invisible=1" alt="website templates" border="0"></a>
</noscript>
<!-- End of StatCounter Code -->
</div>
</body>
</html>
|
|
|
|
|
Date :
2010-11-25 20:30:15 |
By :
Maiiez |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
จาก code อันแรกน่ะครับ คุณต้องเปลียนจาก insert เป็น update ครับ ถ้าใช้ insert มันก็จะทำการเพิ่มข้อมูลชุดใหม่ลงไป
Update
|
|
|
|
|
Date :
2010-11-25 21:10:41 |
By :
kanchen |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อ่อ ๆ ค่ะ ขอบคุณค่ะ จะเอาไปแก้ไข ^ ^
|
|
|
|
|
Date :
2010-11-25 21:19:51 |
By :
Maiiez |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|