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

Source for file books.php

Documentation is available at books.php

  1. <?php
  2. /*
  3.    +----------------------------------------------------------------------+
  4.    | PEAR Web site version 1.0                                            |
  5.    +----------------------------------------------------------------------+
  6.    | Copyright (c) 2006 The PEAR 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.    | Author: Martin Jansen <mj@php.net>                                   |
  17.    +----------------------------------------------------------------------+
  18.    $Id$
  19. */
  20.  
  21. response_header("Support - Books");
  22.  
  23. $books = array(
  24.                array("title" => "The PEAR Installer Manifesto",
  25.                      "authors" => array("Gregory Beaver"),
  26.                      "pearuser" => array("cellog"),
  27.                      "isbn" => "1904811191",
  28.                      "url" => "http://www.packtpub.com/PEAR-Installer/book",
  29.                      "publisher" => "Packt Publishing",
  30.                      "image" => '1904811191.png'
  31.                      ),
  32.                array("title" => "PHP Programming with PEAR",
  33.                      "authors" => array("Stoyan Stefanov""Stephan Schmidt""Aaron Wormus""Carsten Lucke"),
  34.                      "pearuser" => array("stoyan""schst""wormus""luckec"),
  35.                      "isbn" => "1904811795",
  36.                      "url" => "http://www.packtpub.com/pear/book",
  37.                      "publisher" => "Packt Publishing",
  38.                      "image" => "1904811795.png",
  39.                      ),
  40.                array("title" => "PHP PEAR &mdash; Anwendung und Entwicklung - Erweiterungen f&uuml;r PHP schreiben",
  41.                      "authors" => array("Carsten M&ouml;hrke"),
  42.                      "pearuser" => array(),
  43.                      "isbn" => "3898425800",
  44.                      "url" => "http://www.galileocomputing.de/katalog/buecher/titel/gp/titelID-891",
  45.                      "publisher" => "Galileo Computing",
  46.                      "image" => "9783898425803.gif",
  47.                      ),
  48.                array("title" => "Foundations of PEAR: Rapid PHP Development",
  49.                      "authors" => array("Nathan A. Good""Allan Kent"),
  50.                      "pearuser" => array(),
  51.                      "isbn" => "1590597397",
  52.                      "url" => "http://apress.com/book/bookDisplay.html?bID=10181",
  53.                      "publisher" => "Apress",
  54.                      "image" => "foundations-of-pear.gif"
  55.                      )
  56.                );
  57.  
  58. ?>
  59.  
  60. <p>The following is a list of books that have been written about PEAR.
  61. There are a lot more PHP books that describe some PEAR packages.
  62. You can search for them at <a href="http://www.amazon.com/exec/obidos/external-search?mode=books&amp;keyword=PHP">
  63. Amazon.com</a>.</p>
  64.  
  65. <table class="form-holder" cellpadding="5" cellspacing="1">
  66. <?php
  67. foreach ($books as $book{
  68.     echo "<tr>\n";
  69.     echo "  <td rowspan=\"4\" class=\"form-input\">\n";
  70.     if (isset($book['image'])) {
  71.         echo "    <img src=\"/gifs/books/" $book['image'"\" style=\"width: 100px; margin: 0.2em; margin-right: 0.5em;\" alt=\"Cover image for " $book['title'"\" />\n";
  72.     else {
  73.         echo "    <img src=\"/gifs/blank.gif\" width=\"50\" height=\"100\" alt=\"\" />\n";
  74.     }
  75.     echo "</td>\n";
  76.     echo "  <td colspan=\"2\" valign=\"top\" class=\"form-input\">\n";
  77.     echo "    <strong><a href=\"" $book['url'"\">\n";
  78.     echo "      " $book['title'];
  79.     echo "    </a></strong>\n";
  80.     echo "  </td>\n";
  81.     echo "</tr>\n";
  82.     echo "<tr>\n";
  83.     echo "  <td class=\"form-input\">Written by:</td>\n";
  84.  
  85.     $authors = array();
  86.     for ($i = 0; $i count($book['authors'])$i++{
  87.         if (!empty($book['pearuser'][$i])) {
  88.             $authors["    <a href=\"/user/" $book['pearuser'][$i"\">" $book['authors'][$i"</a>";
  89.         else {
  90.             $authors[$book['authors'][$i];
  91.         }
  92.     }
  93.  
  94.     $size count($authors);
  95.     if ($size >= 2{
  96.         echo "  <td class=\"form-input\">" join(array_splice($authors0$size - 1)", "" and " $authors[0"</td>\n";;
  97.     else {
  98.         echo "  <td class=\"form-input\">" $authors[0"</td>\n";
  99.     }
  100.  
  101.     echo "</tr>\n";
  102.     echo "<tr>\n";
  103.     echo "  <td class=\"form-input\">Publisher:</td>\n";
  104.     echo "  <td class=\"form-input\">" $book['publisher'"</td>\n";
  105.     echo "</tr>\n";
  106.     echo "<tr>\n";
  107.     echo "  <td class=\"form-input\">ISBN:</td>\n";
  108.     echo "  <td class=\"form-input\">" $book['isbn'"</td>\n";
  109.     echo "</tr>\n";
  110.     echo "<tr><td colspan=\"2\">&nbsp;</td></tr>\n";
  111. }
  112. ?>
  113. </table>
  114.  
  115. <p>Are you an author or publisher of one of the above books?  No image?
  116. Let <a href="mailto:<?php echo PEAR_WEBMASTER_EMAIL; ?>">us know</a>
  117. if we are allowed to use an image of your book&#39;s cover page
  118. here.  Is your book missing?  Then tell us about it, too.</p>
  119.  
  120. <?php
  121. response_footer();

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