<?php include("includes/head.php");?>
<?php
$sid = isset($_GET["sid"])?$_GET["sid"]:'';
$stid = isset($_GET["stid"])?$_GET["stid"]:'';
?>
<div class="box-content">
  <form method="post" name="frmStrategy" id="frmStrategy">
    <input type="hidden" name="action" value="deleteStrategy">
    <input type="hidden" name="sid" value="<?php echo(isset($sid))?$sid:'';?>">
    <input type="hidden" name="stid" value="<?php echo(isset($stid))?$stid:'';?>">
    <div class="alert alert-danger" role="alert">
  		Are you sure want to delete this Strategy permanently?
	</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){
    
	$("#frmStrategy").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){
			
			$('#shRISREMA').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>