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

Source for file calendar.inc.php

Documentation is available at calendar.inc.php

  1. <?php
  2. /**
  3. *  This file is part of the VCL for PHP project
  4. *
  5. *  Copyright (c) 2004-2007 qadram software <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. use_unit("classes.inc.php");
  27. use_unit("controls.inc.php");
  28. use_unit("stdctrls.inc.php");
  29.  
  30. /**
  31. * A javascript clock, not used
  32. */
  33. class Clock extends FocusControl
  34. {
  35.         function __construct($aowner=null)
  36.         {
  37.                 //Calls inherited constructor
  38.                 parent::__construct($aowner);
  39.  
  40.                 $this->Width=200;
  41.                 $this->Height=200;
  42.         }
  43.  
  44.         function dumpHeaderCode()
  45.         {
  46.                 if (!defined('DYNAPI'))
  47.                 {
  48.                         echo "<script type=\"text/javascript\" src=\"".VCL_HTTP_PATH."/dynapi/src/dynapi.js\"></script>\n";
  49.                 }
  50.  
  51.                 if (!defined('DYNAPI_'.strtoupper($this->className())))
  52.                 {
  53.                         echo "<script type=\"text/javascript\">\n";
  54.                         if (!defined('DYNAPI'))
  55.                         {
  56.                                 echo "dynapi.library.setPath('".VCL_HTTP_PATH."/dynapi/src/');\n";
  57.                                 echo "dynapi.library.include('dynapi.api');\n";
  58.                                 define('DYNAPI',1);
  59.                         }
  60.                         echo "dynapi.library.include('HTMLClock');\n";
  61.                         echo "</script>\n";
  62.                         define('DYNAPI_'.strtoupper($this->className()),1);
  63.                 }
  64.         }
  65.  
  66.         function dumpContents()
  67.         {
  68.                 $l=0;
  69.                 $t=0;
  70.  
  71.                 if (($this->ControlState csDesigning)!=csDesigning)
  72.                 {
  73.                         $l=$this->Left;
  74.                         $t=$this->Top;
  75.                 }
  76.  
  77.                 echo "<script type=\"text/javascript\">\n";
  78.                 $o="vert";
  79.                 if ($this->_kind==sbHorizontal$o="horz";
  80.  
  81.                 echo "        ".$this->Name."=new HTMLClock()\n";
  82.                 echo "        ".$this->Name.".setSize(".$this->width.",".$this->Height.");\n";
  83.                 echo "        dynapi.document.addChild(".$this->Name.")\n";
  84.                 echo "</script>\n";
  85.                 echo "<script type=\"text/javascript\">\n";
  86.                 echo "dynapi.document.insertChild(".$this->Name.");\n";
  87.                 echo "</script>\n";
  88.         }
  89.  
  90. }
  91.  
  92.  
  93. ?>

Documentation generated on Tue, 27 Mar 2007 13:33:20 +0200 by phpDocumentor 1.3.1