<!DOCTYPE html>
<html lang="id">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
        <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <TITLE><?= $db->config("title"); ?></TITLE>
<META NAME="Keywords" content="<?= $db->config("keyword"); ?>">
<META NAME="Description" content="<?= $db->config("description"); ?>">
    <meta name="author" content="" />
    <link rel="shortcut icon" href="templates/bootstrap2-responsive/assets/img/favicon.html" type="image/png" />
    <link rel="image_src" href="templates/bootstrap2-responsive/assets/img/logo.html" />
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="indexc0c0.php?/api/rss/id" />
    
        <meta property="og:image" content="templates/bootstrap2-responsive/assets/img/logo-transparent-og.html" />
        
    
    <!-- Le styles -->
    <link href="templates/bootstrap2-responsive/assets/css/bootstrap.min.css" rel="stylesheet">
    
        <link href="templates/bootstrap2-responsive/assets/css/bootstrap-responsive.min.css" rel="stylesheet">
    
    <link href="templates/bootstrap2-responsive/assets/css/styles.css" rel="stylesheet">
    
        <link href="templates/bootstrap2-responsive/assets/css/enable-responsive.css" rel="stylesheet">
        
    <link href="templates/bootstrap2-responsive/assets/css/bootstrap-select.min.css" rel="stylesheet">
    <link href="templates/bootstrap2-responsive/assets/css/blueimp-gallery.min.css" rel="stylesheet">
    <link href="templates/bootstrap2-responsive/assets/css/jquery.cleditor.css" rel="stylesheet">
    <link href="templates/bootstrap2-responsive/assets/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
    
    
    <link href="templates/bootstrap2-responsive/assets/css/styles_red.css" rel="stylesheet">
    
    
            
    <link href="templates/bootstrap2-responsive/assets/css/custom.css" rel="stylesheet">
    
    
    <script src="templates/bootstrap2-responsive/assets/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="templates/bootstrap2-responsive/assets/js/bootstrap.min.js"></script>
    <script src="templates/bootstrap2-responsive/assets/js/gmap3.js"></script>
    <script src="templates/bootstrap2-responsive/assets/js/bootstrap-select.js"></script>
    <script src="templates/bootstrap2-responsive/assets/js/bootstrap-datetimepicker.min.js"></script>
    <script src="templates/bootstrap2-responsive/assets/js/blueimp-gallery.min.js"></script>
    <script src="templates/bootstrap2-responsive/assets/js/jquery.helpers.js"></script>
    <script src="templates/bootstrap2-responsive/assets/js/jquery.placeholder.min.js"></script>
    
    <script type="text/javascript" src="templates/bootstrap2-responsive/assets/js/jquery.number.js"></script>
    <script type="text/javascript" src="templates/bootstrap2-responsive/assets/js/jquery.h5validate.js"></script>
    
        <script src="templates/bootstrap2-responsive/assets/js/dpejes/dpe.js"></script>
        
    
    
    
    
        
        
        
    <script src="templates/bootstrap2-responsive/assets/js/jquery.custom.js"></script>
    
    			<!-- LOAD JQUERY LIBRARY -->
			<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js"></script>
			
			<!-- LOADING FONTS AND ICONS -->
			<link href="https://fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet" property="stylesheet" media="all" type="text/css" >

			
			<link rel="stylesheet" type="text/css" href="fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css">
			<link rel="stylesheet" type="text/css" href="fonts/font-awesome/css/font-awesome.css">
			
			<!-- REVOLUTION STYLE SHEETS -->
			<link rel="stylesheet" type="text/css" href="css/rs6.css">
			<!-- REVOLUTION LAYERS STYLES -->
							<style type="text/css"></style>
			<!-- REVOLUTION JS FILES -->
			<script type="text/javascript" src="js/revolution.tools.min.js"></script>
			<script type="text/javascript" src="js/rs6.min.js"></script>
			
			<script type="text/javascript">function setREVStartSize(e){			
			try {								
				var pw = document.getElementById(e.c).parentNode.offsetWidth,
					newh;
				pw = pw===0 || isNaN(pw) ? window.innerWidth : pw;
				e.tabw = e.tabw===undefined ? 0 : parseInt(e.tabw);
				e.thumbw = e.thumbw===undefined ? 0 : parseInt(e.thumbw);
				e.tabh = e.tabh===undefined ? 0 : parseInt(e.tabh);
				e.thumbh = e.thumbh===undefined ? 0 : parseInt(e.thumbh);
				e.tabhide = e.tabhide===undefined ? 0 : parseInt(e.tabhide);
				e.thumbhide = e.thumbhide===undefined ? 0 : parseInt(e.thumbhide);
				e.mh = e.mh===undefined || e.mh=="" || e.mh==="auto" ? 0 : parseInt(e.mh,0);		
				if(e.layout==="fullscreen" || e.l==="fullscreen") 						
					newh = Math.max(e.mh,window.innerHeight);				
				else{					
					e.gw = Array.isArray(e.gw) ? e.gw : [e.gw];
					for (var i in e.rl) if (e.gw[i]===undefined || e.gw[i]===0) e.gw[i] = e.gw[i-1];					
					e.gh = e.el===undefined || e.el==="" || (Array.isArray(e.el) && e.el.length==0)? e.gh : e.el;
					e.gh = Array.isArray(e.gh) ? e.gh : [e.gh];
					for (var i in e.rl) if (e.gh[i]===undefined || e.gh[i]===0) e.gh[i] = e.gh[i-1];
										
					var nl = new Array(e.rl.length),
						ix = 0,						
						sl;					
					e.tabw = e.tabhide>=pw ? 0 : e.tabw;
					e.thumbw = e.thumbhide>=pw ? 0 : e.thumbw;
					e.tabh = e.tabhide>=pw ? 0 : e.tabh;
					e.thumbh = e.thumbhide>=pw ? 0 : e.thumbh;					
					for (var i in e.rl) nl[i] = e.rl[i]<window.innerWidth ? 0 : e.rl[i];
					sl = nl[0];									
					for (var i in nl) if (sl>nl[i] && nl[i]>0) { sl = nl[i]; ix=i;}															
					var m = pw>(e.gw[ix]+e.tabw+e.thumbw) ? 1 : (pw-(e.tabw+e.thumbw)) / (e.gw[ix]);					

					newh =  (e.type==="carousel" && e.justify==="true" ? e.gh[ix] : (e.gh[ix] * m)) + (e.tabh + e.thumbh);
				}			
				
				if(window.rs_init_css===undefined) window.rs_init_css = document.head.appendChild(document.createElement("style"));					
				document.getElementById(e.c).height = newh;
				window.rs_init_css.innerHTML += "#"+e.c+"_wrapper { height: "+newh+"px }";				
			} catch(e){
				console.log("Failure at Presize of Slider:" + e)
			}					   
		  };</script>
  </head>

  <body>
  
