NTKCheckbox.php 491 B

1234567891011121314151617181920212223242526
  1. <?php
  2. class NTKCheckbox
  3. {
  4. function NTKCheckbox($id, $value = "", $checked = False, $style = "")
  5. {
  6. $this->id = $id;
  7. $this->value = $value;
  8. $this->checked = $checked;
  9. $this->style = $style;
  10. }
  11. function getHtml()
  12. {
  13. $html = "";
  14. $html .= "<input id=\"$this->id\" name=\"$this->id\" class=\"checkbox\" type=\"checkbox\" value=\"$this->value\" style=\"".$this->style."\"";
  15. if($this->checked)
  16. $html .= " checked=\"checked\"";
  17. $html .= ">\n";
  18. return $html;
  19. }
  20. }
  21. ?>