reportLayout.blade.php 2.15 KB
<?php $logdate = isset($_GET['logdate']) ? strtotime($_GET['logdate']) : strtotime(date('Y-m-d')); ?>
<style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
<script>
$(document).ready(function()
{
  waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
  $('#logdate').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
});

function reloadReport(sortby)
{
    var sortstr='';if(sortby!="")sortstr="&sort="+sortby
    
    doAjax('<?php echo $ajaxPath; ?>?logdate='+$("#logdate").val()+sortstr,'','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
}
function dlAgentlogXls()
{
    window.open('<?php echo $ajaxPath; ?>?dllogxls=1&logdate='+$("#logdate").val());return false;
}
</script>

<div class=innerAll>
    <!--<h4 style="float:left;width:50%;margin:10px 0;"><?php echo $reportName; ?></h4>
    <div style="clear:both"></div>
    <hr>-->

    <div style="float:left;width:50%">
    Search <input id=filter name="filter" type="text"> 
    Date : <input size=10 id='logdate' name='logdate' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='reloadReport("");' /> 
    </div>
    <div style="float:left;width:50%">
        <button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download' style='margin-top:-8px'><i class='fa fa-download'></i> Download</button>
    </div>

    <div style="clear:both"></div>
    <hr>
    @if(!empty($conn_exception))
    <div><?php echo $conn_exception; ?></div>
    <div style="clear:both"></div>
    <hr>
    @endif
    <div style='clear:both'></div>

    @if (count($chartarray) > 0)
        <div class=col-md-12>@include('layout.module.dialer.chart')</div>
        <div style='clear:both'></div>
    @endif

    <div style='overflow:auto'>
        <table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px'>
            <thead><?php echo $outhead; ?></thead>
            <?php echo $outstr; ?>
        </table>
    </div>
</div>