<a name="top-page"></a>
<div class="always-top">


<div class="top-wrapper">
      <div class="container">
        <div class="masthead">
        
        <ul class="nav pull-right top-small">
          <!--<li><span><i class="icon-phone"></i> (021) 29119028 - 29119029</span></li>
          <li><a href="mailto:cs@magnetpro.co.id"><i class="icon-envelope"></i> cs@magnetpro.co.id</a></li>-->
                    <li><a href="index3.php?m=masuk&id=<?=$id?>"><span class="label alert-danger"><i class="icon-user"></i> LOGIN</span></a></li>
		  <li><a href="index2.php?m=join&id=<?= $id; ?>"><span class="label label-success"><i class="icon-pencil"></i> MENDAFTAR</span></a></li>
          </ul>
        
                
        
                <ul class="breadcrumb nav pull-right"><li><a href='index.php?m=depan&id=<?=$id?>'>Beranda</a></li></ul>        </div>
      </div> <!-- /.container -->
</div>
<div class="head-wrapper">
    <div class="container">
        <div class="row">
            <div class="span12"> 
               <a class="logo pull-left" href="#"><img src="gambar/logo.png" alt="Logo" /></a> 
                <a class="logo-over pull-left" href="#"><img src="templates/bootstrap2-responsive/assets/img/logo-over.html" alt="Logo" /></a>
                
                                <div class="pull-right">
                <div class="lang_menu_wrapper">
                   <div class="btn-group">
                  </div>
                </div>
                </div>
                                
                <div class="navbar pull-left">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target="#main-top-menu">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                
                    <ul class="nav navbar-nav nav-collapse collapse navbar-main" id="main-top-menu" role="navigation">
