| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- class NTKForm
- {
- function NTKForm($id, $action = "", $elem = Null)
- {
- $this->id = $id;
- $this->action = $action;
- $this->elem = $elem;
- $this->attributes = array();
- $this->style = "";
- }
-
- function addAttribute($attribute, $value)
- {
- $this->attributes[] = array($attribute, $value);
- }
-
- function getHtml()
- {
- $html = "";
-
- $html .= "<form name=\"".$this->id."\" action=\"".$this->action."\" method=\"post\" style=\"".$this->style."\">\n";
- for($i = 0; $i < count($this->attributes); $i++)
- $html .= "<input type=\"hidden\" name=\"".$this->attributes[$i][0]."\" value=\"".$this->attributes[$i][1]."\">\n";
-
- if($this->elem != null)
- $html .= $this->elem->getHtml();
-
- $html .= "<input type=\"submit\" value=\"\" style=\"visibility: hidden; position: absolute; width: 0px; height: 0px;\">";
- $html .= "</form>\n";
-
- return $html;
- }
- }
- ?>
|