Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') or die('No direct script access.');
- class Controller_Home extends Controller {
- public function action_index() {
- $view = View::factory('home');
- $cs = new Cod4Server(COD4IP,COD4RCON);
- $rawstatus = $cs->getStatus();
- $parsedstatus = $cs->parseStatus($rawstatus);
- if($rawstatus == false) {
- $view->set('connected',false);
- }
- else {
- $view->set('connected',true);
- $view->set('s',$parsedstatus);
- }
- $this->request->response = $view;
- }
- } // End Welcome
Add Comment
Please, Sign In to add comment