<!-- Edit -->
<div class="modal fade" id="edit_<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <center><h4 class="modal-title" id="myModalLabel">Edit Place</h4></center>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">
			<div class="container-fluid">
			<form class="row contact_form one" action="edit/index.php" method="post" enctype="multipart/form-data">

				<input type="hidden" class="form-control" name="id" value="<?php echo $row['id']; ?>">
                <input type="hidden" class="form-control" name="code" value="<?php echo $row['code']; ?>">
                <input type="hidden" class="form-control" name="image" value="<?php echo $row['image']; ?>">
                <input type="hidden" class="form-control" name="image1" value="<?php echo $row['image1']; ?>">
                <input type="hidden" class="form-control" name="image2" value="<?php echo $row['image2']; ?>">
                <input type="hidden" class="form-control" name="image3" value="<?php echo $row['image3']; ?>">
                <input type="hidden" class="form-control" name="image4" value="<?php echo $row['image4']; ?>">
                <input type="hidden" class="form-control" name="image5" value="<?php echo $row['image5']; ?>">
                <input type="hidden" class="form-control" name="image6" value="<?php echo $row['image6']; ?>">

            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                <div class="form-group">

                     <div class="upload-btn-wrapper" align="center">
                        <p class="text-primary fs-12">Tap to upload image</p>
                         <div class="upload-wrapper">
                        
                            <?php
                            if ($row["image"]) {
                                echo '<div class="btn one"><img src="images/'.$row["image"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<div class="btn"><i class="fa fa-image"></i>Add Image';
                            }
                            ?>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_<?php echo $row['id']; ?>(event)" name="image">

                        </div>

                            <img id="output_image_<?php echo $row['id']; ?>" class="output_image_1">

                             </div> </div>

            </div> </div>


                            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="title" value="<?php echo $row['title']; ?>" placeholder="Name of place" required>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="book_tabel_item">
                                    <div class="input-group">
                                        <select class="wide" name="cat" required>
                                            <option value="<?php echo $row['cat']; ?>"><?php echo $row['cat']; ?></option>
                                           <?php
                                            if ($row['cat']!="Fitness") {echo '<option>Fitness</option>';}
                                            if ($row['cat']!="Wellness") {echo '<option>Wellness</option>';}
                                            if ($row['cat']!="Massage") {echo '<option>Massage</option>';}
                                            if ($row['cat']!="Steam Bath") {echo '<option>Steam Bath</option>';}
                                            if ($row['cat']!="Sauna") {echo '<option>Sauna</option>';}
                                            if ($row['cat']!="Dance") {echo '<option>Dance</option>';}
                                            if ($row['cat']!="Sports") {echo '<option>Sports</option>';}
                                            if ($row['cat']!="Experts") {echo '<option>Experts</option>';}
                                            if ($row['cat']!="") {echo '<option></option>';}
                                           ?>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="book_tabel_item">
                                    <div class="input-group">
                                        <select class="wide" name="sub" required>
                                            <option value="<?php echo $row['sub']; ?>"><?php echo $row['sub']; ?></option>
                                           <?php
                                            if ($row['sub']!="Gym") {echo '<option>Gym</option>';}
                                            if ($row['sub']!="Health Club") {echo '<option>Health Club</option>';}
                                            if ($row['sub']!="Spa") {echo '<option>Spa</option>';}
                                            if ($row['sub']!="Massage Parlor") {echo '<option>Massage Parlor</option>';}
                                            if ($row['sub']!="Physiotherapist") {echo '<option>Physiotherapist</option>';}
                                            if ($row['sub']!="Dance Club") {echo '<option>Dance Club</option>';}
                                            if ($row['sub']!="Sports Club") {echo '<option>Sports Club</option>';}
                                            if ($row['sub']!="Trainer") {echo '<option>Trainer</option>';}
                                            if ($row['sub']!="Dietician") {echo '<option>Dietician</option>';}
                                            if ($row['sub']!="Technician") {echo '<option>Technician</option>';}
                                            if ($row['sub']!="Consultant") {echo '<option>Consultant</option>';}
                                            if ($row['sub']!="Swimming Pool") {echo '<option>Swimming Pool</option>';}
                                            if ($row['sub']!="Equipment Supplier") {echo '<option>Equipment Supplier</option>';}
                                           ?>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <input type="email" class="form-control" name="email" value="<?php echo $row['email']; ?>" placeholder="Email Address" required>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <input type="tel" class="form-control" name="phone" value="<?php echo $row['phone']; ?>" placeholder="Phone Number" required>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="address" value="<?php echo $row['address']; ?>" placeholder="Physical Address" required>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="district" value="<?php echo $row['district']; ?>" placeholder="District" required>
                                </div>
                            </div>

                            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="country" value="<?php echo $row['country']; ?>" placeholder="Uganda" readonly>
                                </div>
                            </div>

                            <!--Hours Start-->
                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                	<span class="fs-12">Opening Hours</span>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                	<span class="fs-12">Closing Hours</span>
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <input type="time" class="form-control" name="hr_open" value="<?php echo $row['hr_open']; ?>">
                                </div>
                            </div>

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <input type="time" class="form-control" name="hr_close" value="<?php echo $row['hr_close']; ?>">
                                </div>
                            </div>
                            <!--Hours End-->

                            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="form-group">
                                    <textarea class="form-control" name="services" rows="2" placeholder="Services Offered" required><?php echo $row['services']; ?></textarea>
                                </div>
                            </div>

                            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="form-group">
                                    <textarea class="form-control" name="paragraph1" rows="2" placeholder="Additional Information"><?php echo $row['paragraph1']; ?></textarea>
                                </div>
                            </div>


                            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="form-group">
                                    <span class="fs-12">Numbers to call</span>
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fa fa-mobile"></i>
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-10">
                                <div class="form-group">
                                    <input type="tel" class="form-control" name="phone1" placeholder="Phone 1" value="<?php echo $row['phone1']; ?>">
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fa fa-mobile"></i>
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-10">
                                <div class="form-group">
                                    <input type="tel" class="form-control" name="phone2" placeholder="Phone 2" value="<?php echo $row['phone2']; ?>">
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fa fa-map-location-dot"></i>
                                </div>
                            </div>
                            <div class="col-lg-11 col-md-11 col-sm-11 col-10">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="g_maps" value="<?php echo $row['g_maps']; ?>" placeholder="Google Maps Link">
                                </div>
                            </div>

                            <!--Links Start-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="form-group">
                                    <span class="fs-12">Social Media: Use usernames only!</span>
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fab fa-facebook"></i>
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-10">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="facebook" value="<?php echo $row['facebook']; ?>" placeholder="Facebook">
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fab fa-instagram"></i>
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-10">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="instagram" value="<?php echo $row['instagram']; ?>" placeholder="Instagram">
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fab fa-x-twitter"></i>
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-10">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="twitter" value="<?php echo $row['twitter']; ?>" placeholder="Twitter">
                                </div>
                            </div>

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fab fa-youtube-play"></i>
                                </div>
                            </div>
                            <div class="col-lg-5 col-md-5 col-sm-5 col-10">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="youtube" value="<?php echo $row['youtube']; ?>" placeholder="Youtube">
                                </div>
                            </div>
                            <!--Links End-->

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fa fa-globe"></i>
                                </div>
                            </div>
                            <div class="col-lg-11 col-md-11 col-sm-11 col-10">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="website" value="<?php echo $row['website']; ?>" placeholder="Website Link">
                                </div>
                            </div>

            <!--Image Upload Start-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                <div class="form-group">
                    <span class="fs-12">Other Images: To showcase more..</span>
                </div>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                <div class="form-group others">

                     <div class="upload-btn-wrapper" align="center">
                         <div class="upload-wrapper">
                        <div class="btn">
                            <?php
                            if ($row["image1"]) {
                                echo '<img class="output_image1" src="images/'.$row["image1"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<i class="fa fa-image"></i> Image 1';
                            }
                            ?>
                        </div>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_one_<?php echo $row['id']; ?>(event)" name="image1">

                            <img id="output_image_one_<?php echo $row['id']; ?>" class="output_image1">
                        </div> </div>

            </div> </div>

            <div class="col-lg-8 col-md-8 col-sm-8 col-8">
                <div class="form-group">
                    <textarea class="form-control" name="summ1" rows="2" placeholder="Summary One"><?php echo $row['summ1']; ?></textarea>
                </div>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                <div class="form-group others">

                     <div class="upload-btn-wrapper" align="center">
                         <div class="upload-wrapper">
                        <div class="btn">
                            <?php
                            if ($row["image2"]) {
                                echo '<img class="output_image1" src="images/'.$row["image2"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<i class="fa fa-image"></i> Image 2';
                            }
                            ?>
                        </div>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_two_<?php echo $row['id']; ?>(event)" name="image2">

                            <img id="output_image_two_<?php echo $row['id']; ?>" class="output_image1">
                        </div> </div>

            </div> </div>

            <div class="col-lg-8 col-md-8 col-sm-8 col-8">
                <div class="form-group">
                    <textarea class="form-control" name="summ2" rows="2" placeholder="Summary Two"><?php echo $row['summ2']; ?></textarea>
                </div>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                <div class="form-group others">

                     <div class="upload-btn-wrapper" align="center">
                         <div class="upload-wrapper">
                        <div class="btn">
                            <?php
                            if ($row["image3"]) {
                                echo '<img class="output_image1" src="images/'.$row["image3"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<i class="fa fa-image"></i> Image 3';
                            }
                            ?>
                        </div>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_three_<?php echo $row['id']; ?>(event)" name="image3">

                            <img id="output_image_three_<?php echo $row['id']; ?>" class="output_image1">
                        </div> </div>

            </div> </div>

            <div class="col-lg-8 col-md-8 col-sm-8 col-8">
                <div class="form-group">
                    <textarea class="form-control" name="summ3" rows="2" placeholder="Summary Three"><?php echo $row['summ3']; ?></textarea>
                </div>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                <div class="form-group others">

                     <div class="upload-btn-wrapper" align="center">
                         <div class="upload-wrapper">
                        <div class="btn">
                            <?php
                            if ($row["image4"]) {
                                echo '<img class="output_image1" src="images/'.$row["image4"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<i class="fa fa-image"></i> Image 4';
                            }
                            ?>
                        </div>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_four_<?php echo $row['id']; ?>(event)" name="image4">

                            <img id="output_image_four_<?php echo $row['id']; ?>" class="output_image1">
                        </div> </div>

            </div> </div>

            <div class="col-lg-8 col-md-8 col-sm-8 col-8">
                <div class="form-group">
                    <textarea class="form-control" name="summ4" rows="2" placeholder="Summary Four"><?php echo $row['summ4']; ?></textarea>
                </div>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                <div class="form-group others">

                     <div class="upload-btn-wrapper" align="center">
                         <div class="upload-wrapper">
                        <div class="btn">
                            <?php
                            if ($row["image5"]) {
                                echo '<img class="output_image1" src="images/'.$row["image5"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<i class="fa fa-image"></i> Image 5';
                            }
                            ?>
                        </div>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_five_<?php echo $row['id']; ?>(event)" name="image5">

                            <img id="output_image_five_<?php echo $row['id']; ?>" class="output_image1">
                        </div> </div>

            </div> </div>

            <div class="col-lg-8 col-md-8 col-sm-8 col-8">
                <div class="form-group">
                    <textarea class="form-control" name="summ5" rows="2" placeholder="Summary Five"><?php echo $row['summ5']; ?></textarea>
                </div>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                <div class="form-group others">

                     <div class="upload-btn-wrapper" align="center">
                         <div class="upload-wrapper">
                        <div class="btn">
                            <?php
                            if ($row["image6"]) {
                                echo '<img class="output_image1" src="images/'.$row["image6"].'" alt="'.$row["title"].' img">';
                            } else {
                                echo '<i class="fa fa-image"></i> Image 6';
                            }
                            ?>
                        </div>
                        <input type="file" id="myFile<?php echo $row['id']; ?>" accept="image/*" onchange="preview_image_six_<?php echo $row['id']; ?>(event)" name="image6">

                            <img id="output_image_six_<?php echo $row['id']; ?>" class="output_image1">
                        </div> </div>

            </div> </div>

            <div class="col-lg-8 col-md-8 col-sm-8 col-8">
                <div class="form-group">
                    <textarea class="form-control" name="summ6" rows="2" placeholder="Summary Six"><?php echo $row['summ6']; ?></textarea>
                </div>
            </div>
            <!--Image Upload End-->

                            <div class="col-md-12 text-right">
                				<button type="button" class="btn theme_btn button_hover theme_btn_two" data-dismiss="modal">Cancel</button>
                                <button type="submit" value="submit" name="submit" class="btn theme_btn button_hover">Update</button>
                            </div>

                        </form>

            </div>

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

<!-- Delete -->
<div class="modal fade" id="delete_<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <center><h4 class="modal-title" id="myModalLabel">Delete Place</h4></center>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">	
            	<p class="text-center">Are you sure you want to delete</p>
				<h2 class="text-center" style="font-size: 14px;"><?php echo $row['title']; ?></h2>
				<div align="center"> <?php if ($row['image']) { echo "<img src='images/".$row['image']."' class='img-fluid'>";} ?> </div>
			</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
                <a href="delete/index.php?id=<?php echo $row['id']; ?>&title=<?php echo $row['title']; ?>" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Confirm</a>
            </div>

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