	<?php
	$tmp = $thisUrl."adm1n/functions/php_functions.php";
	include ($tmp);

	$id = $_REQUEST["id"];
    if ($id) {
		include ("exhibitor_list_detil.php");
	} else {
		$dis_produk = '';
		$ctr=0;
		$sql = "select * from exhibitor_list order by companyName";
		$max = mysql_num_rows(mysql_query($sql));
		$perhalaman = 9;
		$page = $_SESSION['page'];
		if (!$page) $page = $_REQUEST["page"];
		if ($page){
			$start=($page - 1) * $perhalaman;
		} else {
			$start=0;
		}
	
		$sql .= " LIMIT $start, $perhalaman";
		if ($hasil = mysql_query($sql)) {
			while ($data = mysql_fetch_array($hasil)) {
				if ($ctr%3 == 0) {
					if ($ctr>0) {
						$dis_produk .= '		
											</div>
										</div>	
									</div>
								</div>
							</div>
						</section>
						<section class="M00601 M0060101 teaserModule layout-centered" data-modul="M00601" style="background-color:#fff;">
							<div class="col l-col12 m-col12 s-col12">
								<div class="col l-col12 m-col12 s-col12">
									<div style="height:30px"></div>
								</div>
							</div>
						</section>';
					}
					$dis_produk .= '
					<section style="clear:both" class="M00601 M0060101 teaserModule layout-centered" data-modul="M00601">
						<div class="row">
							<div class="rowInner">
								<div class="col s-col12 m-col12 l-col12">
									<div class="s-nested12 m-nested12 l-nested12">
										<div class="teasers">
										';		
				}			
				$dis_produk .= '			<div class="col l-col4 m-col12 s-col12" style="min-height:205px; padding:0; background-color:#f1f1f1; margin-bottom:15px; border-bottom:2px solid #999999">
												<article class="teaser-item">
													<a href="'.$thisPage.$curPage.'?id='.$data["exhibitorID"].'" data-teaserId="M00601" title="">';
														
														/**
														$dis_produk .= '       
														<div class="teaserImageBlock">
															<img class="teaserImage" src="'.$data["targetPage"].'/images/'.$data["gambar1"].'" alt="" title="" />
														</div>';
														**/
														
														$dis_produk .= '
														<div class="teaserTextBlock" style="text-align:center; padding-top:16px; margin:0">
															<div style="min-height:308px;">
																<div style="min-height:208px;">';
																	$sql2 = "select * from exhibitor_list_products, exhibitor_list_image 
																			 where exhibitor_id='".$data["exhibitorID"]."' and listProductID = productID limit 0,1 ";
																	//echo $sql2;		 
																	if ($hasil2 = mysql_query($sql2)) {
																		if (mysql_num_rows($hasil2)) {
																			while ($data2 = mysql_fetch_array($hasil2)) {
																				$imageName = $thisPage.'product_image/'.$data["exhibitorID"].'/'.$data2["productID"].'/'.$data2["imageName"];
																				$dis_produk .= '
																				<img style="max-height:188px;" src="'.$imageName.'" border="0" />';
																			}
																		} else {
																			$dis_produk .= '
																			<img style="max-height:188px;" src="'.$thisPage.'images/no-image-slide.png" border="0">';
																		}
																	}
																$dis_produk .= '
																</div>
																<h3 style="line-height:normal">'.strtoupper($data["companyName"]).'</h3>
																<p>';
																	$standNumber = '';
																	$sql2 = "select * from exhibitor_list_hallstand, form_element_value where valueID = to_hall_id and to_exhibitor_id = '".$data["exhibitorID"]."'";
																	if ($hasil2 = mysql_query($sql2)) {
																		while ($data2 = mysql_fetch_array($hasil2)) {
																			$standNumber .= '
																			Hall: '.$data2["valueName"]."<br>";
																			$standNumber .= '
																			Stand: '.$data2["standNumber"]."<br>";
																		}
																	}
																	$dis_produk .= $standNumber;	
																$dis_produk .= '
																</p>
															</div>';
															$dis_produk .= '
															<div align="center" style="margin-top:30px; margin-bottom:0">
																<div id="box-detail">view detail</div>
															</div>
														</div>
													</a>
												</article>
											</div>'; $ctr++;
			} 
			if ($dis_produk != '') {
				$dis_produk .= '		</div>
									</div>	
								</div>
							</div>
						</div>
					</section>
					<section class="M00601 M0060101 teaserModule layout-centered" data-modul="M00601">
						<div class="hide-for-small col l-col12 m-col12 s-col12" style="background-color:#fff;">
							<div class="col l-col12 m-col12 s-col12"></div>
							<div style="height:30px"></div>
						</div>
					</section>
				';
			}
		}
		
		
		echo '
		<input type="text" size="100" />
		<div style="height:30px"></div>
		';		
		
		echo $dis_produk;		
		echo '
		<section class="M00601 M0060101 teaserModule layout-centered" data-modul="M00601" style="background-color:#fff;">
			<div class="col l-col12 m-col12 s-col12">
				<div class="teasers">';
				$tmp = $thisUrl."functions/fungsi_paging.php";
				include($tmp);
				halaman($max, $perhalaman, 3, "?");
				echo '
				</div>
			</div>
			<div style="height:60px"></div>
		</section>';
	}
    ?>
