PK

ADDRLIN : /home/anibklip/aelogifts.com/
FLL :
Current File : //home/anibklip/aelogifts.com/index.php

<?php
include "header.php";
?>
<!-- Home slider -->
<section class="p-0">
	<div class="slide-1 home-slider">
		<?php
		$query = "SELECT * from banners_site  ";
		$query = mysqli_query($conn, $query) or die(mysqli_error($conn));
		while ($rr = mysqli_fetch_array($query)) {
			?>
			<div>
				<a href="<?php echo $rr['link_url'];?>" class="home">
					<img src="images/slider/<?php echo $rr['pic'];?>" alt="" class="bg-img lazyload">
				</a>
			</div>
			<?php
		}
		?>
		<!-- <div>
			<a href="#" class="home">
				<img src="images/slider/2.png" alt="" class="bg-img lazyload">
			</a>
		</div> -->
	</div>
</section>
<!-- Home slider end -->

<?php /* ?>
<!-- collection banner -->
<section class="pb-0 banner-section">
	<div class="container">
		<div class="row partition2">
			<div class="col-md-6">
				<a href="category-page.html" class="collection-banner">
					<img src="images/banner/1.png" class="img-fluid lazyload" alt="">
				</a>
			</div>
			<div class="col-md-6">
				<a href="category-page.html" class="collection-banner">
					<img src="images/banner/2.png" class="img-fluid lazyload" alt="">
				</a>
			</div>
		</div>
	</div>
</section>
<!-- collection banner end -->
<?php */ ?>

<!-- Paragraph-->
<div class="title1 section-t-space">
	<h4>special offer</h4>
	<h2 class="title-inner1">Featured Products</h2>
</div>

<?php /* ?>
<div class="container">
	<div class="row">
		<div class="col-lg-6 offset-lg-3">
			<div class="product-para">
				<p class="text-center">Looking for the latest trends in clothing, shoes and accessories? Welcome to our 'Latest Drops' edit, bringing you all the latest styles from all your fave brands.</p>
			</div>
		</div>
	</div>
</div>
<?php */ ?>
<!-- Paragraph end -->

<section class="section-b-space ratio_asos">
	<div class="container">
		<div class="product-4 product-m arrow">
			<?php
			//$query="select * from prd where dprice >0 and shw_home=1 order by rand() limit 4";
			$query="SELECT p.*, ct.bname as cname from prd as p
				LEFT JOIN cate as ct ON ct.ctid = p.ctid
				where p.stock_qty>0 and p.status=1 and p.shw_home=1 order by rand() limit 12
			";
			$q = mysqli_query($conn, $query) or die(mysqli_error($conn));
			while ($row = mysqli_fetch_array($q)) {
				$prd_lnk = "product_details.php?pid=$row[pid]&pname=$row[pname]&cname=$cname";
				// $prd_lnk="$row[txt]";

				$pid = $row['pid'];
				$pname = substr($row['pname'], 0, 27);
				if (strlen($row['pname']) > 27) {
					$pname .= "...";
				}
				$cname		= $row['cname'];
				$picname	= $row['pic1'];
				$dprice		= $row['dprice'];
				$price		= $row['price'];
				$pname_full	= $row['pname'];

				if($price > 0){
					$diff = $price - $dprice;
					$perc = ($diff/$price) * 100;
					$perc = number_format($perc, 0);
				}
				?>
				<div class="basic-product theme-product-1">
					<div class="overflow-hidden">
						<div class="img-wrapper">
							<a href="<?php echo $prd_lnk;?>">
								<img src="products/<?php echo $picname;?>" class="img-fluid blur-up lazyload" alt="">
							</a>
						</div>
						<div class="product-detail">
							<div>
								<div class="brand-w-color">
									<a class="product-title" href="<?php echo $prd_lnk;?>">
										<?php echo $pname;?>
									</a>
								</div>
								<h6><?php echo $cname;?></h6>
								<h4 class="price">
									<i class="fas fa-rupee-sign"></i> <?php echo $dprice; ?>
									<?php
									if ($price > 0) {
										?>
										<del><?php echo $price ?></del>
										<span class="discounted-price"> <?php echo $perc ?>% Off</span>
										<?php
									}
									?>
								</h4>
							</div>
						</div>
					</div>
				</div>
				<?php
			}
			?>
		</div>
	</div>
