Commit 3d6ae0c8 authored by Leif Andersson's avatar Leif Andersson
Browse files

New variant of action.printGroup.php

parent 02b4cb15
......@@ -14,29 +14,28 @@ $HEAD = <<<EOS
</head>
<body>
<table>
<tr><td>Kolumn1</td><td>Kolumn2</td><td>Kolumn3</td><td>Kolumn4</td>
<td>Kolumn5</td><td>Kolumn6</td><td>Epost</td></tr>
<tr><td>Epost</td><td>Kolumn1</td><td>Kolumn2</td><td>Kolumn3</td><td>Kolumn4</td>
<td>Kolumn5</td><td>Kolumn6</td></tr>
EOS;
$colmax = 6;
$members = Person::getGroupMembers($ID);
$addresses = array();
foreach ($members as $member) {
$adr = '<tr>'; $col = 0;
if (trim($member->Namn)) {$adr .= '<td>'.$member->Namn.'</td>'; $col++;}
$adr = '<tr>';
$Epost = "";
if (trim($member->Epost)) $Epost = trim($member->Epost);
$adr .= '<td>' . $Epost . '</td>';
if (trim($member->Namn)) $adr .= '<td>'.$member->Namn.'</td>';
if ($member->SkolaForetag) {$adr .= '<td>'.$member->SkolaForetag.'</td>';$col++;}
if ($member->Avdelning) {$adr .= '<td>'.$member->Avdelning.'</td>'; $col++;}
if ($member->SkolaForetag) $adr .= '<td>'.$member->SkolaForetag.'</td>';
if ($member->Avdelning) $adr .= '<td>'.$member->Avdelning.'</td>';
if (!$member->Adress) {$member->Adress = $member->Hem;}
if ($member->Adress) {
$aas = explode("\n",$member->Adress);
$adr .= '<td>'.implode('<br />',$aas) . '</td>';
$col++;
# foreach($aas as $aa) {$adr .= '<td>'. $aa .'</td>';}
}
for ($i = $col; $i < $colmax; $i++) $adr .= '<td>x</td>';
if ($member->Epost) {$adr .= '<td>'.$member->Epost.'</td>';}
foreach($aas as $aa) $adr .= '<td>'. $aa .'</td>';
}
$adr .= '</tr>';
$addresses[] = $adr;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment