Guest User

Untitled

a guest
Jun 21st, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. <?php
  2. /**
  3. * Aluno_info_Controller
  4. *
  5. * @uses Template
  6. * @uses _Controller
  7. * @package
  8. * @version $id$
  9. * @copyright 1997-2005 The SPACEONLINE GROUP
  10. * @author Márcio Dias <suporte@spaceonline.com.br>
  11. * @license PHP Version 5.3
  12. */
  13.  
  14. class Teste_Controller extends Template_Controller {
  15.  
  16. // Do not allow to run in production
  17. const ALLOW_PRODUCTION = FALSE;
  18.  
  19. // Use the default Kohana template
  20. public $template = 'themes/base_page';
  21.  
  22. // Currently logged in user
  23. protected $user;
  24.  
  25. /**
  26. * __construct
  27. *
  28. * @access public
  29. * @return void
  30. */
  31. public function __construct()
  32. {
  33. parent::__construct();
  34.  
  35. }
  36.  
  37. /**
  38. * index
  39. *
  40. * @access public
  41. * @return void
  42. */
  43. public function index()
  44. {
  45. if ($_POST) {
  46.  
  47. $post = $_POST;
  48.  
  49. $this->alunos = ORM::factory('cliente');
  50.  
  51. foreach($post['mes'] as $mes) { $this->alunos->where('mes_ref', "$mes"); }
  52.  
  53. foreach($post['ano'] as $ano) { $this->alunos->where('ano_ref', "$ano"); }
  54.  
  55. foreach($post['curso'] as $curso) { $this->alunos->where('nome_curso', "$curso"); }
  56.  
  57. $this->template->alunos_view = $this->alunos->find_all();
  58.  
  59. $this->template->content = new View("teste");
  60. }
  61. }
  62.  
  63. }
  64.  
  65.  
  66. ?>
Add Comment
Please, Sign In to add comment