phpDocumentor form
[ class tree: form ] [ index: form ] [ all elements ]

Source for file Fileupload.php

Documentation is available at Fileupload.php

  1. <?
  2. /**
  3. * @package form
  4. * @filesource
  5. * @see HTML_FORM_COMPONENT_PATH.'/Fileupload.php'
  6. * @copyright (c) http://Finn-Rasmussen.com
  7. * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
  8. * @author http://Finn-Rasmussen.com
  9. * @version 1.9
  10. * @since 21-oct-2005
  11. */
  12.  
  13. /**
  14. * The required files
  15. */
  16. require_once(HTML_FORM_COMPONENT_PATH.'/Input.php');
  17.  
  18. /**
  19. * Generates an INPUT element for a form, which is File upload
  20. * <code>
  21. * <input type="file" name="$name" class="$class" />
  22. * Usage:
  23. * $html = new Fileupload($name,$class,$onclick,$title,$tabindex);
  24. * print $html>getHtml();
  25. * Or
  26. * Fileupload::display($name,$class,$onclick,$title,$tabindex);
  27. * </code>
  28. * @package form
  29. */
  30.  
  31. class Fileupload extends Input {
  32.  
  33. /**
  34. * Constructor
  35. * @param String $name The name
  36. * @param String $class The class
  37. * @param String $onclick On click event for javascript
  38. * @param String $title The tooltip
  39. * @param String $tabindex The tabindex
  40. */
  41. function Fileupload($name, $class='',$onclick='',$title='',$tabindex='') {
  42. $this->Input('file',$name,'',$class,'','','','',$onclick,$title,$tabindex);
  43. }
  44.  
  45. /**
  46. * Display html
  47. * <code>
  48. * Usage:
  49. * Fileupload::display($name,$class,$onclick,$title,$tabindex);
  50. * </code>
  51. * @static
  52. * @param String $name The name
  53. * @param String $class The class
  54. * @param String $onclick On click event for javascript
  55. * @param String $title The tooltip
  56. * @param String $tabindex The tabindex
  57. */
  58. function display($name='',$class='',$onclick='',$title='',$tabindex='') {
  59. $html = new Fileupload($name,$class,$onclick,$title,$tabindex);
  60. $html->addHtml();
  61. }
  62. }
  63. ?>

Documentation generated on Thu, 22 Dec 2005 17:08:08 +0100 by phpDocumentor 1.3.0RC3