D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
attraction.encodersunlimited.com
/
Filename :
service.php
back
Copy
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <title></title> <!-- Fav Icon --> <link rel="icon" href="assets/images/favicon.ico" type="image/x-icon"> <!-- Google Fonts --> <!-- Stylesheets --> <?php require('style.php'); ?> <style> .service-block-one .inner-box .lower-content .price { position: absolute; top: 10px; right: 10px; display: inline-block; width: 110px; height: 40px; line-height: 40px; text-align: center; background: black; font-size: 14px; font-weight: 500; color: #fff; text-decoration: none; border-radius: 30px; z-index: 10; } .text-dk { text-transform: uppercase; } .text-dk a { color: black; } .service-block-one .inner-box .lower-content .price:hover { background: black; transform: scale(1.1); /* Add hover interaction */ } /* Responsive adjustments */ @media (max-width: 768px) { .service-block-one .inner-box .lower-content .price { top: 8px; right: 8px; width: 90px; height: 35px; line-height: 35px; font-size: 12px; } } @media (max-width: 480px) { .service-block-one .inner-box .lower-content .price { top: 5px; right: 5px; width: 80px; height: 30px; line-height: 30px; font-size: 10px; } } </style> </head> <!-- page wrapper --> <body> <div class="boxed_wrapper"> <?php include 'header.php' ?> <!--Page Title--> <section class="page-title centred" style="background-image: url(assets/images/background/pagetitle.jpg);"> <div class="auto-container"> <div class="title-box"> <span class="title-text">Salon Services</span> <h1>Our Services</h1> </div> </div> </section> <!--End Page Title--> <!-- service-page-section --> <?php // Include the database connection file include 'config.php'; // Fetch data from the services table $query = "SELECT id, name, description, image FROM services"; $result = mysqli_query($conn, $query); if (!$result) { die("Query Failed: " . mysqli_error($conn)); } ?> <section class="service-page-section sec-pad"> <div class="auto-container"> <div class="row clearfix"> <?php while ($row = mysqli_fetch_assoc($result)) { ?> <div class="col-lg-3 col-md-6 col-sm-12 service-block"> <div class="service-block-one wow fadeInUp animated" data-wow-delay="00ms" data-wow-duration="1500ms"> <div class="inner-box"> <figure class="image-box"> <a href="#"> <img src="attadminraction/uploads/<?php echo htmlspecialchars($row['image']); ?>" alt="<?php echo htmlspecialchars($row['name']); ?>"> </a> </figure> <div class="lower-content"> <!-- Book Now Button --> <div class="booknowdiv"> <a href="getquote.php" class="price">Book Now</a> </div> <h6 class="text-dk"><a href="#"><?php echo htmlspecialchars($row['name']); ?></a></h6> <p> <?php $description = htmlspecialchars($row['description']); echo strlen($description) > 100 ? substr($description, 0, 100) . '...' : $description; ?> </p> </div> </div> </div> </div> <?php } ?> </div> <div class="more-btn centred"><a href="service.php" class="theme-btn-one">Book Appointment</a></div> </div> </section> <?php // Close the database connection mysqli_close($conn); ?> <!-- service-page-section --> <?php include 'footer.php' ?> </body><!-- End of .page_wrapper --> </html>