Modify to use new array for nicer display

This commit is contained in:
Miles Lott 2001-02-04 03:54:42 +00:00
parent 60974dce6f
commit 5f1e2fe0e7

View File

@ -61,34 +61,38 @@
<?php <?php
// I need to create a common function to handle displaying multiable columns // I need to create a common function to handle displaying multiable columns
echo '<tr bgcolor="' . $phpgw_info["theme"]["th_bg"] . '"><td colspan="3">&nbsp;</td></tr>'; echo "<tr bgcolor=\"" . $phpgw_info["theme"]["th_bg"] . "\"><td colspan=\"3\">&nbsp;</td></tr>\n";
$i = 0; $j = 0; $i = 0; $j = 0;
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
echo '<tr bgcolor="' . $tr_color . '">'; echo "<tr bgcolor=\"" . $tr_color . "\">\n";
while (list($col, $descr) = each($this->stock_contact_fields)) { while (list($col, $descr) = each($this->stock_contact_fields)) {
// echo "<br>test: $col - $i $j - " . count($abc); // echo "<br>test: $col - $i $j - " . count($abc);
$i++; $j++; $i++; $j++;
$showcol = display_name($descr);
echo '<td><input type="checkbox" name="ab_selected[' . $col . ']" value="True"' if ($showcol) {
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . lang($descr) echo "\t<td><input type=\"checkbox\" name=\"ab_selected[" . $col . "]\" value=\"True\""
. '</option></td>'; . ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . lang($showcol)
. "</option></td>\n";
} else {
$i--;
next;
}
if ($i == 3) { if ($i == 3) {
echo "</tr>"; echo "</tr>\n";
$i = 0; $i = 0;
} }
if ($i == 0) { if ($i == 0 && $showcol) {
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
echo '<tr bgcolor="' . $tr_color . '">'; echo "<tr bgcolor=\"" . $tr_color . "\">\n";
} }
if ($j == count($this->stock_contact_fields)) { if ($j == count($this->stock_contact_fields)) {
if ($i == 1) { if ($i == 1) {
echo "<td>&nbsp;</td><td>&nbsp;</td>"; echo "\t<td>&nbsp;</td><td>&nbsp;</td>\n";
} }
if ($i == 2) { if ($i == 2) {
echo "<td>&nbsp;</td>"; echo "\t<td>&nbsp;</td>\n";
} }
echo "</tr>"; echo "</tr>\n";
} }
} }
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);