Changeset 11 for trunk/www/global.php
- Timestamp:
- Jun 11, 2009, 8:28:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/global.php
r9 r11 314 314 } 315 315 316 function MakeLink($Target, $Title) 317 { 318 return('<a href="'.$Target.'">'.$Title.'</a>'); 319 } 320 321 function Table($Table, $Class) 322 { 323 $Result = '<table class="'.$Class.'">'; 324 if(array_key_exists('Header', $Table)) 325 { 326 $Result .= '<tr>'; 327 foreach($Table['Header'] as $Item) 328 $Result .= '<th>'.$Item.'</th>'; 329 $Result .= '</tr>'; 330 } 331 foreach($Table['Rows'] as $Row) 332 { 333 $Result .= '<tr>'; 334 foreach($Row as $Index => $Item) 335 { 336 if($Index == 0) $Class = ' class="Header"'; else $Class = ''; 337 $Result .= '<td'.$Class.'>'.$Item.'</td>'; 338 } 339 $Result .= '</tr>'; 340 } 341 $Result .= '</table>'; 342 return($Result); 343 } 344 316 345 ?>
Note:
See TracChangeset
for help on using the changeset viewer.