</section>

<div class="title1 section-t-space-">
	<h2 class="title-inner1">Videos</h2>
</div>
<section class="section-b-space- ratio_asos">
	<div class="container">
		<div class="row">
			<?php
			include "youtube.class.php";

			$orderby=" order by video_id desc ";
			$query="SELECT * from videos $orderby LIMIT 4";
			// echo "$query <br>";
			
			$query=mysqli_query($GLOBALS["conn"], $query) or die(mysqli_error($GLOBALS["conn"]));
			while($gr=mysqli_fetch_array($query)){
				$gr['url'] = str_replace("https://www.youtube.com/shorts/", "https://www.youtube.com/watch?v=", $gr['url']);
				$gr['url'] = str_replace("https://youtube.com/shorts/", "https://www.youtube.com/watch?v=", $gr['url']);
				$jutjub = new YouTube("$gr[url]");
				?>
				<!-- <div style="float:left; margin:6px; text-align:center; height:250px; width:31%;"> -->
				<div class="col-md-3 text-center" style="box-shadow: 7px 7px 18px -7px rgba(0,0,0,0.75);">
					<a data-fancybox href="<?php echo $gr['url']?>" class=""><img class="example-image thumbnail" style="width: 100%;" src="<?php echo $jutjub->ShowImgSrc("default");?>" /></a>
					<p class="text-left" style="min-height:51px;"><?php echo $gr['titl']?><br /><br /></p>
				</div>
				<?php
			}
			?>
		</div>
	</div>
</section>

<?php /* ?>
<!-- Product slider -->
<section class="section-b-space pt-0 ratio_asos">
	<div class="container">
		<div class="g-3 g-md-4 row row-cols-2- row-cols-sm-2 row-cols-md-3 row-cols-xl-4">
			<?php
			//$query="select * from prd where dprice >0 and shw_home=1 order by rand() limit 4";
			$query="SELECT p.*, ct.bname as cname from prd as p
				LEFT JOIN cate as ct ON ct.ctid = p.ctid
				where p.stock_qty>0 and p.status=1 and p.shw_home=1 order by rand() limit 8
			";
			$q=mysqli_query($conn, $query) or die(mysqli_error($conn));
			while ($row=mysqli_fetch_array($q)){
				$prd_lnk="product_details.php?pid=$row[pid]&pname=$row[pname]&cname=$cname";
				// $prd_lnk="$row[txt]";
				
				$pid=$row['pid'];
				$pname=substr($row['pname'],0,27);
				if(strlen($row['pname'])>27){
					$pname.="...";
				}
				$cname		= $row['cname'];
				$picname	= $row['pic1'];
				$dprice		= $row['dprice'];
				$price		= $row['price'];
				$pname_full	= $row['pname'];

				prd_thumb_div($pid, $prd_lnk, $pname, $picname, $dprice, $price, $cname, $pname_full='');
			}
			?>
		</div>
	</div>
</section>
<!-- Product slider end -->
<?php */ ?>

<div class="title1 section-t-space">
	<h4>exclusive products</h4>
	<h2 class="title-inner1">Latest Products</h2>
</div>
<section class="section-b-space ratio_asos">
	<div class="container">
		<div class="product-4 product-m arrow">
			<?php
			$query="SELECT p.*, ct.bname as cname from prd as p
				LEFT JOIN cate as ct ON ct.ctid = p.ctid
				where p.stock_qty>0 and p.status=1 order by pid desc limit 12
			";
			$q = mysqli_query($conn, $query) or die(mysqli_error($conn));
			while ($row = mysqli_fetch_array($q)) {
				$prd_lnk = "product_details.php?pid=$row[pid]&pname=$row[pname]&cname=$cname";
				// $prd_lnk="$row[txt]";

				$pid = $row['pid'];
				$pname = substr($row['pname'], 0, 27);
				if (strlen($row['pname']) > 27) {
					$pname .= "...";
				}
				$cname		= $row['cname'];
				$picname	= $row['pic1'];
				$dprice		= $row['dprice'];
				$price		= $row['price'];
				$pname_full	= $row['pname'];

				if($price > 0){
					$diff = $price - $dprice;
					$perc = ($diff/$price) * 100;
					$perc = number_format($perc, 0);
				}
				?>
				<div class="basic-product theme-product-1">
					<div class="overflow-hidden">
						<div class="img-wrapper">
							<a href="<?php echo $prd_lnk;?>">
								<img src="products/<?php echo $picname;?>" class="img-fluid blur-up lazyload" alt="">
							</a>
						</div>
						<div class="product-detail">
							<div>
								<div class="brand-w-color">
									<a class="product-title" href="<?php echo $prd_lnk;?>">
										<?php echo $pname;?>
									</a>

								</div>
								<h6><?php echo $cname;?></h6>
								<h4 class="price">
									<i class="fas fa-rupee-sign"></i> <?php echo $dprice; ?>
									<?php
									if ($price > 0) {
										?>
										<del><?php echo $price ?></del>
										<span class="discounted-price"> <?php echo $perc ?>% Off</span>
										<?php
									}
									?>
								</h4>
							</div>
						</div>
					</div>
				</div>
				<?php
			}
			?>
		</div>
	</div>
</section>

<?php /* ?>
<!-- full banner -->
<section class="pt-0">
	<a href="category-page.html">
		<img src="images/slider/home-banner.jpg" alt="" class="img-fluid lazyload">
	</a>
</section>
<!-- full banner end -->
<?php */ ?>

