File manager - Edit - /var/www/ams.cmtc.ac.th/pages/admin-techer-list.php
Back
<div class="card"> <div class="card-body"> <h2>ข้อมูลครูที่ปรึกษา </h2> <!-- <div align="right"><a href="?op=summarize&module=groups-list&show=all" class="btn btn-secondary" role="button"> <i class="fa fa-share" aria-hidden="true"></i> แสดงกลุ่มเรียนทั้งหมด</a> </div> --> <?php global $connect; $show=$_GET['show']; if($show=="all"){ $sql="Select DISTINCT teacherIdcard From std2018_studentgroup where teacherIdcard!='' order by groupCode ASC"; }else{ $depart=$_GET['depart']; //echo "depart=$depart<br>"; $sql="Select * From department_teacher where department_id='$depart' order by department_group_id ASC"; } $db_query=mysqli_query($connect,$sql); $num_rows=mysqli_num_rows($db_query); /* นับ Reccord ที่พบ */ echo "มีจำนวน <b>$num_rows</b> รายการ "; ?> <table class="table table-hover table-striped table-condensed table-sm table-bordered "> <thead> <tr> <th width="8%"><center>#</center></th> <th width="15%">เลขประจำตัวประชาชน</th> <th width="25%">ชื่อ</th> <th width="21%">นามสกุล</th> <th width="20%">แผนกวิชา</th> </tr> </thead> <tbody> <?php $a=0; $no=1; $sum_group=0; $sum_student=0; while($a < $num_rows) { $result = mysqli_fetch_array($db_query); $teacherIdcard=$result['teacherIdcard']; $result_std2018_studentgroup=select("std2018_studentgroup","where teacherIdcard='$teacherIdcard'"); $teacherFirstname=$result_std2018_studentgroup['teacherFirstname']; $teacherLastname=$result_std2018_studentgroup['teacherLastname']; $num_teacher=num_record("department_teacher","where department_id='$department_id' "); ?> <tr> <td align="center"><?php echo $no;?>.<a name="<?=$teacherIdcard?>" id="<?=$teacherIdcard?>"></a></td> <td><?=$teacherIdcard?></td> <td><?=$teacherFirstname?></td> <td><?=$teacherLastname?></td> <td><?php //ตรวจสอบว่ามีรายการนี้หรือยัง $result_department_teacher=select("department_teacher,department","where department_teacher.teacherIdcard='$teacherIdcard' AND department_teacher.department_id=department.department_id"); $department_name=$result_department_teacher["department_name"]; echo "$department_name"; ?> </td> </tr> <?php $no++; $a++; } ?> </tbody> </table> </div> </div></div>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.49 |
proxy
|
phpinfo
|
Settings