Viewing file: rep04.php (33.2 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once("classes/Crud.php"); $crud = new Crud(); $studnetID=$_GET['studnetID']; ?> <!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <style> body { font-family: 'Kanit', sans-serif; font-size: 1px; } </style> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/tables/datatable/datatables.min.css"> </head> <body> <?php include("header.php"); ?> <br> <center><b>รายงานการตรวจสอบผลการเรียนรายนักศึกษา</b></center>
<form> <table class="table"> <thead> <tr bgcolor="#F5E3DF"> <td class="text-center"> <label for="studnetID"><b>รหัสนักศึกษา:</b></label> <input type="text" id="studnetID" name="studnetID" required maxlength="11" size="11" value="<?=$studnetID?>"> <input type="submit" value="ตรวจสอบผลการเรียน"> </td> </tr> </thead> </table> </form> <table class="table"> <thead class="thead-light"> <tr> <th>First</th> <th>Last</th> <th>Handle</th> </tr> </thead> </table>
<div class="row"> <div class="col-sm-12 text-center"> <div class="card"> <div class="card-body"> <!-- ปี 1 เทอม 1 --> <table class="table table-bordered"> <thead> <tr bgcolor="#DAF7A6"> <td class="text-left"><b>ชั้นปีที่ 1</b></td> <td class="text-left"><b>ภาคการศึกษา 1</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm1y1=0; $sumgrdPointterm1y1=0; $sumTotalterm1y1=0; $term1y1= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=1 AND rdTmId=1 "; $resultterm1y1 = $crud->getData($term1y1); foreach($resultterm1y1 as $key => $dataterm1y1){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm1y1['crsCode']?></td> <td class="text-left"><?=$dataterm1y1['crsName']?> <?=$dataterm1y1['crsUnit']?></td> <td class="text-center"><?=$dataterm1y1['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm1y1['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm1y1['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm1y1['rdCreditAttempt'] * $dataterm1y1['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm1y1+=$dataterm1y1['rdCreditAttempt']; $sumgrdPointterm1y1+=$dataterm1y1['grdPoint']; $sumTotalterm1y1+=($dataterm1y1['rdCreditAttempt'] * $dataterm1y1['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm1y1)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm1y1,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm1y1,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm1y1/$sumCreditterm1y1),0,strpos(($sumTotalterm1y1/$sumCreditterm1y1),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<br> <!-- ปี 1 เทอม 2 --> <table class="table table-bordered"> <thead> <tr bgcolor="#DAF7A6"> <td class="text-left"><b>ชั้นปีที่ 1</b></td> <td class="text-left"><b>ภาคการศึกษา 2</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm2y1=0; $sumgrdPointterm2y1=0; $sumTotalterm2y1=0; $term2y1= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=1 AND rdTmId=2 "; $resultterm2y1 = $crud->getData($term2y1); foreach($resultterm2y1 as $key => $dataterm2y1){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm2y1['crsCode']?></td> <td class="text-left"><?=$dataterm2y1['crsName']?> <?=$dataterm2y1['crsUnit']?></td> <td class="text-center"><?=$dataterm2y1['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm2y1['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm2y1['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm2y1['rdCreditAttempt'] * $dataterm2y1['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm2y1+=$dataterm2y1['rdCreditAttempt']; $sumgrdPointterm2y1+=$dataterm2y1['grdPoint']; $sumTotalterm2y1+=($dataterm2y1['rdCreditAttempt'] * $dataterm2y1['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm2y1)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm2y1,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm2y1,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm2y1/$sumCreditterm2y1),0,strpos(($sumTotalterm2y1/$sumCreditterm2y1),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<br> <!-- ปี 1 เทอม 3 --> <table class="table table-bordered"> <thead> <tr bgcolor="#DAF7A6"> <td class="text-left"><b>ชั้นปีที่ 1</b></td> <td class="text-left"><b>ภาคการศึกษา 3</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm3y1=0; $sumgrdPointterm3y1=0; $sumTotalterm3y1=0; $term3y1= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=1 AND rdTmId=3 "; $resultterm3y1 = $crud->getData($term3y1); foreach($resultterm3y1 as $key => $dataterm3y1){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm3y1['crsCode']?></td> <td class="text-left"><?=$dataterm3y1['crsName']?> <?=$dataterm3y1['crsUnit']?></td> <td class="text-center"><?=$dataterm3y1['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm3y1['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm3y1['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm3y1['rdCreditAttempt'] * $dataterm3y1['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm3y1+=$dataterm3y1['rdCreditAttempt']; $sumgrdPointterm3y1+=$dataterm3y1['grdPoint']; $sumTotalterm3y1+=($dataterm3y1['rdCreditAttempt'] * $dataterm3y1['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm3y1)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm3y1,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm3y1,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm3y1/$sumCreditterm3y1),0,strpos(($sumTotalterm3y1/$sumCreditterm3y1),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<br> <!-- ปี 2 เทอม 1 --> <table class="table table-bordered"> <thead> <tr bgcolor="#F7CFC6"> <td class="text-left"><b>ชั้นปีที่ 2</b></td> <td class="text-left"><b>ภาคการศึกษา 1</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm1y2=0; $sumgrdPointterm1y2=0; $sumTotalterm1y2=0; $term1y2= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=2 AND rdTmId=1 "; $resultterm1y2 = $crud->getData($term1y2); foreach($resultterm1y2 as $key => $dataterm1y2){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm1y2['crsCode']?></td> <td class="text-left"><?=$dataterm1y2['crsName']?> <?=$dataterm1y2['crsUnit']?></td> <td class="text-center"><?=$dataterm1y2['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm1y2['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm1y2['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm1y2['rdCreditAttempt'] * $dataterm1y2['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm1y2+=$dataterm1y2['rdCreditAttempt']; $sumgrdPointterm1y2+=$dataterm1y2['grdPoint']; $sumTotalterm1y2+=($dataterm1y2['rdCreditAttempt'] * $dataterm1y2['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm1y2)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm1y2,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm1y2,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm1y2/$sumCreditterm1y2),0,strpos(($sumTotalterm1y2/$sumCreditterm1y2),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 2 เทอม 2 --> <table class="table table-bordered"> <thead> <tr bgcolor="#F7CFC6"> <td class="text-left"><b>ชั้นปีที่ 2</b></td> <td class="text-left"><b>ภาคการศึกษา 2</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm2y2=0; $sumgrdPointterm2y2=0; $sumTotalterm2y2=0; $term2y2= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=2 AND rdTmId=2 "; $resultterm2y2 = $crud->getData($term2y2); foreach($resultterm2y2 as $key => $dataterm2y2){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm2y2['crsCode']?></td> <td class="text-left"><?=$dataterm2y2['crsName']?> <?=$dataterm2y2['crsUnit']?></td> <td class="text-center"><?=$dataterm2y2['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm2y2['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm2y2['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm2y2['rdCreditAttempt'] * $dataterm2y2['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm2y2+=$dataterm2y2['rdCreditAttempt']; $sumgrdPointterm2y2+=$dataterm2y2['grdPoint']; $sumTotalterm2y2+=($dataterm2y2['rdCreditAttempt'] * $dataterm2y2['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm2y2)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm2y2,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm2y2,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm2y2/$sumCreditterm2y2),0,strpos(($sumTotalterm2y2/$sumCreditterm2y2),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 2 เทอม 3 --> <table class="table table-bordered"> <thead> <tr bgcolor="#F7CFC6"> <td class="text-left"><b>ชั้นปีที่ 2</b></td> <td class="text-left"><b>ภาคการศึกษา 3</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm3y2=0; $sumgrdPointterm3y2=0; $sumTotalterm3y2=0; $term3y2= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=2 AND rdTmId=3 "; $resultterm3y2 = $crud->getData($term3y2); foreach($resultterm3y2 as $key => $dataterm3y2){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm3y2['crsCode']?></td> <td class="text-left"><?=$dataterm3y2['crsName']?> <?=$dataterm3y2['crsUnit']?></td> <td class="text-center"><?=$dataterm3y2['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm3y2['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm3y2['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm3y2['rdCreditAttempt'] * $dataterm3y2['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm3y2+=$dataterm3y2['rdCreditAttempt']; $sumgrdPointterm3y2+=$dataterm3y2['grdPoint']; $sumTotalterm3y2+=($dataterm3y2['rdCreditAttempt'] * $dataterm3y2['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm3y2)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm3y2,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm3y2,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm3y2/$sumCreditterm3y2),0,strpos(($sumTotalterm3y2/$sumCreditterm3y2),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 3 เทอม 1 --> <table class="table table-bordered"> <thead> <tr bgcolor="#F5EDBF"> <td class="text-left"><b>ชั้นปีที่ 3</b></td> <td class="text-left"><b>ภาคการศึกษา 1</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm1y3=0; $sumgrdPointterm1y3=0; $sumTotalterm1y3=0; $term1y3= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=3 AND rdTmId=1 "; $resultterm1y3 = $crud->getData($term1y3); foreach($resultterm1y3 as $key => $dataterm1y3){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm1y3['crsCode']?></td> <td class="text-left"><?=$dataterm1y3['crsName']?> <?=$dataterm1y3['crsUnit']?></td> <td class="text-center"><?=$dataterm1y3['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm1y3['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm1y3['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm1y3['rdCreditAttempt'] * $dataterm1y3['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm1y3+=$dataterm1y3['rdCreditAttempt']; $sumgrdPointterm1y3+=$dataterm1y3['grdPoint']; $sumTotalterm1y3+=($dataterm1y3['rdCreditAttempt'] * $dataterm1y3['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm1y3)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm1y3,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm1y3,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm1y3/$sumCreditterm1y3),0,strpos(($sumTotalterm1y3/$sumCreditterm1y3),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 3 เทอม 2 --> <table class="table table-bordered"> <thead> <tr bgcolor="#F5EDBF"> <td class="text-left"><b>ชั้นปีที่ 3</b></td> <td class="text-left"><b>ภาคการศึกษา 2</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm2y3=0; $sumgrdPointterm2y3=0; $sumTotalterm2y3=0; $term2y3= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=3 AND rdTmId=2 "; $resultterm2y3 = $crud->getData($term2y3); foreach($resultterm2y3 as $key => $dataterm2y3){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm2y3['crsCode']?></td> <td class="text-left"><?=$dataterm2y3['crsName']?> <?=$dataterm2y3['crsUnit']?></td> <td class="text-center"><?=$dataterm2y3['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm2y3['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm2y3['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm2y3['rdCreditAttempt'] * $dataterm2y3['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm2y3+=$dataterm2y3['rdCreditAttempt']; $sumgrdPointterm2y3+=$dataterm2y3['grdPoint']; $sumTotalterm2y3+=($dataterm2y3['rdCreditAttempt'] * $dataterm2y3['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm2y3)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm2y3,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm2y3,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm2y3/$sumCreditterm2y3),0,strpos(($sumTotalterm2y3/$sumCreditterm2y3),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 3 เทอม 3 --> <table class="table table-bordered"> <thead> <tr bgcolor="#F5EDBF"> <td class="text-left"><b>ชั้นปีที่ 3</b></td> <td class="text-left"><b>ภาคการศึกษา 3</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm3y3=0; $sumgrdPointterm3y3=0; $sumTotalterm3y3=0; $term3y3= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=3 AND rdTmId=3 "; $resultterm3y3 = $crud->getData($term3y3); foreach($resultterm3y3 as $key => $dataterm3y3){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm3y3['crsCode']?></td> <td class="text-left"><?=$dataterm3y3['crsName']?> <?=$dataterm3y3['crsUnit']?></td> <td class="text-center"><?=$dataterm3y3['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm3y3['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm3y3['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm3y3['rdCreditAttempt'] * $dataterm3y3['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm3y3+=$dataterm3y3['rdCreditAttempt']; $sumgrdPointterm3y3+=$dataterm3y3['grdPoint']; $sumTotalterm3y3+=($dataterm3y3['rdCreditAttempt'] * $dataterm3y3['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm3y3)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm3y3,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm3y3,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm3y3/$sumCreditterm3y3),0,strpos(($sumTotalterm3y3/$sumCreditterm3y3),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 4 เทอม 1 --> <table class="table table-bordered"> <thead> <tr bgcolor="#BFD9F5"> <td class="text-left"><b>ชั้นปีที่ 4</b></td> <td class="text-left"><b>ภาคการศึกษา 1</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm1y4=0; $sumgrdPointterm1y4=0; $sumTotalterm1y4=0; $term1y4= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=4 AND rdTmId=1 "; $resultterm1y4 = $crud->getData($term1y4); foreach($resultterm1y4 as $key => $dataterm1y4){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm1y4['crsCode']?></td> <td class="text-left"><?=$dataterm1y4['crsName']?> <?=$dataterm1y4['crsUnit']?></td> <td class="text-center"><?=$dataterm1y4['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm1y4['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm1y4['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm1y4['rdCreditAttempt'] * $dataterm1y4['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm1y4+=$dataterm1y4['rdCreditAttempt']; $sumgrdPointterm1y4+=$dataterm1y4['grdPoint']; $sumTotalterm1y4+=($dataterm1y4['rdCreditAttempt'] * $dataterm1y4['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm1y4)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm1y4,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm1y4,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm1y4/$sumCreditterm1y4),0,strpos(($sumTotalterm1y4/$sumCreditterm1y4),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 4 เทอม 2 --> <table class="table table-bordered"> <thead> <tr bgcolor="#BFD9F5"> <td class="text-left"><b>ชั้นปีที่ 4</b></td> <td class="text-left"><b>ภาคการศึกษา 2</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm2y4=0; $sumgrdPointterm2y4=0; $sumTotalterm2y4=0; $term2y4= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=4 AND rdTmId=2 "; $resultterm2y4 = $crud->getData($term2y4); foreach($resultterm2y4 as $key => $dataterm2y4){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm2y4['crsCode']?></td> <td class="text-left"><?=$dataterm2y4['crsName']?> <?=$dataterm2y4['crsUnit']?></td> <td class="text-center"><?=$dataterm2y4['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm2y4['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm2y4['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm2y4['rdCreditAttempt'] * $dataterm2y4['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm2y4+=$dataterm2y4['rdCreditAttempt']; $sumgrdPointterm2y4+=$dataterm2y4['grdPoint']; $sumTotalterm2y4+=($dataterm2y4['rdCreditAttempt'] * $dataterm2y4['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm2y4)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm2y4,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm2y4,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm2y4/$sumCreditterm2y4),0,strpos(($sumTotalterm2y4/$sumCreditterm2y4),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
<!-- ปี 4 เทอม 3 --> <table class="table table-bordered"> <thead> <tr bgcolor="#BFD9F5"> <td class="text-left"><b>ชั้นปีที่ 4</b></td> <td class="text-left"><b>ภาคการศึกษา 3</b></td> </tr> </thead> <thead> <tr bgcolor="#E7E2E1"> <th>ลำดับที่</th> <th class="text-center">รหัสวิชา</th> <th class="text-left">ชื่อวิชา</th> <th class="text-center">จำนวนหน่วยกิตที่ได้</th> <th class="text-center">เกรดที่ได้</th> <th class="text-center">คะแนนเกรดที่ได้</th> <th class="text-center">ผลคูณ</th> </tr> </thead> <tbody> <?php $no=1; $sumCreditterm3y4=0; $sumgrdPointterm3y4=0; $sumTotalterm3y4=0; $term3y4= "SELECT * FROM gpTerm WHERE stdCode='$studnetID' AND coSyId=4 AND rdTmId=3 "; $resultterm3y4 = $crud->getData($term3y4); foreach($resultterm3y4 as $key => $dataterm3y4){ ?> <tr> <td><?=$no?></td> <td class="text-center"><?=$dataterm3y4['crsCode']?></td> <td class="text-left"><?=$dataterm3y4['crsName']?> <?=$dataterm3y4['crsUnit']?></td> <td class="text-center"><?=$dataterm3y4['rdCreditAttempt']?></td> <td class="text-center"><?=$dataterm3y4['rdGrade']?></td> <td class="text-center"><?=number_format($dataterm3y4['grdPoint'],2)?></td> <td class="text-center"><?=number_format(($dataterm3y4['rdCreditAttempt'] * $dataterm3y4['grdPoint']),2)?></td> </tr> <?php $no++; $sumCreditterm3y4+=$dataterm3y4['rdCreditAttempt']; $sumgrdPointterm3y4+=$dataterm3y4['grdPoint']; $sumTotalterm3y4+=($dataterm3y4['rdCreditAttempt'] * $dataterm3y4['grdPoint']); } ?> <tr bgcolor="#E7E2E1"> <td colspan="3" class="text-right"><b>หน่วยกิตรวม</b></td> <td class="text-center"><font color="red"><b><?=number_format($sumCreditterm3y4)?></b></font></td> <td class="text-center"></td> <td class="text-center"><font color="red"><b><?=number_format($sumgrdPointterm3y4,2)?></b></font></td> <td class="text-center"><font color="red"><b><?=number_format($sumTotalterm3y4,2)?></b></font></td> </tr> <tr bgcolor="#E7E2E1"> <td colspan="6" class="text-right"><b>เกรดเฉลี่ย:</b></td> <td class="text-center"><font color="red"><b><?=number_format(substr(($sumTotalterm3y4/$sumCreditterm3y4),0,strpos(($sumTotalterm3y4/$sumCreditterm3y4),'.')+3),2)?></b></font></td> </tr> </tbody> </table>
</div> </div> </div> </div> <script src="app-assets/vendors/js/tables/datatable/datatables.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/datatables.buttons.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/datatables.bootstrap4.min.js"></script> <script src="app-assets/js/scripts/datatables/datatable.js"></script> <script src="canvasjs.min.js"></script> </body> </html> <?php function DateThai($strDate) { $strYear = date("Y",strtotime($strDate))+543; $strMonth= date("n",strtotime($strDate)); $strDay= date("j",strtotime($strDate)); $strHour= date("H",strtotime($strDate)); $strMinute= date("i",strtotime($strDate)); $strSeconds= date("s",strtotime($strDate)); $strMonthCut = Array("","ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); $strMonthThai=$strMonthCut[$strMonth]; return "$strDay $strMonthThai $strYear"; } ?>
|