Example #1
0
						</span>
						<?php 
}
?>
						<?php 
if ($mem->PhoneNumber && (!$mem->HidePhone || $isCurrent || $LEADER)) {
    ?>
						<span class="metafield">
							<?php 
    if (IS_MOBILE) {
        echo '<a href="tel:' . $mem->PhoneNumber . '">';
    }
    ?>
							<i class="fa fa-phone"></i>
							<?php 
    echo formatPhoneForDisplay($mem->PhoneNumber);
    ?>
							<?php 
    if (IS_MOBILE) {
        echo '</a>';
    }
    ?>
						</span>
						<?php 
}
?>
						<?php 
if (!$mem->HideBirthday || $isCurrent || $LEADER) {
    ?>
						<span class="metafield">
							<i class="fa fa-gift"></i>
Example #2
0
    echo $memb->FirstName() . ' ' . $memb->LastName;
    ?>
								</a>
							</div>
						</td>
						<td style="width: 200px; min-width: 200px;">
					 		<div>
					 			<div class="vert-align-middle">
					 				<?php 
    echo $memb->ResidenceString();
    ?>
					 			</div>
					 		</div>
					 	</td>
						<td style="width: 200px; min-width: 200px;"><?php 
    echo !$memb->HidePhone || $LEADER ? formatPhoneForDisplay($memb->PhoneNumber) : '';
    ?>
</td>
						<td style="width: 300px; min-width: 300px;"><?php 
    echo !$memb->HideEmail || $LEADER ? $memb->Email : '';
    ?>
</td>
						<td style="width: 200px; min-width: 200px;"><?php 
    echo !$memb->HideBirthday || $LEADER ? "{$mm} {$dd}<sup>{$ordinal}</sup>" : '';
    if ($LEADER) {
        echo ', ' . $yyyy;
    }
    ?>
</td>
				<?php 
    // Display the members' answers this user is allowed to see
Example #3
0
 $month = date("F", $bdate);
 $day = date("j", $bdate);
 $mm = date("m", $bdate);
 $dd = date("d", $bdate);
 $yyyy = date("Y", $bdate);
 // Prepare the member's last activity info in case we need to provide it
 $regDate = strtotime($m->RegistrationDate());
 $lastUpdated = strtotime($m->LastUpdated());
 $lastActivity = strtotime($m->LastActivity());
 // Add fields in the same order as the first line. Very important!
 $csv->AddValue($m->FirstName);
 $csv->AddValue($m->MiddleName);
 $csv->AddValue($m->LastName);
 $csv->AddValue(Gender::Render($m->Gender));
 $csv->AddValue($m->ResidenceString());
 $csv->AddValue(!$m->HidePhone || $allPhones ? formatPhoneForDisplay($m->PhoneNumber) : "");
 if ($allEmails) {
     $csv->AddValue($m->Email);
 }
 if ($allBdays) {
     $csv->AddValue("{$mm}-{$dd}-{$yyyy}");
 } else {
     $csv->AddValue(!$m->HideBirthday ? "{$month} {$day}" : '');
 }
 // doesn't work as well in contact importers. oh well.
 if ($showActivityInfo) {
     $csv->AddValue($regDate > 0 ? date("Y-m-d", $regDate) : "");
     $csv->AddValue($lastUpdated > 0 ? date("Y-m-d", $lastUpdated) : "");
     $csv->AddValue($lastActivity > 0 ? date("Y-m-d", $lastActivity) : "");
 }
 // Now, in the same order as questions saved (from above), we'll
Example #4
0
$csv->AddField("State");
$csv->AddField("Postal");
$csv->AddField("Phone");
$csv->AddField("Prior Unit");
// Add all the data to the file
while ($r = mysql_fetch_array($q)) {
    $m = Member::Load($r['ID']);
    $res = $m->Residence();
    // Get parts of the birth date so we can put in that funky MLS format
    $bdate = strtotime($m->Birthday);
    $month = date("m", $bdate);
    $day = date("d", $bdate);
    $year = date("Y", $bdate);
    // If the address isn't custom, the street portion needs to have the unit number appended
    $streetAddr = $res ? $res->Address : "";
    if ($res && !$res->Custom() && trim($m->Apartment) != "") {
        $streetAddr .= " Apt " . $m->Apartment;
    }
    // Build this row
    $csv->AddValue($m->LastName . ", " . $m->FirstName);
    $csv->AddValue($year . $month . $day);
    $csv->AddValue($streetAddr);
    $csv->AddValue($res ? $res->City : "");
    $csv->AddValue($res ? $res->State : "");
    $csv->AddValue($res ? $res->PostalCode : "");
    $csv->AddValue(formatPhoneForDisplay($m->PhoneNumber));
    $csv->AddValue("");
    $csv->NextRow();
}
// Send file as a download
$csv->Download($filename);