Mini Shell
<!doctype html>
<html lang="en">
<!-- head -->
<?php
include 'head.php';
?>
<body>
<div class="wrapper">
<!-- เมนูด้านซ้าย -->
<?php include 'leftside.php'; ?>
<div class="main-panel">
<!-- ส่วนหัว -->
<?php include 'header.php'; ?>
<?php
include 'function_date.php';
?>
<div class="content">
<div class="container-fluid">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="home.php">หน้าหลัก</a></li>
<li class="breadcrumb-item"><a href="subject_report_class.php">รายงานแสดงผลเป็นรายวิชา(ห้อง)</a></li>
<li class="breadcrumb-item active" aria-current="page">แสดงผลการเรียนเป็นรายวิชาตามห้องเรียน</li>
</ol>
</nav>
<?php
$course = $_GET['course'];
$subject_id = $_GET['subject_id'];
$level_class = $_GET['level_class'];
$class = $_GET['class'];
$sql_report = "SELECT * FROM users_dg left JOIN grade ON users_dg.user_id = grade.grade_student_id left JOIN class_room ON users_dg.user_class_id = class_room.class_id WHERE (`year`='$s_year') AND (`lc_id`='$level_class') AND (`grade_subject_id`='$subject_id') AND (`class_id`='$class') AND (class_room.`course`='$course') ORDER BY grade_name DESC";
$result_report = mysqli_query($link2, $sql_report);
$sql = "SELECT * FROM class_room left JOIN level_class ON class_room.lc_id = level_class.lc_id left JOIN course ON course.course_id = class_room.course left JOIN subject ON subject.subject_class_id = level_class.lc_id WHERE (class_room.`academic_year`='$s_year') AND (class_room.`class_id`='$class') AND (`subject_id`='$subject_id') AND (class_room.`course`='$course') ";
$result = mysqli_query($link2, $sql);
$row = mysqli_fetch_assoc($result);
?>
<div class="col-lg-12 col-md-12">
<div class="card">
<div class="card-header card-header-tabs" data-background-color="rose">
<h4 class="card-title">ตารางแสดงข้อมูลผลการเรียนรายวิชา : <?php echo $row['subject_name']; ?> หลักสูตร : <?php echo $row['course_name']; ?></h4>
<p class="category">ห้องเรียน : <?php echo $row['class_name']; ?></p>
</div>
<div class="card-content table-responsive">
<table id="datatables" class="table table-hover">
<thead class="text-warning">
<th class="text-center">ลำดับที่</th>
<th class="text-center">รหัสนักเรียน</th>
<th>ชื่อ</th>
<th>นามสกุล</th>
<th class="text-center">คะแนนภาคเรียนที่ 1</th>
<th class="text-center">คะแนนภาคเรียนที่ 2</th>
<th class="text-center">คะแนนรวม</th>
<th class="text-center">ผลการเรียน</th>
</thead>
<?php
$i=1;
while ($row_report = mysqli_fetch_array($result_report)) { ?>
<tbody>
<?php
$title_name = $row_report['sex'];
if ($title_name == 1) {
$title_name = "เด็กชาย";
} else {
$title_name = "เด็กหญิง";
}
?>
<tr>
<td class="text-center"><?php echo $i; ?></td>
<td class="text-center"><?php echo $row_report['username']; ?></td>
<td><?php echo $title_name.$row_report['name_peple']; ?></td>
<td><?php echo $row_report['sname_peple']; ?></td>
<td class="text-center"><?php echo $row_report['score1']; ?></td>
<td class="text-center"><?php echo $row_report['score2']; ?></td>
<?php
$sum = $row_report['score1']+$row_report['score2'];
?>
<td class="text-center"><?php echo $sum; ?></td>
<?php
$grade = $row_report['grade_name'];
if ($grade == 9) {
$grade_name = "ยังไม่ประเมินผล";
} else {
$grade_name = $row_report['grade_name'];
}
?>
<td class="text-center"><?php echo $grade_name; ?></td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- footer1 -->
<?php include 'footer1.php'; ?>
</div>
</div>
<!-- footer2 -->
<?php include 'footer2.php'; ?>
<!-- Mirrored from demos.creative-tim.com/material-dashboard-pro/examples/dashboard.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 20 Mar 2017 21:32:16 GMT -->
</html>
Zerion Mini Shell 1.0