getTypeName() static public method

static public getTypeName ( $nb )
Exemplo n.º 1
0
Copyright (C) 2003-2013 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, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("profile", "r");
Html::header(Profile::getTypeName(2), $_SERVER['PHP_SELF'], "admin", "profile");
Search::show('Profile');
Html::footer();
Exemplo n.º 2
0
based on GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2014 by the INDEPNET Development Team.

-------------------------------------------------------------------------

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, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("profile", READ);
Html::header(Profile::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "admin", "profile");
Search::show('Profile');
Html::footer();
Exemplo n.º 3
0
 /**
  * Add a message on update action
  **/
 function addMessageOnUpdateAction()
 {
     $link = $this->getFormURL();
     if (!isset($link)) {
         return;
     }
     $addMessAfterRedirect = false;
     if (isset($this->input['_update'])) {
         $addMessAfterRedirect = true;
     }
     if (isset($this->input['_no_message']) || !$this->auto_message_on_action) {
         $addMessAfterRedirect = false;
     }
     if ($addMessAfterRedirect) {
         $profile = new Profile();
         $profile->getFromDB($this->fields['profiles_id']);
         // Do not display quotes
         if (isset($profile->fields['name'])) {
             $profile->fields['name'] = stripslashes($profile->fields['name']);
         } else {
             $profile->fields['name'] = $profile->getTypeName() . " : " . __('ID') . " " . $profile->fields['id'];
         }
         Session::addMessageAfterRedirect(__('Item successfully updated') . "&nbsp;: " . (isset($this->input['_no_message_link']) ? $profile->getNameID() : $profile->getLink()));
     }
 }
Exemplo n.º 4
0
 /**
  * Add a message on update action
  **/
 function addMessageOnUpdateAction()
 {
     global $CFG_GLPI, $LANG;
     $link = $this->getFormURL();
     if (!isset($link)) {
         return;
     }
     $addMessAfterRedirect = false;
     if (isset($this->input['_update'])) {
         $addMessAfterRedirect = true;
     }
     if (isset($this->input['_no_message']) || !$this->auto_message_on_action) {
         $addMessAfterRedirect = false;
     }
     if ($addMessAfterRedirect) {
         $profile = new Profile();
         $profile->getFromDB($this->fields['profiles_id']);
         // Do not display quotes
         if (isset($profile->fields['name'])) {
             $profile->fields['name'] = stripslashes($profile->fields['name']);
         } else {
             $profile->fields['name'] = $profile->getTypeName() . " : " . $LANG['common'][2] . " " . $profile->fields['id'];
         }
         addMessageAfterRedirect($LANG['common'][71] . "&nbsp;: " . (isset($this->input['_no_message_link']) ? $profile->getNameID() : $profile->getLink()));
     }
 }