<?php /* ?>
<!-- service layout -->
<div class="container">
	<section class="service border-section small-section">
		<div class="row">
			<div class="col-md-4 service-block">
				<div class="media">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -117 679.99892 679">
						<path
							d="m12.347656 378.382812h37.390625c4.371094 37.714844 36.316407 66.164063 74.277344 66.164063 37.96875 0 69.90625-28.449219 74.28125-66.164063h241.789063c4.382812 37.714844 36.316406 66.164063 74.277343 66.164063 37.96875 0 69.902344-28.449219 74.285157-66.164063h78.890624c6.882813 0 12.460938-5.578124 12.460938-12.460937v-352.957031c0-6.882813-5.578125-12.464844-12.460938-12.464844h-432.476562c-6.875 0-12.457031 5.582031-12.457031 12.464844v69.914062h-105.570313c-4.074218.011719-7.890625 2.007813-10.21875 5.363282l-68.171875 97.582031-26.667969 37.390625-9.722656 13.835937c-1.457031 2.082031-2.2421872 4.558594-2.24999975 7.101563v121.398437c-.09765625 3.34375 1.15624975 6.589844 3.47656275 9.003907 2.320312 2.417968 5.519531 3.796874 8.867187 3.828124zm111.417969 37.386719c-27.527344 0-49.851563-22.320312-49.851563-49.847656 0-27.535156 22.324219-49.855469 49.851563-49.855469 27.535156 0 49.855469 22.320313 49.855469 49.855469 0 27.632813-22.21875 50.132813-49.855469 50.472656zm390.347656 0c-27.53125 0-49.855469-22.320312-49.855469-49.847656 0-27.535156 22.324219-49.855469 49.855469-49.855469 27.539063 0 49.855469 22.320313 49.855469 49.855469.003906 27.632813-22.21875 50.132813-49.855469 50.472656zm140.710938-390.34375v223.34375h-338.375c-6.882813 0-12.464844 5.578125-12.464844 12.460938 0 6.882812 5.582031 12.464843 12.464844 12.464843h338.375v79.761719h-66.421875c-4.382813-37.710937-36.320313-66.15625-74.289063-66.15625-37.960937 0-69.898437 28.445313-74.277343 66.15625h-192.308594v-271.324219h89.980468c6.882813 0 12.464844-5.582031 12.464844-12.464843 0-6.882813-5.582031-12.464844-12.464844-12.464844h-89.980468v-31.777344zm-531.304688 82.382813h99.703125v245.648437h-24.925781c-4.375-37.710937-36.3125-66.15625-74.28125-66.15625-37.960937 0-69.90625 28.445313-74.277344 66.15625h-24.929687v-105.316406l3.738281-5.359375h152.054687c6.882813 0 12.460938-5.574219 12.460938-12.457031v-92.226563c0-6.882812-5.578125-12.464844-12.460938-12.464844h-69.796874zm-30.160156 43h74.777344v67.296875h-122.265625zm0 0"
							fill="#ec8951" />
					</svg>
					<div class="media-body">
						<h4>free shipping</h4>
						<p>free shipping world wide</p>
					</div>
				</div>
			</div>
			<div class="col-md-4 service-block">
				<div class="media">
					<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
						id="Capa_1" x="0px" y="0px" viewBox="0 0 480 480" style="enable-background:new 0 0 480 480;"
						xml:space="preserve" width="512px" height="512px">
						<g>
							<g>
								<g>
									<path
										d="M472,432h-24V280c-0.003-4.418-3.588-7.997-8.006-7.994c-2.607,0.002-5.05,1.274-6.546,3.41l-112,160 c-2.532,3.621-1.649,8.609,1.972,11.14c1.343,0.939,2.941,1.443,4.58,1.444h104v24c0,4.418,3.582,8,8,8s8-3.582,8-8v-24h24 c4.418,0,8-3.582,8-8S476.418,432,472,432z M432,432h-88.64L432,305.376V432z"
										fill="#ec8951" />
									<path
										d="M328,464h-94.712l88.056-103.688c0.2-0.238,0.387-0.486,0.56-0.744c16.566-24.518,11.048-57.713-12.56-75.552 c-28.705-20.625-68.695-14.074-89.319,14.631C212.204,309.532,207.998,322.597,208,336c0,4.418,3.582,8,8,8s8-3.582,8-8 c-0.003-26.51,21.486-48.002,47.995-48.005c10.048-0.001,19.843,3.151,28.005,9.013c16.537,12.671,20.388,36.007,8.8,53.32 l-98.896,116.496c-2.859,3.369-2.445,8.417,0.924,11.276c1.445,1.226,3.277,1.899,5.172,1.9h112c4.418,0,8-3.582,8-8 S332.418,464,328,464z"
										fill="#ec8951" />
									<path
										d="M216.176,424.152c0.167-4.415-3.278-8.129-7.693-8.296c-0.001,0-0.002,0-0.003,0 C104.11,411.982,20.341,328.363,16.28,224H48c4.418,0,8-3.582,8-8s-3.582-8-8-8H16.28C20.283,103.821,103.82,20.287,208,16.288 V40c0,4.418,3.582,8,8,8s8-3.582,8-8V16.288c102.754,3.974,185.686,85.34,191.616,188l-31.2-31.2 c-3.178-3.07-8.242-2.982-11.312,0.196c-2.994,3.1-2.994,8.015,0,11.116l44.656,44.656c0.841,1.018,1.925,1.807,3.152,2.296 c0.313,0.094,0.631,0.172,0.952,0.232c0.549,0.198,1.117,0.335,1.696,0.408c0.08,0,0.152,0,0.232,0c0.08,0,0.152,0,0.224,0 c0.609-0.046,1.211-0.164,1.792-0.352c0.329-0.04,0.655-0.101,0.976-0.184c1.083-0.385,2.069-1.002,2.888-1.808l45.264-45.248 c3.069-3.178,2.982-8.242-0.196-11.312c-3.1-2.994-8.015-2.994-11.116,0l-31.976,31.952 C425.933,90.37,331.38,0.281,216.568,0.112C216.368,0.104,216.2,0,216,0s-0.368,0.104-0.568,0.112 C96.582,0.275,0.275,96.582,0.112,215.432C0.112,215.632,0,215.8,0,216s0.104,0.368,0.112,0.568 c0.199,115.917,91.939,210.97,207.776,215.28h0.296C212.483,431.847,216.013,428.448,216.176,424.152z"
										fill="#ec8951" />
									<path
										d="M323.48,108.52c-3.124-3.123-8.188-3.123-11.312,0L226.2,194.48c-6.495-2.896-13.914-2.896-20.408,0l-40.704-40.704 c-3.178-3.069-8.243-2.981-11.312,0.197c-2.994,3.1-2.994,8.015,0,11.115l40.624,40.624c-5.704,11.94-0.648,26.244,11.293,31.947 c9.165,4.378,20.095,2.501,27.275-4.683c7.219-7.158,9.078-18.118,4.624-27.256l85.888-85.888 C326.603,116.708,326.603,111.644,323.48,108.52z M221.658,221.654c-0.001,0.001-0.001,0.001-0.002,0.002 c-3.164,3.025-8.148,3.025-11.312,0c-3.125-3.124-3.125-8.189-0.002-11.314c3.124-3.125,8.189-3.125,11.314-0.002 C224.781,213.464,224.781,218.53,221.658,221.654z"
										fill="#ec8951" />
								</g>
							</g>
						</g>
					</svg>
					<div class="media-body">
						<h4>24 X 7 service</h4>
						<p>online service for new customer</p>
					</div>
				</div>
			</div>
			<div class="col-md-4 service-block">
				<div class="media">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -14 512.00001 512">
						<path
							d="m136.964844 308.234375c4.78125-2.757813 6.417968-8.878906 3.660156-13.660156-2.761719-4.777344-8.878906-6.417969-13.660156-3.660157-4.78125 2.761719-6.421875 8.882813-3.660156 13.660157 2.757812 4.78125 8.878906 6.421875 13.660156 3.660156zm0 0"
							fill="#ec8951" />
						<path
							d="m95.984375 377.253906 50.359375 87.230469c10.867188 18.84375 35.3125 25.820313 54.644531 14.644531 19.128907-11.054687 25.703125-35.496094 14.636719-54.640625l-30-51.96875 25.980469-15c4.78125-2.765625 6.421875-8.878906 3.660156-13.660156l-13.003906-22.523437c1.550781-.300782 11.746093-2.300782 191.539062-37.570313 22.226563-1.207031 35.542969-25.515625 24.316407-44.949219l-33.234376-57.5625 21.238282-32.167968c2.085937-3.164063 2.210937-7.230469.316406-10.511719l-20-34.640625c-1.894531-3.28125-5.492188-5.203125-9.261719-4.980469l-38.472656 2.308594-36.894531-63.90625c-5.34375-9.257813-14.917969-14.863281-25.605469-14.996094-.128906-.003906-.253906-.003906-.382813-.003906-10.328124 0-19.703124 5.140625-25.257812 13.832031l-130.632812 166.414062-84.925782 49.03125c-33.402344 19.277344-44.972656 62.128907-25.621094 95.621094 17.679688 30.625 54.953126 42.671875 86.601563 30zm102.324219 57.238282c5.523437 9.554687 2.253906 21.78125-7.328125 27.316406-9.613281 5.558594-21.855469 2.144531-27.316407-7.320313l-50-86.613281 34.640626-20c57.867187 100.242188 49.074218 85.011719 50.003906 86.617188zm-22.683594-79.296876-10-17.320312 17.320312-10 10 17.320312zm196.582031-235.910156 13.820313 23.9375-12.324219 18.664063-23.820313-41.261719zm-104.917969-72.132812c2.683594-4.390625 6.941407-4.84375 8.667969-4.796875 1.707031.019531 5.960938.550781 8.527344 4.996093l116.3125 201.464844c3.789063 6.558594-.816406 14.804688-8.414063 14.992188-1.363281.03125-1.992187.277344-5.484374.929687l-123.035157-213.105469c2.582031-3.320312 2.914063-3.640624 3.425781-4.480468zm-16.734374 21.433594 115.597656 200.222656-174.460938 34.21875-53.046875-91.878906zm-223.851563 268.667968c-4.390625-7.597656-6.710937-16.222656-6.710937-24.949218 0-17.835938 9.585937-34.445313 25.011718-43.351563l77.941406-45 50 86.601563-77.941406 45.003906c-23.878906 13.78125-54.515625 5.570312-68.300781-18.304688zm0 0"
							fill="#ec8951" />
						<path
							d="m105.984375 314.574219c-2.761719-4.78125-8.878906-6.421875-13.660156-3.660157l-17.320313 10c-4.773437 2.757813-10.902344 1.113282-13.660156-3.660156-2.761719-4.78125-8.878906-6.421875-13.660156-3.660156s-6.421875 8.878906-3.660156 13.660156c8.230468 14.257813 26.589843 19.285156 40.980468 10.980469l17.320313-10c4.78125-2.761719 6.421875-8.875 3.660156-13.660156zm0 0"
							fill="#ec8951" />
						<path
							d="m497.136719 43.746094-55.722657 31.007812c-4.824218 2.6875-6.5625 8.777344-3.875 13.601563 2.679688 4.820312 8.765626 6.566406 13.601563 3.875l55.71875-31.007813c4.828125-2.6875 6.5625-8.777344 3.875-13.601562-2.683594-4.828125-8.773437-6.5625-13.597656-3.875zm0 0"
							fill="#ec8951" />
						<path
							d="m491.292969 147.316406-38.636719-10.351562c-5.335938-1.429688-10.820312 1.734375-12.25 7.070312-1.429688 5.335938 1.738281 10.816406 7.074219 12.246094l38.640625 10.351562c5.367187 1.441407 10.824218-1.773437 12.246094-7.070312 1.429687-5.335938-1.738282-10.820312-7.074219-12.246094zm0 0"
							fill="#ec8951" />
						<path
							d="m394.199219 7.414062-10.363281 38.640626c-1.429688 5.335937 1.734374 10.816406 7.070312 12.25 5.332031 1.425781 10.816406-1.730469 12.25-7.070313l10.359375-38.640625c1.429687-5.335938-1.734375-10.820312-7.070313-12.25-5.332031-1.429688-10.816406 1.734375-12.246093 7.070312zm0 0"
							fill="#ec8951" />
					</svg>
					<div class="media-body">
						<h4>festival offer</h4>
						<p>new online special festival offer</p>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
<!-- service layout  end -->
<?php */ ?>

