芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/breadwinnerv2/crm/application/controllers/Quote.php
load->model('quote_model', 'quote'); if (!is_login()) { redirect(base_url() . 'user/profile', 'refresh'); } } //invoices list public function index() { $head['title'] = "Manage Quote"; $this->load->view('includes/header', $head); $this->load->view('quotes/quotes'); $this->load->view('includes/footer'); } public function ajax_list() { $list = $this->quote->get_datatables(); $data = array(); $no = $this->input->post('start'); foreach ($list as $invoices) { $no++; $row = array(); $row[] = $no; $row[] = $invoices->tid; $row[] = $invoices->name; $row[] = dateformat($invoices->invoicedate); $row[] = amountFormat($invoices->total); $row[] = '
' . $this->lang->line(ucwords($invoices->status)) . '
'; $row[] = '
tid") . '" class="btn btn-success btn-xs">
' . $this->lang->line('View') . '
'; $data[] = $row; } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $this->quote->count_all(), "recordsFiltered" => $this->quote->count_filtered(), "data" => $data, ); //output to json format echo json_encode($output); } public function view() { $tid = intval($this->input->get('id')); $data['id'] = $tid; $head['title'] = "Quote $tid"; $data['invoice'] = $this->quote->quote_details($tid); if($data['invoice']['csd']==$this->session->userdata('user_details')[0]->cid) { $data['products'] = $this->quote->quote_products($tid); $data['employee'] = $this->quote->employee($data['invoice']['eid']); $this->load->view('includes/header', $head); $this->load->view('quotes/view', $data); $this->load->view('includes/footer'); } } }