Welcome Guest, Not a member yet? Register   Sign In
get value option in controllers
#4

Hi, after 1 day I think that problem is not in form_open

($start_date) and ($end_date) get by sAjaxSource with ($v) in function
PHP Code:
function getrepairbyuser($pdf NULL$xls NULL)
    {
        if ($this->input->get('start_date')) {
            $start_date date('Y-m-d'strtotime($this->input->get('start_date'))) . " 00:00:00";
        } else {
            $start_date date('Y-m-d 00:00:00');
        }
        if ($this->input->get('end_date')) {
            $end_date date('Y-m-d'strtotime($this->input->get('end_date'))) . " 23:59:59";
        } else {
            $end_date date('Y-m-d 23:59:59');
        


and I don't know how to send incule $status, $user_id  with $v  to (getrepairbyuser) ^^!

In view (sAjaxSource) is

PHP Code:
    $(document).ready(function () {

        $('.date').datepicker({ dateFormat'mm-dd-yy' });
        var oTable = $('#dynamic-table').dataTable({
            "aaSorting": [[0"desc"]],
            "aLengthMenu": [[102550100, -1], [102550100"All"]],
            "iDisplayLength"10,
            'bProcessing'true'bServerSide'true,
            'sAjaxSource''<?= site_url('panel/reports/getrepairbyuser/?v=1' . $v) ?>',
            'fnServerData': function (sSourceaoDatafnCallback) {
                aoData.push({
                    "name""<?= $this->security->get_csrf_token_name() ?>",
                    "value""<?= $this->security->get_csrf_hash() ?>"
                });
                $.ajax({'dataType''json''type''POST''url'sSource'data'aoData'success'fnCallback});
            }, 
            "aoColumns": [
            null,
            null,
            
null,
            null,
            null,
            null,
            {mRenderformatToMoney},
            ],
            
"fnFooterCallback": function (nRowaaDataiStartiEndaiDisplay) {
                var gtotal 0;
                for (var 0aaData.lengthi++) {
                    gtotal += parseFloat(aaData[aiDisplay[i]][6]);
                }
                var nCells nRow.getElementsByTagName('th');
                nCells[6].innerHTML formatMoney(parseFloat(gtotal));
            }
           
        
});
    }); 

^^!
Reply


Messages In This Thread
get value option in controllers - by datcanlong - 11-07-2019, 10:38 AM
RE: get value option in controllers - by Wouter60 - 11-07-2019, 12:48 PM
RE: get value option in controllers - by datcanlong - 11-08-2019, 10:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB