0byt3m1n1-V2
Path:
/
home
/
office2017v2.1
/
[
Home
]
File: speed.php
<?php session_start(); $u_id=$_SESSION['ses_u_id']; include "header.php"; include 'top-menu.php'; //checkuser(); if(!isset($u_id)){ echo"<div class=\"alert alert-danger\">ระบบได้รับการป้องกัน</div>"; echo "<meta http-equiv='refresh' content='1;URL=index.php'>"; } ?> <div class="row"> <?php include "speed.php"; ?> </div><!-- row --> <?php include 'footer.php';?> require_once 'crud.php'; ?> <div class="container" style="margin-top: 20px;"> <div class="row"> <div class="col-xs-8 col-xs-offset-2"> <div class="panel panel-default"> <div class="panel-heading"><h3>จัดการวัตถุประสงค์</h3></div><br> <form method="post" class="form-group"> <input class="form-control" type="text" name="obj_name" required placeholder="ใส่วัตถุประสงค์" value="<?php if(isset($_GET['edit'])) echo $getROW['obj_name']; ?>" /> <p></p> <?php if(isset($_GET['edit'])){?> <button class="btn btn-success" type="submit" name="update">update</button> <?php }else{ ?> <center><button class="btn btn-primary" type="submit" name="save">save</button></center> <?php } ?> </form> <table class="table table-bordered table-hover"> <thead> <tr> <th>ID</th> <th>ชื่อวัตถุประสงค์</th> <th></th> <th></th> </tr> </thead> <tbody> <?php $res = $conn->query("SELECT * FROM object"); while($row=$res->fetch_array()){ ?> <tr> <td><?php echo $row['obj_id']; ?></td> <td><?php echo $row['obj_name']; ?></td> <td><a href="speed.php?edit=<?php echo $row['obj_id']; ?>" onclick="return confirm('sure to edit !'); " >edit</a></td> <td><a href="speed.php?del=<?php echo $row['obj_id']; ?>" onclick="return confirm('sure to delete !'); " >delete</a></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <?php include "footer.php"; ?>
©
2018.