Update member report

master
Skylar Ittner 1 year ago
parent 860808d62c
commit 49f078c8fc

@ -153,12 +153,10 @@ END;
$header = $phpWord->addSection(["paperSize" => "Letter", 'marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600]);
$header->addTitle("HACHE Member Directory\n", 1);
$updated = $header->addTextRun();
$updated->addText("Updated: ", ['bold' => true]);
$updated->addText("$date");
$iconkey = $header->addTextRun();
$iconkey->addText("Icon key: ", ['bold' => true]);
$iconkey->addText("●: Graduated student | ►: Photo permission denied");
$header->addText("Updated: ", ['bold' => true]);
$header->addText("$date");
$header->addText("Icon key: ", ['bold' => true]);
$header->addText("●: Graduated student | ►: Photo permission denied");
$header->addText($Strings->get("You agree to use the information in this directory for homeschool use ONLY. All other purposes, such as soliciting, is strictly prohibited.", false));
$header->addTextBreak(2);
@ -178,21 +176,28 @@ END;
$famtext->addText("►");
}
$famtext->addText($f->getName(), ['bold' => true]);
$famtext->addText(", " . $f->getFather() . " and " . $f->getMother());
$body->addText($f->getAddress() . ", " . $f->getCity() . ", " . $f->getState() . " " . $f->getZip());
$links = $body->addTextRun();
$links->addLink("tel:" . $f->getPhone(), $f->getPhone());
$links->addText(" ");
$links->addLink("mailto:" . $f->getEmail(), $f->getEmail());
if (!empty($f->getFather()) && !empty($f->getMother())) {
$famtext->addText(", " . $f->getFather() . " and " . $f->getMother());
} else if (!empty($f->getFather())) {
$famtext->addText(", " . $f->getFather());
} else if (!empty($f->getMother())) {
$famtext->addText(", " . $f->getMother());
}
$famtext = $body->addTextRun();
$famtext->addText($f->getAddress() . ", " . $f->getCity() . ", " . $f->getState() . " " . $f->getZip());
$famtext = $body->addTextRun();
$famtext->addLink("tel:" . $f->getPhone(), $f->getPhone());
$famtext->addText(" ");
$famtext->addLink("mailto:" . $f->getEmail(), $f->getEmail());
foreach ($f->getChildren() as $child) {
$chtext = $body->addTextRun(["indent" => 1440]);
$famtext = $body->addTextRun();
if ($child->isGraduated()) {
$chtext->addText(" ● ");
$famtext->addText(" ● ");
} else {
$chtext->addText("");
$famtext->addText("");
}
$chtext->addText($child->getName() . ", " . date("M y", $child->getBirthday()));
$famtext->addText($child->getName() . ", " . date("M y", $child->getBirthday()));
}
$body->addTextBreak(1);
}

Loading…
Cancel
Save