pearweb_manual
[ class tree: pearweb_manual ] [ index: pearweb_manual ] [ all elements ]

Source for file index.php

Documentation is available at index.php

  1. <?php
  2. /*
  3.    +----------------------------------------------------------------------+
  4.    | PEAR Web site version 1.0                                            |
  5.    +----------------------------------------------------------------------+
  6.    | Copyright (c) 2001-2005 The PHP Group                                |
  7.    +----------------------------------------------------------------------+
  8.    | This source file is subject to version 2.02 of the PHP license,      |
  9.    | that is bundled with this package in the file LICENSE, and is        |
  10.    | available at through the world-wide-web at                           |
  11.    | http://www.php.net/license/2_02.txt.                                 |
  12.    | If you did not receive a copy of the PHP license and are unable to   |
  13.    | obtain it through the world-wide-web, please send a note to          |
  14.    | license@php.net so we can mail you a copy immediately.               |
  15.    +----------------------------------------------------------------------+
  16.    | Authors: Martin Jansen <mj@php.net>                                  |
  17.    +----------------------------------------------------------------------+
  18.    $Id$
  19. */
  20.  
  21. require_once 'HTML/Table.php';
  22. response_header('Documentation');
  23. ?>
  24.  
  25. <div class="manual-content" id="manual-content">
  26.  
  27.  <h1>Documentation</h1>
  28.  
  29.  <p class="para">
  30.   The PEAR documentation is a centralized place where developers can
  31.   add the documentation for their package.
  32.  </p>
  33.  
  34.  <p class="para">
  35.   Currently the documentation is available in the following languages:
  36.  </p>
  37.  
  38.  <ul class="itemizedlist">
  39. <?php
  40. echo "  <li class=\"listitem\">";
  41. echo '<strong>' . make_link('/manual/en/''English''</strong>';
  42. echo "</li>\n";
  43. ?>
  44.  </ul>
  45.  
  46.  
  47.  <h2>Download Documentation</h2>
  48.  
  49.  <p class="para">
  50.   If you prefer to have an offline version of the documentation, you can
  51.   download it in a variety of formats.
  52.  </p>
  53.  
  54.  <blockquote class="note">
  55.   <p class="para"><strong>Note to Windows users</strong>: If you are using
  56.    Microsoft Internet Explorer under Windows XP SP2 or
  57.    later and you are going to download the documentation in CHM
  58.    format, you should "unblock" the file after downloading it, by
  59.    right-clicking on it and selecting the properties menu item. Then click
  60.    on the 'Unblock' button. Failing to do this may lead to errors
  61.    in the visualization of the file, due to a Microsoft bug.
  62.   </p>
  63.  </blockquote>
  64.  
  65. <?php
  66. $formats = array(
  67.     // "pear_manual_{LANG}.chm"         => array('HTML Help file',      'chm'),
  68.     "pear_manual_{LANG}.tar.bz2"     => array('Many HTML files',     'tar.bz2'),
  69.     "pear_manual_{LANG}.tar.gz"      => array('Many HTML files',     'tar.gz'),
  70.     "pear_manual_{LANG}.zip"         => array('Many HTML files',     'zip'),
  71.     "pear_manual_{LANG}.html.gz"     => array('One big HTML file',   'html.tar.gz'),
  72.     "pear_manual_{LANG}.html.zip"    => array('One big HTML file',   'html.zip'),
  73.     "pear_manual_{LANG}.html.bz2"    => array('One big HTML file',   'html.tar.bz2'),
  74. );
  75.  
  76. $table = new HTML_Table('class="informaltable"');
  77.  
  78. $table->addRow(array('Type''Format')'''th');
  79. $doc_languages = array('en' => 'English');
  80. foreach ($doc_languages as $domain => $name{
  81.     $language $name;
  82.     $table->addRow(array($language)'colspan="2"''th');
  83.  
  84.     foreach ($formats as $filename => $information{
  85.         $filename str_replace("{LANG}"$domain$filename);
  86.  
  87.         $information[0= make_link(
  88.             '/distributions/manual/' $filename,
  89.             $information[0]
  90.         );
  91.         $table->addRow($information);
  92.     }
  93. }
  94. echo $table->toHTML();
  95. ?>
  96.  
  97. </div>
  98.  
  99. <?php
  100.  
  101. response_footer();

Documentation generated on Mon, 11 Mar 2019 16:04:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.