Gestionnaire de fichiers - Editer - /home/webapp68.cm.in.th/u68319090001/app/news.php
Arrière
<br><br><br><br> <?php // * คือ เอาฐานข้อมูลทั้งหมด /* if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["uid"]. " - Name: " . $row["username"]. "password : " . $row["password"]. "fullname : ". $row["fullname"] . "email : ". $row["email"] ."phone : ".$row["phone"] . "address : ".$row["address"]."time : ".$row["creation_date"]."<br>"; } } else { echo "0 results"; } $conn->close(); */ ?> <div class="container mt-3"> <h2>ข่าวสารประชาสัมพันธ์</h2> <?php $sql = "SELECT * FROM news,user where news.uid=user.uid ORDER BY nid DESC "; $result = $conn->query($sql); if ($result->num_rows > 0){ ?> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_iogin"]){ ?> <a href="?page=appnews" class="btn btn-success"> เพิ่มข่าว </a> <?php } ?> <table class="table table-bordered table-hover"> <thead> <tr> <th>ลำดับ</th> <th>หัวข้อข่าว</th> <th>เนื้อหาข่าว</th> <th>วันที่</th> <th>ผู้ประกาศข่าว</th> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_iogin"]){ ?> <th>การจัดการ</th> <?php } ?> </tr> </thead> <tbody> <?php $no = 1; while($row = $result->fetch_assoc()) { ?> <tr> <td><?=$no?></td> <td><?=$row['headline']?></td> <td><?=$row['content']?></td> <td><?=$row['time_news']?></td> <td><?=$row['fullname']?></td> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_iogin"]){ ?> <td> <a href="?page=appnews&uid=<?= $row['uid'] ?> " class="btn btn-outline-warning">แก้ไข</a> <a href="?page=delete_user&uid=<?= $row['uid'] ?> " class="btn btn-outline-danger">ลบ</a> </td> <?php } ?> </tr> <?php $no++; } ?> </tbody> </table> <?php } ?> </div>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Génération de la page: 0.07 |
proxy
|
phpinfo
|
Réglages