screenshot

  1. <?php
  2. /**
  3.  * PEAR_Info Request #13741 : show list if potential config files
  4.  *
  5.  * @link http://pear.php.net/bugs/bug.php?id=13741
  6.  *
  7.  * Use the new selectors of custom stylesheet "pearinfo3.css"
  8.  *
  9.  * dl { margin: 0 }
  10.  *
  11.  * dd.cfg_found:after { content: " => FOUND "; }
  12.  * dd.cfg_notfound:after { content: " => NOT FOUND "; }
  13.  *
  14.  */
  15.  
  16. require_once 'PEAR/Info.php';
  17.  
  18. class PEAR_Info3 extends PEAR_Info
  19. {
  20.     function PEAR_Info3($pear_dir = '', $user_file = '', $system_file = '')
  21.     {
  22.         $this->__construct($pear_dir, $user_file, $system_file);
  23.     }
  24.  
  25.     function toHtml()
  26.     {
  27.         $styles = basename($this->getStyleSheet(false));
  28.  
  29.         $body = $this->info;
  30.  
  31.         $html = <<<HTML
  32. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  33.     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  35. <head>
  36. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
  37. <meta name="author" content="Laurent Laville" />
  38. <title>My PEAR_Info()</title>
  39. <link rel="stylesheet" type="text/css" href="$styles" />
  40. </head>
  41. <body>
  42.  
  43. <div id="header">
  44. <h1>Laurent-Laville.org</h1>
  45. </div>
  46.  
  47. <div id="footer">
  48. </div>
  49.  
  50. <div id="contents">
  51. $body
  52. </div>
  53.  
  54. </body>
  55. </html>
  56. HTML;
  57.         return $html;
  58.     }
  59. }
  60.  
  61. $info = new PEAR_Info3();
  62. $info->setStyleSheet(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pearinfo3.css');
  63. $info->display();
  64. ?>