Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / front / user.form.my.php @ b67d8923

Historique | Voir | Annoter | Télécharger (2,55 ko)

1
<?php
2

    
3
/*
4
 * @version $Id: user.form.my.php 7763 2009-01-06 18:44:50Z moyo $
5
 -------------------------------------------------------------------------
6
 GLPI - Gestionnaire Libre de Parc Informatique
7
 Copyright (C) 2003-2009 by the INDEPNET Development Team.
8

9
 http://indepnet.net/   http://glpi-project.org
10
 -------------------------------------------------------------------------
11

12
 LICENSE
13

14
 This file is part of GLPI.
15

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

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

26
 You should have received a copy of the GNU General Public License
27
 along with GLPI; if not, write to the Free Software
28
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
 --------------------------------------------------------------------------
30
 */
31

    
32
// ----------------------------------------------------------------------
33
// Original Author of file:
34
// Purpose of file:
35
// ----------------------------------------------------------------------
36

    
37
$NEEDED_ITEMS = array (
38
        "user",
39
        "profile",
40
        "group"
41
);
42

    
43
define('GLPI_ROOT', '..');
44
include (GLPI_ROOT . "/inc/includes.php");
45

    
46
checkLoginUser();
47
$user = new User();
48

    
49
if (isset ($_POST["update"]) && $_POST["ID"] == $_SESSION["glpiID"]) {
50
        $user->update($_POST);
51
        logEvent(0, "users", 5, "setup", $_SESSION["glpiname"] . "  " . $LANG["log"][21] . "  " . $_POST["name"] . ".");
52
        glpi_header($_SERVER['HTTP_REFERER']);
53
} else {
54

    
55
        if (!isset($_SESSION['glpi_viewpreferences'])) $_SESSION['glpi_viewpreferences']="my";
56
        if (isset($_GET['onglet'])) $_SESSION['glpi_viewpreferences']=$_GET['onglet'];
57

    
58
        if ($_SESSION["glpiactiveprofile"]["interface"] == "central")
59
                commonHeader($LANG["title"][13], $_SERVER['PHP_SELF']);
60
        else
61
                helpHeader($LANG["title"][13], $_SERVER['PHP_SELF']);
62

    
63
showUserPreferencesOnglets($_SERVER['PHP_SELF'],$_SESSION['glpi_viewpreferences']);
64
switch ($_SESSION['glpi_viewpreferences'])
65
{
66
        case "plugins":
67
                echo "<table class='tab_cadre_fixe' ><tr><td>";
68
                doHook("user_preferences",$_POST);
69
                echo "</td></tr>";
70
                echo "</table>";
71
        break;
72
        default:
73
                $user->showMyForm($_SERVER['PHP_SELF'], $_SESSION["glpiID"]);
74
        break;
75
}
76

    
77
if ($_SESSION["glpiactiveprofile"]["interface"] == "central")
78
        commonFooter();
79
else
80
        helpFooter();
81
}
82
?>
Redmine Appliance - Powered by TurnKey Linux