Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Memanggil file class.profile.php
- require_once 'app/model/class.profile.php';
- $auth_pro = new Profile();
- //Menampilkan data ke tabel
- $stmt = $auth_pro->runQuery("SELECT * FROM profile");
- $stmt->execute();
- $result = null;
- if ($stmt->rowCount() == 0) {
- }
- else {
- while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
- $result[] = "<td>".$row['nama']."</td>
- <td><img src='photo/".$row['photo']."'
- class='img-rounded' width='115px' height='115px'></td>
- <td>
- <a class='btn btn-info' href='profile-edit.php?edit_ipro=".$row['id_profile']."'><span class='glyphicon glyphicon-edit'></span> Edit</a>
- <a class='btn btn-danger' href='?delete_ipro=".$row['id_profile']."'><span class='glyphicon glyphicon-remove-circle'></span> Delete</a>
- </td>";
- }
- }
- //Eksekusi untuk menghapus data
- if (isset($_GET['delete_ipro'])) {
- try {
- if ($auth_pro->deleteProfile($ipro)) {
- $auth_pro->redirect('index.php?deleted');
- }
- } catch (PDOException $e) {
- echo $e->getMessage();
- }
- }
- include 'app/view/header.blade.php';
- include 'app/view/menu.blade.php';
- include 'app/view/index.blade.php';
- include 'app/view/footer.blade.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement