Exemplo n.º 1
0
                            if (isset($_POST["deleteaccounts"])) {
                                $input = array('id' => $_POST["id"]);
                                $account_item->check($_POST["id"], UPDATE);
                                $account_item->delete($input);
                                Html::back();
                            } else {
                                $account->checkGlobal(READ);
                                if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
                                    $plugin = new Plugin();
                                    if ($plugin->isActivated("environment")) {
                                        Html::header(PluginAccountsAccount::getTypeName(2), '', "assets", "pluginenvironmentdisplay", "accounts");
                                    } else {
                                        Html::header(PluginAccountsAccount::getTypeName(2), '', "admin", "pluginaccountsmenu");
                                    }
                                } else {
                                    Html::helpHeader(PluginAccountsAccount::getTypeName(2));
                                }
                                $account->display(array('id' => $_GET['id']));
                                if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
                                    Html::footer();
                                } else {
                                    Html::helpFooter();
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}