Source for file Prices.php

Documentation is available at Prices.php

  1. <?php
  2. /* -------------------------------------------------------------------------- */
  3. /* Module      : Prices                                                       */
  4. /*                                                                            */
  5. /* Version History :                                                          */
  6. /*                                                                            */
  7. /* Date        Vsn     Author          Description                            */
  8. /* -------------------------------------------------------------------------- */
  9. /* 17/01/09    1.0     S.Lindo         Initial version.                       */
  10. /* -------------------------------------------------------------------------- */
  11. /**
  12.  * Display prices for all seasons for the requested accomodations
  13.  * 
  14.  * @package Default
  15.  */
  16. {
  17.     /**
  18.      * @return string Seasons and prices for each requested accommodation.
  19.      */
  20.     public function prices($in_accommodation)
  21.     {
  22.         $prices null;
  23.  
  24.         $durationPrice new DurationPrice();
  25.         $season new Season();
  26.  
  27.         foreach ($in_accommodation as $accommodation)
  28.         {
  29.             $prices .= "\n<hr />";
  30.  
  31.             $prices .= "\n<div class=\"section\"><h3>" $accommodation['description'"</h3>";
  32.             $prices .= "\n<table>\n\n<tr class=\"header\"><td>Season</td><td>Nights</td><td>Price</td></tr>";
  33.  
  34.             $durationPriceRowSet $durationPrice->fetchAll("accomm_id=".$accommodation['accomm_id']);
  35.  
  36.             // Loop through  each pricing  for the accommodation
  37.             foreach ($durationPriceRowSet as $durationPriceRow)
  38.             {
  39.                 $prices .= "\n<tr>";
  40.                 $seasonRow $season->find($durationPriceRow['client_season_id']);
  41.                 $prices .= "\n\t<td>" $seasonRow[0]->description "</td>";
  42.  
  43.                 $prices .= "\n\t<td>" $durationPriceRow['duration'"</td>";
  44.                 $prices .= "\n\t<td>" $durationPriceRow['cost'"</td>";
  45.  
  46.                 $prices .= "\n</tr>";
  47.             }
  48.             $prices .= "\n</table></div>\n";
  49.         }
  50.  
  51.         return $prices;
  52.     }
  53.  
  54. }

Documentation generated on Fri, 27 Mar 2009 13:48:40 +0000 by phpDocumentor 1.4.1