Welcome Guest, Not a member yet? Register   Sign In
failed to upload image file and save data
#21

[eluser]cestaz18[/eluser]
here's my complete code...

VIEW
Code:
<div class="infield">
                                    &lt;?php echo form_open_multipart('at_reports/post');?&gt;
                                    &lt;input type="file" name="userfile" class="tb" title="&lt;?=lang('icon');?&gt;"/&gt;
                                    &lt;input type="submit" value="upload" /&gt;
                                    &lt;!--&lt;/form&gt;--&gt;
                                    &lt;!--&lt;input type="text" name="icon" class="tb" title="&lt;?=lang ('icon');?&gt;" /&gt;--&gt;
                                </div>

CONTROLLER
Code:
[code]

&lt;?php
    class At_reports extends Controller {
        function At_reports() {
            parent::Controller();
            $method = $this->uri->rsegment(2);
            $user = $this->session->userdata('user');
            if (($method!='login'&&$method!='auth'&&$method!='logout')&&!$user) redirect('at_reports');

            $this->load->helper('form');
            $this->load->model('At_reports_db', 'Reports');
            $this->load->model('Dataset_db');

        
            
            $lang_select = $this->session->userdata('lang_select');
            $this->config->set_item('language', $lang_select);
            $this->lang->load('at_reports');
        }

        function index() {
            $data['showtoolbar'] = true;
            $data['ptitle'] = "Admin Tool - Reports";
            $data['navs'] = $this->Dataset_db->buildNav(0);
            $data['report_navs'] = $this->Dataset_db->buildReportNav(0);
            $data['admin_navs'] = $this->Dataset_db->buildAdminToolNav(0);
            $data['current_main_nav'] = 'admin';

            //tab management
            $tabs = $this->session->userdata('tabs');
            if (!$tabs) $tabs = array();
            $tabs['at_reports'] = $this->Dataset_db->getAdminTool('at_reports');
            $this->session->set_userdata('tabs',$tabs);
            $data['current_tab'] = $tabs['at_reports']['link'];

            $data['operator'] = $this->Dataset_db->getSearchTypes('OPERATOR');
            $data['content'] = $this->load->view('home',$data,true);
            $this->load->vars($data);
            $this->load->view('default_view');
        }

        function listview() {
            $data = $this->Reports->getList();
            $this->load->view('template/table',$data);
        }

        function detaillistview() {
            //$dt['module_id'] = $this->input->post('item');
            $data = $this->Reports->getParameters();
            $this->load->view('template/table',$data);
        }

        function js() {
            $this->load->view('js/script.js');
        }

       [code]


Messages In This Thread
failed to upload image file and save data - by El Forum - 01-18-2010, 09:41 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 09:53 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 09:57 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 10:05 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 10:10 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 11:23 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 11:30 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 11:35 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 12:09 AM
failed to upload image file and save data - by El Forum - 01-19-2010, 12:22 AM
failed to upload image file and save data - by El Forum - 01-19-2010, 03:34 AM
failed to upload image file and save data - by El Forum - 01-19-2010, 06:50 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 07:23 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 07:39 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 07:43 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:08 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:17 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:22 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:33 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:37 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:43 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:46 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:48 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:50 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:51 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:56 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 10:40 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:04 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:06 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:07 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:11 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:18 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:26 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:38 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:56 PM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:01 AM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:09 AM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:17 AM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB