173 lines
6.5 KiB
PHP
173 lines
6.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<meta charset="utf-8">
|
|
<title><?php echo $title ?></title>
|
|
<meta name="generator" content="Bootply" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<link href="<?php echo base_url()?>asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link href="<?php echo base_url()?>asset/css/styles.css" rel="stylesheet">
|
|
<link href="<?php echo base_url()?>asset/css/custom.css" rel="stylesheet">
|
|
<style>
|
|
a.navbar-brand{
|
|
background: url(<?php echo base_url()."asset/images/logo.png" ?>) top left no-repeat;
|
|
background-size: 40px 40px;
|
|
background-position: center;
|
|
width:40px;
|
|
padding-top:10px;
|
|
margin-left:10px;
|
|
text-align:center;
|
|
}
|
|
.navbar-center
|
|
{
|
|
position: absolute;
|
|
width: 100%;
|
|
text-align: center;
|
|
margin: auto;
|
|
margin-top:10px;
|
|
}
|
|
.navbar-center a
|
|
{
|
|
border: solid 1px #000000;
|
|
padding: 5px;
|
|
}
|
|
</style>
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
|
|
<script src="<?php echo base_url()?>asset/bootstrap/js/bootstrap.min.js"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
//script here
|
|
$(document).ready(function() {
|
|
var cartcntn = $( "div.cart-content" ).html();
|
|
$("#cartbt").popover({
|
|
placement : 'bottom', //placement of the popover. also can use top, bottom, left or right
|
|
title : '<div style="text-align:center; font-size:14px;"> Keranjang</div>', //this is the top title bar of the popover. add some basic css
|
|
html: 'true', //needed to show html of course
|
|
content : cartcntn, //this is the content of the html box. add the image here or anything you want really.
|
|
trigger: 'hover'
|
|
});
|
|
var logincntn = $( "div.login-content" ).html();
|
|
$("#loginbt").popover({
|
|
placement : 'bottom', //placement of the popover. also can use top, bottom, left or right
|
|
title : '<div style="text-align:center; font-size:14px;"> Keranjang</div>', //this is the top title bar of the popover. add some basic css
|
|
html: 'true', //needed to show html of course
|
|
content : logincntn //this is the content of the html box. add the image here or anything you want really.
|
|
//trigger: 'hover'
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<!-- nav header -->
|
|
<div id="top-nav" class="navbar navbar-default navbar-fixed-top">
|
|
<div class="container-fluid">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<!--<a class="navbar-brand" href="#"></a>-->
|
|
<div class="navbar-center">
|
|
<form class="navbar-form" role="search" style="display:inline">
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" placeholder="Search Product" style="width:300px">
|
|
<div class="input-group-btn">
|
|
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<a href="<?php echo site_url('cart') ?>" id="cartbt" style="display:inline" class="btn btn-primary">
|
|
<i class="glyphicon glyphicon-shopping-cart"></i> Keranjang Belanja(<span id="total-cart" style="display: inline-block;"><?php echo $this->cart->total_items(); ?></span>)
|
|
</a>
|
|
<div class="cart-content" style="display:none">
|
|
<div id="popOverCart" style="">
|
|
<table>
|
|
<thead><tr>
|
|
<td width="100px">Nama</td>
|
|
<td width="50px">Qty</td>
|
|
<td>Harga</td>
|
|
</tr></thead>
|
|
<tbody>
|
|
<?php foreach ($this->cart->contents() as $items): ?>
|
|
<tr>
|
|
<td><?php echo $items['name']; ?></td>
|
|
<td><?php echo $items['qty']; ?></td>
|
|
<td>Rp. <?php echo $this->cart->format_number($items['price']); ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
<tfoot><tr style="border-top:solid 1px #000000">
|
|
<td>Total</td>
|
|
<td colspan="2"><b>Rp. <?php echo $this->cart->format_number($this->cart->total()); ?></b></td>
|
|
</tr></tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="navbar-collapse collapse">
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<?php if($this->session->userdata('logged_in')){ ?>
|
|
<li class="dropdown">
|
|
<a class="dropdown-toggle" role="button" data-toggle="dropdown" href="#"><i class="glyphicon glyphicon-user"></i> <?php echo $this->session->userdata('username') ?> <span class="caret"></span></a>
|
|
<ul id="g-account-menu" class="dropdown-menu" role="menu">
|
|
<li><a href="#">My Profile</a></li>
|
|
<?php if ($this->session->userdata('type') == "ADMIN"){ ?>
|
|
<li><a href="<?php echo site_url('su/dashboard') ?>">Admin Panel</a></li>
|
|
<?php } ?>
|
|
<li role="separator" class="divider"></li>
|
|
<li><a href="<?php echo site_url('user/logout') ?>"><i class="glyphicon glyphicon-lock"></i> Logout</a></li>
|
|
</ul>
|
|
</li>
|
|
<?php }else{ ?>
|
|
<li id="loginbt"><a role="button" href="#"><i class="glyphicon glyphicon-user"></i> Login <span class="caret"></span></a></li>
|
|
<?php } ?>
|
|
</ul>
|
|
<div class="login-content" style="display:none">
|
|
<!--
|
|
<div id="popOverLogin">
|
|
<form action="<?php echo site_url('user/login') ?>" method="post">
|
|
<input type="text" name="username" placeholder="Username">
|
|
<input type="password" name="password" placeholder="Password">
|
|
<input type="submit" value="Login">
|
|
</form>
|
|
</div>
|
|
-->
|
|
|
|
<div class="container">
|
|
<form id="login-form" class="form-horizontal" style="" action="<?php echo site_url('user/login') ?>" method="post">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<div class="col-sm-8">
|
|
<input type="text" name="username" class="form-control" id="inputEmail3" placeholder="Username">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-8">
|
|
<input type="password" name="password" class="form-control" id="inputPassword3" placeholder="Password">
|
|
</div>
|
|
</div>
|
|
<button class="btn btn-primary" type="submit">Log in</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- header -->
|
|
<div class="container" id="main-body">
|
|
<div class="row">
|
|
<div class="col-md-10">
|
|
<!-- logo -->
|
|
<div class="row">
|
|
<div class="col-md-1" id="logo">
|
|
<img src="<?php echo base_url()."asset/images/bglogo.png" ?>"alt="logo" width="700px"></img>
|
|
</div>
|
|
</div>
|