Viewing file: detailCountPo.php (13.75 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include 'include/controller.php'; $year=$_GET['year']; $po=$_GET['po']; ; if($po==1){ $text="ตำแหน่งวิชาการ: ผู้อำนวยการวิทยาลัย"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND positionCode=1 ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($po==2){ $text="ตำแหน่งวิชาการ: พยาบาลวิชาชีพชำนาญการพิเศษ"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND positionCode=2 ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($po==3){ $text="ตำแหน่งวิชาการ: วิทยาจารย์ชำนาญการพิเศษ"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND positionCode=5 ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($po==4){ $text="ตำแหน่งวิชาการ: พยาบาลวิชาชีพชำนาญการ"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND positionCode=3 ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($po==5){ $text="ตำแหน่งวิชาการ: พยาบาลวิชาชีพปฏิบัติการ"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND positionCode=4 ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($po==6){ $text="ตำแหน่งวิชาการ: พยาบาลวิชาชีพ"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND positionCode=6 ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($po==7){ $text="ตำแหน่งวิชาการทั้งหมด"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); } ?> <!DOCTYPE html> <html class="loading" lang="en" data-textdirection="ltr"> <!-- BEGIN: Head-->
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui"> <meta name="description" content="Vuexy admin is super flexible, powerful, clean & modern responsive bootstrap 4 admin template with unlimited possibilities."> <meta name="keywords" content="admin template, Vuexy admin template, dashboard template, flat admin template, responsive admin template, web app"> <meta name="author" content="PIXINVENT"> <title><?=$text?> ปีการศึกษา <?=$year?></title> <link rel="apple-touch-icon" href="app-assets/images/ico/apple-icon-120.png"> <link rel="shortcut icon" type="image/x-icon" href="app-assets/images/ico/favicon.ico"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600" rel="stylesheet">
<!-- BEGIN: Vendor CSS--> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/vendors.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/charts/apexcharts.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/extensions/tether-theme-arrows.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/extensions/tether.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/extensions/shepherd-theme-default.css"> <!-- END: Vendor CSS-->
<!-- BEGIN: Theme CSS--> <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap-extended.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/colors.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/components.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/themes/dark-layout.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/themes/semi-dark-layout.css">
<!-- BEGIN: Page CSS--> <link rel="stylesheet" type="text/css" href="app-assets/css/core/menu/menu-types/vertical-menu.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/core/colors/palette-gradient.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/pages/dashboard-analytics.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/pages/card-analytics.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/plugins/tour/tour.css"> <!-- END: Page CSS-->
<!-- BEGIN: Custom CSS--> <link rel="stylesheet" type="text/css" href="assets/css/style.css"> <!-- END: Custom CSS--> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Niramit&display=swap" rel="stylesheet"> <style> body { font-family: 'Niramit', sans-serif; font-size: 13px; } </style> </head> <!-- END: Head-->
<!-- BEGIN: Body-->
<body class="vertical-layout vertical-menu-modern 2-columns navbar-floating footer-static " data-open="click" data-menu="vertical-menu-modern" data-col="2-columns">
<!-- Column selectors with Export Options and print table --> <section id="column-selectors"> <div class="card-header"> <div class="bg-success text-white"><br><center><b><?=$text?> ปีการศึกษา <?=$year?></b></center><br></div> </div> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-content"> <div class="card-body card-dashboard"> <div class="table-responsive"> <table class="table table-striped dataex-html5-selectors"> <thead> <tr> <th class="text-center align-top">ลำดับ</th> <th width="19%" class="text-left">ชื่อ-นามสกุล</th> <th width="19%">ตำแหน่งวิชาการ</th> <th width="9%">วุฒิการศึกษา</th> <th width="9%">วันที่เริ่มสอน</th> <th width="9%">นับถึงวันที่</th> <th width="8%">สอนมา(ปี)</th> <th width="8%">สอนมา(เดือน)</th> <th class="text-center align-top">ช่วงเวลาการนับ</th> </tr> </thead> <tbody> <?php if ($resultlist->num_rows > 0) { while($valuelist = $resultlist->fetch_assoc()) { $NameData=$valuelist['title'].$valuelist['Name']." ".$valuelist['Surname']; $EducationalBackground=$valuelist['EducationalBackground']; if($EducationalBackground=="PhD"){$edu="ปริญญาเอก";} if($EducationalBackground=="MD"){$edu="ปริญญาโท";} if($EducationalBackground=="BD"){$edu="ปริญญาตรี";} ?> <tr> <td class="text-center align-top"><?=$no?></td> <td width="19%" class="text-left align-top"><?=$NameData?></td> <td width="19%" class="text-left align-top"><?=$valuelist['academicPosition']?></td> <td width="9%" class="text-left align-top"><?=$edu?></td> <td width="9%" class="text-left align-top"><?=DateThai($valuelist['teachingStartDate'])?></td> <td width="9%" class="text-left align-top"><?=DateThai($valuelist['countUpToDate'])?></td> <td width="8%" class="text-center align-top"><?=$valuelist['totalYears']?></td> <td width="8%" class="text-center align-top"><?=$valuelist['totalMonths']?></td> <td width="23%" class="text-left align-top"><?=$valuelist['detail']?></td> </tr> <?php $no++; $sum6+=$valuelist[$input]; } } ?> </tbody> <tfoot> <tr> <td class="text-right align-top" colspan="7"><font color="red"><b>รวมนับจำนวนอาจารย์</b></font></td> <td width="7%" class="text-center align-top"><font color="red"><b><?=number_format($no-1,0)?></b></font></td> <td width="23%" class="text-left align-top"><font color="red"><b>คน</b></font></td> </tr> </tfoot> </table> </div> </div> </div> </div> </div> </div> </section> <!-- Column selectors with Export Options and print table -->
<!-- BEGIN: Vendor JS--> <script src="app-assets/vendors/js/vendors.min.js"></script> <!-- BEGIN Vendor JS-->
<!-- BEGIN: Page Vendor JS--> <script src="app-assets/vendors/js/charts/apexcharts.min.js"></script> <script src="app-assets/vendors/js/extensions/tether.min.js"></script> <script src="app-assets/vendors/js/extensions/shepherd.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/pdfmake.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/vfs_fonts.js"></script> <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/buttons.html5.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/buttons.print.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/buttons.bootstrap.min.js"></script> <script src="app-assets/vendors/js/tables/datatable/datatables.bootstrap4.min.js"></script> <!-- END: Page Vendor JS-->
<!-- BEGIN: Theme JS--> <script src="app-assets/js/core/app-menu.js"></script> <script src="app-assets/js/core/app.js"></script> <script src="app-assets/js/scripts/components.js"></script> <!-- END: Theme JS-->
<!-- BEGIN: Page JS--> <script src="app-assets/js/scripts/pages/dashboard-analytics.js"></script> <script src="app-assets/js/scripts/datatables/datatable.js"></script> <!-- END: Page JS-->
</body> <!-- END: 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"; } ?>
|