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

class Annouce extends CI_Controller {

    
    public function __construct()
    {
        parent::__construct();
        if($this->session->userdata("level") != 99)
        {
            
            redirect(base_url(),'refresh');
            
        }
    }
    
    public function index()
    {
        $this->load->view('admin/Header');
        $this->load->view('admin/Annouce');
        $this->load->view('admin/Footer');
    }

    public function submit()
    {
        $text = $this->input->post("text");
        $object = array(
            'text'  =>  $text,
        );
        $this->db->update('announce', $object);
        
        
        redirect('Admin/Annouce','refresh');
    }

}

/* End of file Annouce.php */
