예제 #1
0
         $input = array('id' => $key);
         if ($val == 1) {
             $account_item->check($key, 'w');
             $account_item->delete($input);
         }
     }
     Html::back();
     //from items ?
 } else {
     if (isset($_POST["deleteaccounts"])) {
         $input = array('id' => $_POST["id"]);
         $account_item->check($_POST["id"], 'w');
         $account_item->delete($input);
         Html::back();
     } else {
         $account->checkGlobal("r");
         if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
             $plugin = new Plugin();
             if ($plugin->isActivated("environment")) {
                 Html::header(PluginAccountsAccount::getTypeName(2), '', "plugins", "environment", "accounts");
             } else {
                 Html::header(PluginAccountsAccount::getTypeName(2), '', "plugins", "accounts");
             }
         } else {
             Html::helpHeader(PluginAccountsAccount::getTypeName(2));
         }
         $account->showForm($_GET["id"]);
         if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
             Html::footer();
         } else {
             Html::helpFooter();
예제 #2
0
파일: hash.php 프로젝트: geldarr/hack-space
-------------------------------------------------------------------------

LICENSE

This file is part of accounts.

accounts is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

accounts is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with accounts. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
$account = new PluginAccountsAccount();
$account->checkGlobal("w");
$plugin = new plugin();
if ($plugin->isActivated("environment")) {
    Html::header(PluginAccountsAccount::getTypeName(2), '', "plugins", "environment", "hash");
} else {
    Html::header(PluginAccountsAccount::getTypeName(2), '', "plugins", "accounts", "hash");
}
Search::show("PluginAccountsHash");
Html::footer();
예제 #3
0
accounts is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with accounts. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
$account = new PluginAccountsAccount();
$account->checkGlobal(UPDATE);
$hashClass = new PluginAccountsHash();
$update = 0;
if (countElementsInTable("glpi_plugin_accounts_accounts") > 0) {
    $update = 1;
}
if (isset($_POST["add"])) {
    $hashClass->check(-1, CREATE, $_POST);
    $newID = $hashClass->add($_POST);
    $hashClass->redirectToList();
} else {
    if (isset($_POST["upgrade"])) {
        if ($_POST["hash"]) {
            include_once GLPI_ROOT . "/plugins/accounts/hook.php";
            $_SESSION['plugin_accounts']['aescrypted_key'] = $_POST["aeskey"];
            $hashClass->update($_POST);
예제 #4
0
along with accounts. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
$plugin = new plugin();
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
    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 = new PluginAccountsAccount();
$account->checkGlobal(READ);
if ($account->canView()) {
    if (Session::haveRight("plugin_accounts_see_all_users", 1)) {
        echo "<div align='center'>";
        echo "<a onclick='add_file_modal.dialog(\"open\");' href='#modal_account_content' title='" . __s('Type view') . "'>" . __('Type view', 'accounts') . "</a>";
        echo "</div>";
        Ajax::createModalWindow('add_file_modal', $CFG_GLPI['root_doc'] . "/plugins/accounts/ajax/accounttree.php", array('title' => __('Type view', 'accounts'), 'width' => 800, 'height' => 400));
    }
    Search::show("PluginAccountsAccount");
} else {
    Html::displayRightError();
}
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
    Html::footer();
} else {
    Html::helpFooter();