<!-- Tab product -->
<div class="title1 section-t-space">
	<h4>saving with our combo products</h4>
	<h2 class="title-inner1">Combo Products</h2>
</div>

<section class="section-b-space ratio_asos">
	<div class="container">
		<div class="product-4 product-m arrow">
			<?php
			/* $query="SELECT p.*, ct.bname as cname from prd as p
				LEFT JOIN cate as ct ON ct.ctid = p.ctid
				where p.ctid=20 and p.stock_qty>0 and p.status=1 order by pid desc limit 4
			"; */
			$query = "SELECT p.*, ct.bname as cname FROM prd as p
                INNER JOIN cate as ct ON ct.ctid = p.ctid
                WHERE ct.parent_id = 20 AND p.stock_qty > 0 AND p.status = 1 
				group by ct.ctid 
				ORDER BY p.pid DESC LIMIT 4
			";
			$q = mysqli_query($conn, $query) or die(mysqli_error($conn));
			while ($row = mysqli_fetch_array($q)) {
				$prd_lnk = "product_details.php?pid=$row[pid]&pname=$row[pname]&cname=$cname";
				// $prd_lnk="$row[txt]";

				$pid = $row['pid'];
				$pname = substr($row['pname'], 0, 27);
				if (strlen($row['pname']) > 27) {
					$pname .= "...";
				}
				$cname		= $row['cname'];
				$picname	= $row['pic1'];
				$dprice		= $row['dprice'];
				$price		= $row['price'];
				$pname_full	= $row['pname'];

				if($price > 0){
					$diff = $price - $dprice;
					$perc = ($diff/$price) * 100;
					$perc = number_format($perc, 0);
				}
				?>
				<div class="basic-product theme-product-1">
					<div class="overflow-hidden">
						<div class="img-wrapper">
							<a href="<?php echo $prd_lnk;?>">
								<img src="products/<?php echo $picname;?>" class="img-fluid blur-up lazyload" alt="">
							</a>
						</div>
						<div class="product-detail">
							<div>
								<div class="brand-w-color">
									<a class="product-title" href="<?php echo $prd_lnk;?>">
										<?php echo $pname;?>
									</a>

								</div>
								<h6><?php echo $cname;?></h6>
								<h4 class="price">
									<i class="fas fa-rupee-sign"></i> <?php echo $dprice; ?>
									<?php
									if ($dprice > 0) {
										?>
										<del><?php echo $price ?></del>
										<span class="discounted-price"> <?php echo $perc ?>% Off</span>
										<?php
									}
									?>
								</h4>
							</div>
						</div>
					</div>
				</div>
				<?php
			}
			?>
		</div>
	</div>
</section>

<!-- <section class="section-b-space pt-0 ratio_asos">
	<div class="container">
		<div class="row">
		<?php
			/* //$query="select * from prd where dprice >0 and shw_home=1 order by rand() limit 4";
			$query="SELECT p.*, ct.bname as cname from prd as p
				LEFT JOIN cate as ct ON ct.ctid = p.ctid
				where p.stock_qty>0 and p.status=1 and p.shw_home=1 order by pid desc limit 4
			";
			$q=mysqli_query($conn, $query) or die(mysqli_error($conn));
			while ($row=mysqli_fetch_array($q)){
				$prd_lnk="product_details.php?pid=$row[pid]&pname=$row[pname]&cname=$cname";
				// $prd_lnk="$row[txt]";
				
				$pid=$row['pid'];
				$pname=substr($row['pname'],0,27);
				if(strlen($row['pname'])>27){
					$pname.="...";
				}
				$cname		= $row['cname'];
				$picname	= $row['pic1'];
				$dprice		= $row['dprice'];
				$price		= $row['price'];
				$pname_full	= $row['pname'];
				?>
				<div class="col">
					<?php
					prd_thumb_div($pid, $prd_lnk, $pname, $picname, $dprice, $price, $cname, $pname_full='');
					?>
 				</div>
				<?php
			} */
			?>
		</div>
	</div>
