Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

glpi / front / menu.php @ 0e0753c8

History | View | Annotate | Download (665 Bytes)

1
<?php
2

    
3
include ("../../../inc/includes.php");
4

    
5
if (PluginVigiloMenu::canView()) {
6
    Html::header(__('Vigilo', 'vigilo'), $_SERVER["PHP_SELF"], "plugins",
7
                    "PluginVigiloMenu", "menu");
8

    
9
    $res = null;
10
    $pipes = array();
11

    
12
    if (!empty($_POST["deploy"])) {
13
        $fds = array(
14
            1 => array("pipe", "w"),
15
            2 => array("pipe", "w"),
16
        );
17
        $cmd = "/usr/bin/sudo -n /usr/bin/vigiconf deploy -f --debug";
18
        $res = proc_open($cmd, $fds, $pipes);
19
        if (!is_resource($res))
20
            $res = false;
21
    }
22
    PluginVigiloMenu::displayMenu($res, $pipes);
23
} else {
24
    Html::displayRightError();
25
}
26

    
27
Html::footer();
28