Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2.  
  3. class My_Controller extends CI_Controller{
  4.  
  5. }
  6.  
  7. class LOG_Controller extends My_Controller{
  8.  
  9. }
  10.  
  11. class NOLOG_Controller extends My_Controller{
  12.  
  13. }
  14. ?>
  15.  
  16. class My_Controller extends CI_Controller {
  17.  
  18. // do something clever here
  19.  
  20. }
  21.  
  22. // do something even more clever here ...
  23. require_once("application/core/tool_controller.php");
  24.  
  25. class MY_Controller extends CI_Controller
  26. {
  27. public function __construct() {
  28. parent::__construct();
  29.  
  30. if ( !$this->ion-auth->loggedin() ) {
  31. redirect('auth/login');
  32. }
  33. }
  34. }
  35.  
  36. class Secure extends MY_Controller
  37. {
  38. function __construct() {
  39. parent::__construct();
  40. }
  41. }
  42.  
  43. class Insecure extends CI_Controller
  44. {
  45. function __construct() {
  46. parent::__construct();
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement