glpi / src / front / menu.php @ e0c97dab
History | View | Annotate | Download (761 Bytes)
1 |
<?php
|
---|---|
2 |
|
3 |
include(dirname(dirname(__DIR__)) . |
4 |
DIRECTORY_SEPARATOR . "inc" . |
5 |
DIRECTORY_SEPARATOR . "includes.php"); |
6 |
|
7 |
if (PluginVigiloMenu::canView()) { |
8 |
Html::header(__('Vigilo', 'vigilo'), $_SERVER["PHP_SELF"], "plugins", |
9 |
"PluginVigiloMenu", "menu"); |
10 |
|
11 |
$res = null; |
12 |
$pipes = array(); |
13 |
|
14 |
if (!empty($_POST["deploy"])) { |
15 |
$fds = array( |
16 |
1 => array("pipe", "w"), |
17 |
2 => array("pipe", "w"), |
18 |
); |
19 |
$cmd = "/usr/bin/sudo -n /usr/bin/vigiconf deploy -f --debug"; |
20 |
$res = proc_open($cmd, $fds, $pipes); |
21 |
if (!is_resource($res)) |
22 |
$res = false; |
23 |
} |
24 |
PluginVigiloMenu::displayMenu($res, $pipes); |
25 |
} else {
|
26 |
Html::displayRightError();
|
27 |
} |
28 |
|
29 |
Html::footer();
|
30 |
|