<!-- 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 Blog</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="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']; ?>">

                            <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-12 col-md-12 col-sm-12 col-12">
                                <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="form-group">
                                    <input type="text" class="form-control" name="topic" value="<?php echo $row['topic']; ?>" placeholder="Topic" 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="author" value="<?php echo $row['author']; ?>" placeholder="Author" required>
                                </div>
                            </div>

                            <!--Paragraphs Start-->
                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <textarea class="form-control" name="paragraph1" rows="2" placeholder="Paragraph One" required><?php echo $row['paragraph1']; ?></textarea>
                                </div>
                            </div>

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

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

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

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

                            <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                                <div class="form-group">
                                    <textarea class="form-control" name="paragraph6" rows="2" placeholder="Paragraph Six"><?php echo $row['paragraph6']; ?></textarea>
                                </div>
                            </div>
                            <!--Descriptions End-->

                            <div class="col-lg-1 col-md-1 col-sm-1 col-2">
                                <div class="form-group">
                                    <i class="fa fa-link"></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="web_link" value="<?php echo $row['web_link']; ?>" placeholder="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">Images: Tap to upload!</span>
                </div>
            </div>

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

                     <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">

                     <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">

                     <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>
            <!--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 Blog</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['image1']) { echo "<img src='images/".$row['image1']."' 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>