<?php 

function sms_delivery_report_cb() {
	$support = new support;
	$report = $support->fetch_sms_details('reports');
	// var_dump($report);
	$i = 1;
	?>
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-custom bg-white">
			    <div class="panel-heading">
			        <h1>SMS Delivery Report</h1>
			    </div>
		        <div class="panel-body instruction table-responsive">
		        	<table id="bootstrap-data-table-export" class="table table-striped table-bordered">
			            <thead>
			              	<tr>
				                <th>SN</th>
								<th>Mobile Number</th>
								<th>Message</th>
								<th>Sender</th>
								<th>Price</th>
								<th>Units</th>
								<th>Length</th>
								<th>Send Date</th>
								<th>Status</th>
			              	</tr>
			            </thead>
			            <tbody>
			            	<?php if (_count($report) > 0): foreach ($report as $report_obj) : ?>
			            		<tr>
			            			<td><?php echo $i; ?></td>
			            			<td><?php echo $report_obj->mobile; ?></td>
			            			<td style="max-width: 230px; overflow: hidden"><?php echo $report_obj->message; ?></td>
			            			<td><?php echo $report_obj->sender; ?></td>
			            			<td><?php echo toMoney($report_obj->price); ?></td>
			            			<td><?php echo $report_obj->units; ?></td>
			            			<td><?php echo $report_obj->length; ?></td>
			            			<td><?php echo $report_obj->send_date; ?></td>
			            			<td><?php echo $report_obj->status; ?></td>
			            		</tr>
			            	<?php $i++; endforeach; endif; ?>
			            </tbody>
			        </table>
				</div>
			</div>
		</div>
	</div>
	<?php
}