<!-- 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">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <center><h4 class="modal-title" id="myModalLabel">Edit Testimonial</h4></center>
            </div>
            <div class="modal-body">
			<div class="container-fluid">
			<form method="POST" action="edit/index.php" enctype="multipart/form-data">

				<input type="hidden" class="form-control" name="id" value="<?php echo $row['id']; ?>">

				<div class="row form-group">
					<div class="col-sm-2">
						<label class="control-label modal-label">Name:</label>
					</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="name" value="<?php echo $row['name']; ?>">
					</div>
				</div>

				<div class="row form-group">
					<div class="col-sm-2">
						<label class="control-label modal-label">Position:</label>
					</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="position" value="<?php echo $row['position']; ?>">
					</div>
				</div>

				<div class="row form-group">
					<div class="col-sm-2">
						<label class="control-label modal-label">Testimonial:</label>
					</div>
					<div class="col-sm-10">
						<textarea rows="4" cols="7" class="form-control" name="testimonial" value="<?php echo $row['testimonial']; ?>"><?php echo $row['testimonial']; ?></textarea>
					</div>
				</div>

				<div class="row form-group">
					<div class="col-sm-2">
						<label class="control-label modal-label">Image:</label>
					</div>
					<div class="col-sm-10 edit-img">
						<?php 
						if ($row['image']) { echo "<a href=\"edit_image/index.php?id=$row[id]\"><img src='images/".$row['image']."' width='30%'></a>";} 
						elseif ($row['image']=="") { echo "<a href=\"edit_image/index.php?id=$row[id]\"><img src='images/default.png' width='30%'></a>";}
						?>
						
						<input type="hidden" class="form-control" name="image" value="<?php echo $row['image']; ?>">
					</div>
				</div>

            </div> 
			</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
                <button type="submit" name="edit" class="btn btn-success"><span class="glyphicon glyphicon-check"></span> Update</a>
			</form>
            </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">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <center><h4 class="modal-title" id="myModalLabel">Delete Testimonial</h4></center>
            </div>
            <div class="modal-body">	
            	
				<div align="center" class="edit-img"> <?php if ($row['image']) { echo "<img src='images/".$row['image']."' width='20%'>";} 
			elseif ($row['image']=="") { echo "<img src='images/default.png' width='20%'>";} ?> </div> <br>

			<p class="text-center">Are you sure you want to delete <b><?php echo $row['name']; ?></b>'s testimonial?</p>
			</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.php?id=<?php echo $row['id']; ?>" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Yes</a>
            </div>

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