</section> -->
<!-- Tab product end -->

<script>
	$.fancybox.defaults.hash = false;
	(function($){
		$(document).ready(function(){
			$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
				event.preventDefault(); 
				event.stopPropagation(); 
				$(this).parent().siblings().removeClass('open');
				$(this).parent().toggleClass('open');
			});
		});
	})(jQuery);

	$(document).ready(function(){
	  $('.dropdown-submenu a.test').on("mouseover", function(e){
		$(this).next('ul').toggle();
		e.stopPropagation();
		e.preventDefault();
	  });
	});

	//$('body, html').mousedown(function(event) {
	/* $('.text-holder, .events_up, .single-product-item, .text, h3, img, .breadcrumb-area, .top-bar-area, .mainmenu-area, .footer-area, .footer-bottom-area, .content-box1').mousedown(function(event) {
		// event.preventDefault();
	}); */

	/* $(document).bind("contextmenu cut copy",function(e){
		e.preventDefault();
		//alert('Copying is not allowed');
	});

	jQuery(document).keydown(function(e) {
	  if (e.ctrlKey) {
		if (e.keyCode == 65 || e.keyCode == 97) { // 'A' or 'a'
		  e.preventDefault();
		  // SELECT ALL MARKERS HERE...
		}
	  }
	}); */
</script>

<?php
/***************************** MAIN VIDEO START *********************************** */
$query="SELECT * from videos order by video_id desc limit 1 ";
$query=mysqli_query($GLOBALS["conn"], $query) or die(mysqli_error($GLOBALS["conn"]));
$video_id="";
if($gr=mysqli_fetch_array($query)){
	// echo $gr['url'];
	$your_url=$gr['url'];//'https://www.youtube.com/embed/G_5-SqD2gtA';
	$video_id=get_youtube_id_from_url($your_url);
	// $jutjub = new YouTube("$gr[url]");

	if (!isset($_SESSION['videoShown'])) {
		?>
		<div id="popup_main">
			<div class="popup-container">
				<button type="button" id="popup_main_close" class="close-button" aria-label="Close">×</button>
				<iframe src="https://www.youtube.com/embed/<?php echo $video_id;?>?autoplay=1&rel=0&playsinline=0&controls=1&loop=1&mute=1&enablejsapi=1" id="main_video_top" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
			</div>
		</div>
		<?php

		// Check if the video has been shown during the current session
		if (!isset($_SESSION['videoShown'])) {
			// The video hasn't been shown yet, so we'll display it
			$_SESSION['videoShown'] = true; // Set the session variable
		}
	}
}
?>
<script type="text/javascript">
	// $("#popup_main").click(function(){
	var main_video_resize = false;
	$('#popup_main').on('click', function(event) {
		// alert("Hide popup close");
		// document.getElementById('popup_main').style.display = 'none'
		// $("#popup_main").css("width", "350px");
		/* $("#popup_main").animate({
			'width' : '400px',
			'height': '250px' 
		});
		// $("#popup_main").css("height", "300px");
		$("#popup_main").css("position", "absolute");
		$("#popup_main").css("top", "40%");
		$("#popup_main").css("left", "calc(100% - 400px)");

		$("#popup_main iframe").css("width", "100%");
		$("#popup_main iframe").css("height", "230px");
		$("#popup_main iframe").css("margin-top", "0px"); */

		$("#popup_main").hide();
	});

	/* $(window).on('scroll', () => {
		// alert('header just passed.');
		// var scrollTop = $(window).scrollTop()
		// if (scrollTop > $(headerElem).offset().top) { 
		// 	// display add
		// }

		if(main_video_resize==false){
			$("#popup_main").trigger("click");
			main_video_resize=true;
		}
	}) */
	
	// document.getElementById("popup_main").style.display = "none"
	setTimeout( function(){ 
		$( "#popup_main" ).fadeIn(3000); 
	}, 2000);
	
	function stopVideo() {
		var iframe = document.getElementById('main_video_top');
		if (iframe) {
			var iframeSrc = iframe.src;
			iframe.src = '';  // Clear the source
			iframe.src = iframeSrc.replace('autoplay=1', 'autoplay=0');  // Reset source without autoplay
		}
	}

	$('#popup_main_close').on('click', function(event) {
		$("#popup_main").css("display", "none");
		stopVideo();  // Stop the video when closing
	});
</script>
<?php include "footer.php"; ?>


PK 99