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: books.php,v 1.6 2007/12/29 00:11:33 dufuz Exp $
  19. */
  20.  
  21. response_header("Support - Books");
  22.  
  23. echo "<h1>Support</h1>";
  24.  
  25. $books = array(
  26.                array("title" => "The PEAR Installer Manifesto",
  27.                      "authors" => array("Gregory Beaver"),
  28.                      "pearuser" => array("cellog"),
  29.                      "isbn" => "1904811191",
  30.                      "url" => "http://www.packtpub.com/PEAR-Installer/book",
  31.                      "publisher" => "Packt Publishing",
  32.                      "image" => '1904811191.png'
  33.                      ),
  34.                array("title" => "PHP Programming with PEAR",
  35.                      "authors" => array("Stoyan Stefanov""Stephan Schmidt""Aaron Wormus""Carsten Lucke"),
  36.                      "pearuser" => array("stoyan""schst""wormus""luckec"),
  37.                      "isbn" => "1904811795",
  38.                      "url" => "http://www.packtpub.com/pear/book",
  39.                      "publisher" => "Packt Publishing",
  40.                      ),
  41.                array("title" => ,
  42.                      "authors" => array("Carsten M&ouml;hrke"),
  43.                      "pearuser" => array(),
  44.                      "isbn" => "3898425800",
  45.                      "url" => "http://www.galileocomputing.de/katalog/buecher/titel/gp/titelID-891",
  46.                      "publisher" => "Galileo Computing"
  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. <h2>&raquo; <a name="books" id="books">Books</a></h2>
  61.  
  62. <p>The following is a list of books that have been written about PEAR.
  63. There are a lot more PHP books that describe some PEAR packages.
  64. You can search for them at <a href="http://www.amazon.com/exec/obidos/external-search?mode=books&amp;keyword=PHP">
  65. Amazon.com</a>.</p>
  66.  
  67. <table class="form-holder" cellpadding="5" cellspacing="1">
  68. <?php
  69. foreach ($books as $book{
  70.     echo "<tr>\n";
  71.     echo "  <td rowspan=\"4\" class=\"form-input\">\n";
  72.     if (isset($book['image'])) {
  73.         echo "    <img src=\"/gifs/books/" $book['image'"\" alt=\"Cover image for " $book['title'"\" />\n";
  74.     else {
  75.         echo "    <img src=\"/gifs/blank.gif\" width=\"50\" height=\"100\" alt=\"\" />\n";
  76.     }
  77.     echo "</td>\n";
  78.     echo "  <td colspan=\"2\" valign=\"top\" class=\"form-input\">\n";
  79.     echo "    <strong><a href=\"" $book['url'"\">\n";
  80.     echo "      " $book['title'];
  81.     echo "    </a></strong>\n";
  82.     echo "  </td>\n";
  83.     echo "</tr>\n";
  84.     echo "<tr>\n";
  85.     echo "  <td class=\"form-input\">Written by:</td>\n";
  86.  
  87.     $authors = array();
  88.     for ($i = 0; $i count($book['authors'])$i++{
  89.         if (!empty($book['pearuser'][$i])) {
  90.             $authors["    <a href=\"/user/" $book['pearuser'][$i"\">" $book['authors'][$i"</a>";
  91.         else {
  92.             $authors[$book['authors'][$i];
  93.         }
  94.     }
  95.  
  96.     $size count($authors);
  97.     if ($size >= 2{
  98.         echo "  <td class=\"form-input\">" join(array_splice($authors0$size - 1)", "" and " $authors[0"</td>\n";;
  99.     else {
  100.         echo "  <td class=\"form-input\">" $authors[0"</td>\n";
  101.     }
  102.  
  103.     echo "</tr>\n";
  104.     echo "<tr>\n";
  105.     echo "  <td class=\"form-input\">Publisher:</td>\n";
  106.     echo "  <td class=\"form-input\">" $book['publisher'"</td>\n";
  107.     echo "</tr>\n";
  108.     echo "<tr>\n";
  109.     echo "  <td class=\"form-input\">ISBN:</td>\n";
  110.     echo "  <td class=\"form-input\">" $book['isbn'"</td>\n";
  111.     echo "</tr>\n";
  112.     echo "<tr><td colspan=\"2\">&nbsp;</td></tr>\n";
  113. }
  114. ?>
  115. </table>
  116.  
  117. <p>Are you an author or publisher of one of the above books?  No image?
  118. Let <a href="mailto:<?php echo PEAR_WEBMASTER_EMAIL; ?>">us know</a>
  119. if we are allowed to use an image of your book&#39;s cover page
  120. here.  Is your book missing?  Then tell us about it, too.</p>
  121.  
  122. <p><a href="/support/">&laquo; Back to the Support overview</a></p>
  123.  
  124. <?php
  125. response_footer();
  126. ?>

Documentation generated on Mon, 11 Mar 2019 15:14:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.