Gestionnaire de fichiers - Editer - /home/webapp68.cm.in.th/u68319090012/Final/web/news.php
Arrière
<br><br><br><br> <div class="container mt-3"> <h2>ข่าวประชาสัมพันธ์</h2> <?php $sql = "SELECT * FROM news,user where news.uid=user.uid ORDER BY news.nid DESC "; $result = $conn->query($sql); if ($result->num_rows > 0) { ?> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_login"]!=""){ ?> <a href="?page=regis1" class="btn btn-success">เพิ่มข่าว</a> <?php } ?> <table class="table table-hover table-bordered"> <thead> <tr> <th>ลำดับ</th> <th>หัวข้อข่าว</th> <th>วันที่</th> <th>ผู้ประกาศ</th> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_login"]!=""){ ?> <th>จัดการ</th> <?php } ?> </tr> </thead> <tbody> <?php // output data of each row $no=1; //เริ่มต้นลำดับ while($row = $result->fetch_assoc()) { //echo "id: " . $row["uid"]. " - Name: " . $row["fullname"]. " " . $row["email"]. "<br>"; $uid=$row["uid"]; ?> <tr> <td><?php echo"$no"; ?></td> <td><?="$row[headlines]"?></td> <td><?php echo"$row[date_add]"; ?></td> <td><?php echo"$row[fullname]"; ?></td> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_login"]!=""){ ?> <td> <a href="?page=edit&uid=<?=$uid?>" class="btn btn-primary">แก้ไข</a> <a href="?page=delete&uid=<?=$uid?>" class="btn btn-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.08 |
proxy
|
phpinfo
|
Réglages