Ejemplo n.º 1
0
            $_GET["action"] = "edit";
            include "bookmark.php";
            break;
        case "edit_user_notification":
            popHeader($LANG['Menu'][40], $_SERVER['PHP_SELF']);
            include "ticket_user.form.php";
            break;
        case "add_ldapuser":
            popHeader($LANG['ldap'][35], $_SERVER['PHP_SELF']);
            include "ldap.import.php";
            break;
        case "add_ruleparameter":
            popHeader($LANG['ldap'][35], $_SERVER['PHP_SELF']);
            include strtolower($_GET['sub_type'] . "Parameter.php");
            break;
        case "list_notificationtags":
            popHeader($LANG['mailing'][138], $_SERVER['PHP_SELF']);
            include "notification.tags.php";
            break;
        case "show_kb":
            popHeader($LANG['title'][5], $_SERVER['PHP_SELF']);
            $kb = new KnowbaseItem();
            $kb->check($_GET["id"], 'r');
            $kb->showFull(true);
            popHeader($LANG['mailing'][138], $_SERVER['PHP_SELF']);
            break;
    }
    echo "<div class='center'><br><a href='javascript:window.close()'>" . $LANG['buttons'][60] . "</a>";
    echo "</div>";
    popFooter();
}
Ejemplo n.º 2
0
            $soft->redirectToList();
        } else {
            if (isset($_REQUEST["purge"])) {
                $soft->check($_REQUEST["id"], 'd');
                $soft->delete($_REQUEST, 1);
                Event::log($_REQUEST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][24]);
                $soft->redirectToList();
            } else {
                if (isset($_POST["update"])) {
                    $soft->check($_POST["id"], 'w');
                    $soft->update($_POST);
                    Event::log($_POST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][21]);
                    glpi_header($_SERVER['HTTP_REFERER']);
                } else {
                    if (isset($_POST["mergesoftware"])) {
                        popHeader($LANG['Menu'][4]);
                        if (isset($_POST["id"]) && isset($_POST["item"]) && is_array($_POST["item"]) && count($_POST["item"])) {
                            $soft->check($_POST["id"], 'w');
                            $soft->merge($_POST["item"]);
                        }
                        glpi_header($_SERVER['HTTP_REFERER']);
                    } else {
                        commonHeader($LANG['Menu'][4], $_SERVER['PHP_SELF'], "inventory", "software");
                        $soft->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"]));
                        commonFooter();
                    }
                }
            }
        }
    }
}
Ejemplo n.º 3
0
Copyright (C) 2003-2011 by the INDEPNET Development Team.

http://indepnet.net/   http://glpi-project.org
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkLoginUser();
popHeader($LANG['common'][12], $_SERVER['PHP_SELF']);
Search::manageGetValues('DocumentType');
Search::showList('DocumentType', $_GET);
popFooter();
Ejemplo n.º 4
0
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 ocsinventoryng. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------------------------------------------------------------------------------*/
include '../../../inc/includes.php';
Session::checkLoginUser();
if (isset($_GET["popup"])) {
    $_SESSION["glpipopup"]["name"] = $_GET["popup"];
}
if (isset($_SESSION["glpipopup"]["name"])) {
    switch ($_SESSION["glpipopup"]["name"]) {
        case "test_rule":
            popHeader(_x('button', 'Test'), $_SERVER['PHP_SELF']);
            include GLPI_ROOT . "/front/rule.test.php";
            break;
        case "test_all_rules":
            popHeader(__('Test rules engine'), $_SERVER['PHP_SELF']);
            include GLPI_ROOT . "/front/rulesengine.test.php";
            break;
        case "show_cache":
            popHeader(__('Information about cache'), $_SERVER['PHP_SELF']);
            include GLPI_ROOT . "/front/rule.cache.php";
            break;
    }
    echo "<div class='center'><br><a href='javascript:window.close()'>" . __('Close') . "</a>";
    echo "</div>";
    popFooter();
}
Ejemplo n.º 5
0
     $budget->check($_REQUEST["id"], 'w');
     if ($budget->delete($_REQUEST, 1)) {
         Event::log($_REQUEST["id"], "budget", 4, "financial", $_SESSION["glpiname"] . " " . $LANG['log'][24]);
     }
     $budget->redirectToList();
 } else {
     if (isset($_POST["update"])) {
         $budget->check($_POST["id"], 'w');
         if ($budget->update($_POST)) {
             Event::log($_POST["id"], "budget", 4, "financial", $_SESSION["glpiname"] . " " . $LANG['log'][21]);
         }
         glpi_header($_SERVER['HTTP_REFERER']);
     } else {
         /// TODO To manage using dropdown.common.form
         if (isset($_GET['popup'])) {
             popHeader($LANG['financial'][87], $_SERVER['PHP_SELF']);
             if (isset($_GET["rand"])) {
                 $_SESSION["glpipopup"]["rand"] = $_GET["rand"];
             }
         } else {
             commonHeader($LANG['financial'][87], $_SERVER['PHP_SELF'], "financial", "budget");
         }
         $budget->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"]));
         if (isset($_GET['popup'])) {
             echo "<div class='center'><br><a href='javascript:window.close()'>" . $LANG['buttons'][13] . "</a>";
             echo "</div>";
             popFooter();
         } else {
             commonFooter();
         }
     }
Ejemplo n.º 6
0
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    define('GLPI_ROOT', '..');
    include GLPI_ROOT . "/inc/includes.php";
}
checkRight("import_externalauth_users", 'w');
AuthLdap::manageValuesInSession($_REQUEST);
if (isset($_SESSION['ldap_import']['popup']) && $_SESSION['ldap_import']['popup']) {
    popHeader($LANG['setup'][3], $_SERVER['PHP_SELF']);
} else {
    commonHeader($LANG['setup'][3], $_SERVER['PHP_SELF'], "admin", "user", "ldap");
}
if (isset($_GET['start'])) {
    $_SESSION['ldap_import']['start'] = $_GET['start'];
}
if (isset($_GET['order'])) {
    $_SESSION['ldap_import']['order'] = $_GET['order'];
}
if ($_SESSION['ldap_import']['action'] == 'show') {
    $_REQUEST['target'] = $_SERVER['PHP_SELF'];
    $authldap = new AuthLDAP();
    $authldap->getFromDB($_SESSION['ldap_import']['authldaps_id']);
    AuthLdap::showUserImportForm($authldap);
    if (isset($_SESSION['ldap_import']['authldaps_id']) && $_SESSION['ldap_import']['authldaps_id'] != NOT_AVAILABLE && isset($_SESSION['ldap_import']['criterias']) && !empty($_SESSION['ldap_import']['criterias'])) {
     $dropdown->check($_POST["id"], 'w');
     $dropdown->update($_POST);
     $dropdown->refreshParentInfos();
     Event::log($_POST["id"], get_class($dropdown), 4, "setup", $_SESSION["glpiname"] . " " . $LANG['log'][21]);
     glpi_header($_SERVER['HTTP_REFERER']);
 } else {
     if (isset($_POST["execute"])) {
         if (method_exists($dropdown, $_POST["_method"])) {
             call_user_func(array(&$dropdown, $_POST["_method"]), $_POST);
             glpi_header($_SERVER['HTTP_REFERER']);
         } else {
             displayErrorAndDie($LANG['common'][24]);
         }
     } else {
         if (isset($_GET['popup'])) {
             popHeader($dropdown->getTypeName(), $_SERVER['PHP_SELF']);
             if (isset($_GET["rand"])) {
                 $_SESSION["glpipopup"]["rand"] = $_GET["rand"];
             }
             $dropdown->showForm($_GET["id"]);
             echo "<div class='center'><br><a href='javascript:window.close()'>" . $LANG['buttons'][13] . "</a>";
             echo "</div>";
             popFooter();
         } else {
             $dropdown->displayHeader();
             if (!isset($options)) {
                 $options = array();
             }
             $dropdown->showForm($_GET["id"], $options);
             commonFooter();
         }