Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Teste_Controller extends Template_Controller {
- const ALLOW_PRODUCTION = FALSE;
- public $template = 'themes/base_page';
- // Currently logged in user
- protected $user;
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * index
- *
- * @access public
- * @return void
- */
- public function index()
- {
- if ($_POST) {
- $post = $_POST;
- $alunos = ORM::factory('cliente');
- foreach($post['mes'] as $mes) { $alunos->where('mes_ref', $mes); }
- foreach($post['ano'] as $ano) { $alunos->where('ano_ref', $ano); }
- foreach($post['curso'] as $curso) { $alunos->where('nome_curso', $curso); }
- $this->template->alunos = $alunos->find_all();
- $this->template->content = new View("teste");
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment