<?php include('include/head.php');  ?>


<body>

    <?php include('include/header.php');  ?>



    <!-- ==== service-detail banner start ==== -->
    <section class="whykrimson">
        <div class="service-banner-text">
            <h1>Location</h1>
            <p>Electrical Power Solutions</p>
        </div>
    </section>
    <!-- ==== service-detail banner end ==== -->

    <div class="main_content my-5">
        <div class="section py-5">
            <div class="container">
                <div class="row">
                    <?php

                    $locationSql = mysqli_query($conn, "SELECT location_name, slug FROM `tbl_locations` WHERE `is_active` = 1");
                    while ($locations = mysqli_fetch_array($locationSql)) {
                        $locName = $locations['location_name'];
                        $slug = $locations['slug'];
                        // echo ($locName);
                    ?>
                        <div class="col-md-6 col-lg-3 mb-5 mb-lg-0">
                            <a class="location-card" href="<?php path(); ?>/locations/<?php echo $slug; ?>" data-aos="fade-up" data-aos-delay="200" data-aos-duration="1000">
                                <div class="location-icon">
                                    <svg aria-hidden="true" style="width: 25px;" class="e-font-icon-svg e-fas-map-marker-alt" viewBox="0 0 384 512" xmlns="http://www.w3.org/2000/svg">
                                        <path fill="#fff" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z">
                                        </path>
                                    </svg>
                                </div>
                                <h5><?php echo $locName; ?></h5>
                            </a>
                        </div>

                    <?php
                    }
                    ?>
                </div>
            </div>
        </div>
    </div>


    <?php include('include/footer.php');  ?>

</body>

</html>