<div class="right_col" role="main">
	<div class="">
		<div class="page-title">
			<div class="title_left">
                <h3>Deposit Activity</h3>
			</div>
		</div>
		<div class="clearfix"></div>
		<div class="row">
			<div class="col-md-12 col-sm-12 col-xs-12">
				<div class="x_panel">
					<div class="x_content">
						<table id="datatable" class="table table-striped table-bordered">
							  
						</table>
                        <script>
                            function fetchData() {
                                var xhttp = new XMLHttpRequest();
                                xhttp.onreadystatechange = function() {
                                    if (this.readyState == 4 && this.status == 200) {
                                        document.getElementById("datatable").innerHTML = this.responseText;
                                    }
                                };
                                xhttp.open("GET", "deposit_activity_table.php", true);
                                xhttp.send();
                            }

                            // Fetch data initially
                            fetchData();

                            // Refresh data every 5 seconds (5000 milliseconds)
                            // setInterval(fetchData, 5000);
                        </script>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>

<?php
	if(isset($_REQUEST['delete'])){
		$sa_id = $_REQUEST['delete'];
		mysqli_query($conn,"DELETE FROM sms_activity WHERE sa_id=$sa_id") or die (mysql_error());
		header('Location: index.php?pagecontent=sms_activity');  
	}
?>