Advertisement
Guest User

BlueOnyx minimal Apache restart

a guest
Jun 16th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class Apacherestart extends MX_Controller {
  4.  
  5.     public function index() {
  6.  
  7.         $CI =& get_instance();
  8.  
  9.         // We load the BlueOnyx helper library first of all, as we heavily depend on it:
  10.         $this->load->helper('blueonyx');
  11.         init_libraries();
  12.  
  13.         // Need to load 'BxPage' for page rendering:
  14.         $this->load->library('BxPage');
  15.  
  16.         // Get $CI->BX_SESSION['sessionId'] and $CI->BX_SESSION['loginName'] from Cookie (if they are set):
  17.         $CI->BX_SESSION['sessionId'] = $CI->input->cookie('sessionId');
  18.         $CI->BX_SESSION['loginName'] = $CI->input->cookie('loginName');
  19.  
  20.         // Line up the ducks for CCE-Connection:
  21.         include_once('ServerScriptHelper.php');
  22.         $CI->serverScriptHelper = new ServerScriptHelper($CI->BX_SESSION['sessionId'], $CI->BX_SESSION['loginName']);
  23.         $CI->cceClient = $CI->serverScriptHelper->getCceClient();
  24.         $CI->cceClient->setObject("System", array('reload' => time()), "Web");
  25.  
  26.         header("Location: /gui");
  27.         exit;
  28.     }
  29. }
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement