Commit 4ef63538 authored by Leif Andersson's avatar Leif Andersson
Browse files

Ändring i utskriften

parent 2ddd6e41
......@@ -10,32 +10,33 @@ $HEAD = <<<EOS
<head>
<meta charset="utf-8" />
<title>Grupp $ID</title>
<meta http-equiv="Content-Type" content="text/plain"/>
<!-- meta http-equiv="Content-Type" content="text/html"/ -->
</head>
EOS;
$members = Person::getGroupMembers($ID);
$addresses = array();
$addresses[] = 'Kolumn1;Kolumn2;Kolumn3;Kolumn4;Kolumn5;Kolumn6';
foreach ($members as $member) {
$adr = '';
if (trim($member->Namn)) $adr .= $member->Namn.PHP_EOL;
if ($member->SkolaForetag) $adr .= $member->SkolaForetag.PHP_EOL;
if ($member->Avdelning) $adr .= $member->Avdelning.PHP_EOL;
if ($member->Adress) $adr .= $member->Adress.PHP_EOL;
$addresses[] = $adr;
}
if (trim($member->Namn)) $adr .= $member->Namn.';';
if ($member->SkolaForetag) $adr .= $member->SkolaForetag.';';
if ($member->Avdelning) $adr .= $member->Avdelning.';';
if ($member->Adress) {
$aas = explode("\n",$member->Adress);
foreach($aas as $aa) $adr .= $aa .';';
}
$addresses[] = rtrim($adr,';');
}
//print_r($addresses);
echo $HEAD;
echo '<body>'.PHP_EOL;
echo '<pre>';
echo '<pre>'.PHP_EOL;
foreach ($addresses as $adr) echo $adr.PHP_EOL;
echo '</pre>';
echo '</pre>';
echo '</body></html>';
exit;
......
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