2013-04-17 17:23:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
class ControllerPolicyApply extends Controller {
|
|
|
|
private $error = array();
|
|
|
|
|
|
|
|
public function index(){
|
|
|
|
|
|
|
|
$this->id = "content";
|
|
|
|
$this->template = "policy/apply.tpl";
|
|
|
|
$this->layout = "common/layout-empty";
|
|
|
|
|
|
|
|
|
|
|
|
$request = Registry::get('request');
|
|
|
|
|
|
|
|
$db = Registry::get('db');
|
|
|
|
$lang = Registry::get('language');
|
|
|
|
|
|
|
|
if(Registry::get('admin_user') == 0) {
|
|
|
|
die("go away");
|
|
|
|
}
|
|
|
|
|
|
|
|
system('sudo -n /etc/init.d/rc.piler reload', $val);
|
|
|
|
|
|
|
|
if($val === 0) {
|
2013-04-17 21:45:02 +02:00
|
|
|
$this->data['x'] = $lang->data['text_applied'];
|
2013-04-17 17:23:20 +02:00
|
|
|
} else {
|
2013-04-17 21:45:02 +02:00
|
|
|
$this->data['x'] = $lang->data['text_install_sudo_apply'];
|
2013-04-17 17:23:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-04-17 21:45:02 +02:00
|
|
|
$this->render();
|
2013-04-17 17:23:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|