Mini Shell

Direktori : /var/www/vhosts/ccp.ac.th/backup_full/httpdocs/sp/admin_gard/
Upload File :
Current File : /var/www/vhosts/ccp.ac.th/backup_full/httpdocs/sp/admin_gard/subject_view_report.php

<!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.php">รายงานแสดงผลเป็นรายวิชา(ชั้น)</a></li>
                           <li class="breadcrumb-item active" aria-current="page">แสดงผลการเรียนเป็นรายวิชา</li>
                       </ol>
                     </nav>                  
      
                   <?php
                    $subject_id = $_GET['subject_id'];
                    $level_class = $_GET['level_class'];
                    $course = $_GET['course'];
                  
                    $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_room.`course`='$course') ORDER BY grade_name DESC";
                    $result_report = mysqli_query($link2, $sql_report);
                    
                    $sql = "SELECT * FROM subject left JOIN course ON course.course_id = subject.course  WHERE (`academic_year`='$s_year') AND (`subject_id`='$subject_id') AND (subject.`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 $level_class; ?></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