How to use Master Pages (master)

  1. <?php
  2. /**
  3. *  This file is part of the VCL for PHP project
  4. *
  5. *  Copyright (c) 2004-2008 qadram software S.L. <support@qadram.com>
  6. *
  7. *  Checkout AUTHORS file for more information on the developers
  8. *
  9. *  This library is free software; you can redistribute it and/or
  10. *  modify it under the terms of the GNU Lesser General Public
  11. *  License as published by the Free Software Foundation; either
  12. *  version 2.1 of the License, or (at your option) any later version.
  13. *
  14. *  This library is distributed in the hope that it will be useful,
  15. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. *  Lesser General Public License for more details.
  18. *
  19. *  You should have received a copy of the GNU Lesser General Public
  20. *  License along with this library; if not, write to the Free Software
  21. *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  22. *  USA
  23. *
  24. */
  25.  
  26.  
  27. //Includes
  28. require_once("vcl/vcl.inc.php");
  29. use_unit("forms.inc.php");
  30. use_unit("extctrls.inc.php");
  31. use_unit("stdctrls.inc.php");
  32.  
  33. //Class definition
  34. class MasterPage extends Page
  35. {
  36.    public $pnContents = null;
  37.    public $Panel2 = null;
  38.    public $Panel1 = null;
  39.    function pnContentsShow($sender$params)
  40.    {
  41.       //Override this method in inherited pages and show here your contents
  42.    }
  43.  
  44. }
  45.  
  46. global $application;
  47.  
  48. global $MasterPage;
  49.  
  50. //Creates the form
  51. $MasterPage = new MasterPage($application);
  52.  
  53. //Read from resource file
  54. $MasterPage->loadResource(__FILE__);
  55.  
  56. //Shows the form
  57. $MasterPage->show();
  58.  
  59. ?>

Documentation generated on Wed, 28 May 2008 19:55:03 +0200 by phpDocumentor 1.4.0a2