<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class newOne extends Admin_Controller
{
    function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        $all  = $this->db->query("SELECT *  FROM `testTable`")->result();
   $dlog = array(
                    'total'         => !empty($_POST['total_credit'][$key]) ? $_POST['total_credit'][$key] : $_POST['total_debit'][$key] * -1,
                    'notes'         => !empty($log['notes'][$key]) ? $log['notes'][$key] : '',
                    'userId'        => getUserId(),
                    'accountId'     => 0,
                    'dateCreation'  => date('Y-m-d H:i:s'),
                    'lastUpdate'    => date('Y-m-d H:i:s')
                );
                // $log_item = $this->general_model->updateRowById('dailyLog_items', 'id', $check_item->id, $dlog);
            }
        }
        redirect('admin/dailyLog/index', 'refresh');
        $this->template
            ->set('view', 'admin/newOne/index')
            ->set('all', $all)
            ->render();
    }
}
