




<!-- contact us page -->
<div class="contact-page">
    <div class="container">
        <div class="page-body">
            <ul class="branches">
                <?php
                if(isset($branches) && is_array($branches)):
                    foreach($branches as $key => $value):
                        ?>
                        <li>
                            <div class="branch-heading">
                                <p>
                                    <?php echo $branchesLang[$key]['title'] ?>
                                </p>
                            </div>
                            <div class="working-hours-phones">
                                <div class="working-hours">
                                    <ul class="week-days">
                                        <li>
                    <span>
                      Mail
                    </span>
                                            <span>
                      <?php echo $value['email'] ?>
                    </span>
                                        </li>
                                    </ul>
                                </div>
                                <ul class="phones">
                                    <li>
                                        <span class="feather icon-phone-call"></span>
                                        <span>
                    <?php echo $value['phone'] ?>
                  </span>
                                    </li>
                                </ul>
                            </div>
                            <div class="location">
              <span>
                <i class="feather icon-map-pin"></i>
                  <?php echo $branchesLang[$key]['address'] ?>
              </span>
                            </div>
                        </li>
                    <?php
                    endforeach;
                endif;
                ?>
            </ul>

            <div class="form-wrapper">
                <div class="form-heading">
                    <p>
                        Contact Us
                    </p>
                </div>
                <form id="sendMessageForm">
                    <div id="mresultmessageData"></div>
                    <div class="form-div">
                        <input type="text" name="name" placeholder="Name*">
                    </div>
                    <div class="form-div">
                        <input type="email" name="email" placeholder="Email Address*">
                    </div>
                    <div class="form-div">
                        <input type="text" name="phone" placeholder="Phone Number*">
                    </div>
                    <div class="form-div">
                        <input type="text" name="subject" id="" placeholder="Message Title">
                    </div>
                    <div class="form-div">
                        <textarea name="message" placeholder="Message"></textarea>
                    </div>
                    <input type="hidden" name="action" value="addsentmessagedata">
                    <button type="submit" class="sentmessage">
                        <span class="feather icon-send"></span>
                        <span>
                Send
              </span>
                    </button>
                </form>
            </div>
        </div>
    </div>


    <div class="map-wrapper">
        <iframe
                src="<?php  echo $repeatedData['webData']['location']; ?>"
                frameborder="0" style="border:0" allowfullscreen></iframe>
    </div>

</div>
<!-- contact us page -->

<script>
    $(document).ready(function () {
        // start add subscribe code
        $("body").on("submit", "#sendMessageForm", function () {
            var allData = $(this).serialize();
            $.ajax({
                url: "<?php echo BASE_URL . "home/SendMessageForm" ?>",
                type: "POST",
                data: allData,
                beforeSend: function () {
                    $(".sentmessage").attr("disabled", "disabled");
                },
                statusCode: {
                    404: function () {
                        alert("page not found");
                    },
                },
                success: function (valdata) {
                    var da = jQuery.parseJSON(valdata);
                    if (da['status'] == "success") {
                        $("#mresultmessageData").html(da['message']);
                        setTimeout("location.reload(true);", 2000);
                    } else {
                        $("#mresultmessageData").html(da['message']);
                    }
                    $(".sentmessage").removeAttr("disabled");
                }
            });
            return false;
        });
        // end subscribe code

    })
</script>