0byt3m1n1-V2
Path:
/
home
/
office2017v2.1
/
admin
/
[
Home
]
File: user_group.php
<?php /*if(!isset($_SESSION['ses_u_id'])){ header("location:../index.php"); }*/ include "header.php"; $u_id=$_SESSION['ses_u_id']; require_once 'crud_user_group.php'; //checkuser(); ?> <div class="row"> <div class="col-md-2" > <?php include 'menu1.php';?> </div> <div class="col-md-10"> <div class="panel panel-default" style="margin: 20"> <div class="panel-heading"><i class="fa fa-group fa-2x" aria-hidden="true"> </i>...<strong>จัดการกลุ่มผู้ใช้งาน</strong> </div> <p></p> <form method="post" class="form-group"> <input class="form-control" type="text" name="level_name" required placeholder="ใส่กลุ่มผู้ใช้ที่ต้องการสร้าง" value="<?php if(isset($_GET['edit'])) echo $getROW['level_name']; ?>"/> <label for="status"><i class="fa fa-cog"></i>สถานะการใช้งาน:</label> <input type="radio" id="status" name="status" value="1" checked> ใช้งาน <input type="radio" id="status" name="status" value="0"> ระงับการใช้งาน <br> <p></p> <?php if(isset($_GET['edit'])){?> <center><button class="btn btn-success btn-lg" type="submit" name="update"><i class="fa fa-database"></i> update</button></center> <?php }else{ ?> <center><button class="btn btn-primary btn-lg" type="submit" name="save"><i class="fa fa-database"></i> save</button></center> <?php } ?> </form> <hr/> <table id='myTable' class="table table-bordered table-hover"> <thead> <tr> <th>ที่</th> <th>กลุ่มผู้ใช้งาน</th> <th>สถานะ</th> <th></th> <th></th> </tr> </thead> <tbody> <?php $count=1; $res = $conn->query("SELECT * FROM user_level"); while($row=$res->fetch_array()){?> <tr> <td><?php echo $count ?></td> <td><?php echo $row['level_name']; ?></td> <td><?php $status=$row['status']; if($status==1){ echo "<a class=\"btn btn-warning \"><i class=\"fa fa-user\"></i></a>"; } else { echo "<a class=\"btn btn-danger \"><i class=\"fa fa-user-times\"></i></a>"; } ?> </td> <td><a class="btn btn-info" href="user_group.php?edit=<?php echo $row['level_id']; ?>" onclick="return confirm('คุณต้องการแก้ไขข้อมูลใช่หรือไม่ !'); " > <i class="fa fa-pencil" aria-hidden="true"></i> แก้ไข</a></td> <td><a class="btn btn-danger" href="user_group.php?del=<?php echo $row['level_id']; ?>" onclick="return confirm('ระบบกำลังจะลบกลุ่มผู้ใช้อย่างถาวร !'); " > <i class="fa fa-trash-o" aria-hidden="true"></i> ลบ</a></td> </tr> <?php $count++; }?> </tbody> </table> </div> <div class="well"> คำอธิบาย: <i class="fa fa-user btn btn-warning"></i> อนุญาตใช้งาน <i class="fa fa-user-times btn btn-danger"></i> ระงับการใช้งาน </div> </div> </div> <?php include "footer.php"; ?>
©
2018.