<?php include("includes/head.php");?>
<?php
$sid = isset($_GET["sid"])?$_GET["sid"]:'';
$intid = isset($_GET["intid"])?$_GET["intid"]:'';
?>
<div class="box-content">
  <form method="post" name="frmInteractions" id="frmInteractions">
    <input type="hidden" name="action" value="deleteInteractions">
    <input type="hidden" name="sid" value="<?php echo(isset($sid))?$sid:'';?>">
    <input type="hidden" name="intid" value="<?php echo(isset($intid))?$intid:'';?>">
    <div class="alert alert-danger" role="alert">
  		Are you sure want to delete this Interaction?
	</div>
    <div style="text-align:right;">      
      <button type="button" class="btn btn-default" data-dismiss="modal" onClick="$.colorbox.close();">Cancel</button>
      <button data-loading-text="Deleting..." type="submit" class="btn btn-danger"> <i class="fa fa-floppy-o"></i> Delete</button>
    </div>
  </form>
</div>
<script>
$(document).ready(function(e){
    
	$("#frmInteractions").on('submit', function(e){
	
	e.preventDefault();
	
	var shdata = new FormData(this);
	
	$.ajax({		
		type: 'POST',
        url: 'sh-update-config.php',
		processData: false,
		contentType: false,
        data: shdata,
		cache: false,
		dataType: 'html',
        success:function(response){
			
			$('#shInterationsUpdates').html(response);
			 
            //$('#myModal').modal('hide');			
			$.colorbox.close();
			
			Lobibox.notify('success', {
                    title: 'Success',
                    msg: 'Record deleted successfully.'
                });
        },
		error:function(html)
		{	
			//$('#myModal').modal('hide');
			$.colorbox.close();
			
			Lobibox.notify('error', {
                    title: 'Error',
                    msg: 'Some problem occurred, Please try again.'
                });
        }
    });
	
	});
	
});
</script>