<li class="active"><a href="index.php?m=depan&id=<?=$id?>" ><img src="templates/bootstrap2-responsive/assets/img/home-icon.png" alt="Beranda" /></a></li>
<li><a href="index2.php?m=tentang-kami&id=<?=$id?>" >Tentang Kami</a></li>
<li><a href="produk.php?m=produk&id=<?=$id?>" >Produk</a></li>
<li><a href="index2.php?m=system&id=<?=$id?>" >Marketing Plan</a></li>
<li><a href="index2.php?m=testimony&id=<?=$id?>" >Testimony</a></li>
<li><a href="index2.php?m=contact&id=<?=$id?>" >Kontak</a></li>
<li><a href="index2.php?m=join&id=<?= $id; ?>" >Daftar</a></li>
</ul>

                </div><!-- /.navbar -->
            </div>  
        </div> 
        
    </div>  
</div>



</div>
<div class="wrap-map" id="wrap-map-1">
    <div class="carousel slide">
        
    <div class="container">    </div>
    
    <!-- START HomeBC 1 1 REVOLUTION SLIDER 6.1.6 --><p class="rs-p-wp-fix"></p>
			<rs-module-wrap id="rev_slider_5_1_wrapper" data-alias="home-bc-1-1" data-source="gallery" style="background:transparent;padding:0;margin:0px auto;margin-top:0;margin-bottom:0;">
				<rs-module id="rev_slider_5_1" style="display:none;" data-version="6.1.6">
					<rs-slides>
						<rs-slide data-key="rs-21" data-title="Slide" data-thumb="assets/Slider-1-Heros-copy-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-1-Heros-copy.jpg" title="Slider 1 Heros copy" width="1452" height="727" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-23" data-title="Slide" data-thumb="assets/Slider-2-Heros-copy-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-2-Heros-copy.jpg" title="Slider 2 Heros copy" width="1452" height="727" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-24" data-title="Slide" data-thumb="assets/Slider-3-Heros-copy-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-3-Heros-copy.jpg" title="Slider 3 Heros copy" width="1452" height="727" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-25" data-title="Slide" data-thumb="assets/Slider-4-Heros-copy-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-4-Heros-copy.jpg" title="Slider 4 Heros copy" width="1452" height="727" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-26" data-title="Slide" data-thumb="assets/Slider-5-Heros-copy-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-5-Heros-copy.jpg" title="Slider 5 Heros copy" width="1452" height="727" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-27" data-title="Slide" data-thumb="assets/Slider-6-Heros-copy-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-6-Heros-copy.jpg" title="Slider 6 Heros copy" width="1452" height="727" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-28" data-title="Slide" data-thumb="assets/Slider-7-Heros-copy-scaled-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-7-Heros-copy-scaled.jpg" title="Slider 7 Heros copy" width="2560" height="1278" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
						<rs-slide data-key="rs-22" data-title="Slide" data-thumb="assets/Slider-8-Heros-copy-scaled-100x50.jpg" data-anim="ei:d;eo:d;s:1000;r:0;t:fade;sl:d;">
							<img src="assets/Slider-8-Heros-copy-scaled.jpg" title="Slider 8 Heros copy" width="2560" height="1281" class="rev-slidebg" data-no-retina>
