Server IP : 10.254.12.21 / Your IP : 10.254.12.21 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : apache ( 48) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/trr/sample/ |
Upload File : |
<?php include 'check_mode_admin.php';?> <?php include 'admin_dbconnect.php';?> <?php include 'header.php';?> <?php if ($_GET['ref_lifestyleTypeMain_id']) { $ref_lifestyleTypeMain_id = $_GET['ref_lifestyleTypeMain_id']; } else { $ref_lifestyleTypeMain_id=0; } ?> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">รายชื่อวิถีชีวิต <a href="lifestyle_add.php?ref_lifestyleTypeMain_id=<?php echo $ref_lifestyleTypeMain_id;?>"><button type="button" class="btn btn-primary">เพิ่มวิถีชีวิต</button></a></h1> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <!-- <div class="panel-heading"> DataTables Advanced Tables </div> --> <!-- /.panel-heading --> <div class="panel-body"> <?php $strSQL = "SELECT lifestyle.lifestyle_ethieGroup_id, lifestyle.lifestyle_ethicGroup_name, ref_lifestyletype_main.ref_lifestyleTypemain_name FROM (lifestyle INNER JOIN ref_lifestyletype_main ON lifestyle.ref_lifestyleTypeMain_id = ref_lifestyletype_main.ref_lifestyleTypemain_id)"; if ($ref_lifestyleTypeMain_id<>0) { $strSQL .= " WHERE lifestyle.ref_lifestyleTypeMain_id =" . $ref_lifestyleTypeMain_id; } $strSQL .= " ORDER BY lifestyle.lifestyle_ethieGroup_id DESC"; $objQuery = mysql_query($strSQL); $objResult = mysql_fetch_array($objQuery); if(!$objResult) { echo "ไม่มีข้อมูลวิถีชีวิต"; } else { ?> <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example"> <thead> <tr> <th>id</th> <th>ชื่อกลุ่มชาติพันธุ์</th> <th>ประเภท</th> </tr> </thead> <tbody> <?php while ($objResult) { ?> <tr class="gradeA"> <td><a href="lifestyle_detail.php?lifestyle_ethieGroup_id=<?php echo $objResult["lifestyle_ethieGroup_id"];?>"><?php echo $objResult["lifestyle_ethieGroup_id"];?></a></td> <td><a href="lifestyle_detail.php?lifestyle_ethieGroup_id=<?php echo $objResult["lifestyle_ethieGroup_id"];?>"><?php echo $objResult["lifestyle_ethicGroup_name"];?></a></td> <td><?php echo $objResult["ref_lifestyleTypemain_name"];?></td> </tr> <?php $objResult = mysql_fetch_array($objQuery); } ?> </tbody> </table> <!-- /.table-responsive --> <?php } ?> </div> <!-- /.panel-body --> </div> <!-- /.panel --> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <?php include 'sidebar.php';?>