 <section class="panel">
    <header class="panel-heading">
       <?php echo $type == 'import' ? 'Import CITES Summary' : 'Export CITES Summary'; ?>
    </header>
    <div class="panel-body">
        <div id="div_master_report_leadlist">
                <ul class="clearfix form-ul material"> 
                    <li class="col-sm-2">
                        <?php echo CHtml::textField('from_date','',array('class' => 'datepicker','data-label'=>'Invoice Date From'));?>
                    </li>
                    <li class="col-sm-2">
                        <?php echo CHtml::textField('to_date', '',array('class' => 'datepicker','data-label'=>'Invoice Date To'));?>
                    </li>
                </ul>
        </div>
        <div class='btn-wrap text-center'> 
            <button onclick="excel();return false;" class='plan-save-btn btn btn-theme' target="_blank"><i class="fa fa-download"></i> Excel</button>
        </div>
    </div>
</section>


<?php $cs = Yii::app()->getClientScript(); 

$cs->registerScript("excel", "function excel(){
        
       
        var from_date = $('#from_date').val(); 
        var to_date = $('#to_date').val();
        
        window.open($('#liveSite').val()+'index.php?r=reports/cites_summary_excel&from_date='+from_date+'&to_date='+to_date+'&type=".$type."', '_blank');
}", CClientScript::POS_HEAD);
