HOME


sh-3ll 1.0
DIR:/chroot/home/laughingplants/laughingplants.com/html/
Upload File :
Current File : /chroot/home/laughingplants/laughingplants.com/html/plants.php
<?php include 'header.php';

$plant_id = $_GET['id']; 

if(!isset($plant_id) || empty($plant_id))
{
	 header('location:index.php', true);
	echo "<script>window.location='index.php'</script>";
}	

$select_plant= $con->prepare("SELECT * FROM tbl_plants WHERE id=:plant_id");
$select_plant->bindParam(':plant_id', $plant_id);
$select_plant->execute();
$number = $select_plant->rowCount();
 
if(!$number)
{  
   header('location:index.php', true);
   echo "<script>window.location='index.php'</script>"; 
}
$fetch_plant = $select_plant->fetch(PDO::FETCH_ASSOC);
?>

	<section id="menu_transparent">
		<div class="container">
		<div class="col-md-12 banner_top" >
			<div class="row">
				<div class="col-md-7">
					<h2><?php echo $fetch_plant['pl_name']; ?></h2>
					<p><?php echo $fetch_plant['pl_slogan']; ?></p>
					
				</div>
				
				<div class="col-md-5 banner_img_right">
<!--					<img src="images/plant_detail_img.png" class="img-responsive">-->
					<img src="plant_images/<?php echo $fetch_plant['hero_thumb_img']; ?>" class="img-responsive">
				</div>
			</div>
		</div>
		</div> 
	</section>
	
	<section>
		<div class="container">
		<div class="col-md-12" style="margin-top: 6%;">
		<div class="row">
<!--		<img width="100%" src="plant_main_image/--><?php //echo $fetch_plant['pl_main_image']; ?><!--" alt="" />-->
            <?php
            if ($fetch_plant['pl_main_image'])
            echo '<img width="100%" src="plant_main_image/'.$fetch_plant['pl_main_image'].'" alt="" />';
            ?>

		<div class="product">
			<div class="single-inner">
				<div class="images" style="width: 100%;">
					<div class="project-slider">
						<div class="owl-carousel sync2">
										 <?php  
											$select_slider= $con->prepare("SELECT * FROM tbl_slider_images WHERE plant_id=:plant_id");
											$select_slider->bindParam(':plant_id', $plant_id);
											$select_slider->execute(); 
											while($fetch_slider = $select_slider->fetch(PDO::FETCH_ASSOC))
											{ 
											?>
													<div class="item">
														<a href="plant_original_image/<?php echo $fetch_slider['image_name']; ?>" data-rel="prettyPhoto[product-gallery]">
															<img class="img-responsive" src="plant_resized_image/<?php echo $fetch_slider['image_name']; ?>" alt="" /> 
														</a>
													</div>
											<?php 
											}
											?>	
													
												</div>						
											</div>
										</div>
									</div>
								</div>
							</div>
							</div>
							</div>
	
	</section>
	
	<section id="plant_description">
		<div class="container">
			<div class="col-md-12">
				<div class="row">
					<h2><?php echo $fetch_plant['pl_name']; ?> Plant Features</h2>
					 <?php echo htmlspecialchars_decode($fetch_plant['pl_features']); ?>
					 
					<h2><?php echo $fetch_plant['pl_name']; ?> Caring Instruction</h2>
					  <?php echo htmlspecialchars_decode($fetch_plant['pl_growing_instr']); ?>
				</div>
			</div>
		</div>
	</section>


	
        <section class="plant-description">
            <div class="container">
   <h2>Plant Details</h2>
               <div class="col-md-8 col-md-offset-2" style="border-top: 1px dashed #000; padding-top: 15px; padding-bottom: 15px; border-bottom: 1px dashed #000;">
                  
                   <div class="row">

         <div class='col-md-6 dashed_border '>
            <div class='well'>
                <div class='row'>
                    <div class='col-xs-4 text-center'>
                        <span><img src="images/pd4.png"  class="img-responsive"/></span>
                    </div>
                    <div class='col-xs-8'>
                        <h3>Maintenance</h3>
<?php  
  if($fetch_plant['maint_low'])
  { ?>
                        <p>Low</p>
<?php
  } ?>
<?php  
  if($fetch_plant['maint_medium'])
  { ?>
                        <p>Medium</p>
<?php
  } ?>

<?php  
  if($fetch_plant['maint_high'])
  { ?>
                        <p>High</p>
<?php
  } ?>
                    </div>
                </div>
            </div>
        </div>

        <div class='col-md-6'>
            <div class='well'>
                <div class='row'>
                    <div class='col-xs-4 text-center'>
                        <span><img src="images/pd3.png"  class="img-responsive"/></span>
                    </div>
                    <div class='col-xs-8'>
                        <h3>Lighting</h3>
                      <?php  
  if($fetch_plant['light_low_light'])
  { ?>
                        <p>Indoor: Low Light</p>
<?php
  }   
  if($fetch_plant['light_medium_light'])
  { ?>
                        <p>Indoor: Medium Light</p>
<?php
  } ?>

<?php  
  if($fetch_plant['light_high_light'])
  { ?>
                        <p>Indoor: High Light</p>
<?php
  }    
  if($fetch_plant['light_out_sun'])
  { ?>
                        <p>Outdoor: Sun</p>
<?php
  }   
  if($fetch_plant['light_out_part_sun'])
  { ?>
                        <p>Outdoor: Part Sun</p>
<?php
  }   
  if($fetch_plant['light_out_shade'])
  { ?>
                        <p>Outdoor: Shade</p>
<?php
  } ?>
                        
                    </div>
                </div>
            </div>
        </div>
</div>
<div class="row">
        <div class='col-md-6 dashed_border '>
            <div class='well'>
                <div class='row'>
                    <div class='col-xs-4 text-center'>
                        <span><img src="images/pd2.png"  class="img-responsive"/></span>
                    </div>
                    <div class='col-xs-8'>
                        <h3>Colors</h3>
                     <?php  if($fetch_plant['shade_variegated'])  { ?>  <p>Variegated</p> <?php  } ?>
                     <?php  if($fetch_plant['shade_green'])  { ?>  <p>Green</p> <?php  } ?>
                     <?php  if($fetch_plant['shade_orange'])  { ?>  <p>Orange</p> <?php  } ?>
                     <?php  if($fetch_plant['shade_pink'])  { ?>  <p>Pink</p> <?php  } ?>
                     <?php  if($fetch_plant['shade_white'])  { ?>  <p>White</p> <?php  } ?>
                     <?php  if($fetch_plant['shade_yellow'])  { ?>  <p>Yellow</p> <?php  } ?>

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

        <div class='col-md-6'>
            <div class='well'>
                <div class='row'>
                    <div class='col-xs-4 text-center'>
                        <span><img src="images/pd1.png" class="img-responsive" /></span>
                    </div>
                    <div class='col-xs-8'>
                        <h3>Other Information</h3>
                        <p><?php echo htmlspecialchars_decode($fetch_plant['other_info']); ?></p>
                    </div>
                </div>
            </div>
        </div>

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


    <section id="social_icons">
        <?php
        $social_id=1;
        $select_social_media = $con->prepare("SELECT * FROM tbl_social_media WHERE id=:social_id");
        $select_social_media ->bindPAram(":social_id", $social_id);
        $select_social_media ->execute();
        $fetch_social_media= $select_social_media ->fetch(PDO::FETCH_ASSOC);
        ?>
        <div class="container">
            <div class="col-md-12">
                <p><a href="<?php echo $fetch_social_media['f_link']; ?>"><span class="fb"><i class="fa fa-facebook" aria-hidden="true"></i></span></a> <a href="<?php echo $fetch_social_media['g_link']; ?>"><span class="gp"><i class="fa fa-google-plus" aria-hidden="true"></i></span></a> <a href="<?php echo $fetch_social_media['t_link']; ?>"><span class="tw"><i class="fa fa-twitter" aria-hidden="true"></i></span></a> <a href="<?php echo $fetch_social_media['l_link']; ?>"><span class="li"><i class="fa fa-linkedin" aria-hidden="true"></i></span></a></p>
            </div>
        </div>
    </section>

<!--    <section id="store_address">-->
<!--        <div class="container">-->
<!--            <div class="col-md-12">-->
<!--                <div class="row">-->
<!--                    --><?php
//                    $store_address1 = htmlspecialchars_decode(trim($fetch_plant['store_address1']));
//                    $store_address2 = htmlspecialchars_decode(trim($fetch_plant['store_address2']));
//                    $store_address3 = htmlspecialchars_decode(trim($fetch_plant['store_address3']));
//                    $store_address4 = htmlspecialchars_decode(trim($fetch_plant['store_address4']));
//                    if (!empty($store_address1) || !empty($store_address2) || !empty($store_address3) || !empty($store_address4))
//                    {
//                        ?>
<!--                        <h2>Store Address</h2>-->
<!--                    --><?php //} ?>
<!--                    <div class="row">-->
<!--                        --><?php
//                        $sl = 1;
//                        if (!empty($store_address1))
//                        { ?>
<!--                            <div class="col-md-3">-->
<!--                                <h3><i class="fa fa-map-marker" aria-hidden="true"></i> Store --><?php //echo $sl; ?><!--</h3>-->
<!--                                --><?php //echo $store_address1; ?>
<!--                            </div>-->
<!--                            --><?php //$sl ++;
//                        } ?>
<!---->
<!--                        --><?php //if (!empty($store_address2))
//                        { ?>
<!--                            <div class="col-md-3">-->
<!--                                <h3><i class="fa fa-map-marker" aria-hidden="true"></i> Store --><?php //echo $sl; ?><!--</h3>-->
<!--                                --><?php //echo $store_address2; ?>
<!--                            </div>-->
<!--                            --><?php //$sl ++;
//                        } ?>
<!---->
<!--                        --><?php //if (!empty($store_address3))
//                        { ?>
<!--                            <div class="col-md-3">-->
<!--                                <h3><i class="fa fa-map-marker" aria-hidden="true"></i> Store --><?php //echo $sl; ?><!--</h3>-->
<!--                                --><?php //echo $store_address3; ?>
<!--                            </div>-->
<!--                            --><?php //$sl ++;
//                        } ?>
<!---->
<!--                        --><?php //if (!empty($store_address4))
//                        { ?>
<!--                            <div class="col-md-3">-->
<!--                                <h3><i class="fa fa-map-marker" aria-hidden="true"></i> Store --><?php //echo $sl; ?><!--</h3>-->
<!--                                --><?php //echo $store_address4; ?>
<!--                            </div>-->
<!--                        --><?php //} ?>
<!---->
<!---->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--    </section>-->


<!--RELATED PLANTS BLOCK -->
<?php
//$pl_related_plants= $fetch_plant['pl_related_plants'];
// if(!empty($pl_related_plants))
// {
//?>
<!--	<section id="product_white" style="background-color: #eee;"><!-- Related section -->
<!--		<div class="container">-->
<!--		<div class="row">-->
<!--			<div class="col-md-12">-->
<!--                                     <div class="text-center">-->
<!--                                         <img src="images/about.png" class="upper_img">-->
<!--                                         <h2 class="team">Related Plants</h2>-->
<!--                                     </div>-->
<!--				<div class="row">-->
<!--				--><?php //
//				$pl_related_plants = $fetch_plant['pl_related_plants'];
//				foreach (explode(',' , $pl_related_plants) as $each_plant)
//				{
//					$select_related_plant= $con->prepare("SELECT * FROM tbl_plants WHERE id=:plant_id");
//					$select_related_plant->bindParam(':plant_id', $each_plant);
//					$select_related_plant->execute();
//
//					$fetch_related_plant = $select_related_plant->fetch(PDO::FETCH_ASSOC);
//				 ?>
<!--					<div class="col-md-3 col-sm-6 search_blok">-->
<!--						<a href="plants.php?id=--><?php //echo $each_plant; ?><!--"><img src="plant_images/--><?php //echo $fetch_related_plant['plant_image']; ?><!--" class="img-responsive"><span class="price_tag">--><?php //echo $fetch_related_plant['plant_price'];  ?><!--</span></a>-->
<!--						<a href="plants.php?id=--><?php //echo $each_plant; ?><!--"><h3>--><?php //echo $fetch_related_plant['pl_name']; ?><!--</h3> </a>-->
<!--<h5>--><?php //echo $fetch_related_plant ['pl_family_name']; ?><!--</h5>-->
<!--						<p>--><?php //echo substr($fetch_related_plant['pl_slogan'],0,90).' .....'; ?><!--<p> -->
<!--					</div>-->
<!--			 --><?php //
//				}
//				 ?>
<!--				 -->
<!--					 -->
<!--				</div>-->
<!--			</div>-->
<!--			</div>-->
<!--		</div>-->
<!--	</section>-->
<?php
//} ?>

<?php
$pl_varities_plants= $fetch_plant['pl_varities_plants'];
 if(!empty($pl_varities_plants))
 {
?>
    <section id="product_white"><!-- varities section -->
		<div class="container">
		<div class="row">
			<div class="col-md-12">
                                     <div class="text-center">
                                         <img src="images/about.png" class="upper_img">
                                         <h2 class="team">Other House Plants</h2>
                                     </div>
				<div class="row">
				<?php
				$pl_varities_plants= $fetch_plant['pl_varities_plants'];

				foreach (explode(',' , $pl_varities_plants) as $each_plant)
				{
					$select_related_plant= $con->prepare("SELECT * FROM tbl_plants WHERE id=:plant_id");
					$select_related_plant->bindParam(':plant_id', $each_plant);
					$select_related_plant->execute();
					$fetch_related_plant = $select_related_plant->fetch(PDO::FETCH_ASSOC);
				 ?>
					<div class="col-md-3 col-sm-6 search_blok">
						<a href="plants.php?id=<?php echo $each_plant; ?>"><img src="plant_images/<?php echo $fetch_related_plant['plant_image']; ?>" class="img-responsive"><span class="price_tag"><?php echo $fetch_related_plant['plant_price'];  ?></span></a>
						<a href="plants.php?id=<?php echo $each_plant; ?>"><h3><?php echo $fetch_related_plant['pl_name']; ?></h3> </a>
<h5><?php echo $fetch_related_plant ['pl_family_name']; ?></h5>
						<p><?php echo substr($fetch_related_plant['pl_slogan'],0,90).' .....'; ?><p>
					</div>
			 <?php
				}
				 ?>


				</div>
			</div>
			</div>
		</div>
	</section>
<?php
				}
				 ?>


<?php include 'footer.php'?>