<!---->						</rs-slide>
					</rs-slides>
					<rs-progress class="rs-bottom" style="visibility: hidden !important;"></rs-progress>
				</rs-module>
		<script type="text/javascript">
		if(typeof revslider_showDoubleJqueryError === "undefined") {
			function revslider_showDoubleJqueryError(sliderID) {
				var err = "<div class='rs_error_message_box'>";
				err += "<div class='rs_error_message_oops'>Oops...</div>";
				err += "<div class='rs_error_message_content'>";
				err += "You have some jquery.js library include that comes after the Slider Revolution files js inclusion.<br>";
				err += "To fix this, you can:<br>&nbsp;&nbsp;&nbsp; 1. Set 'Module General Options' -> 'Advanced' -> 'jQuery & OutPut Filters' -> 'Put JS to Body' to on";
				err += "<br>&nbsp;&nbsp;&nbsp; 2. Find the double jQuery.js inclusion and remove it";
				err += "</div>";
			err += "</div>";
				jQuery(sliderID).show().html(err);
			}
		}
		</script>
			</rs-module-wrap>
			<!-- END REVOLUTION SLIDER -->

				<script type="text/javascript">
					
					var	revapi5,
						tpj;
					jQuery(function() {
						tpj = jQuery;
						if(tpj("#rev_slider_5_1").revolution == undefined){
							revslider_showDoubleJqueryError("#rev_slider_5_1");
						}else{
							revapi5 = tpj("#rev_slider_5_1").show().revolution({
								jsFileLocation:"js/",
								sliderLayout:"fullwidth",
								duration:"3000ms",
								visibilityLevels:"1240,1024,778,480",
								gridwidth:"1240,1024,778,480",
								gridheight:"662,613,810,483",
								editorheight:"662,613,810,483",
								responsiveLevels:"1240,1024,778,480",
								disableProgressBar:"on",
								navigation: {
									mouseScrollNavigation:false,
									touch: {
										touchenabled:true
									},
									arrows: {
										enable:true,
										style:"hesperiden",
										left: {
											h_offset:0
										},
										right: {
											h_offset:0
										}
									}
								},
								fallbacks: {
									allowHTML5AutoPlayOnAndroid:true
								},
							});
						}
						
					});
				</script>
