/** * show Libraries information in system information * * @since version 0.84 **/ static function showLibrariesInformation() { // No gettext echo "<tr class='tab_bg_2'><th>Libraries</th></tr>\n"; echo "<tr class='tab_bg_1'><td><pre>\n \n"; include_once GLPI_HTMLAWED; echo "htmLawed version " . hl_version() . " in (" . realpath(dirname(GLPI_HTMLAWED)) . ")\n"; include GLPI_PHPCAS; echo "phpCas version " . phpCAS::getVersion() . " in (" . (dirname(GLPI_PHPCAS) ? realpath(dirname(GLPI_PHPCAS)) : "system") . ")\n"; require_once GLPI_PHPMAILER_DIR . "/class.phpmailer.php"; $pm = new PHPMailer(); echo "PHPMailer version " . $pm->Version . " in (" . realpath(GLPI_PHPMAILER_DIR) . ")\n"; // EZ component echo "ZetaComponent ezcGraph installed in (" . dirname(dirname(GLPI_EZC_BASE)) . "): " . (class_exists('ezcGraph') ? 'OK' : 'KO') . "\n"; // Zend $zv = new Zend\Version\Version(); echo "Zend Framework version " . $zv::VERSION . " in (" . realpath(GLPI_ZEND_PATH) . ")\n"; // SimplePie : $sp = new SimplePie(); echo "SimplePie version " . SIMPLEPIE_VERSION . " in (" . realpath(GLPI_SIMPLEPIE_PATH) . ")\n"; // TCPDF include_once GLPI_TCPDF_DIR . '/include/tcpdf_static.php'; echo "TCPDF version " . TCPDF_STATIC::getTCPDFVersion() . " in (" . realpath(GLPI_TCPDF_DIR) . ")\n"; // password_compat require_once GLPI_PASSWORD_COMPAT; $check = PasswordCompat\binary\check() ? "Ok" : "KO"; echo "ircmaxell/password-compat in (" . realpath(dirname(GLPI_PASSWORD_COMPAT)) . "). Compatitility: {$check}\n"; echo "\n</pre></td></tr>"; }
/** * show Libraries information in system information * * @since version 0.84 **/ static function showLibrariesInformation() { // No gettext echo "<tr class='tab_bg_2'><th>Libraries</th></tr>\n"; echo "<tr class='tab_bg_1'><td><pre>\n \n"; include_once GLPI_HTMLAWED; echo "htmLawed version " . hl_version() . " in (" . self::getLibraryDir("hl_version") . ")\n"; echo "phpCas version " . phpCAS::getVersion() . " in (" . (self::getLibraryDir("phpCAS") ? self::getLibraryDir("phpCAS") : "system") . ")\n"; $pm = new PHPMailer(); echo "PHPMailer version " . $pm->Version . " in (" . self::getLibraryDir("PHPMailer") . ")\n"; // EZ component echo "ZetaComponent ezcGraph installed in (" . self::getLibraryDir("ezcGraph") . "): " . (class_exists('ezcGraph') ? 'OK' : 'KO') . "\n"; // Zend echo "Zend Framework in (" . self::getLibraryDir("Zend\\Loader\\StandardAutoloader") . ")\n"; // SimplePie : $sp = new SimplePie(); echo "SimplePie version " . SIMPLEPIE_VERSION . " in (" . self::getLibraryDir($sp) . ")\n"; // TCPDF echo "TCPDF version " . TCPDF_STATIC::getTCPDFVersion() . " in (" . self::getLibraryDir("TCPDF") . ")\n"; // password_compat $check = PasswordCompat\binary\check() ? "Ok" : "KO"; echo "ircmaxell/password-compat in (" . self::getLibraryDir("PasswordCompat\\binary\\check") . "). Compatitility: {$check}\n"; // autolink echo "iacaml/autolink in (" . self::getLibraryDir("autolink") . ")\n"; // sabre/vobject echo "sabre/vobject in (" . self::getLibraryDir("Sabre\\VObject\\Component") . ")\n"; // vcard echo "guzzlehttp/guzzle in (" . self::getLibraryDir("JeroenDesloovere\\VCard\\VCard") . ")\n"; echo "\n</pre></td></tr>"; }
/** * show Libraries information in system information * * @since version 0.84 **/ static function showLibrariesInformation() { // No gettext echo "<tr class='tab_bg_2'><th>Libraries</th></tr>\n"; echo "<tr class='tab_bg_1'><td><pre>\n \n"; include_once GLPI_HTMLAWED; $pm = new PHPMailer(); $sp = new SimplePie(); $deps = [['name' => 'htmLawed', 'version' => hl_version(), 'check' => 'hl_version'], ['name' => 'phpCas', 'version' => phpCAS::getVersion(), 'check' => 'phpCAS'], ['name' => 'PHPMailer', 'version' => $pm->Version, 'check' => 'PHPMailer'], ['name' => 'Zend Framework', 'check' => 'Zend\\Loader\\StandardAutoloader'], ['name' => 'zetacomponents/graph', 'check' => 'ezcGraph'], ['name' => 'SimplePie', 'version' => SIMPLEPIE_VERSION, 'check' => $sp], ['name' => 'TCPDF', 'version' => TCPDF_STATIC::getTCPDFVersion(), 'check' => 'TCPDF'], ['name' => 'ircmaxell/password-compat', 'check' => 'password_hash'], ['name' => 'ramsey/array_column', 'check' => 'array_column'], ['name' => 'michelf/php-markdown', 'check' => 'Michelf\\Markdown'], ['name' => 'true/punycode', 'check' => 'TrueBV\\Punycode'], ['name' => 'iacaml/autolink', 'check' => 'autolink'], ['name' => 'sabre/vobject', 'check' => 'Sabre\\VObject\\Component']]; foreach ($deps as $dep) { $path = self::getLibraryDir($dep['check']); if ($path) { echo "{$dep['name']} "; if (isset($dep['version'])) { echo "version {$dep['version']} "; } echo "in ({$path})\n"; } } echo "\n</pre></td></tr>"; }
$doc->setHeaderFont(array($fontfamily, 'b', 10)); $doc->setHeaderData('pix/moodlelogo-med.png', 40, $SITE->fullname, $CFG->wwwroot); $doc->setPrintFooter(true); $doc->setFooterMargin(10); $doc->setFooterFont(array($fontfamily, '', 8)); $doc->AddPage(); $doc->SetTextColor(255, 255, 255); $doc->SetFillColor(255, 203, 68); $doc->SetFont($fontfamily, 'B', 24); $doc->Cell(0, 0, 'Moodle PDF library test', 0, 1, 'C', 1); $doc->SetFont($fontfamily, '', 12); $doc->Ln(6); $doc->SetTextColor(0, 0, 0); $c = '<h3>General information</h3>'; $c .= 'Moodle release: ' . $CFG->release . '<br />'; $c .= 'PDF producer: TCPDF ' . TCPDF_STATIC::getTCPDFVersion() . ' (http://www.tcpdf.org) <br />'; $c .= 'Font of this test page: ' . $fontfamily . '<br />'; $c .= '<h3>Current settings</h3>'; $c .= '<table border="1" cellspacing="0" cellpadding="1">'; foreach (array('K_PATH_MAIN', 'K_PATH_URL', 'K_PATH_FONTS', 'K_PATH_CACHE', 'K_PATH_IMAGES', 'K_BLANK_IMAGE', 'K_CELL_HEIGHT_RATIO', 'K_SMALL_RATIO', 'PDF_CUSTOM_FONT_PATH', 'PDF_DEFAULT_FONT') as $setting) { if (defined($setting)) { $c .= '<tr style="font-size: x-small;"><td>' . $setting . '</td><td>' . constant($setting) . '</td></tr>'; } } $c .= '<tr style="font-size: x-small;"><td>Effective font path</td><td>' . $doc->_getfontpath() . '</td></tr>'; $c .= '</table><br />'; $c .= '<h3>Available font files</h3>'; $fontfiles = $doc->returnFontsList(); sort($fontfiles); $c .= implode(', ', $fontfiles); $c .= '<br />';