Changeset 18 for trunk/class/Form.php
- Timestamp:
- Jun 23, 2012, 12:47:30 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/Form.php
r16 r18 20 20 } 21 21 22 function Show() { 23 if ($this->title != '') echo ('<strong>'.$this->title.'</strong>'); 24 echo(' 22 function GetText() { 23 $return = ''; 24 if ($this->title != '') $return .= '<strong>'.$this->title.'</strong>'; 25 $return .= ' 25 26 <form action="'.$this->action.'" method="'.$this->method.'"> 26 <table>' );27 <table>'; 27 28 28 29 foreach($this->inputs as $input) 29 30 { 30 echo'<tr>';31 $return .= '<tr>'; 31 32 32 if (isset($input['description'])) echo'<td>'.$input['description'].'</td>';33 else echo'<td></td>';33 if (isset($input['description'])) $return .= '<td>'.$input['description'].'</td>'; 34 else $return .= '<td></td>'; 34 35 35 echo'<td><input ';36 $return .= '<td><input '; 36 37 37 if (isset($input['type'])) echo'type="'.$input['type'].'" ';38 if (isset($input['name'])) echo'name="'.$input['name'].'" ';39 if (isset($input['value'])) echo'value="'.$input['value'].'" ';38 if (isset($input['type'])) $return .= 'type="'.$input['type'].'" '; 39 if (isset($input['name'])) $return .= 'name="'.$input['name'].'" '; 40 if (isset($input['value'])) $return .= 'value="'.$input['value'].'" '; 40 41 41 echo'/></td></tr>';42 $return .= '/></td></tr>'; 42 43 } 43 44 44 echo('</table> 45 </form>'); 46 45 $return .= '</table> 46 </form>'; 47 return $return; 48 } 49 50 function Show() 51 { 52 53 echo $this->GetText(); 47 54 } 48 55
Note:
See TracChangeset
for help on using the changeset viewer.