-------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkRight("config", "w"); $plugin = new plugin(); if ($plugin->isActivated("environment")) { Html::header(PluginAccountsAccount::getTypeName(2), '', "plugins", "environment", "accounts"); } else { Html::header(PluginAccountsAccount::getTypeName(2), '', "plugins", "accounts"); } $PluginAccountsHash = new PluginAccountsHash(); $account = new PluginAccountsAccount(); if (isset($_POST["update_encrypted_password"]) && isset($_POST["item"])) { foreach ($_POST["upgrade_accounts"] as $key => $val) { foreach ($_POST["item"] as $key2 => $val2) { $encrypted_password = "******" . $key2; $_POST[$encrypted_password] = addslashes($_POST[$encrypted_password]); if (isset($_POST[$encrypted_password]) && $_POST[$encrypted_password]) { $query = "UPDATE `glpi_plugin_accounts_accounts`\n SET `encrypted_password` ='" . $_POST[$encrypted_password] . "'\n WHERE `id` ='" . $key2 . "' ;"; $result = $DB->query($query); $_SESSION['plugin_accounts']['upgrade'][] = $key2; } } } Html::back(); } else { $PluginAccountsHash->getFromDB(1); $hash = $PluginAccountsHash->fields["hash"]; $account->showAccountsUpgrade($hash); } Html::footer();