Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Aluno_info_Controller
- *
- * @uses Template
- * @uses _Controller
- * @package
- * @version $id$
- * @copyright 1997-2005 The SPACEONLINE GROUP
- * @author Márcio Dias <suporte@spaceonline.com.br>
- * @license PHP Version 5.3
- */
- class Teste_Controller extends Template_Controller {
- // Do not allow to run in production
- const ALLOW_PRODUCTION = FALSE;
- // Use the default Kohana template
- public $template = 'themes/base_page';
- // Currently logged in user
- protected $user;
- /**
- * __construct
- *
- * @access public
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * index
- *
- * @access public
- * @return void
- */
- public function index()
- {
- if ($_POST) {
- $post = $_POST;
- $this->alunos = ORM::factory('cliente');
- foreach($post['mes'] as $mes) { $this->alunos->where('mes_ref', "$mes"); }
- foreach($post['ano'] as $ano) { $this->alunos->where('ano_ref', "$ano"); }
- foreach($post['curso'] as $curso) { $this->alunos->where('nome_curso', "$curso"); }
- $this->template->alunos_view = $this->alunos->find_all();
- $this->template->content = new View("teste");
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment