Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "koneksi/koneksi.php";
- session_name('profil');
- session_start();
- if (isset($_SESSION['profil-username'])) {
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Data Penelitian | Sistem Informasi Perikanan Palabuhanratu</title>
- <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
- <!-- bootstrap 3.0.2 -->
- <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
- <!-- font Awesome -->
- <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
- <!-- Ionicons -->
- <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" />
- <!-- Theme style -->
- <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />
- <!-- Favicon -->
- <!-- DATA TABLES -->
- <link href="css/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
- <style>
- .callout {
- margin-bottom: 0;
- }
- .btn {
- margin-bottom: 3px;
- }
- </style>
- </head>
- <body class="skin-blue">
- <?php include 'includes/header.php'; ?>
- <div class="wrapper row-offcanvas row-offcanvas-left">
- <!-- Left side column. contains the logo and sidebar -->
- <?php include 'includes/menu.php'; ?>
- <!-- Right side column. Contains the navbar and content of the page -->
- <aside class="right-side">
- <!-- Content Header (Page header) -->
- <section class="content-header">
- <h1>
- Berita
- <small><i class="fa fa-angle-right"></i> Data Berita</small>
- </h1>
- </section>
- <!-- Main content -->
- <section class="content">
- <!-- top row -->
- <div class="row">
- <div class="col-md-12">
- <div class="box box-info">
- <div class="box-header">
- <h3 class="box-title"><i class="fa fa-file-text-o"></i> TABEL DATA BERITA</h3>
- </div><!-- /.box-header -->
- <div class="box-body">
- <table class="table table-bordered table-striped" id="tabel-plt">
- <thead>
- <th>No.</th>
- <th>Judul</th>
- <th>Operasi</th>
- </thead>
- <tbody>
- <?php
- $get_berita = mysqli_query($db, "SELECT * FROM berita ORDER BY id DESC");
- $no = 1;
- foreach ($get_berita as $berita) {
- ?>
- <tr>
- <td><?=$no;?></td>
- <td><?=$berita['judul'];?></td>
- <td>
- <a class="btn btn-info btn-xs" href="detail-berita.php?id=<?=$berita['id'];?>"><i class="fa fa-pencil"></i> Ubah</a>
- <?php
- if ($berita['status'] == "publish") {
- ?>
- <a class="btn btn-default btn-xs" href="unpublish.php?id=<?=$berita['id'];?>"><i class="fa fa-share"></i> Unpublish</a>
- <?php
- } else {
- ?>
- <a class="btn btn-default btn-xs" href="publish.php?id=<?=$berita['id'];?>"><i class="fa fa-share"></i> Publish</a>
- <?php
- }
- ?>
- <a type="button" class="btn btn-danger btn-xs" href="hapus-berita.php?id=<?=$berita['id'];?>">
- <i class="fa fa-trash-o"></i> Hapus
- </a>
- </td>
- </tr>
- <?php
- $no++;
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <!-- /.row -->
- </section><!-- /.content -->
- </aside><!-- /.right-side -->
- </div><!-- ./wrapper -->
- <!-- add new calendar event modal -->
- <!-- jQuery 2.0.2 -->
- <script src="js/jquery.min.js"></script>
- <!-- jQuery UI 1.10.3 -->
- <script src="js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
- <!-- Bootstrap -->
- <script src="js/bootstrap.min.js" type="text/javascript"></script>
- <!-- AdminLTE App -->
- <script src="js/AdminLTE/app.js" type="text/javascript"></script>
- <!-- DATA TABES SCRIPT -->
- <script src="js/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
- <script src="js/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
- <!-- Inline Scripts -->
- <script type="text/javascript">
- /* datatables */
- $('table').dataTable();
- </script>
- </body>
- </html>
- <?php
- } else {
- header('location:login.php');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement