Esempio n. 1
0
 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         $key = PluginAccountsAesKey::checkIfAesKeyExists($item->getID());
         switch ($tabnum) {
             case 2:
                 if (!$key) {
                     self::showSelectAccountsList($item->getID());
                 } else {
                     $parm = array("id" => $item->getID(), "aeskey" => $key);
                     $accounts = PluginAccountsReport::queryAccountsList($parm);
                     PluginAccountsReport::showAccountsList($parm, $accounts);
                 }
                 break;
             case 3:
                 self::showHashChangeForm($item->getID());
                 break;
         }
     }
     return true;
 }
include '../../../inc/includes.php';
Session::checkCentralAccess();
if (isset($_POST["display_type"])) {
    $post = $_POST;
    $parm["display_type"] = $post["display_type"];
    $parm["id"] = $post["hash_id"];
    $parm["aeskey"] = $post["aeskey"];
    $parm["item_type"] = $post["item_type"];
    $parm["export_x"] = $post["export_x"];
    $parm["export_y"] = $post["export_y"];
    $accounts = array();
    foreach ($post["id"] as $k => $v) {
        $accounts[$k]["id"] = $v;
    }
    foreach ($post["name"] as $k => $v) {
        $accounts[$k]["name"] = $v;
    }
    foreach ($post["entities_id"] as $k => $v) {
        $accounts[$k]["entities_id"] = $v;
    }
    foreach ($post["type"] as $k => $v) {
        $accounts[$k]["type"] = $v;
    }
    foreach ($post["login"] as $k => $v) {
        $accounts[$k]["login"] = $v;
    }
    foreach ($post["password"] as $k => $v) {
        $accounts[$k]["password"] = $v;
    }
    PluginAccountsReport::showAccountsList($parm, $accounts);
}
Esempio n. 3
0
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';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
Session::checkLoginUser();
if (isset($_POST["key"])) {
    $options = array('id' => $_POST["id"], 'aeskey' => $_POST["key"]);
    $accounts = PluginAccountsReport::queryAccountsList($options);
    PluginAccountsReport::showAccountsList($options, $accounts);
} else {
    _e('Access denied');
}
Html::ajaxFooter();