Пример #1
0
 public function doConfig()
 {
     $data = array();
     if (checkRight('sys_config') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     $this->load->model('MIS_Sys');
     $data = $this->input->post();
     if ($data['sys_id']) {
         $this->MIS_Sys->update($data);
     } else {
         $this->MIS_Sys->add($data);
     }
     redirect(formatUrl('sys/index?msg=') . urlencode('保存成功'));
 }
Пример #2
0
 /**
  * 获取列表
  * Enter description here ...
  */
 public function getConfirmList($offset, $limit)
 {
     $info = array();
     $sql = "select * from {$this->_table} where (status = 0 or status = 1)";
     if (checkRight('complain_assign')) {
         $sql .= " and (follow_by=0 or follow_by=" . $this->_ci->userId . ")";
     } else {
         $sql .= " and follow_by=" . $this->_ci->userId;
     }
     $sql .= " limit {$offset},{$limit}";
     $query = $this->db->query($sql);
     if ($query) {
         $info = $query->result_array();
     }
     return $info;
 }
Пример #3
0
 public function ebauth()
 {
     $this->is_logged_in = $this->isLoggedIn();
     if ($RIGHT_CODE) {
         checkRight($RIGHT_CODE);
     }
     $session_id = session_id();
     if (empty($session_id)) {
         session_start();
         $session_id = session_id();
     }
     $sSQL = "select username from user a where session_id='{$session_id}'";
     $result = mysql_query($sSQL) or die(mysql_error());
     $row = mysql_fetch_array($result);
     $current_username = $row["username"];
     return $this->is_logged_in;
 }
Пример #4
0
 /**
  * 
  * 回复
  */
 public function doReply()
 {
     $data = $this->input->post();
     if (checkRight('feedback_reply') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     $data['reply_time'] = strtotime('now');
     $data['admin_id'] = $this->userId;
     $data['admin_name'] = $this->userName;
     $this->load->model('MIS_Feedback');
     $this->MIS_Feedback->addReply($data);
     $updateData = array();
     $updateData['feedback_id'] = $data['feedback_id'];
     $updateData['feedback_status'] = 1;
     $this->MIS_Feedback->update($updateData);
     redirect(formatUrl('feedback/index'));
 }
Пример #5
0
 /**
  * 
  * 确认申请
  */
 public function doConfirmApply()
 {
     $data = $this->input->post();
     unset($data['file']);
     if (!$data['follow_by'] && checkRight('project_apply_confirm') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     if ($data['follow_by'] && checkRight('project_apply_assign') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     if (!$data['follow_by']) {
         $data['status'] = 1;
     }
     $this->load->model('MIS_Apply');
     $msg = '';
     $this->MIS_Apply->update($data);
     redirect(formatUrl('project/index'));
 }
Пример #6
0
 public function fee()
 {
     $data = array();
     if (checkRight('finance_fee') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     $this->load->model('MIS_Fee');
     $keyword = $this->input->get();
     $offset = 0;
     $pageUrl = '';
     page(formatUrl('finance/fee'), $this->MIS_Fee->getCount($keyword), PER_COUNT, $offset, $pageUrl);
     $list = $this->MIS_Fee->getList($keyword, $offset, PER_COUNT);
     $feeInfo = $this->MIS_Fee->getEnterpriseFee();
     $dataList = array();
     foreach ($list as $item) {
         $item['curPay'] = $item['rent_fee'] + $item['property_fee'] + $item['water_fee_unit_price'] * $item['water_fee_num'] + $item['elec_fee_unit_price'] * $item['elec_fee_num'];
         if (isset($feeInfo[$item['enterprise_id']])) {
             $item['fee'] = $feeInfo[$item['enterprise_id']]['fee'];
         } else {
             $item['fee'] = 0;
         }
         if ($item['pay_status'] == 0) {
             $item['otherPay'] = $item['fee'] - $item['curPay'];
             $item['totalPay'] = $item['curPay'] + $item['otherPay'];
         } else {
             $item['totalPay'] = $item['otherPay'] = $item['fee'];
         }
         $item['curPay'] = round($item['curPay'], 2);
         $item['otherPay'] = round($item['otherPay'], 2);
         $item['totalPay'] = round($item['totalPay'], 2);
         $dataList[] = $item;
     }
     $data['pageUrl'] = $pageUrl;
     $data['dataList'] = $dataList;
     $data['keyword'] = $keyword;
     $this->showView('financeFee', $data);
 }
Пример #7
0
(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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("config", "w");
$config = new Config();
//Update CAS configuration
if (isset($_POST["update"])) {
    $config->update($_POST);
    glpi_header($CFG_GLPI["root_doc"] . "/front/auth.others.php");
}
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
commonHeader($LANG['title'][14], $_SERVER['PHP_SELF'], "config", "extauth", "others");
showOtherAuthList($_SERVER['PHP_SELF']);
commonFooter();
Пример #8
0
 public function flowDetail()
 {
     $data = array();
     if (checkRight('flow_list') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     $this->load->model('MIS_Flow');
     $did = $this->input->get('did');
     $data['info'] = $this->MIS_Flow->getInfo($did);
     $data['stepInfo'] = $this->MIS_Flow->getStepInfo($did);
     $this->showView('flowDetail', $data);
 }
Пример #9
0
 } else {
     if (isset($_POST["change_auth_method"])) {
         checkRight('user_authtype', 'w');
         $user->check($_POST['id'], 'w');
         if (isset($_POST["auths_id"])) {
             User::changeAuthMethod(array($_POST["id"]), $_POST["authtype"], $_POST["auths_id"]);
         }
         glpi_header($_SERVER['HTTP_REFERER']);
     } else {
         if (!isset($_GET["ext_auth"])) {
             checkRight("user", "r");
             commonHeader($LANG['title'][13], '', "admin", "user");
             $user->showForm($_GET["id"]);
             commonFooter();
         } else {
             checkRight("import_externalauth_users", "w");
             if (isset($_GET['add_ext_auth_ldap'])) {
                 if (isset($_GET['login']) && !empty($_GET['login'])) {
                     AuthLdap::importUserFromServers(array('name' => $_GET['login']));
                 }
                 glpi_header($_SERVER['HTTP_REFERER']);
             }
             if (isset($_GET['add_ext_auth_simple'])) {
                 if (isset($_GET['login']) && !empty($_GET['login'])) {
                     $input = array('name' => $_GET['login'], '_extauth' => 1, 'add' => 1);
                     $user->check(-1, 'w', $input);
                     $newID = $user->add($input);
                     Event::log($newID, "users", 4, "setup", $_SESSION["glpiname"] . " " . $LANG['log'][20] . " " . $_GET['login'] . ".");
                 }
                 glpi_header($_SERVER['HTTP_REFERER']);
             }
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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
checkRight('rule_dictionnary_dropdown', 'r');
$rule = new RuleDictionnaryNetworkEquipmentType();
include "rule.common.tabs.php";
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkCentralAccess();
$ri = new ReservationItem();
if (isset($_REQUEST["add"])) {
    checkRight("reservation_central", "w");
    if ($newID = $ri->add($_REQUEST)) {
        Event::log($newID, "reservationitem", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][20] . " " . $_REQUEST["itemtype"] . "-" . $_REQUEST["items_id"] . ".");
    }
    glpi_header($_SERVER['HTTP_REFERER']);
} else {
    if (isset($_REQUEST["delete"])) {
        checkRight("reservation_central", "w");
        $ri->delete($_REQUEST);
        Event::log($_REQUEST['id'], "reservationitem", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][22]);
        glpi_header($_SERVER['HTTP_REFERER']);
    } else {
        if (isset($_REQUEST["update"])) {
            checkRight("reservation_central", "w");
            $ri->update($_REQUEST);
            Event::log($_REQUEST['id'], "reservationitem", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][21]);
            glpi_header($_SERVER['HTTP_REFERER']);
        } else {
            checkRight("reservation_central", "w");
            commonHeader($LANG['Menu'][17], $_SERVER['PHP_SELF'], "utils", "reservation");
            $ri->showForm($_GET["id"]);
        }
    }
}
commonFooter();
Пример #12
0
*/
// ----------------------------------------------------------------------
// Original Author of file: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if (!isset($_POST['id'])) {
    exit;
}
if (!isset($_REQUEST['glpi_tab'])) {
    exit;
}
checkRight('config', 'r');
$authldap = new AuthLDAP();
if ($_POST['id'] > 0 && $authldap->can($_POST['id'], 'r')) {
    switch ($_REQUEST['glpi_tab']) {
        case -1:
            $authldap->showFormUserConfig($_POST['id'], $_POST['target']);
            $authldap->showFormGroupsConfig($_POST['id'], $_POST['target']);
            $authldap->showFormAdvancedConfig($_POST['id'], $_POST['target']);
            $authldap->showFormReplicatesConfig($_POST['id'], $_POST['target']);
            Log::showForItem($authldap);
            break;
        case 2:
            $authldap->showFormUserConfig($_POST['id'], $_POST['target']);
            break;
        case 3:
            $authldap->showFormGroupsConfig($_POST['id'], $_POST['target']);
Пример #13
0
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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
checkRight('rule_ocs', 'r');
$rule = new RuleOcs();
include "rule.common.tabs.php";
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("printer", "r");
PluginFusioninventoryAuth::checkRight("snmp_printers", "r");
$printer_history = new PluginFusioninventoryPrintersHistory();
if (isset($_POST['delete'])) {
    PluginFusioninventoryAuth::checkRight("snmp_printers", "w");
    if (isset($_POST['limit'])) {
        for ($i = 0; $i < $_POST['limit']; $i++) {
            if (isset($_POST["checked_{$i}"]) && $_POST["checked_{$i}"] == 1) {
                if (isset($_POST["ID_{$i}"])) {
                    $input['ID'] = $_POST["ID_{$i}"];
                }
                $printer_history->delete($input);
            }
        }
    }
}
Пример #15
0
<?php

require_once '../lib/db.php';
require_once '../lib/utils.php';
$RIGHT_CODE = "CONFIG_TAGS_MAPPING";
checkRight($RIGHT_CODE);
?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Energy Builder</title>
    <script src="../common/lm/jquery.js"></script>
	<script src="../common/utils.js"></script>
	<script src="../common/js/jquery-ui.js"></script>
	<link rel="stylesheet" href="../common/css/jquery-ui.css" />
    <link rel="stylesheet" href="../common/css/style.css"/>
<style type="text/css">
html,body {height:100%;}
#boxEditUser{
	display:;
	position:fixed;background:#f8f8f8;padding:0px;border:2px solid #666;
	width:800px;
	height:400px;
	left:50%;
	top:50%;
	margin-left:-400px;
	margin-top:-200px;
}
</style>
Пример #16
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";
checkRight("reservation_helpdesk", "1");
$rr = new Reservation();
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 (isset($_POST["update"])) {
    list($begin_year, $begin_month, $begin_day) = explode("-", $_POST["begin"]);
    if (haveRight("reservation_central", "w") || getLoginUserID() === $_POST["users_id"]) {
        $_POST['_target'] = $_SERVER['PHP_SELF'];
        $_POST['_item'] = key($_POST["items"]);
        if ($rr->update($_POST)) {
            glpi_header($CFG_GLPI["root_doc"] . "/front/reservation.php?reservationitems_id=" . $_POST['_item'] . "&mois_courant={$begin_month}&annee_courante={$begin_year}");
        }
    }
Пример #17
0
-------------------------------------------------------------------------

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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("computer", "r");
commonHeader($LANG['Menu'][0], $_SERVER['PHP_SELF'], "inventory", "computer");
Search::show('Computer');
commonFooter();
Пример #18
0
-------------------------------------------------------------------------

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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("peripheral", "r");
commonHeader($LANG['Menu'][16], $_SERVER['PHP_SELF'], "inventory", "peripheral");
Search::show('Peripheral');
commonFooter();
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: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
checkRight("networking", "w");
if (isset($_POST["action"])) {
    echo "<input type='hidden' name='action' value='" . $_POST["action"] . "'>";
    switch ($_POST["action"]) {
        case "delete":
            echo "&nbsp;<input type='submit' name='delete_several' class='submit' value='" . $LANG['buttons'][2] . "'>";
            break;
        case "assign_vlan":
            Dropdown::show('Vlan');
            echo "&nbsp;<input type='submit' name='assign_vlan_several' class='submit' value='" . $LANG['buttons'][2] . "'>";
            break;
        case "unassign_vlan":
            Dropdown::show('Vlan');
            echo "&nbsp;<input type='submit' name='unassign_vlan_several' class='submit' value='" . $LANG['buttons'][2] . "'>";
            break;
        case "move":
Пример #20
0
 /**
  * 
  * 删除目录
  */
 public function dirDoDel()
 {
     $data = array();
     $id = $this->input->get('id');
     $this->load->model('MIS_Netdisk');
     $info = $this->MIS_Netdisk->getDirInfo($id);
     if (checkRight('dir_del') || $this->userId == $info['admin_id'] || $this->userRole == 0 || in_array($this->userRole, explode(',', $info['dir_role']))) {
         $fileConut = $this->MIS_Netdisk->getFileCount($id);
         if ($fileConut > 0) {
             redirect(formatUrl('netdisk/dirList?msg=' . urlencode('该目录下存在' . $fileConut . '个文件,暂时不可删除')));
         } else {
             $this->MIS_Netdisk->delDir($id);
             redirect(formatUrl('netdisk/dirList'));
         }
     } else {
         $this->showView('denied', $data);
         exit;
     }
 }
Пример #21
0
 /**
  * 
  * 查看
  */
 public function productDetail()
 {
     $data = array();
     if (checkRight('club_productList') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     $id = $this->input->get('id');
     $this->load->model('MIS_ClubProduct');
     //获取详情
     $data['info'] = $this->MIS_ClubProduct->getInfo($id);
     $this->showView('clubProductDetail', $data);
 }
Пример #22
0
 /**
  * 
  * 删除
  */
 public function doDel()
 {
     $data = array();
     if (checkRight('role_del') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     $id = $this->input->get('id');
     $this->load->model('APP_Admin');
     $adminList = $this->APP_Admin->queryAdminByRole($id);
     $this->load->model('APP_Role');
     if (empty($adminList)) {
         $this->APP_Role->del($id);
         redirect(formatUrl('role/index'));
     } else {
         redirect(formatUrl('role/index?msg=' . urlencode('该分组下存在' . count($adminList) . '个用户,暂时不可删除')));
     }
 }
Пример #23
0
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";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
checkRight("monitor", "r");
if (empty($_POST["id"])) {
    exit;
}
if (!isset($_REQUEST['glpi_tab'])) {
    exit;
}
if (!isset($_POST["sort"])) {
    $_POST["sort"] = "";
}
if (!isset($_POST["order"])) {
    $_POST["order"] = "";
}
if (!isset($_POST["withtemplate"])) {
    $_POST["withtemplate"] = "";
}
Пример #24
0
-------------------------------------------------------------------------

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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("phone", "r");
commonHeader($LANG['help'][35], $_SERVER['PHP_SELF'], "inventory", "phone");
Search::show('Phone');
commonFooter();
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";
checkRight("reports", "r");
commonHeader($LANG['Menu'][6], $_SERVER['PHP_SELF'], "utils", "report");
$items = array('Computer', 'Monitor', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer', 'Software');
# Titre
echo "<big><strong>" . $LANG['reports'][4] . "</strong></big><br><br>";
# Request All
if (isset($_POST["item_type"][0]) && $_POST["item_type"][0] == '0' || !isset($_POST["item_type"])) {
    $_POST["item_type"] = $items;
}
if (isset($_POST["item_type"]) && is_array($_POST["item_type"])) {
    $query = array();
    foreach ($_POST["item_type"] as $key => $val) {
        if (in_array($val, $items)) {
            $itemtable = getTableForItemType($val);
            $query[$val] = "SELECT `{$itemtable}`.`name` AS itemname,\n                                `{$itemtable}`.`is_deleted` AS itemdeleted,\n                                `glpi_locations`.`completename` AS location,\n                                `glpi_contracttypes`.`name` AS type,\n                                `glpi_infocoms`.`buy_date`,\n                                `glpi_infocoms`.`warranty_duration`,\n                                `glpi_contracts`.`begin_date`,\n                                `glpi_contracts`.`duration`,\n                                `glpi_entities`.`completename` AS entname,\n                                `glpi_entities`.`id` AS entID\n                         FROM `glpi_contracts_items`\n                         INNER JOIN `glpi_contracts`\n                              ON (`glpi_contracts_items`.`contracts_id` = `glpi_contracts`.`id`)\n                         INNER JOIN `{$itemtable}`\n                              ON (`glpi_contracts_items`.`itemtype` = '{$val}'\n                                  AND `{$itemtable}`.`id` = `glpi_contracts_items`.`items_id`)\n                         LEFT JOIN `glpi_infocoms`\n                              ON (`glpi_infocoms`.`itemtype` = '{$val}'\n                                  AND `{$itemtable}`.`id` = `glpi_infocoms`.`items_id`)\n                         LEFT JOIN `glpi_contracttypes`\n                              ON (`glpi_contracts`.`contracttypes_id` = `glpi_contracttypes`.`id`)\n                         LEFT JOIN `glpi_locations`\n                              ON (`{$itemtable}`.`locations_id` = `glpi_locations`.`id`)\n                         LEFT JOIN `glpi_entities`\n                              ON (`{$itemtable}`.`entities_id` = `glpi_entities`.`id`)\n                         WHERE `{$itemtable}`.`is_template` ='0' " . getEntitiesRestrictRequest("AND", $itemtable);
            if (isset($_POST["annee"][0]) && $_POST["annee"][0] != 'toutes') {
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: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if (!isset($_POST["id"]) || !isset($_POST["itemtype"])) {
    exit;
}
if (!isset($_REQUEST['glpi_tab'])) {
    exit;
}
$setupdisplay = new DisplayPreference();
if ($_POST["id"] < 0) {
    switch ($_REQUEST['glpi_tab']) {
        case 1:
            $setupdisplay->showFormGlobal($_POST['target'], $_POST["displaytype"]);
            break;
        case 2:
            checkRight('search_config', 'w');
            $setupdisplay->showFormPerso($_POST['target'], $_POST["displaytype"]);
            break;
    }
}
ajaxFooter();
Пример #27
0
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";
commonHeader($LANG['Menu'][13], '', "maintain", "stat");
checkRight("statistic", "1");
if (empty($_REQUEST["type"])) {
    $_REQUEST["type"] = "user";
}
if (empty($_REQUEST["showgraph"])) {
    $_REQUEST["showgraph"] = 0;
}
if (empty($_REQUEST["date1"]) && empty($_REQUEST["date2"])) {
    $year = date("Y") - 1;
    $_REQUEST["date1"] = date("Y-m-d", mktime(1, 0, 0, date("m"), date("d"), $year));
    $_REQUEST["date2"] = date("Y-m-d");
}
if (!empty($_REQUEST["date1"]) && !empty($_REQUEST["date2"]) && strcmp($_REQUEST["date2"], $_REQUEST["date1"]) < 0) {
    $tmp = $_REQUEST["date1"];
    $_REQUEST["date1"] = $_REQUEST["date2"];
    $_REQUEST["date2"] = $tmp;
Пример #28
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: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if (!isset($_POST["id"])) {
    exit;
}
checkRight("group", "r");
$group = new Group();
if ($_POST["id"] > 0 && $group->can($_POST["id"], 'r')) {
    switch ($_REQUEST['glpi_tab']) {
        case -1:
            Group_User::showForGroup($_POST['target'], $group);
            $group->showItems();
            $group->showLDAPForm($_POST['target'], $_POST["id"]);
            Plugin::displayAction($group, $_REQUEST['glpi_tab']);
            break;
        case 2:
            $group->showItems();
            break;
        case 3:
            $group->showLDAPForm($_POST['target'], $_POST["id"]);
            break;
Пример #29
0
-------------------------------------------------------------------------

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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("config", "r");
commonHeader($LANG['login'][2], $_SERVER['PHP_SELF'], "config", "extauth", "ldap");
Search::show('AuthLDAP');
commonFooter();
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.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
if (strpos($_SERVER['PHP_SELF'], "dropdownNotificationTemplate.php")) {
    define('GLPI_ROOT', '..');
    include GLPI_ROOT . "/inc/includes.php";
    header("Content-Type: text/html; charset=UTF-8");
    header_nocache();
}
checkRight("notification", "w");
NotificationTemplate::dropdownTemplates('notificationtemplates_id', $_POST['itemtype']);