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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkSeveralRightsOr(array('notification' => 'r', 'config' => 'w'));
commonHeader($LANG['setup'][704], $_SERVER['PHP_SELF'], "config", "mailing", -1);
if (isset($_GET['activate'])) {
    $config = new Config();
    $tmp['id'] = $CFG_GLPI['id'];
    $tmp['use_mailing'] = 1;
    $config->update($tmp);
    glpi_header($_SERVER['HTTP_REFERER']);
}
if (!$CFG_GLPI['use_mailing']) {
    echo "<div align='center'<p>";
    if (haveRight("config", "w")) {
        echo "<a href='setup.notification.php?activate=1' class='icon_consol b'>" . $LANG['setup'][202] . "</a></p></div>";
    }
} else {
    if (!haveRight("config", "r") && haveRight("notification", "r") && $CFG_GLPI['use_mailing']) {
Exemplo n.º 2
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 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:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkSeveralRightsOr(array("reservation_central" => "r", "reservation_helpdesk" => "1"));
if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") {
    helpHeader($LANG['Menu'][31], $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
} else {
    commonHeader($LANG['Menu'][17], $_SERVER['PHP_SELF'], "utils", "reservation");
}
if (!haveRight("reservation_central", "r")) {
    ReservationItem::showListSimple();
} else {
    Search::show('ReservationItem');
}
if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") {
    helpFooter();
} else {
    commonFooter();
}
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if (isset($_POST["action"]) && isset($_POST["itemtype"]) && !empty($_POST["itemtype"])) {
    if (!class_exists($_POST['itemtype'])) {
        exit;
    }
    if (isset($_POST['sub_type'])) {
        if (!class_exists($_POST['sub_type'])) {
            exit;
        }
        $item = new $_POST["sub_type"]();
    } else {
        $item = new $_POST["itemtype"]();
    }
    if (in_array($_POST["itemtype"], $CFG_GLPI["infocom_types"])) {
        checkSeveralRightsOr(array($_POST["itemtype"] => "w", "infocom" => "w"));
    } else {
        $item->checkGlobal("w");
    }
    echo "<input type='hidden' name='action' value='" . $_POST["action"] . "'>";
    echo "<input type='hidden' name='itemtype' value='" . $_POST["itemtype"] . "'>";
    echo '&nbsp;';
    switch ($_POST["action"]) {
        case "activate_rule":
            Dropdown::showYesNo("activate_rule");
            echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>\n";
            break;
        case 'move_under':
            echo $LANG['setup'][75];
            Dropdown::show($_POST['itemtype'], array('name' => 'parent', 'comments' => 0));
            echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>\n";
Exemplo n.º 4
0
             case "delete":
                 checkRight("delete_ticket", "1");
                 break;
             case "add_followup":
                 checkSeveralRightsOr(array('global_add_followups' => 1, 'own_ticket' => 1));
                 break;
             case "add_task":
                 checkSeveralRightsOr(array('global_add_tasks' => 1, 'own_ticket' => 1));
                 break;
             default:
                 checkRight("update_ticket", "1");
         }
         break;
     default:
         if (in_array($_POST["itemtype"], $CFG_GLPI["infocom_types"])) {
             checkSeveralRightsOr(array($_POST["itemtype"] => 'w', 'infocom' => 'w'));
         } else {
             $item->checkGlobal('w');
         }
 }
 commonHeader($LANG['title'][42], $_SERVER['PHP_SELF']);
 if (isset($_GET['multiple_actions'])) {
     if (isset($_SESSION['glpi_massiveaction']) && isset($_SESSION['glpi_massiveaction']['items'])) {
         $percent = min(100, round(100 * ($_SESSION['glpi_massiveaction']['item_count'] - count($_SESSION['glpi_massiveaction']['items'])) / $_SESSION['glpi_massiveaction']['item_count'], 0));
         displayProgressBar(400, $percent);
     }
 }
 if (isset($_POST["action"]) && isset($_POST["itemtype"]) && isset($_POST["item"]) && count($_POST["item"])) {
     /// Save selection
     if (!isset($_SESSION['glpimassiveactionselected']) || count($_SESSION['glpimassiveactionselected']) == 0) {
         $_SESSION['glpimassiveactionselected'] = array();
Exemplo n.º 5
0
    $_GET["gID"] = 0;
}
if (!isset($_GET["usertype"])) {
    $_GET["usertype"] = "user";
}
switch ($_GET["usertype"]) {
    case "user":
        $_GET['gID'] = 0;
        break;
    case "group":
        $_GET['uID'] = 0;
        break;
    case "user_group":
        $_GET['gID'] = "mine";
        break;
}
if (isset($_GET['genical'])) {
    Planning::generateIcal($_GET["uID"], $_GET["gID"]);
} else {
    commonHeader($LANG['Menu'][29], $_SERVER['PHP_SELF'], "maintain", "planning");
    checkSeveralRightsOr(array('show_all_planning' => '1', 'show_planning' => '1'));
    if (!isset($_GET["date"]) || empty($_GET["date"])) {
        $_GET["date"] = strftime("%Y-%m-%d");
    }
    if (!isset($_GET["type"])) {
        $_GET["type"] = "week";
    }
    Planning::showSelectionForm($_GET['type'], $_GET['date'], $_GET["usertype"], $_GET["uID"], $_GET["gID"]);
    Planning::show($_GET['uID'], $_GET['gID'], $_GET["date"], $_GET["type"]);
    commonFooter();
}
Exemplo n.º 6
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 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:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkSeveralRightsOr(array('knowbase' => 'r', 'faq' => 'r'));
if (isset($_GET["id"])) {
    glpi_header($CFG_GLPI["root_doc"] . "/front/knowbaseitem.form.php?id=" . $_GET["id"]);
}
commonHeader($LANG['title'][5], $_SERVER['PHP_SELF'], "utils", "knowbase");
// Search a solution
if (!isset($_GET["contains"]) && isset($_GET["tickets_id"])) {
    $ticket = new Ticket();
    if ($ticket->getFromDB($_GET["tickets_id"])) {
        $_GET["contains"] = $ticket->getField('name');
    }
}
if (!isset($_GET["contains"])) {
    $_GET["contains"] = "";
}
if (!isset($_GET["knowbaseitemcategories_id"])) {
Exemplo n.º 7
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 GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: Walid Nouh
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkSeveralRightsOr(array('rule_dictionnary_dropdown' => 'r', 'rule_dictionnary_software' => 'r'));
commonHeader($LANG['common'][12], $_SERVER['PHP_SELF'], "admin", "dictionnary", -1);
echo "<div class='center'><table class='tab_cadre'>";
echo "<tr><th colspan='4'>" . $LANG['rulesengine'][77] . "</th></tr>";
echo "<tr class='tab_bg_1'><td class='top'><table class='tab_cadre'>";
echo "<tr><th>" . $LANG['rulesengine'][80] . "</th></tr>";
if (haveRight("rule_dictionnary_software", "r")) {
    echo "<tr class='tab_bg_1'><td class='center b'>";
    echo "<a href=\"ruledictionnarysoftware.php\">" . $LANG['rulesengine'][35] . "</a></td></tr>";
}
if (haveRight("rule_dictionnary_dropdown", "r")) {
    echo "<tr class='tab_bg_1'><td class='center b'>";
    echo "<a href=\"ruledictionnarymanufacturer.php\">" . $LANG['rulesengine'][36] . "</a></td></tr>";
}
if (haveRight("rule_dictionnary_printer", "r")) {
    echo "<tr class='tab_bg_1'><td class='center b'>";
Exemplo n.º 8
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 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:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkSeveralRightsOr(array('ocsng' => 'r', 'clean_ocsng' => 'r'));
commonHeader($LANG['ocsng'][0], $_SERVER['PHP_SELF'], "utils", "ocsng");
if (isset($_SESSION["ocs_import"])) {
    unset($_SESSION["ocs_import"]);
}
if (isset($_SESSION["ocs_link"])) {
    unset($_SESSION["ocs_link"]);
}
if (isset($_SESSION["ocs_update"])) {
    unset($_SESSION["ocs_update"]);
}
if (isset($_GET["ocsservers_id"]) && $_GET["ocsservers_id"]) {
    $name = "";
    if (isset($_GET["ocsservers_id"])) {
        $_SESSION["ocsservers_id"] = $_GET["ocsservers_id"];
    }
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";
}
if (!strpos($_SERVER['PHP_SELF'], "popup")) {
    commonHeader($LANG['common'][12], $_SERVER['PHP_SELF'], "config", "display");
}
checkSeveralRightsOr(array("search_config_global" => "w", "search_config" => "w"));
$setupdisplay = new DisplayPreference();
if (isset($_POST["activate"])) {
    $setupdisplay->activatePerso($_POST);
} else {
    if (isset($_POST["add"])) {
        $setupdisplay->add($_POST);
    } else {
        if (isset($_POST["delete"]) || isset($_POST["delete_x"])) {
            $setupdisplay->delete($_POST);
        } else {
            if (isset($_POST["up"]) || isset($_POST["up_x"])) {
                $setupdisplay->orderItem($_POST, 'up');
            } else {
                if (isset($_POST["down"]) || isset($_POST["down_x"])) {
                    $setupdisplay->orderItem($_POST, 'down');