• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/View/Helper/FormFile.php

00001 <?php
00027 require_once 'Zend/View/Helper/FormElement.php';
00028 
00029 
00039 class Zend_View_Helper_FormFile extends Zend_View_Helper_FormElement
00040 {
00054     public function formFile($name, $attribs = null)
00055     {
00056         $info = $this->_getInfo($name, null, $attribs);
00057         extract($info); // name, id, value, attribs, options, listsep, disable
00058 
00059         // is it disabled?
00060         $disabled = '';
00061         if ($disable) {
00062             $disabled = ' disabled="disabled"';
00063         }
00064 
00065         // XHTML or HTML end tag?
00066         $endTag = ' />';
00067         if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
00068             $endTag= '>';
00069         }
00070 
00071         // build the element
00072         $xhtml = '<input type="file"'
00073                 . ' name="' . $this->view->escape($name) . '"'
00074                 . ' id="' . $this->view->escape($id) . '"'
00075                 . $disabled
00076                 . $this->_htmlAttribs($attribs)
00077                 . $endTag;
00078 
00079         return $xhtml;
00080     }
00081 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2