function kwname($start, $end, $increment, $fontclass, $colspan, $type) { print '<tr>'; for ($x = $start; $x < $end; $x += $increment) { if ($colspan > 1) { //print '<td class="'.$fontclass.'" colspan='.$colspan.'>'; print '<td colspan=' . $colspan . '>'; } else { //print '<td class="'.$fontclass.'">'; print '<td>'; } $kwpers = ancestor_chart_person($x, $type); if ($kwpers != '') { print $kwpers; } else { // if we don't do this IE7 wil not print borders of cells print ' '; } print '</td>'; } print '</tr>'; }
if ($sexe[$i + $blocks] == 'F') { $sexe_colour = ' ancestor_woman'; $backgr_col = "#FBDEC0"; } if ($sexe[$i + $blocks] == 'M') { $sexe_colour = ' ancestor_man'; $backgr_col = "#C0F9FC"; } } else { // empty square - give it background so lines won't show through $sexe_colour = ' ancestor_none'; } echo '<div class="ancestor_name' . $sexe_colour . '" style="background-color:' . $backgr_col . '; top: ' . $this_top . 'px; left: ' . $left . 'px; height: ' . $height . 'px; width:' . $width . 'px;'; echo '">'; if (isset($sexe[$i + $blocks]) and $sexe[$i + $blocks] != "") { echo ancestor_chart_person($i + $blocks, 'hour' . $size); } else { echo " "; // otherwise background color doesn't work and lines show through } echo '</div>'; $this_top += $incr; } // *** long vertical line *** $this_top = $top + $line_drop; for ($i = 0; $i < $blocks / 2; $i++) { echo '<div class="hour_ancestor_split" style="top: ' . $this_top . 'px; left: ' . ($left + $width + 3) . 'px; height: ' . $hi . 'px;"></div>'; $this_top += $gap; } // *** little horizontal line *** $this_top = $top + $line_drop;