0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www
/
arcaneoverseas.com
/
application
/
controllers
/
admin
/
[
Home
]
File: newsletter.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Newsletter extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see http://codeigniter.com/user_guide/general/urls.html */ /* * Doctrine EntityManager */ public $em; /* * constructeur */ public function __construct() { parent::__construct(); /* Session controle */ if ($this->session->userdata("logged_in") != true) redirect('admin/login/index'); /* Standard Libraries */ $this->layout->set_theme('admin/interne_page'); //Instantiate a Doctrine Entity Manager $this->em = $this->doctrine->em; /* Standard Libraries */ $this->load->database(); $this->load->helper('url'); $this->load->helper('csv'); /* Load Crud */ $this->load->library('grocery_CRUD'); } public function index($type_contenu_id = 0) { $data = array(); $crud = new grocery_CRUD(); $crud->set_table('newsletter'); $crud->display_as('inscrit','Recevoir les actualités '); $crud->unset_add(); $crud->unset_edit(); $output = $crud->render(); $output->title_module = "Message Contact" ; $this->layout->views('admin/session_user') ->views('admin/header') ->views('admin/nav') ->view('admin/view_newletter', $output); } public function create_csv(){ $this->load->database(); $query = $this->db->get('newsletter'); $this->load->helper('csv'); query_to_csv($query,true,'Newsletter_'.date('dMy').'.csv'); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */
©
2018.