<?php 

		$mar=  webmastermarketing();
                $div=GetValue('divisi','sv_master_sales',array('id'=>'where/'.$mar));
$jenisaktifitas=array();
                if(!diaadmin()){
                    //$jenisaktifitas=array('type'=>'where/'.$div,'notes'=>'order/asc');
                }
                $opt_aktivitas=GetOptAll('ref_activity','-Aktivitas-',$jenisaktifitas,'notes','id',NULL,array(),array());
?>

<script>
    $(document).ready(function(e){
        $('#datamarketing').load('<?php echo base_url()?>dashboard/chart_marketing');
    });
    function cari_marketing_aktivity(){
        var start=$('#start').val();
        var end=$('#end').val();
        var act=$('#aktivitas').val();
        //if(start && end){
        $('#datamarketing').load('<?php echo base_url()?>dashboard/chart_marketing',{s:start,e:end,a:act});
        //}
    };
    </script>
<style>
    .centerz{
        float:none!important;
        margin:0 auto;
    }
    input[type="text"]{
        padding:0!important;
    }
</style>
<div class="col-md-12">
    <div class="col-md-6 centerz"><center>
            <label></label>&nbsp;<?php echo form_dropdown($nm_f,$opt_aktivitas,(isset($val[$nm_f]) ? $val[$nm_f] : ''),"class='select2' id='aktivitas'")?>&nbsp;&nbsp;<input type="text" name="start" id="start" placeholder="Periode : Start" class="datepicker" data-provide="datepicker" data-date-format="yyyy-mm-dd" style="border-radius: 5px!important;height:26px;text-indent:37px;" >&nbsp;-&nbsp;<input type="text" name="end" placeholder="Periode : End" id="end" class="datepicker" data-provide="datepicker" data-date-format="yyyy-mm-dd" style="border-radius: 5px!important;height:26px;text-indent:37px;">
        <button type="button" id="search" onclick="cari_marketing_aktivity()">Search</button></center>
    </div>
</div>
<div id="datamarketing"></div>