0byt3m1n1-V2
Path:
/
home
/
office2017v2.1
/
admin
/
[
Home
]
File: speed.php
<?php /*if(!isset($_SESSION['ses_u_id'])){ header("location:../index.php"); }*/ include "header.php"; $u_id=$_SESSION['ses_u_id']; require_once 'crud_speed.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-fighter-jet fa-2x" aria-hidden="true"></i> <strong>จัดการชั้นความเร็ว</strong></div> <p></p> <form method="post" class="form-group"> <input class="form-control" type="text" name="speed" required placeholder="ใส่ข้อมูล" value="<?php if(isset($_GET['edit'])) echo $getROW['speed_name']; ?>"/> <p></p> <?php if(isset($_GET['edit'])){?> <button class="btn btn-success" type="submit" name="update">update</button> <?php }else{ ?> <button class="btn btn-primary" type="submit" name="save">save</button> <?php } ?> </form> <hr/> <table class="table table-bordered table-hover"> <thead> <tr> <th>ที่</th> <th>ชั้นความเร็ว</th> <th></th> <th></th> </tr> </thead> <tbody> <?php $count=1; $res = $conn->query("SELECT * FROM speed"); while($row=$res->fetch_array()){?> <tr> <td><?php echo $count ?></td> <td><?php echo $row['speed_name']; ?></td> <td><a class="btn btn-info" href="speed.php?edit=<?php echo $row['speed_id']; ?>" onclick="return confirm('sure to edit !'); " > <i class="fa fa-pencil" aria-hidden="true"></i> แก้ไข</a></td> <td><a class="btn btn-danger" href="speed.php?del=<?php echo $row['speed_id']; ?>" onclick="return confirm('sure to delete !'); " > <i class="fa fa-trash-o" aria-hidden="true"></i> ลบ</a></td> </tr> <?php $count++; }?> </tbody> </table> </div> </div> </div> <?php include "footer.php"; ?>
©
2018.