Viewing file: Conclude1.php (11.65 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start(); if (session_is_registered("valid_user")&&session_is_registered("password")) { $Username = $valid_user; $Password = $password; include("../../include/FunctionDB.php"); ConnectDB(); $sql = "Select Sum(Teacher_name) From personal_tb "; $sql2 = "Select * From personal_tb"; $result = mysql_query($sql) or die(" Error").mysql_error(); $result2 = mysql_query($sql2) or die(" Error").mysql_error(); $rs = mysql_fetch_array($result); $rs2 = mysql_fetch_array($result2); $total = mysql_num_rows($result2); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title> Detail</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link rel="stylesheet" href="../../../css/cart4.css" type="text/css"> </head>
<body bgcolor="#F7F5EC"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <table width="89%" border="0" align="center" cellpadding="0" cellspacing="1" class="table" style="border:1px solid gray"> <form action="file:///C|/Apache2/htdocs/Etech/FrmEditPersonal.php" method="$_POST"> <tr bgcolor="#F3ECD2" > <td height="24" colspan="4"> <div align="center"><font color="#003366" size="4" face="Tahoma"><strong>แสดงรายละเอียดสัดส่วนการศึกษา</strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#EEEEEE" style="border:1px solid gray"> <div align="center"><font color="#003366" size="3" face="Tahoma"><strong>วุฒิ</strong></font></div></td> <td bgcolor="#EEEEEE" style="border:1px solid gray"> <div align="center"><font color="#003366" size="3" face="Tahoma"><strong>จำนวน (</strong></font><font color="#000000" size="2" face="Tahoma"><strong> คน </strong></font><font color="#003366" size="3" face="Tahoma"><strong>) </strong></font></div></td> <td bgcolor="#EEEEEE" style="border:1px solid gray"> <div align="center"><font color="#003366" size="3" face="Tahoma"><strong>ร้อยละ</strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td width="45%" bgcolor="#F3ECD2"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong>ปริญญาตรี</strong></font></div></td> <td width="29%" bgcolor="#FFFFFF"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong> <a href="DegreeList.php?Degree_code=1"> <?php $sql1 = "SELECT count(Degree_code) as num1 FROM personal_tb WHERE Degree_code=1 "; $result = mysql_query($sql1) or die(" Error").mysql_error(); $rs1 = mysql_fetch_array($result); echo "$rs1[num1]"; ?> </a> </strong></font></div></td> <td width="26%" bgcolor="#FFFFFF"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong> <?php $per1 = ($rs1[num1] * 100) / $total; echo number_format($per1,2,'.','.'); ?> </strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td height="22" bgcolor="#F3ECD2"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong>ปริญญาโท</strong></font></div></td> <td bgcolor="#FFFFFF"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong> <a href="DegreeList.php?Degree_code=2"> <?php $sql2 = "Select Count(Degree_code) as num2 From personal_tb Where Degree_code=2 "; $result = mysql_query($sql2) or die(" Error").mysql_error(); $rs2 = mysql_fetch_array($result); echo "$rs2[num2]"; ?> </a> </strong></font></div></td> <td bgcolor="#FFFFFF"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong> <?php $per2 = ($rs2[num2] * 100) / $total; echo number_format($per2,2,'.','.'); ?> </strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong>ปริญญาเอก</strong></font></div></td> <td bgcolor="#FFFFFF"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong> <a href="DegreeList.php?Degree_code=3"> <?php $sql3 = "Select Count(Degree_code) as num3 From personal_tb Where Degree_code=3 "; $result = mysql_query($sql3) or die(" Error").mysql_error(); $rs3 = mysql_fetch_array($result); echo "$rs3[num3]"; ?> </a> </strong></font></div></td> <td bgcolor="#FFFFFF"> <div align="center"><font color="#000000" size="2" face="Tahoma"><strong> <?php $per3 = ($rs3[num3] * 100) / $total; echo number_format($per3,2,'.','.'); ?> </strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td height="22" bgcolor="#F3ECD2"> </td> <td colspan="3" bgcolor="#F3ECD2"> <table width="79%" border="0" align="center"> <tr bgcolor="#F3ECD2"> <td width="30%" bgcolor="#F3ECD2"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>ปริญญาตรี</strong></font></div></td> <td width="30%"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>ปริญญาโท</strong></font></div></td> <td width="30%"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>ปริญญาเอก</strong></font></div></td> </tr> </table> </td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>อัตราส่วน</strong></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <div align="center"> <font color="#FF0000" size="2" face="Tahoma"><strong> <?php echo number_format($per1,2,'.','.'); ?> <font color="#000000" size="4">:</font> <?php echo number_format($per2,2,'.','.'); ?> <font color="#000000" size="4"> : </font><font color="#000000"> </font> <?php echo number_format($per3,2,'.','.'); ?> </strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>จำนวนอาจารย</strong></font><font color="#003366" size="2" face="Tahoma"><strong>วุฒิทางการพยาบาล</strong></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong> <?php $sql = "Select Count(Type_Degree) as CountNurse From personal_tb Where Type_Degree1='ด้านพยาบาล'"; $result = mysql_query($sql) or die(" Error").mysql_error(); $rs = mysql_fetch_array($result); echo "$rs[CountNurse] "; ?> คน</strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>จำนวนอาจารย์ทั้งหมด</strong></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong> <?php $sql = "Select * From personal_tb "; $result = mysql_query($sql) or die(" Error").mysql_error(); $num = mysql_num_rows($result); echo "$num "; ?> คน </strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>จำนวนนักศึกษา</strong></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <div align="center"><font color="#FF0000" size="2"><strong><font color="#003366" face="Tahoma"> <?php // $CountNurse = $rs[CountNurse]; $sql4 ="Select * From student_tb Where Succ_Status='0' "; $res2 = mysql_query($sql4) or die("Error".mysql_error()); $Total_std = mysql_num_rows($res2); echo"$Total_std"; ?> </font><font color="#003366" size="2" face="Tahoma">คน</font></strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong>สัดส่วนอาจารย์ที่มีวุฒิพยาบาล ต่อ จำนวนนักศึกษา</strong></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <div align="center"><font color="#003366" size="2" face="Tahoma"><strong> <?php // $sql = "Select Count(Type_Degree) as CountNurse From personal_tb Where Type_Degree=1 "; // $result = mysql_query($sql) or die(" Error").mysql_error(); // $rs = mysql_fetch_array($result); // $rs[CountNurse] ; echo "$rs[CountNurse] "; ?> : </strong></font><font color="#FF0000" size="2"><strong><font color="#003366" face="Tahoma"> <?php // $CountNurse = $rs[CountNurse]; $sql4 ="Select * From student_tb Where Succ_Status='0' "; $res2 = mysql_query($sql4) or die("Error".mysql_error()); $Total_std = mysql_num_rows($res2); echo"$Total_std"; ?> </font></strong></font><font color="#003366" size="2" face="Tahoma"><strong> </strong></font></div></td> </tr> <tr bordercolor="#CCCCCC"> <td bgcolor="#F3ECD2"> <div align="center"><font size="2" face="Tahoma"><strong><font color="#003366">สัดส่วนอาจารย์</font><font size="2"><font color="#003366" face="Tahoma">ทั้งหมด</font><font color="#003366" size="2" face="Tahoma">ต่อจำนวนนักศึกษา</font></font></strong></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <div align="center"><font color="#FF0000" size="2"><strong><font color="#003366" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sql = "Select * From personal_tb "; $result = mysql_query($sql) or die(" Error").mysql_error(); $num = mysql_num_rows($result); echo "$num "; ?> </font></strong></font><font color="#003366" size="2" face="Tahoma"><strong> : </strong></font><font color="#003366" size="2" face="Tahoma"><strong> <?php // $CountNurse = $rs[CountNurse]; $sql4 ="Select * From student_tb Where Succ_Status='0' "; $res2 = mysql_query($sql4) or die("Error".mysql_error()); $Total_std = mysql_num_rows($res2); echo"$Total_std"; ?> </strong></font></div></td> </tr> <tr > <td height="20" colspan="4" bgcolor="#F3ECD2"> </td> </tr> </form> </table>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"><font color="#003366" size="2" face="Tahoma"><a href="../../graph/reportdegree.php?num1=<? echo $rs1[num1]?>&%BD%03m2=<? echo $rs2[num2]?>&%BD%03m3=<? echo $rs3[num3]?>">แสดงกราฟอัตราส่วนวุฒิการศึกษา</a></font></div></td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> </body> </html> <?php } else { echo"<body bgcolor=\"#CCCCCC\">"; echo"<meta http-equiv=\"refresh\" content=\"3;URL=../logout.php\" target=\"mainFrame\">\n"; echo"<center>"; echo"<br><br><br><b><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">Please Login</font> </b><br>"; echo"<br><br><font face=\"Tahoma\" size=\"10\" color=\"#000000\"> ERROR 404 PERMISION DENY</font><br>"; echo"<br><font face=\"Tahoma\" size=\"4\" color=\"#000000\"> คุณไม่มีสิทธ์ใช้งาน</font>"; echo"</center>"; echo"</body>"; } ?>
|