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

Source for file monitor_itdynamic.php

Documentation is available at monitor_itdynamic.php

  1. <?php
  2. @include '../../include_path.php';
  3. /**
  4.  * Monitor example using ITDynamic QF renderer, and
  5.  * a class-method as user callback.
  6.  *
  7.  * @version    $Id: monitor_itdynamic.php,v 1.3 2004/04/18 13:25:43 farell Exp $
  8.  * @author     Laurent Laville <pear@laurent-laville.org>
  9.  * @package    HTML_Progress
  10.  */
  11.  
  12. require_once 'HTML/Progress/monitor.php';
  13. require_once 'progressModels.php';
  14. require_once 'progressHandler.php';
  15. require_once 'HTML/QuickForm/Renderer/ITDynamic.php';
  16. // can use either HTML_Template_Sigma or HTML_Template_ITX
  17. require_once 'HTML/Template/ITX.php';
  18. //require_once 'HTML/Template/Sigma.php';
  19.  
  20.  
  21. $monitor = new HTML_Progress_Monitor('frmMonitor5'array(
  22.     'title'  => 'Upload your pictures',
  23.     'start'  => 'Upload',
  24.     'cancel' => 'Stop',
  25.     'button' => array('style' => 'width:80px;')
  26.     )
  27. );
  28. $monitor->setProgressHandler(array('my2ClassHandler','my1Method'));
  29.  
  30. // Attach a progress ui-model (see file progressModels.php for attributes definition)
  31. $progress = new HTML_Progress();
  32. $progress->setUI('Progress_ITDynamic');
  33. $progress->setAnimSpeed(50);
  34. $monitor->setProgressElement($progress);
  35.  
  36. // can use either HTML_Template_Sigma or HTML_Template_ITX
  37. $tpl =new HTML_Template_ITX('./templates');
  38. // $tpl =& new HTML_Template_Sigma('./templates');
  39.  
  40.  
  41. $tpl->loadTemplateFile('itdynamic_monitor.html');
  42.  
  43. $tpl->setVariable(array(
  44.     'qf_style'  => "body {font-family: Verdana, Arial; } \n" $monitor->getStyle(),
  45.     'qf_script' => $monitor->getScript()
  46.     )
  47. );
  48.  
  49. $renderer =new HTML_QuickForm_Renderer_ITDynamic($tpl);
  50. $renderer->setElementBlock(array(
  51.     'buttons'     => 'qf_buttons'
  52. ));
  53.  
  54. $monitor->accept($renderer);
  55.  
  56. // Display progress uploader dialog box
  57. $tpl->show();
  58.  
  59.  
  60. $monitor->run();   
  61.  
  62. echo '<p>&lt;&lt; <a href="index.html">Back examples TOC</a></p>';
  63. ?>

Documentation generated on Mon, 11 Mar 2019 10:15:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.