Viewing file: showPlaning.php (11.56 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("../include/FunctionDB.php"); include("admin_menu.php"); ConnectDB(); $sql = "SELECT * FROM personal_tb"; $result = mysql_query($sql) or die(" Error").mysql_error(); $rs = mysql_fetch_array($result); $row = mysql_num_rows($result); $strSQL = "Select * FROM project_tb WHERE Project_code = '$Project_code'"; $result = mysql_query($strSQL); $num = mysql_num_rows($result ); ?> <meta http-equiv="Content-Type" content="text/html; charset=TIS-620"><table width="792" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="792"><br> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_manage.php" >หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">ข้อมูลแผนดำเนินการ</font></legend> <label><div align="center"> <form id="form1" name="form1" method="post" action=""> <table width="95%" border="0" cellpadding="0" cellspacing="1" style="background-color:#eeeeee; border:1px solid gray"> <tr bgcolor="#CCCCFF"> <td height="24" colspan="7" ><div align="center"><font color="#000000" size="4" face="Tahoma"><strong>รายละเอียดแผนดำเนินการประจำปีงบประมาณ</strong></font></div></td> </tr> <tr bgcolor="#E6E6E6"> <td width="35" align="center" style="border:1px solid gray"><font color="#000000" size="2" face="MS Serif">No.</font></td> <td width="45" align="center" style="border:1px solid gray"><font size="2" face="MS Serif">รหัส</font></td> <td width="52" align="center" bgcolor="#CCCCCC" style="border:1px solid gray"><font color="#000000" size="2" face="MS Serif">ข้อ</font></td> <td width="352" align="center" bgcolor="#CCCCCC" style="border:1px solid gray"><font color="#000066" size="2" face="MS Serif">ชื่อหัวข้อของแผนดำเนินการ</font></td> <td width="77" align="center" bgcolor="#CCCCCC" style="border:1px solid gray"><font color="#000066" size="2" face="MS Serif">ป /ด /ว</font></td> <td width="69" align="center" bgcolor="#CCCCCC" style="border:1px solid gray"><font color="#000000" size="2" face="MS Serif">หมวดเงิน</font></td> <td width="111" align="center" style="border:1px solid gray"><div align="left"><font face="MS Serif"><font size="2">ยอดเงิน(บาท)<img src="file:///C|/AppServ/www/Webproject/Image/s_desc.png" width="15" height="9" /></font></font></div></td> </tr> <?php $i = 1; while($row = mysql_fetch_array($result)) {
if($count==0) { ?> <tr bgcolor="#F7F7F7" > <td align="center" ><strong><font color="#996600" size="1" face="Tahoma"> <?=$i?> </font></strong></td> <td align="center" ><div align="center"><font color="#003366" size="2" face="Tahoma"> <?=$row["Faculty_code"]?> </font></div></td> <td align="center" bordercolor="#EEEEEE" bgcolor="#eeeeee" ><div align="left"><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="InstructorList.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="PlaningList.php?Budget_Year=<?=$row["Budget_Year"]?>&&Faculty_code=<?=$row["Faculty_code"] ?>"title="Click to see Detail" class="d"> <?=$row["Orderlist_2"]?> </a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="ProjectList1.php?Orderlist_2=<?=$row["Orderlist_2"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"> </font></div></td> <td align="center" bordercolor="#EEEEEE" bgcolor="#eeeeee" ><div align="left"><font color="#990099" size="2" face="Tahoma"> <a href="PlaningInDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> <?=$row["Project_name"]?> </a><a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a></font> </div></td> <td align="center" bordercolor="#EEEEEE" bgcolor="#eeeeee" ><div align="center"><font color="#990099" size="2" face="Tahoma"> <a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"><font color="#003366" size="2" face="Tahoma"> <?=$row["Start_Date"]?> </font><font size="2" face="Tahoma"></font></font> </div></td> <td bordercolor="#EEEEEE" bgcolor="#eeeeee" ><div align="center"><font color="#003366" size="2" face="Tahoma"> <?=$row["Percent_ans"]?> </font></div></td> <td bgcolor="#F7F7F7" ><div align="right"><font color="#993333" size="2" face="Tahoma"> <?echo number_format($row['Budget_use'],2,'.',','); ?> </font></div></td> </tr> <? $count=1; } else { ?> <tr bgcolor="#FFFFFF"> <td align="center" bordercolor="#FFFFFF" ><strong><font color="#996600" size="1" face="Tahoma"> <?=$i?> </font></strong></td> <td align="center" bordercolor="#FFFFFF" ><div align="center"><font color="#003366" size="2" face="Tahoma"> <?=$row["Faculty_code"]?> </font></div></td> <td align="center" bordercolor="#EEEEEE" ><div align="left"><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="InstructorList.php?Orderlist_2=<?=$row["Orderlist_2"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="InstructorList.php?Orderlist_2=<?=$row["Orderlist_2"]?>"title="Click to see Detail" class="d"></a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="ProjectList1.php?Orderlist_2=<?=$row["Orderlist_2"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="PlaningList.php?Budget_Year=<?=$row["Budget_Year"]?>&&Faculty_code=<?=$row["Faculty_code"] ?>"title="Click to see Detail" class="d"> <?=$row["Orderlist_2"]?> </a></font></div></td> <td align="center" bordercolor="#EEEEEE" ><div align="left"><font color="#990099" size="2" face="Tahoma"> <a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a><a href="PlaningInDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> <?=$row["Project_name"]?> </a><a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a></font> </div></td> <td align="center" bordercolor="#EEEEEE" ><div align="center"><font color="#990099" size="2" face="Tahoma"> <a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"><font color="#003366" size="2" face="Tahoma"><strong><font color="#003366" size="2" face="Tahoma"> <?=$row["Start_Date"]?> </font></font><font size="2" face="Tahoma"></font>></font> </div></td> <td bordercolor="#EEEEEE" ><div align="center"><font color="#003366" size="2" face="Tahoma"> <?=$row["Percent_ans"]?> </font></div></td> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma"> <?echo number_format($row['Budget_use'],2,'.',','); ?> </font></div></td> </tr> <? $count=0; } $i++; } ?> <tr bgcolor="#FFFFFF"> <td colspan="7" align="center" ><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#E8FAFD"><div align="right"><font color="#0033CC" size="2" face="Tahoma"><strong> <font color="#993333"> จำนวนเงินที่ใช้</font></strong></font></div></td> <td bgcolor="#E8FAFD"><div align="right"><strong><font color="#993333" size="2" face="Tahoma"> <?php // $Orderlist_2 = $rs["Orderlist_2"]; $sql1 = "Select Sum(Budget_use) as SumB1 From project_tb Where Project_code='$Project_code' "; $result1 = mysql_query($sql1) or die("Erro".mysql_error()); $rss1 = mysql_fetch_array($result1); echo number_format($rss1[SumB1],2,'.',','); //echo"$rss1[SumC1]"; ?> </font></strong></div></td> </tr> <tr> <td bgcolor="#E8FAFD"><div align="right"><font color="#0033CC" size="2" face="Tahoma"><strong> <font color="#993333">วงเงินที่ตั้งไว้ตามแผน</font></strong></font></div></td> <td bgcolor="#E8FAFD"><div align="right"><strong><font color="#993333" size="2" face="Tahoma"> <?php // $Orderlist_2 = $rss["Orderlist_2"]; $sql2 = "Select * From project_type_tb Where Project_code='$Project_code' "; $result2 = mysql_query($sql2) or die("Erro".mysql_error()); $rss2 = mysql_fetch_array($result2); echo number_format($rss2[Budget_use],2,'.',','); // echo"$rss2[Budget_use]"; ?> </font></strong></div></td> </tr> <tr> <td width="77%" bgcolor="#E8FAFD"><div align="right"><font color="#0033CC" size="2" face="Tahoma"><strong> <font color="#993333">คงเหลือเงินตามแผน</font></strong></font></div></td> <td width="23%" bgcolor="#E8FAFD"><div align="right"><font color="#FF0000" size="2" face="Tahoma"> <?php $Delete3 = $rss2[Budget_use] - $rss1[SumB1] ; echo number_format($Delete3,2,'.',','); // echo"$Del4"; ?> </font></div></td> </tr> </table></td> </tr> <tr bgcolor="#CCCCFF"> <td colspan="7" align="center" ><div align="center"><strong><font color="#000000" size="2" face="Tahoma">ทั้งหมด</font><font color="#003399" size="2" face="Tahoma"> <? echo $num ?> </font><font color="#FFFFFF" size="2" face="Tahoma"><font color="#003366">รายการ</font><font color="#FFFFFF"> </font></font> </strong></div></td> </tr> </table> </form> </div> </label> </fieldset><br> <font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่<br> </font></td> </tr> </table>
|