mengedit

parent a14458d1
<?php
//session_start();
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
$query = "SELECT menu.harga as harga, pesanan.jumlah as jumlah FROM pesanan INNER JOIN menu ON pesanan.id_menu = menu.id";
$result_set = $database->query($query);
?>
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cafe Bunga Toba</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style-portfolio.css">
<link rel="stylesheet" href="css/picto-foundry-food.css" />
<link rel="stylesheet" href="css/jquery-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav main-nav clear navbar-right ">
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
<body>
<div class="checkout grid_16">
<div class="billInfo grid_11 alpha">
<h4>Daftar Pesanan</h4><br>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-12">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-6">
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<br>
<br>
<p>
<table border="2px">
<tr>
<td>Total harga</td>
<table border="1px"><br>
<tr>
<th>Total harga</th>
</tr>
<?php
$total = 0;
......
......@@ -6,7 +6,7 @@ include_once 'connection/koneksi.php';
$id = get_session('id');
mysqli_query($database, "DELETE FROM pesanan WHERE id_user=$id");
mysqli_query($conn, "DELETE FROM pesanan WHERE id_user=$id");
$harga = $_GET['harga'];
......
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2017 at 04:16 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `cafe_db`
--
-- --------------------------------------------------------
--
-- Table structure for table `kategori`
--
CREATE TABLE IF NOT EXISTS `kategori` (
`id` int(11) NOT NULL,
`nama` varchar(7) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `kategori`
--
INSERT INTO `kategori` (`id`, `nama`) VALUES
(1, 'makanan'),
(2, 'minuman');
-- --------------------------------------------------------
--
-- Table structure for table `komentar`
--
CREATE TABLE IF NOT EXISTS `komentar` (
`id` int(11) NOT NULL,
`name` varchar(50) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`komentar` text
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `komentar`
--
INSERT INTO `komentar` (`id`, `name`, `email`, `komentar`) VALUES
(4, 'Marit', 'maritia@yahoo.com', 'kai ken\r\n'),
(5, 'Sule', 'Priktiew@gmail.com', 'bfhsfsbfsdf');
-- --------------------------------------------------------
--
-- Table structure for table `menu`
--
CREATE TABLE IF NOT EXISTS `menu` (
`id` int(11) NOT NULL,
`id_karyawan` int(11) DEFAULT NULL,
`nama` varbinary(64) DEFAULT NULL,
`harga` varchar(9) DEFAULT NULL,
`gambar` varbinary(64) DEFAULT NULL,
`deskripsi` varchar(32) DEFAULT NULL,
`id_kategori` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `menu`
--
INSERT INTO `menu` (`id`, `id_karyawan`, `nama`, `harga`, `gambar`, `deskripsi`, `id_kategori`) VALUES
(5, NULL, 0x4179616d2050656e796574, '23.000', 0x6179616d2070656e7965742e6a7067, 'Enak dan Gurih', NULL),
(6, NULL, 0x426562656b20476f72656e67, '20.000', 0x626562656b20676f72656e672e6a7067, 'Sedap', NULL),
(7, NULL, 0x4e61736920476f72656e67202b204179616d, '16.000', 0x6e61736920676f72656e67202b206179616d2e6a7067, 'Enak', NULL),
(8, NULL, 0x4461756e205562692054756d62756b, '10.000', 0x6461756e207562692074756d62756b2e6a7067, 'Sedap', NULL),
(9, NULL, 0x426968756e204b756168, '14.000', 0x626968756e206b7561682e6a7067, 'Enak bangetttt', NULL),
(10, NULL, 0x496e646f6d696520476f72656e67, '10.000', 0x696e646f6d696520676f72656e672e6a7067, 'Seleraku', NULL),
(11, NULL, 0x4966756d6965204b756168, '13.000', 0x6966756d6965206b7561682e6a7067, 'Ifumie Kuah ini kali', NULL),
(12, NULL, 0x4e617369204b756e696e67, '17.000', 0x6e617369206b756e696e672e6a7067, 'Enak lahhh', NULL),
(13, NULL, 0x4d69652041636568, '15.000', 0x6d696520616365682e6a7067, 'Enak ', NULL),
(14, NULL, 0x4e61736920476f72656e67204269617361, '16.000', 0x6e61736920676f72656e672062696173612e6a7067, 'Enak', NULL),
(15, NULL, 0x4e61736920476f72656e67205370657369616c, '16.000', 0x6e61736920676f72656e67207370657369616c2e6a7067, 'Enak', NULL),
(16, NULL, 0x506563656c204c656c65, '56.000', 0x706563656c206c656c652e6a7067, 'Enakkkk', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pembayaran`
--
CREATE TABLE IF NOT EXISTS `pembayaran` (
`id` int(11) NOT NULL,
`id_user` int(11) DEFAULT NULL,
`total` varchar(10) DEFAULT NULL,
`status` varchar(32) DEFAULT NULL,
`gambar` varchar(64) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `pembayaran`
--
INSERT INTO `pembayaran` (`id`, `id_user`, `total`, `status`, `gambar`) VALUES
(11, 5, '0', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pesanan`
--
CREATE TABLE IF NOT EXISTS `pesanan` (
`id` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`id_menu` int(11) NOT NULL,
`jumlah` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `role`
--
CREATE TABLE IF NOT EXISTS `role` (
`id` int(11) NOT NULL,
`nama` varchar(8) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `role`
--
INSERT INTO `role` (`id`, `nama`) VALUES
(1, 'karyawan'),
(2, 'member');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL,
`first_name` varchar(64) DEFAULT NULL,
`last_name` varchar(64) DEFAULT NULL,
`email` varchar(64) DEFAULT NULL,
`username` varchar(32) DEFAULT NULL,
`password` varchar(32) DEFAULT NULL,
`id_role` varchar(10) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `first_name`, `last_name`, `email`, `username`, `password`, `id_role`) VALUES
(5, 'member', 'member', 'member@yahoo.com', 'member', 'member', '2'),
(6, 'karyawan', 'karyawan', 'karyawan@yahoo.com', 'karyawan', 'karyawan', '1');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `kategori`
--
ALTER TABLE `kategori`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `komentar`
--
ALTER TABLE `komentar`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `menu`
--
ALTER TABLE `menu`
ADD PRIMARY KEY (`id`), ADD KEY `id_karyawan` (`id_karyawan`), ADD KEY `id_kategori` (`id_kategori`);
--
-- Indexes for table `pembayaran`
--
ALTER TABLE `pembayaran`
ADD PRIMARY KEY (`id`), ADD KEY `id_user` (`id_user`);
--
-- Indexes for table `pesanan`
--
ALTER TABLE `pesanan`
ADD PRIMARY KEY (`id`), ADD KEY `id_user` (`id_user`), ADD KEY `pesanan_ibfk_2` (`id_menu`);
--
-- Indexes for table `role`
--
ALTER TABLE `role`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `kategori`
--
ALTER TABLE `kategori`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `komentar`
--
ALTER TABLE `komentar`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `menu`
--
ALTER TABLE `menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `pembayaran`
--
ALTER TABLE `pembayaran`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `pesanan`
--
ALTER TABLE `pesanan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `role`
--
ALTER TABLE `role`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `menu`
--
ALTER TABLE `menu`
ADD CONSTRAINT `menu_ibfk_1` FOREIGN KEY (`id_karyawan`) REFERENCES `user` (`id`),
ADD CONSTRAINT `menu_ibfk_2` FOREIGN KEY (`id_kategori`) REFERENCES `kategori` (`id`);
--
-- Constraints for table `pembayaran`
--
ALTER TABLE `pembayaran`
ADD CONSTRAINT `pembayaran_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`);
--
-- Constraints for table `pesanan`
--
ALTER TABLE `pesanan`
ADD CONSTRAINT `pesanan_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`),
ADD CONSTRAINT `pesanan_ibfk_2` FOREIGN KEY (`id_menu`) REFERENCES `menu` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<?php
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
$status = "accepted";
$id = $_GET['id'];
//die($gambar);
$sql = "UPDATE pembayaran SET status='$status' WHERE id=$id";
if ($database->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $database->error;
}
redirect('index.php');
?>
\ No newline at end of file
......@@ -204,9 +204,9 @@ INTRO CONTAINER
}
.top-title{
color: white;
font-family: 'Playball', cursive;
font-size: 120px;
font-weight: 400;
font-family: "Arial Black", Gadget, sans-serif;
font-size: 58px;
font-weight: 300;
}
.second-title {
font-weight: lighter;
......@@ -250,7 +250,7 @@ INTRO CONTAINER
border-bottom: 8px solid #fff;
}
.beer.background_content{
.profil.background_content{
background: url('../images/beer.jpg') no-repeat center center;
background-size: cover;
background-position: 70% 50%;
......
<?php
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cafe Bunga Toba</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style-portfolio.css">
<link rel="stylesheet" href="css/picto-foundry-food.css" />
<link rel="stylesheet" href="css/jquery-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav main-nav clear navbar-right ">
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
<!-- ============ Daftar Pesanan ============= -->
<section id="daftarpesanan" class="description_content">
<div class="text-content container">
<div class="inner contact row">
<div class="contact-form">
<!-- Form -->
<table class="table table-bordered">
<thead>
<tr>
<th>Total Biaya Pembayaran</th>
<th>Status Pembayaran</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT * FROM pembayaran ";
$result_set = $database->query($query);
if ($result_set != NULL) {
while ($row = $result_set->fetch_array()) {
?>
<tr>
<td><?= $row['total'] ?></td>
<?php
if ($row['status'] != "accepted") {
echo '<td>'
. '<a href="view_bukti.php?id=' . $row['gambar'] . '"><button class="btn btn-success">View</button></a> '
. '<a href="confirm.php?id=' . $row['id'] . '"><button class="btn btn-success">Confirm</button></td></a>';
} else {
echo ' <td>' . $row['status'] . '</td> ';
}
?>
</tr>
<?php
}
} else {
echo 'ada belum memesan pesan sekarang juga<br><a href="menu.php">Pesan</a>';
}
?>
</tbody>
</table>
</div><!-- End Contact Form Area -->
</div><!-- End Inner -->
</div>
</section>
\ No newline at end of file
......@@ -8,7 +8,7 @@ include_once 'connection/koneksi.php';
$id = $_GET['id'];
// retrieve posted form data
mysqli_query($database, "DELETE FROM menu WHERE id=$id");
mysqli_close($database);
mysqli_query($conn, "DELETE FROM menu WHERE id=$id");
mysqli_close($onn);
redirect('index.php');
?>
......@@ -4,6 +4,6 @@ include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
$id = $_GET['id'];
mysql_query("DELETE FROM komentar WHERE id = '$id'");
mysqli_query($conn, "DELETE FROM komentar WHERE id = '$id'");
header('Location: list_komentar.php');
?>
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
......@@ -92,9 +92,9 @@ include_once 'connection/koneksi.php';
<!-- ============ Menu ============= -->
<?php
$per_hal = 10;
$jumlah_record = mysqli_query($conn, "SELECT COUNT(*) from menu");
$jum = mysqli_result($jumlah_record, 0);
$per_hal = 8;
$jumlah_record = mysqli_query($conn, "SELECT * from menu");
$jum = mysqli_num_rows($conn, $jumlah_record);
$halaman = ceil($jum / $per_hal);
$page = (isset($_GET['page'])) ? (int) $_GET['page'] : 1;
$start = ($page - 1) * $per_hal;
......@@ -114,7 +114,7 @@ $start = ($page - 1) * $per_hal;
<div class="col-lg-12">
<?php
$query = "SELECT * FROM menu";
$query = "SELECT * FROM menu limit $start, $per_hal";
$result_set = $database->query($query);
while ($row = $result_set->fetch_assoc()) {
......@@ -136,15 +136,16 @@ $start = ($page - 1) * $per_hal;
?>
<div class="col-md-12">
<ul class="pagination">
<ul class="pagination">
<?php
for ($x = 1; $x <= $halaman; $x++) {
?>
<li><a href="?page=i<?php echo $x ?>"><?php echo $x ?></a></li>
<li><a href="?page=<?php echo $x ?>"><?php echo $x ?></a></li>
<?php
}
?>
</ul>
</div>
</ul>
......@@ -160,6 +161,7 @@ $start = ($page - 1) * $per_hal;
<section id="komentar" class="description_content">
<div class="bread background_content">
<h1>Beri Komentar</h1>
<h2 class="white second-title">"Jika anda memiliki pertanyaan ataupun komentar,anda dapat mengisi formulir dibawah ini"</h2>
</div>
<div class="text-content container">
<div class="inner contact">
......@@ -238,7 +240,7 @@ $start = ($page - 1) * $per_hal;
<br>
<footer class="sub_footer">
<div class="container">
<div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="#">PA1-1617-D3TI05</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="https://themewagon.com/">PA1-1617-D3TI05</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">Back to <a href="#top">TOP</a></p>
</div>
<div class="col-md-4"><p class="sub-footer-text text-center">Built With Care By <a href="#" target="_blank">Us</a></p></div>
......
......@@ -2,6 +2,7 @@
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
?>
<!DOCTYPE html>
<html>
......@@ -46,19 +47,21 @@ include_once 'connection/koneksi.php';
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="#pricing">MENU</a></li>');
echo('<li><a class="color_animation" href="#pesanan">PESANAN</a></li>');
echo('<li><a class="color_animation" href="#pembayaran">Pembayaran</a></li>');
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="index.php #olahmenu">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="index.php #daftarpesanan">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="#pricing">MENU</a></li>');
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
......@@ -70,13 +73,21 @@ include_once 'connection/koneksi.php';
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid">
<h2> Daftar Komentar </h2>
<hr/>
<?php
$komen = mysql_query("SELECT * FROM komentar");
while($q = mysql_fetch_array($komen)){
$komen = mysqli_query($conn,"SELECT * FROM komentar");
while($q = mysqli_fetch_array($komen)){
?>
<div class="col-md-6">
<div class="thumbnail">
......
......@@ -7,19 +7,23 @@ include_once 'connection/koneksi.php';
$username = $_POST["username"];
$password = $_POST["password"];
$res_set = mysqli_query($database, "select * from user where username='$username' and password='$password'");
$res_set = mysqli_query($conn, "select * from user where username='$username' and password='$password'");
$res = mysqli_fetch_array($res_set);
if ($res_set->num_rows < 1) {
redirect('login.php');
$_SESSION['error'] = TRUE;
} else {
set_session('role', $res["role"]);
$id = $res["id_role"];
$res_role = mysqli_query($conn, "select * from role where id =$id ");
$resRole = mysqli_fetch_array($res_role);
set_session('role', $resRole["nama"]);
set_session('id', $res["id"]);
set_session('first_name', $res["first_name"]);
// die(get_session('role'));
$_SESSION['isLogin'] = TRUE;
// die(get_session('id'));
// die(get_session('id'));
redirect('index.php');
}
index.file=index.php
url=http://localhost/Fredrick/restaurant/
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/delete_menu.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/update_menu_process.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/index.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/logout.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/register.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/tambah_menu.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/pesan_barang.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/pesan_barang_process.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/update_menu.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/bayar.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/bayar_process.php</file>
<file>file:/C:/xampp/htdocs/Fredrick/restaurant/login_process.php</file>
</group>
</open-files>
</project-private>
include.path=${php.global.include.path}
php.version=PHP_70
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=false
web.root=.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>restaurant</name>
</data>
</configuration>
</project>
......@@ -3,9 +3,7 @@ session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
if(!isset($_SESSION['admin'])){
header("location: login.php");
}
?>
......@@ -84,9 +82,9 @@ if(!isset($_SESSION['admin'])){
<br><br><br><br><br>
<?php
$id_barang = $_GET['id'];
$query = "SELECT * FROM menu";
$result_set = $database->query($query);
$row = $result_set->fetch_assoc();
$query = "SELECT * FROM menu";
$result_set = $conn->query($query);
$row = $result_set->fetch_assoc();
?><!-- / header -->
<body>
......
......@@ -7,10 +7,10 @@ include_once 'connection/koneksi.php';
$id_barang = $_GET['id'];
$id_user = get_session('id');
$jumlah = $_POST['jumlah'];
$query = 'INSERT INTO pesanan( `id_user`, `id_menu`, `jumlah`) VALUES(?, ?, ?)';
$query = 'INSERT INTO pesanan($conn, `id_user`, `id_menu`, `jumlah`) VALUES(?, ?, ?)';
//die($id_barang . $id_user . $jumlah);
$statement = $database->prepare($query);
$statement = $conn->prepare($query);
$statement->bind_param('iii', $id_user, $id_barang, $jumlah);
$statement->execute();
......
<?php
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cafe Bunga Toba</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style-portfolio.css">
<link rel="stylesheet" href="css/picto-foundry-food.css" />
<link rel="stylesheet" href="css/jquery-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
<script src="js/jquery-3.1.1.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav main-nav clear navbar-right ">
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
<br><br><br><br>
<div class="col-md-8 col-md-offset-2">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
<li data-target="#myCarousel" data-slide-to="5"></li>
<li data-target="#myCarousel" data-slide-to="6"></li>
</ol>
<!-- Carousel -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/1.jpg" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
<div class="item">
<img src="images/2.JPG" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
<div class="item">
<img src="images/3.JPG" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
<div class="item">
<img src="images/4.JPG" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
<div class="item">
<img src="images/5.JPG" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
<div class="item">
<img src="images/6.JPG" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
<div class="item">
<img src="images/7.JPG" alt="slider">
<div class="carousel-caption">
<h2>Cafe Bunga Toba</h2>
</div>
</div>
</div>
<!-- Prev and Next-->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="jumbotron">
<div class="container">
<h2 style="font-size: 65px;">Cafe Bunga Toba</h2>
<p>Cafe ini biasanya dikunjungi banyak oleh pelanggan pelanggan yang berasal dari daerah lokal ataupun daerah luar,seperti turis turis.
Cafe ini menyediakan banyak makanan dan minuman yang nikmat bagi para pelanggan yang ingin memesan dan membeli makanan dan minuman.
Cafe ini berlokasi di :<Br>
Jl.Pemandian No.2 Balige - Tobasa <br>
TELP 21572
</p>
</div>
</div>
<!-- ============ Footer Section ============= -->
<br>
<footer class="sub_footer">
<div class="container">
<div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="https://themewagon.com/">PA1-1617-D3TI05</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">Back to <a href="profil.php">TOP</a></p>
</div>
<div class="col-md-4"><p class="sub-footer-text text-center">Built With Care By <a href="#" target="_blank">Us</a></p></div>
</div>
</footer>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js" ></script>
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/jquery.mixitup.min.js" ></script>
<script type="text/javascript" src="js/main.js" ></script>
......@@ -19,7 +19,7 @@ $role = "member";
$query = 'INSERT INTO user( `first_name`, `last_name`, `email`,`username`,`password`,`role`) VALUES(?, ?, ?, ?, ?, ?)';
$statement = $database->prepare($query);
$statement = $conn->prepare($query);
$statement->bind_param('ssssss', $firstName, $lastName, $email, $username, $password, $role);
$statement->execute();
......
......@@ -2,6 +2,7 @@
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
?>
<!DOCTYPE html>
<html>
......@@ -24,7 +25,7 @@ include_once 'connection/koneksi.php';
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
</head>
<body>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
......@@ -46,18 +47,22 @@ include_once 'connection/koneksi.php';
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="#pricing">MENU</a></li>');
echo('<li><a class="color_animation" href="#pesanan">PESANAN</a></li>');
echo('<li><a class="color_animation" href="#pembayaran">Pembayaran</a></li>');
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="#olahmenu">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="#daftarpesanan">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation active" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
......
<?php
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
if (!empty($_FILES['uploaded_file'])) {
$path = "foto/";
$path = $path . basename($_FILES['uploaded_file']['name']);
if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
echo "The file " . basename($_FILES['uploaded_file']['name']) .
" has been uploaded";
} else {
echo "There was an error uploading the file, please try again!";
}
}
$nama = $_POST['nama'];
$harga = $_POST['harga'];
$deskripsi = $_POST['deskripsi'];
$id_karyawan = $_POST['id'];
$gambar = basename($_FILES['uploaded_file']['name']);
$query = 'INSERT INTO menu( `id_karyawan`, `nama`, `harga`,`deskripsi`,`gambar`) VALUES(?, ?, ?, ?, ?)';
$kategori = $_POST['kategori'];
//die($kategori);
$statement = $conn->prepare($query);
$statement->bind_param('issss', $id_karyawan, $nama, $harga, $deskripsi, $gambar);
$statement->execute();
redirect('index.php');
?>
\ No newline at end of file
......@@ -5,36 +5,80 @@ include_once 'connection/koneksi.php';
$id = $_GET['id'];
//die($id);
$id_brg = mysql_real_escape_string($_GET['id']);
$det = mysql_query("select * from menu where id='$id_brg'")or die(mysql_error());
while ($d = mysql_fetch_array($det)) {
$id_brg = mysqli_real_escape_string($conn, $_GET['id']);
$det = mysqli_query($conn, "select * from menu where id='$id_brg'")or die(mysqli_error());
while ($d = mysqli_fetch_array($det)) {
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Restaurant</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style-portfolio.css">
<link rel="stylesheet" href="css/picto-foundry-food.css" />
<link rel="stylesheet" href="css/jquery-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
</head>
<body>
<meta charset="UTF-8">
<title>Cafe Bunga Toba</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style-portfolio.css">
<link rel="stylesheet" href="css/picto-foundry-food.css" />
<link rel="stylesheet" href="css/jquery-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
<script src="js/jquery-3.1.1.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav main-nav clear navbar-right ">
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
<!-- ============ Tambah Menu ============= -->
......@@ -81,16 +125,28 @@ while ($d = mysql_fetch_array($det)) {
</div>
</section>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js" ></script>
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/jquery.mixitup.min.js" ></script>
<script type="text/javascript" src="js/main.js" ></script>
<!-- ============ Footer Section ============= -->
<br>
<footer class="sub_footer">
<div class="container">
<div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="https://themewagon.com/">PA1-1617-D3TI05</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">Back to <a href="update_menu.php">TOP</a></p>
</div>
<div class="col-md-4"><p class="sub-footer-text text-center">Built With Care By <a href="#" target="_blank">Us</a></p></div>
</div>
</footer>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js" ></script>
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/jquery.mixitup.min.js" ></script>
<script type="text/javascript" src="js/main.js" ></script>
</body>
</html>
<?php
......
<?php
$id = $_GET['id'];
?>
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cafe Bunga Toba</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style-portfolio.css">
<link rel="stylesheet" href="css/picto-foundry-food.css" />
<link rel="stylesheet" href="css/jquery-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="icon" href="favicon-1.ico" type="image/x-icon">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav main-nav clear navbar-right ">
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div><!-- /.container-fluid -->
</nav>
<fieldset>
<form id="contact-us" method="post" action="upload_bukti_process.php?id=<?= $id ?>" enctype="multipart/form-data">
<!-- Left Inputs -->
<br><br><br><br>
<div class="col-md-6">
<h1>Upload Bukti Pembayaran</h1>
<input type="file" name="uploaded_file" id="username" required="required" class="form" placeholder="Username" />
<br><br>
<button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Upload</button>
</form>
\ No newline at end of file
<button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Upload</button>
</form>
</fieldset>
\ No newline at end of file
......@@ -27,10 +27,10 @@ $id = $_GET['id'];
$sql = "UPDATE pembayaran SET status='$status',gambar='$gambar' WHERE id=$id";
if ($database->query($sql) === TRUE) {
if ($conn->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $database->error;
echo "Error updating record: " . $conn->error;
}
redirect('index.php#pembayaran');
?>
\ No newline at end of file
<?php
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
$gambar = $_GET['id'];
?>
<img src="pembayaran/<?= $gambar ?> ">
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment