Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / front / popup.php @ b67d8923

Historique | Voir | Annoter | Télécharger (3,46 ko)

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

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

11
 LICENSE
12

13
 This file is part of GLPI.
14

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

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

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

    
31

    
32
$NEEDED_ITEMS=array("bookmark", "setup", "entity", "rulesengine", "ocsng", "search");
33

    
34
define('GLPI_ROOT', '..');
35
include (GLPI_ROOT . "/inc/includes.php");
36

    
37
checkLoginUser();
38

    
39
if (isset($_GET["popup"])) $_SESSION["glpipopup"]["name"]=$_GET["popup"];
40

    
41
if (isset($_SESSION["glpipopup"]["name"])){
42
        switch ($_SESSION["glpipopup"]["name"]){
43
                case "dropdown":
44
                        if (isset($_GET["rand"])) $_SESSION["glpipopup"]["rand"]=$_GET["rand"];
45

    
46
                        popHeader($LANG["common"][12],$_SERVER['PHP_SELF']);
47
                        // Manage reload
48
                        if (isset($_POST["add"])||isset($_POST["delete"])||isset($_POST["several_add"])||isset($_POST["move"])||isset($_POST["update"])){
49
                                echo "<script type='text/javascript' >\n";
50
                                echo "if (window.opener.document.getElementById('search_".$_SESSION["glpipopup"]["rand"]."').value=='".$CFG_GLPI["ajax_wildcard"]."'){\n";
51
                                echo "window.opener.document.getElementById('search_".$_SESSION["glpipopup"]["rand"]."').value='';";
52
                                echo "} else {\n";
53
                                echo "window.opener.document.getElementById('search_".$_SESSION["glpipopup"]["rand"]."').value='".$CFG_GLPI["ajax_wildcard"]."';\n";
54
                                echo "}\n";
55
                                echo "</script>";
56
                        }
57
                        include "setup.dropdowns.php";
58
                        popFooter();
59

    
60
                break;
61
                case "search_config":
62
                        popHeader($LANG["common"][12],$_SERVER['PHP_SELF']);
63
                        if (isset($_POST["add"])||isset($_POST["delete"])||isset($_POST["delete_x"])||isset($_POST["up"])||isset($_POST["up_x"])||isset($_POST["down"])||isset($_POST["down_x"])){
64
                                echo "<script type='text/javascript' >\n";
65
                                echo "window.opener.location.reload();";
66
                                echo "</script>";
67
                        }
68
                        include "setup.display.php";
69
                        popFooter();
70
                break;
71
                case "test_rule": 
72
                        popHeader($LANG["buttons"][50],$_SERVER['PHP_SELF']); 
73
                        include "rule.test.php"; 
74
                        popFooter(); 
75
                break;
76
                case "test_all_rules": 
77
                        popHeader($LANG["buttons"][50],$_SERVER['PHP_SELF']); 
78
                        include "rulesengine.test.php"; 
79
                        popFooter(); 
80
                break;
81
                case "show_cache": 
82
                        popHeader($LANG["buttons"][50],$_SERVER['PHP_SELF']); 
83
                        include "rule.cache.php"; 
84
                        popFooter(); 
85
                break;
86
                case "load_bookmark": 
87
                        popHeader($LANG["Menu"][40],$_SERVER['PHP_SELF']); 
88
                        $_GET["action"]="load";
89
                        include "bookmark.php"; 
90
                        popFooter(); 
91
                break;
92
                case "edit_bookmark": 
93
                        popHeader($LANG["Menu"][40],$_SERVER['PHP_SELF']); 
94
                        $_GET["action"]="edit";
95
                        include "bookmark.php"; 
96
                        popFooter(); 
97
                break;
98

    
99
        }
100
}
101

    
102
?>
Redmine Appliance - Powered by TurnKey Linux