Hosted by
|
<?php
// $Date: 2004/01/06 07:38:21 $ // $Revision: 1.8 $ // $Author: jcrocholl $
function frame_head($color, $icon, $caption) { global $frame_rows; $frame_rows = array(); global $root; $result = "<table class=\"frame\">\n" . "<tr>" . "<td class=\"nw $color nw-$color\"><img alt=\"\" " . "width=\"16\" height=\"16\" " . "src=\"$root"."png/$color/nw.png\"/></td>" . "<td class=\"n $color n-$color nav-icon\">$icon</td>" . "<td class=\"n $color n-$color nav-text\">$caption</td>" . "<td class=\"ne $color ne-$color\"><img alt=\"\" " . "width=\"16\" height=\"16\" " . "src=\"$root"."png/$color/ne.png\"/></td>" . "</tr>\n"; return $result; }
function frame_row(&$frame_rows, $icon, $text) { $frame_rows[] = "<td class=\"nav-icon\">$icon</td>" . "<td class=\"nav-text\">$text</td>"; }
function frame_row_single(&$frame_rows, $text) { $frame_rows[] = "<td class=\"nav-single\" colspan=\"2\">$text</td>"; }
function frame_tail($rows) { $count = count($rows); global $root; if (!$count) { return "<tr>" . "<td class=\"sw\">" . "<img alt=\"\" " . "width=\"16\" height=\"16\" " . "src=\"$root"."png/gray/sw.png\"/></td>" . "<td class=\"s\" colspan=\"2\">empty</td>" . "<td class=\"se\">" . "<img alt=\"\" " . "width=\"16\" height=\"16\" " . "src=\"$root"."png/gray/se.png\"/></td>" . "</tr>\n</table>\n"; } foreach ($rows as $row) { $index++; $result .= "<tr>"; if ($index == 1) $result .= "<td class=\"sw\" rowspan=\"$count\">" . "<img alt=\"\" src=\"$root"."png/gray/sw.png\"/></td>"; if ($index == $count) $result .= str_replace('<td class="nav', '<td class="s nav', $row); else $result .= $row; if ($index == 1) $result .= "<td class=\"se\" rowspan=\"$count\">" . "<img alt=\"\" src=\"$root"."png/gray/se.png\"/></td>"; $result .= "</tr>\n"; } $result .= "</table>\n"; return $result; }
?>
|