[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

/examples/apps/bookmarks/ -> bookmarks.php (source)

   1  <?php
   2  // Include WACT common file (where ever it is)
   3  require_once  './load_wact.php';
   4  
   5  // Include template component
   6  require WACT_ROOT . 'template/template.inc.php';
   7  // Include database component
   8  require WACT_ROOT . 'db/db.inc.php';
   9  
  10  // Create the main "page component"
  11  $Page = & new Template('/bookmarks.html');
  12  
  13  // Get the bookmarks like from the page
  14  $List = & $Page->getChild('BookmarksList');
  15  
  16  // Get the Pager from the page (id from template is 'pagenav')
  17  $Pager = & $Page->getChild('pagenav');
  18  
  19  // Prepare the paged dataset
  20  $Bookmarks = & DBC::NewPagedRecordSet('SELECT * FROM bookmarks ORDER BY name', $Pager);
  21  
  22  // Pass the bookmarks dataset to the list
  23  $List->registerDataSet($Bookmarks);
  24  
  25  // Display the page
  26  $Page->display();
  27  ?>


Generated: Sun Nov 28 19:36:09 2004 Cross-referenced by PHPXref 0.5