<!-- STYLE -->				<style type="text/css">.custom.tparrows{width:45px !important;  height:120px !important;  background:rgba(16,16,25,0.5 ) !important;border-radius:0px}.custom.tparrows:hover{background:#101019 !important}.custom.tparrows:before{font-family:"revicons";  font-size:15px;  color:#fff;  display:block;  line-height:40px;  text-align:center}.custom.tp-rightarrow{-webkit-transform:rotate(180deg);  -moz-transform:rotate(180deg);  -ms-transform:rotate(180deg);  -o-transform:rotate(180deg);  transform:rotate(180deg)}.custom.tp-leftarrow:before,.custom.tp-rightarrow:before{content:'' !important;  position:absolute;  top:50%;  left:70%;  width:30px;  height:30px;  border-top:1px solid #FFF;  border-left:1px solid #FFF;  -webkit-transform:translate3d(-50%,-50%,0) rotate(-45deg);  -moz-transform:translate3d(-50%,-50%,0) rotate(-45deg);  -ms-transform:translate3d(-50%,-50%,0) rotate(-45deg);  -o-transform:translate3d(-50%,-50%,0) rotate(-45deg);  transform:translate3d(-50%,-50%,0) rotate(-45deg)}.custom.tp-leftarrow:after,.custom.tp-rightarrow:after{content:'';  display:block;  position:absolute;  left:106%;  top:50%;  width:70px;  border-top:1px solid #FFF;  -webkit-transform:translate3d(-50%,-50%,0);  -moz-transform:translate3d(-50%,-50%,0);  -ms-transform:translate3d(-50%,-50%,0);  -o-transform:translate3d(-50%,-50%,0);  transform:translate3d(-50%,-50%,0)}@media (max-width:767px){.custom.tparrows{width:30px !important;height:90px !important}.custom.tp-leftarrow:before,.custom.tp-rightarrow:before{width:20px;  height:20px}.custom.tp-leftarrow:after,.custom.tp-rightarrow:after{width:50px}}</style><!-- /STYLE --><!-- STYLE -->				<style type="text/css">#rev_slider_5_1_wrapper .hesperiden.tparrows{cursor:pointer;background:rgba(0,0,0,0.5);width:40px;height:40px;position:absolute;display:block;z-index:1000;  border-radius:50%}#rev_slider_5_1_wrapper .hesperiden.tparrows:hover{background:#000000}#rev_slider_5_1_wrapper .hesperiden.tparrows:before{font-family:'revicons';font-size:20px;color:#ffffff;display:block;line-height:40px;text-align:center}#rev_slider_5_1_wrapper .hesperiden.tparrows.tp-leftarrow:before{content:'\e82c';  margin-left:-3px}#rev_slider_5_1_wrapper .hesperiden.tparrows.tp-rightarrow:before{content:'\e82d';  margin-right:-3px}</style><!-- /STYLE -->

<div class="wrap-search">
    <div class="container">
 
        
        <div class="search-form">
            <form action="cari-produk.php?m=&id=<?=$id?>" method="post">
                <input id="rectangle_ne" type="text" class="hide" />
                <input id="rectangle_sw" type="text" class="hide" />
            
                <!-- [START] TreeSearch -->
                                <!-- [END] TreeSearch -->
            
                <select id="search_option_2" class="span3 selectpicker" name="kategorynya" placeholder="Kategory Produk">
                    <option value="">Kategory</option>
<option value="57" >Product Best Seller</option>
<option value="58" >Peralatan rumah tangga</option>
<option value="59" >Kesehatan dan Kecantikan</option>
<option value="60" >Peralatan Olahraga</option>
<option value="61" >Peralatan elektronik</option>
                </select>
            <!--<select id="search_option_3" class="span3 selectpicker nomargin" placeholder="Luas Bangunan">
                    <option value="">Luas Bangunan</option><option value="" selected="selected"></option>
                </select>-->
			
			  <div class="advanced-form-part">

                 <button id="search-start" type="submit" class="btn btn-info btn-medium">&nbsp;&nbsp;Lihat Produk&nbsp;&nbsp;<!--<input id="search_option_19" type="text" class="span3 Bathrooms INTEGER" placeholder="Kamar Mandi"  value="" />
                <input id="search_option_20" type="text" class="span3 INTEGER" placeholder="Kamar Tidur"  value="" />
                <div class="form-row-space"></div>
                                                <label class="checkbox">
                <input id="search_option_11" type="checkbox" class="span1" value="true{options_name_11}" />{options_name_11}
                </label>
                <label class="checkbox">
                <input id="search_option_22" type="checkbox" class="span1" value="true{options_name_22}" />{options_name_22}
                </label>
                <label class="checkbox">
                <input id="search_option_25" type="checkbox" class="span1" value="true{options_name_25}" />{options_name_25}
                </label>
                <label class="checkbox">
                <input id="search_option_27" type="checkbox" class="span1" value="true{options_name_27}" />{options_name_27}
                </label>
                <label class="checkbox">
                <input id="search_option_28" type="checkbox" class="span1" value="true{options_name_28}" />{options_name_28}
                </label>
                <label class="checkbox">
                <input id="search_option_29" type="checkbox" class="span1" value="true{options_name_29}" />{options_name_29}
                </label>
                <label class="checkbox">
                <input id="search_option_32" type="checkbox" class="span1" value="true{options_name_32}" />{options_name_32}
                </label>
                <label class="checkbox">
                <input id="search_option_30" type="checkbox" class="span1" value="true{options_name_30}" />{options_name_30}
                </label>
                <label class="checkbox">
                <input id="search_option_33" type="checkbox" class="span1" value="true{options_name_33}" />{options_name_33}
                </label>-->
                </button>
                </div>
				
                <br style="clear:both;" />
                <!--<div id="tags-filters">
                </div>-->
				<!--<button id="search-start" type="submit" class="btn btn-info btn-large">&nbsp;&nbsp;Cari&nbsp;&nbsp;</button>
                <a id="search-start-map" href="#wrap-map" class="scroll"><button type="button" class="btn btn-success btn-large">Tunjukkan di peta</button></a>
                <img id="ajax-indicator-1" src="http://www.magnetpro.co.id/templates/bootstrap2-responsive/assets/img/ajax-loader.gif" />-->
				
				
				
                                
                <img id="ajax-indicator-1" src="templates/bootstrap2-responsive/assets/img/ajax-loader.gif" />
            </form>
        </div>


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




<div class="wrap-content">
<div class="container">
    <div class="row-fluid">
        <div class="span12">
            <div class="results-properties-list with-sidebar">
    

    <br style="clear:both;" />

    <div class="row-fluid">
        

                <ul class="thumbnails">       
				     

<?
$batas   = 12;
$halaman = $_GET['halaman'];
if(empty($halaman)){
	$posisi  = 0;
	$halaman = 1;
}
else{
	$posisi = ($halaman-1) * $batas;
}

$db->select("id, catid, kode, nama, deskripsi, harga, gambar, published, created, file, hit, expire", "product",  "published=1", "id desc LIMIT $posisi,$batas");

if($db->num_rows() > 0) {
	//echo $db->result(0, "maintext");
	while($row = $db->fetch_row()) {
	$adafoto = $row[6];
	    echo "<li class='span3 li-grid'>";
	    echo "<div class='thumbnail f_-'>";
		
		
		//echo "<div class='author'><em>Oleh: $row[2]</em></div>";
		echo "<div class='isi'><font color='#282D3A'><a href=index2.php?m=best-seller&nid=$row[0]&id=$id><h3>$row[3]</h3></a></font></div>";
		if ($adafoto !=''){
		echo "<img alt='Image' data-src='holder.js/300x200' src='images/news/".$row[6]."'  alt=''/>";
		}
		else
		{
		echo "<a href=index2.php?m=best-seller&amp;page=detil&amp;pid=<?= $data[0]; ?>&amp;id=<?= $id; ?><div class='img'><img src='images/noimage.jpg' width=300 height=200 border=0></a></div>";
		} 
		// Tampilkan hanya sebagian isi berita 
		echo "<div class='purpose-badget fea_-'>Rp. $row[5]</div>
		";
				echo "<a href='index2.php?m=best-seller&page=detil&pid=$row[0]&id=$id' class='over-image'> </a>";
		echo "
		<div class='caption'>";
		echo "<a class='btn btn-info' href='index2.php?m=best-seller&page=detil&pid=$row[0]&id=$id'>Detail </span>";
		
		echo "<a class='btn btn-info' href='index3.php?m=masuk&pid=$row[0]&id=$id'>Beli</a></p>";

			}	
} else {
	echo "<p>&nbsp;</p><p align=center>Belum ada Produk <?= $db->dataku('nama', $id); ?></p><p>&nbsp;</p>";
}	

?>                            
      </div>
    </div>
  </li>        </ul><ul class="thumbnails"></ul>        
      </div>
<div align="center">  
     <? 
	 $tampil2 = mysql_query("SELECT * FROM product WHERE published='1'");
$jmldata = mysql_num_rows($tampil2);
$jmlhal  = ceil($jmldata/$batas);
	 echo "<div class=paging>";
echo "</div>";
if($halaman > 1){
	$prev=$halaman-1;
	echo "<span class=prevnext><a href=$_SERVER[PHP_SELF]?m=best-seller&halaman=$prev&id=$id>Prev</a></span> ";
}
else{ 
	echo "<span class=disabled>Prev</span> ";
}

// Tampilkan link halaman 1,2,3 ...
for($i=1;$i<=$jmlhal;$i++)
if ($i != $halaman){
	echo " <a href=$_SERVER[PHP_SELF]?m=best-seller&halaman=$i&id=$id>$i</a> ";
}
else{
	echo " <span class=current>$i</span> ";
}

// Link kehalaman berikutnya (Next)
if($halaman < $jmlhal){
	$next=$halaman+1;
	echo "<span class=prevnext><a href=$_SERVER[PHP_SELF]?m=best-seller&halaman=$next&id=$id>Next</a></span>";
}
else{ 
	echo "<span class=disabled>Next</span>";
}
echo "</div>";
echo "<br>";
echo "<div align='center'>Total : <b>$jmldata</b> Produk</div></p>";
?>
</div>	
    </div>
</div>        </div>
    </div>
</div>
</div>
<div class="wrap-content2">
    <div class="container defaultcontent">
        <br>
    </div>
</div>

    
<div class="wrap-bottom">
    <div class="container">
      <div class="row-fluid footer-row">
          <div class="span3">
    <div class="logo-transparent">
     <a class="logo" href="#"><img src="gambar/logo.png" alt="Logo Footer" /></a>  
    </div>
    <div class="sketch-bottom visible-desktop">
    </div>
</div>          
          <div class="span3">
    <br />
    <table>
        <tr>
            <td></td>
            <td>
                <b>INFO TERBARU</b><br />
<marquee direction="up" height="150" loop="true" scrollamount="3" style="CURSOR:default" onMouseOver="this.stop()" onMouseOut="this.start()">
                      <span class="mbr-contacts__text"><span class="cc01 style19  style15">
                      <?
$batas   = 2;
$halaman = $_GET['halaman'];
if(empty($halaman)){
	$posisi  = 0;
	$halaman = 1;
}
else{
	$posisi = ($halaman-1) * $batas;
}

$db->select("id_berita, id_user, judul, isi_berita, gambar, tanggal, counter, published", "berita", "published=1", "id_berita desc LIMIT $posisi,$batas");

if($db->num_rows() > 0) {
	//echo $db->result(0, "maintext");
	while($row = $db->fetch_row()) {
	$adafoto = $row[4];
	    echo "<table>";
	    echo "<tr><td>";
		echo "<div class='isi'><font color='#FFF' size='2'>post: $row[5]</font></div>";
		echo "<div class='isi'><font color='#FFF'size='2'>berita ini telah dibaca: $row[6] kali</font></div>";
		//echo "<div class='author'><em>Oleh: $row[2]</em></div>";
		echo "<br>";
		echo "<div class='isi'><font color='#FFF'size='2'><a href=index2.php?m=detailberita&nid=$row[0]&id=$id><font color='#FFF'size='2'>$row[2]</a></font></div>";
		echo "<br>";
		if ($adafoto !=''){
		echo "<a href=index2.php?m=detailberita&nid=$row[0]&id=$id><img class='img' src='images/news/".$row[4]."' width=40 height=40 hspace=10 border=0 align=left></a></div>";
		}
		else
		{
		echo "<a href=index2.php?m=detailberita&nid=$row[0]&id=$id><div class='img'><img src='images/noimage.jpg' width=40 height=40 hspace=10 border=0 align=left></a></div>";
		} 
		// Tampilkan hanya sebagian isi berita 
  	  	$isi_berita = nl2br($row[3]);
    	$isi = substr($isi_berita,0,400); // ambil sebanyak 410 karakter
   		 $isi = substr($isi_berita,0,strrpos($isi," ")); // spasi antar kalimat 
		echo "<div class='isi'><font color='#FFF'size='2'>$isi ...</font color='#FFF'size='2'><a href=index2.php?m=detailberita&nid=$row[0]&id=$id><font color='#FFF'size='2'>Selengkapnya</a></div>";
		echo "</td></tr></table>";
		echo "<div><hr width=100% size=1 color=#FFF size='2'></div>";
			}	
} else {
	echo "<p>&nbsp;</p><p align=center>Belum ada berita</p><p>&nbsp;</p>";
}	
$tampil2 = mysql_query("SELECT * FROM berita");
$jmldata = mysql_num_rows($tampil2);
$jmlhal  = ceil($jmldata/$batas);
echo "<div class=paging>";
echo "</div>";
if($halaman > 1){
	$prev=$halaman-1;
	echo "<span class=prevnext><a href=$_SERVER[PHP_SELF]?m=berita&halaman=$prev&id=$id>Prev</a></span> ";
}
else{ 
	echo "<span class=disabled>Prev</span> ";
}

// Tampilkan link halaman 1,2,3 ...
for($i=1;$i<=$jmlhal;$i++)
if ($i != $halaman){
	echo " <a href=$_SERVER[PHP_SELF]?m=berita&halaman=$i&id=$id>$i</a> ";
}
else{
	echo " <span class=current>$i</span> ";
}

// Link kehalaman berikutnya (Next)
if($halaman < $jmlhal){
	$next=$halaman+1;
	echo "<span class=prevnext><a href=$_SERVER[PHP_SELF]?m=berita&halaman=$next&id=$id>Next</a></span>";
}
else{ 
	echo "<span class=disabled>Next</span>";
}
echo "</div>";
echo "<br>";
echo "<p align=center><div class='isi1'>Total : <b>$jmldata</b> Berita</div></p>";
?>
                      </span></span>
              </marquee>
        </tr>
    </table>
</div>     
<div class="span3">
    <br />
    <table>
        <tr>
            <td></i></td>
            <td>
                <b>MEMBER BARU</b><br />
<marquee direction="up" height="150" loop="true" scrollamount="3" class="style6" style="CURSOR:default" onMouseOver="this.stop()" onMouseOut="this.start()">
                    <span class="mbr-contacts__text">
                    <?= $db->newmember(1, "home"); ?>
                    </span>                    </marquee>
        </tr>
    </table>
</div>         
 <div class="span3">
    <a class="to-top" href="#top-page">SPONSOR</a>
	<br /><br /><br />
<ul>
                      <li>Username: <span class="bank"><span class="style5">
                        <?= $db->dataku("username", $ref); ?>
                      </span></span> </li>
                      <li>Nama: 
                        <?= $db->dataku("nama", $id); ?> 
                      </li>
                      <li>Kota: 
                        <?= $db->dataku("kota", $id); ?> 
                      </li>
					  <li>Telp/hp: 
                        <?= $db->dataku("hp", $id); ?> 
                      </li>
                      <li>WhatsApp: 
          <a href="https://wa.me/<?= $db->dataku("ym", $id); ?>"><img src="Chat-via-whatsapp.png" width="100" height="25" border="0"></a>                        
</ul>
					
<script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
<script type="text/javascript" src="../s7.addthis.com/js/300/addthis_widget.js#pubid=sandiwinter"></script>

    </div>
</div>      </div>
    </div>
    <!-- Generate time: 3.4575259685516, version: 1.5.8 -->
</div>






<style>
.wrap-search {
    background-image: url('gambar/bg_atas.jpg');   
}
</style>



<!-- The Gallery as lightbox dialog, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
    <div class="slides"></div>
    <h3 class="title"></h3>
    <a class="prev">‹</a>
    <a class="next">›</a>
    <a class="close">×</a>
    <a class="play-pause"></a>
    <ol class="indicator"></ol>
</div>

<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-683342-5']);  _gaq.push(['_trackPageview']);  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</script> 
  </body>
</html>