Guest User

Untitled

a guest
Jun 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php defined('SYSPATH') or die('No direct script access.');
  2.  
  3. class Controller_Home extends Controller {
  4.  
  5. public function action_index() {
  6.  
  7. $view = View::factory('home');
  8.  
  9. $cs = new Cod4Server(COD4IP,COD4RCON);
  10.  
  11. $rawstatus = $cs->getStatus();
  12. $parsedstatus = $cs->parseStatus($rawstatus);
  13.  
  14.  
  15. if($rawstatus == false) {
  16. $view->set('connected',false);
  17. }
  18. else {
  19. $view->set('connected',true);
  20. $view->set('s',$parsedstatus);
  21. }
  22.  
  23. $this->request->response = $view;
  24. }
  25.  
  26. } // End Welcome
Add Comment
Please, Sign In to add comment