senjasoekarnoAvatar border
TS
senjasoekarno
Salahnya dimana ya gan??
Saya mau buat slideshow pake php mysql


Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\baju\index.php on line 151


Ini sintax nya


<!DOCTYPE html>
<?php
include 'config/kon.php';
session_start();
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Home | E-Shopper</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/prettyPhoto.css" rel="stylesheet">
<link href="css/price-range.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
<!--[if lt IE 9]>
[removed][removed]
[removed][removed]
<![endif]-->
<link rel="shortcut icon" href="images/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
[removed]
/*autocomplete muncul setelah user mengetikan minimal2 karakter */
$(function() {
$( "#anime" ).autocomplete({
source: "data.php",
minLength:1,
});
});
[removed]
</head><!--/head-->

<body>

<header id="header"><!--header-->
<div class="header-middle "><!--header-middle-->
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="logo pull-left">
<a href="index.php"><img src="images/home/qurotha.png" width ="300" height="100" alt="" /></a>
</div>

</div>
<div class="col-sm-4">
</div>
<div class="col-sm-4">

<div class="shop-menu pull-right">

<ul class="nav navbar-nav">
<?php
if (empty($_SESSION['username']) AND empty($_SESSION['password'])){?>
<li><a href="?page=login"><i class="fa fa-lock"></i> Login</a></li>

<?php }else{?>
<li><a href="#"><i class="fa fa-user"></i> Account</a></li>
<li><a href="checkout.html"><i class="fa fa-crosshairs"></i> Checkout</a></li>
<li><a href="cart.html"><i class="fa fa-shopping-cart"></i> Cart</a></li>
<?php }?>

</ul>

</div>

</div>
</div>
</div>
</div><!--/header-middle-->

<div class="header-bottom">
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="mainmenu pull-left">
<ul class="nav navbar-nav collapse navbar-collapse">
<li><a href="index.php" class="active">Home</a></li>
<li class="dropdown"><a href="#">Shop<i class="fa fa-angle-down"></i></a>
<ul role="menu" class="sub-menu">
<li><a href="shop.html">Products</a></li>
<li><a href="product-details.html">Product Details</a></li>
<li><a href="checkout.html">Checkout</a></li>
<li><a href="cart.html">Cart</a></li>
<li><a href="?page=login.php">Login</a></li>
</ul>
</li>
<li class="dropdown"><a href="#">Blog<i class="fa fa-angle-down"></i></a>
<ul role="menu" class="sub-menu">
<li><a href="blog.html">Blog List</a></li>
<li><a href="blog-single.html">Blog Single</a></li>
</ul>
</li>
<li><a href="404.html">404</a></li>
<li><a href="contact-us.html">Contact</a></li>
</ul>
</div>
</div>
<div class="col-sm-6">
<div class="search_box pull-right">
<form class="navbar-form" role="search" action="?page=cari" method="post" name="form1">
<div class="group">
<input type="text" name="txtKeyword" id="anime" placeholder="Search"/>
</div>

</form>
</div>
</div>
</div>
</div>
</div>-->

</header><!--/header-->


<header id="header">
<section id="slider">
<div class="container">
<div class="col-sm-12 padding-center">
<div id="slider-carousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php


$count = mysql_query("SELECT COUNT(*) FROM slideshow") or die(mysql_error());
$count = mysql_result($count,0);
for($i=0; $i<$count;$i++){
echo '<li data-target="#transition-timer-carousel" data-slide-to="'.$i.'"'; if($i==0){ echo 'class="active"'; } echo '></li>';
}
?>
</ol>

<div class="carousel-inner">
<?php
//Query database
$sql = mysql_query("SELECT * FROM slideshow ORDER BY active DESC");
[B]while($row = mysql_fetch_assoc($sql)){[/B]
echo '
<div class="item '; if($row['active'] == 1){ echo 'active'; } echo '">
<img src="img/'.$row['gambar'].'" />
<div class="carousel-caption">
<h1 class="carousel-caption-header">'.$row['judul_slide'].'</h1>
<p class="carousel-caption-text hidden-sm hidden-xs">
'.$row['keterangan_slide'].'
</p>
</div>
</div>
';
}
?>
</div>

<a href="#slider-carousel" class="left control-carousel hidden-xs" data-slide="prev">
<i class="fa fa-angle-left"></i>
</a>
<a href="#slider-carousel" class="right control-carousel hidden-xs" data-slide="next">
<i class="fa fa-angle-right"></i>
</a>
</div>

</div>
</div>
</section>
</header>


<section>
<div class="container">
<div class="row">
<div class="col-sm-3">
<div class="left-sidebar">
<div class="brands_products"><!--brands_products-->
<h2>KATEGORI</h2>
<div class="brands-name">
<ul class="nav nav-pills nav-stacked">
<?php
$sql = "SELECT b.nama AS nama, COUNT(b.nama) AS jumlah_kategori, k.id_kategori AS id_kategori, k.nama_kategori AS nama_kategori FROM barang AS b INNER JOIN kategori AS k ON k.id_kategori = b.id_kategori GROUP BY b.id_kategori";
$gon = mysql_query($sql) or die('Query Gagal');
while ($data = mysql_fetch_assoc($gon)) {
?>
<li><a href="?page=kategori-produk&kode=<?php echo $data['id_kategori']?>"> <span class="pull-right">(<?php echo $data['jumlah_kategori']; ?>emoticon-Wink</span><?php echo $data['nama_kategori']; ?></a></li>
<?php } ?>
</ul>
</div>
</div><!--/brands_products-->

<div class="brands_products"><!--brands_products-->
<h2>Brands</h2>
<div class="brands-name">
<ul class="nav nav-pills nav-stacked">
<li><a href="#"> <span class="pull-right">(50)</span>Acne</a></li>
<li><a href="#"> <span class="pull-right">(56)</span>Grüne Erde</a></li>
<li><a href="#"> <span class="pull-right">(27)</span>Albiro</a></li>
<li><a href="#"> <span class="pull-right">(32)</span>Ronhill</a></li>
<li><a href="#"> <span class="pull-right">(5)</span>Oddmolly</a></li>
<li><a href="#"> <span class="pull-right">(9)</span>Boudestijn</a></li>
<li><a href="#"> <span class="pull-right">(4)</span>Rösch creative culture</a></li>
</ul>
</div>
</div><!--/brands_products-->

<div class="price-range"><!--price-range-->
<h2>Price Range</h2>
<div class="well text-center">
<input type="text" class="span2" value="" data-slider-min="0" data-slider-max="600" data-slider-step="5" data-slider-value="[250,450]" id="sl2" ><br />
<b class="pull-left">$ 0</b> <b class="pull-right">$ 600</b>
</div>
</div><!--/price-range-->

<div class="shipping text-center"><!--shipping-->
<img src="images/home/shipping.jpg" alt="" />
</div><!--/shipping-->

</div>
</div>


<div class="col-sm-9 padding-right">
<div class="col-sm-12 padding-right">
<?php
$page = @$_GET['page'];
$file = "$page.php";
if (!file_exists($file)) {
include ("katalog.php");
} else { // jika file tidak ada
include ("$page.php");
}
?>
</div>





<div class="col-sm-12 padding-right">
<div class="recommended_items"><!--recommended_items-->
<h2 class="title text-center">recommended items</h2>

<div id="recommended-item-carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="item active">
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="gambar/Boneka-Doraemon-XL.jpg" width="268" height="134" alt="" />
<h2>$56</h2>
<p>Easy Polo Black Edition</p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>

</div>
</div>
</div>
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="gambar/Boneka-Doraemon-XL.jpg" width="268" height="134" alt="" />
<h2>$56</h2>
<p>Easy Polo Black Edition</p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>

</div>
</div>
</div>
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="gambar/Boneka-Doraemon-XL.jpg" width="268" height="134" alt="" />
<h2>$56</h2>
<p>Easy Polo Black Edition</p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>

</div>
</div>
</div>
</div>
<div class="item">
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="gambar/Boneka-Doraemon-XL.jpg" width="268" height="134" alt="" />
<h2>$56</h2>
<p>Easy Polo Black Edition</p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>

</div>
</div>
</div>
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="gambar/Boneka-Doraemon-XL.jpg" width="268" height="134" alt="" />
<h2>$56</h2>
<p>Easy Polo Black Edition</p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>

</div>
</div>
</div>
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="gambar/Boneka-Doraemon-XL.jpg" width="268" height="134" alt="" />
<h2>$56</h2>
<p>Easy Polo Black Edition</p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>

</div>
</div>
</div>
</div>
</div>
<a class="left recommended-item-control" href="#recommended-item-carousel" data-slide="prev">
<i class="fa fa-angle-left"></i>
</a>
<a class="right recommended-item-control" href="#recommended-item-carousel" data-slide="next">
<i class="fa fa-angle-right"></i>
</a>
</div>
</div><!--/recommended_items-->

</div>


</div>
</div>
</div>

</section>




<footer id="footer"><!--Footer-->
<div class="footer-widget">
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="single-widget">
<h2>Quock Shop</h2>
<div class="contactinfo">
<ul class="nav nav-pills">
<li><a href="#"><i class="fa fa-phone"></i> S E N S O R2 2130 2856</a></li>
<li><a href="#"><i class="fa fa-envelope"></i> irsanmuhamadofficial@outlook.com</a></li>
</ul>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="single-widget">
<h2>About Shopper</h2>
<form action="#" class="searchform">
<input type="text" placeholder="Your email address" />
<button type="submit" class="btn btn-default"><i class="fa fa-arrow-circle-o-right"></i></button>
<p>Get the most recent updates from <br />our site and be updated your self...</p>
</form>
</div>
</div>
<div class="col-sm-4">
<div class="single-widget">
<h2>About Shopper</h2>

<div class="social-icons pull">
<ul class="nav navbar-nav">
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
<li><a href="#"><i class="fa fa-dribbble"></i></a></li>
<li><a href="#"><i class="fa fa-google-plus"></i></a></li>
</ul>
</div>


</div>
</div>

</div>
</div>
</div>

<div class="footer-bottom">
<div class="container">
<div class="row">
<p class="pull-left">Copyright © 2015 E-SHOPPER Inc. All rights reserved.</p>
<p class="pull-right">Designed by <span><a target="_blank" href="http://www.themeum.com">Themeum</a></span></p>
</div>
</div>
</div>

</footer><!--/Footer-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
[removed][removed]
<!-- Include all compiled plugins (below), or include individual files as needed -->
[removed][removed]
[removed]
$(document).ready(function() {
//Events that reset and restart the timer animation when the slides change
$("#transition-timer-carousel").on("slide.bs.carousel", function(event) {
//The animate class gets removed so that it jumps straight back to 0%
$(".transition-timer-carousel-progress-bar", this)
.removeClass("animate").css("width", "0%");
}).on("slid.bs.carousel", function(event) {
//The slide transition finished, so re-add the animate class so that
//the timer bar takes time to fill up
$(".transition-timer-carousel-progress-bar", this)
.addClass("animate").css("width", "100%");
});

//Kick off the initial slide animation when the document is ready
$(".transition-timer-carousel-progress-bar", "#transition-timer-carousel")
.css("width", "100%");
});
[removed]


[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
</body>
</html>





0
966
1
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Urutan
Terbaru
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan