<?php
session_start();
include 'admin/mysql.php';

require_once 'includes/security.php';

if(isset($_GET['logout'])){
    session_destroy();
    // echo '<META HTTP-EQUIV="refresh" CONTENT="0">';
    header('Location: ../index.php');
}

?>

<?php
include 'includes/header.html';
?>
<?php 
include 'includes/navigation.php';
?>
<body>

<!-- Header Images Slider -->
<div id="myCarousel" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
    <li data-target="#myCarousel" data-slide-to="2"></li>
  </ol>
  <div class="carousel-inner">
    <div class="item active"> <div class="carousel-image" style="background-image: url(images/image1.jpg); background-size: cover; background-position: center; height: 100vh; min-width: 1000px;"></div>
      <div class="container">
        <div class="carousel-caption">
          <h2 class="HeaderonImage">Professional Painting Service</h2>
          <p class="FooterOfImage"><!-- DESCRIPTION --></p>
        </div>
      </div>
    </div>
    <div class="item"> <div class="carousel-image" style="background-image: url(images/image2.jpg); background-size: cover; background-position: center; height: 100vh; min-width: 1000px;"></div>
      <div class="container">
        <div class="carousel-caption">
          <h2 class="HeaderonImage">Professional Decorating</h2>
          <p class="FooterOfImage"><!-- DESCRIPTION --></p>
        </div>
      </div>
    </div>
    <div class="item"> <div class="carousel-image" style="background-image: url(images/image3.jpg); background-size: cover; background-position: center; height: 100vh; min-width: 1000px;"></div>
      <div class="container">
        <div class="carousel-caption text-center">
          <h2 class="HeaderonImage">Professional Plastering</h2>
          <p class="FooterOfImage"><!-- DESCRIPTION --></p>
        </div>
      </div>
    </div>
  </div>
</div>


<!-- Header Images Slider -->
<div style="background:white;">

	<div class="container-fluid topfont" style="margin-bottom:25px" id="Service">
		<div class="row" style="margin:40px 0px">
			<div class="col-lg-6">
				<div class="text-center">
					<h1 class="aboutheader" style="margin-bottom:20px;color:#343E49;">Painting Decorating Services</h1><p>
						We provide high quality service which is painting and decorating as well as plastering. We use only high quality materials and paint so that it can last long. Materials we use are also your chosen. We work across United Kingdom, but we are based in West Sussex.<br>
						I am trained individual who can deal with many different challenges that can come up. All you quastion related to painting decorating will be answerd as i have a lot of experience in many different paint types as well as different material.</p>
				</div>
			</div>
			<div class="col-lg-6">
				<div class="text-center">
					<h1 class="aboutheader" style="margin-bottom:20px;color:#343E49;"> Materials and substantces used</h1><p>
						Creosote to protect wood from the weahter. Use of dust Sheet to cover the floor.	Gloss paint. Grout to cover spaces in between the tiles. Different types of paint liquid. Wall paper to cover the walls. Spray paint / Spray Gun to spray the wall. Udercoat if required.Top coat.Sealant to protect from weather, water etc. Top quality paintbrush to make sure paint is evenly painted.</p>
				</div>
			</div>

	</div>

	<div class="container" style="margin-top:10px;margin-bottom:0px;">
		<div class="row" style="margin:20px 0px">
			<div class="col-lg-6">
				<div>
					<img class="displayed" style="text-align:center" src="images/PaintRoller2.png" >
				</div>
				<div class="text-center">
					<h3 class="aboutheader" style="text-align:center;font-size:20px;font-weight:400;color:#113560;" class="">Wall Painting Service</h3>
				</div>
				<p style="text-align:center;margin:20px 0px" class="aboutpar">										<!-- DESCRIPTION -->
				</p>
			</div>
			<div class="col-lg-6">
				<div>
					<img class="displayed" style="text-align:center" src="images/Decorating2.png" >
				</div>
				<div class="text-center">
					<h3 class="aboutheader" style="text-align:center;font-size:20px;font-weight:400;color:#113560;" class="">Decorating Service</h3>
				</div>
				<p style="text-align:center;margin:20px 0px;" class="aboutpar">												<!-- DESCRIPTION -->
				</p>
			</div>
		</div>
	</div>
</div>

<!--About me-->
<div id="AboutMe" style="background:#f5f5f5;">
	<div class="container topfont" style="margin-bottom:25px" id="Service">
		<div class="row" style="margin:40px 0px">
			<div class="col-lg-12">
				<div class="text-center">
					<h3 class="aboutheader" style="margin-bottom:20px;color:#343E49;">About me</h3>
				</div>
			</div>
			<div class="col-lg-12">
	<div class="col-lg-12">
		<div class="AboutParagraph" style="text-align: center;">
			<p class="aboutpar" style="margin:0px 50px;">
				My name is Branislav Kantor and i am the very honest and hard working person. In my life I did many different jobs and I have experience in a lot of practical work and painting is my passion which I like doing it. I painted many houses, rooms and walls and I know how to work in difficult situations which require improvising or strategical thinking.
			</p>
		</div>
	</div>
			</div>
		</div>
	</div>
</div>
</div>
<!--Gallery-->
<style>
.gallery{
    margin-left: -5px;
    width: 100%;
}
</style>
<div class="gallery" style="background:white;">
<section id="OurWork" style="padding-bottom: 40px;">
  <div class="container-fluid">
  	<div class="row">
  		<style>
  		.fancy-image{
  			width: 100%;
  		}

        .pagination>li>a, .pagination>li>span {
            color: #337ab7 !important;
        }

  	</style>
			<h3 class="aboutheader" style="margin-bottom: 10px; color:#343E49;"align="center">Our work</h3>
			<?php
            $results_per_page  = 13;

            $sql = "SELECT id FROM images";
            $result = mysqli_query($dbc, $sql);
            $number_of_results = mysqli_num_rows($result);
            $number_of_pages  = ceil($number_of_results/$results_per_page);

            if(!isset($_GET['page'])){
                $page = 1;
            }else{
                $page = $_GET['page'];
            }

            $this_page_first_result = ($page-1)*$results_per_page;

			$sql = 'SELECT id, name, title, description FROM images ORDER BY id DESC LIMIT ' . $this_page_first_result . ',' .  $results_per_page;
			$result = $dbc->query($sql);
			$row = mysqli_fetch_array($result);
			if($result->num_rows > 1):
				while($row = $result->fetch_assoc()):
					$id = $row['id'];
					$image = $row['name'];
					$title = $row['title'];
					$description = $row['description'];
					$path = '../images/work/';
			?>

		<div class="col-sm-6 col-md-3" style="margin-top: 30px;">
	  	<a href="<?php echo $path.$image ?>" data-fancybox="group" data-caption="<?php echo $description ?>" style="transition: unset;">
	  		<div class="fancy-image" style="background-image: url(<?php echo $path.$image ?>); background-size: cover; height: 235px;; background-position: center;"> </div>
		</a>
		 </div>


      <?php endwhile; ?>
        <nav aria-label="Page navigation example" style="width: 100%; text-align: center; display: inline-block;">
            <ul class="pagination justify-content-center mt-3">
                <?php
                for ($page=1;$page<=$number_of_pages;$page++) {

                    $ourWork = "#OurWork";
                    echo '<li class="page-item"><a class="page-link" href="http://paintingdecoratingbk.co.uk/index.php?page=' . $page . ', '. $ourWork. '">' . $page . '</a></li> ';
                }
                ?>
            </ul>
        </nav>

		<?php endif; ?>
    </div>
</div>
</section>
</div>


<!--Reviews-->
<div id="Reviews" >
	<div id="text-carousel"   class="carousel slide" data-ride="carousel" style="text-align: center;" >
		<h3 class="aboutheader"  style="margin-bottom:50px;margin-top:0px;text-align:center;color:#343E49;">What my customers are saying</h3>
		<div class="row">
			<div class="col-xs-offset-3 col-xs-6">
				<div class="carousel-inner">
					<div class="item active">
						<div class="carousel-content">
							<div>
								<p style="margin:0px 15%;color:#343434;font-size:100%;font-style: italic;">"Painted my house over the weekend can't be happier. Also very affordable and I recommend him. Five stars."</p>
							</div>
						</div>
					</div>
					<div class="item">
						<div class="carousel-content">
							<div>
								<p style="margin:0px 15%;color:#343434;font-size:100%;font-style: italic;">"Had to go on holiday and wanted my house to be painted in that small period of time and it was done beautifully. Very trustworthy person."</p>
							</div>
						</div>
					</div>
					<div class="item">
						<div class="carousel-content">
							<div>
								<p style="margin:0px 15%;color:#343434;font-size:100%;font-style: italic;">"Hight quality work, fast and affordable. All house was painted in just four days! For the price and quality its worth it."</p>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<!--Contact form-->
<div style="background:white;">
<div class="container topfont" id="ContactUs" >
	<div class="row">
		<div class="col-lg-12">
			<div class="text-center">
				<h3 class="aboutheader" style="margin-bottom:50px;margin-top:50px;color:#343E49;">Get in touch</h3>
			</div>
		</div>
		   <div class="row" style="margin:20px 0px;margin-bottom:50px">
		<div class="col-lg-4">
		    <div style="text-align:center;">
            <i style="color:#2f7ddb" class="fa fa-map-marker fa-2x"></i>
			</div>
			  <h4 class="aboutheader" style="font-size:18px;text-align:center;margin:30px 0px">LOCATION</h4>
			<p style="text-align:center;margin-top:5px" class="aboutpar">
			West Sussex<br>
			Crawley
			</p>
		</div>
		<div class="col-lg-4">
		    <div style="text-align:center;">
            <i style="color:#2f7ddb" class="fa fa-phone fa-2x"></i>
			</div>
						  <h4 class="aboutheader" style="font-size:18px;text-align:center;margin:30px 0px">CALL US 24/7</h4>
			<p style="text-align:center;margin-top:5px" class="aboutpar">
                +447376412380
			</p>
		</div>
		<div class="col-lg-4">
		    <div style="text-align:center;">
            <i style="color:#2f7ddb" class="fa fa-envelope-o fa-2x"></i>
			</div>
			     		<h4 class="aboutheader" style="font-size:18px;text-align:center;margin:30px 0px">MAIL US</h4>
			<p style="text-align:center;margin-top:5px" class="aboutpar">
                <a class="mailto" href="mailto:paintingkantor@gmail.com">paintingkantor@gmail.com</a>
                <style>
                    .mailto{
                        color: #337ab7 !important;
                    }
                    .mailto:hover{
                        text-underline: none;
                        border-bottom: 1px solid #337ab7;
                        color: #337ab7 !important;
                    }
                </style>
			</p>
		</div>
		   </div>
        <div class="col-12">
            <?php

            $errors = isset($_SESSION['errors']) ? $_SESSION['errors'] : [];
            $fields = isset($_SESSION['fields']) ? $_SESSION['fields'] : [];
            ?>
            <?php if(!empty($errors)): ?>
                <div class="alert alert-warning" role="alert">
                    <ul>
                        <li><?php echo implode('</li><li>', $errors); ?></li>
                    </ul>
                </div>
            <?php endif; ?>
            <?php if(!empty($_SESSION['sentemail'])): ?>
                <div class="alert alert-success" role="alert">
                    <ul>
                        <p><?php echo $_SESSION['sentemail']; ?></p>
                    </ul>
                </div>
            <?php endif ?>
        </div>
		   <div class="col-lg-6">
		     		<form action="send_form_email.php" method="post">
			   <div class="form-group">
			   		<p class="aboutpar">Your Name(required)</p>
				 		<input type="text" class="form-control"  name="name" <?php echo isset($fields['name']) ? ' value="'. e($fields['name']) .'"' : '' ?>>
			   </div>
			   <div class="form-group">
			        <p class="aboutpar">Email(required)</p>
				 			<input type="email" class="form-control"   name="email" <?php echo isset($fields['email']) ? ' value="'. e($fields['email']) .'"' : '' ?>>
			   </div>

                <div class="form-group">
                    <p class="aboutpar">Telephone(required)</p>
                    <input type="phone" class="form-control"   name="phone" <?php echo isset($fields['phone']) ? ' value="'. e($fields['phone']) .'"' : '' ?>>
                </div>

		   </div>
		   <div class="col-lg-6">
			   <div class="form-group">
			     	<p class="aboutpar">Message</p>
				 		<textarea class="form-control noresize" rows="8.4" name="message" style="height:182px"><?php echo isset($fields['message']) ? e($fields['message']) : '' ?></textarea>
			   </div>
		   </div>

		   <div class="col-lg-12">
               <div class="g-recaptcha" data-sitekey="6LfB0kEUAAAAAOA-0FuKmV0mz1W27q-nG5jznEH7"></div>
               <script src='https://www.google.com/recaptcha/api.js'></script>
		   		<button class="btn btn-success" type="submit" style="margin:17px 0px 40px 0px;text-center">Submit</button>
		   </div>

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

		<?php include 'includes/scripts.html' ?>
<!--Footer -->
</body>
</html>


