title() 공개 메소드

Print a good title for group pages
public title ( ) : nothing
리턴 nothing (display)
예제 #1
0
파일: group.php 프로젝트: glpi-project/glpi
-------------------------------------------------------------------------

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("group", READ);
Html::header(Group::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "admin", "group");
$group = new Group();
$group->title();
Search::show('Group');
Html::footer();
 *
 * Display of Attribution Information is required in Larger Works which are
 * defined in the CPAL as a work which combines Covered Code or portions
 * thereof with code not governed by the terms of the CPAL.
 *******************************************************************************/
include "commonHeaders.php";
header("Content-Type: image/png");
$sTimer->start('logoRun');
$groupId = $sRequest->getInt("group");
$group = new Group($groupId);
if (!$group || $group->getPermission($sUser, ACTION_VIEW_GROUP) == PERMISSION_DISALLOWED) {
    $fp = fopen($sTemplate->getTemplateRootAbs() . "img/header_logo.png", 'rb');
    fpassthru($fp);
    fclose($fp);
    exit;
}
$im = imagecreate(400, 18);
imagecolorallocate($im, 255, 255, 255);
// get font
$font = $sTemplate->getTemplateRootAbs() . "fonts/font.otf";
// transparent background
imagesavealpha($im, true);
$trans_colour = imagecolorallocatealpha($im, 0, 0, 0, 127);
imagefill($im, 0, 0, $trans_colour);
// group title
$textcolor = imagecolorexact($im, 255, 255, 255);
mb_internal_encoding("UTF-8");
imagefttext($im, 14, 0, 5, 17, $textcolor, $font, mb_strtoupper($group->title()));
imagepng($im);
imagedestroy($im);
$sTimer->stop('logoRun');