<?php global $SA_Tables; global $SA_AdminLinks; ?> <div class="wrap"> <?php sa_heading(__("Summary", 'silentauction')); // no event is currently set $currentEventID = get_option('sa-current-event', ''); $linkClassString = 'page-title-action'; $eventsPageKey = 'sa-events'; $biddersPageKey = 'sa-bidders'; $itemsPageKey = 'sa-items'; if ($currentEventID == '') { $eventList = $SA_Tables->events->getAll(); // ... because there are no events if (count($eventList) == 0) { echo '<p>' . __("No events yet.", 'silentauction') . '</p>'; echo '<a href="' . get_admin_url(null, 'admin.php') . "?page={$eventsPageKey}&view=add\" class=\"{$linkClassString}\">" . __("Click here to get started.", 'silentauction') . '</a>'; } else { echo '<p><a href="' . get_admin_url(null, 'admin.php') . "?page={$eventsPageKey}\" class=\"{$linkClassString}\">" . __("Click here to activate an event.", 'silentauction') . '</a></p>'; } } else { $eventInfo = $SA_Tables->events->getByID($currentEventID); if ($eventInfo !== false) { echo '<p><h3>' . $eventInfo['title'] . '</h3></p>'; $numBidders = $SA_Tables->bidders->getCount($currentEventID); $numItems = $SA_Tables->items->getCount($currentEventID, 1); ?> <table class="form-table">
$contact = false; $bidderInfo = false; if ($d['winningBidderID'] != 0) { $contact = $SA_Tables->contacts->getByID($d['contactID']); $exportData[] = array($d['ID'], $d['winningBidderID'], sprintf("\$%.2f", $d['winningBid']), $d['title'], $contact['name'], $contact['business'], $contact['addr'], $contact['city'], $contact['state'], $contact['zip'], $contact['email']); } } writeCSVAndEchoNotice($exportData, 'donorlog.csv', "Export successful.", "Unable to write donorlog.csv"); } ?> <div class="wrap"> <?php $currentEventID = get_option('sa-current-event', ''); $showPage = $currentEventID != ''; $subtitle = __("Export", 'silentauction'); sa_heading($subtitle); global $SA_Tables; $sectionList = $SA_Tables->itemSections->getAll($currentEventID); if ($showPage) { $sectionChecked = array(); $isPost = isset($_POST['sa-export-form']); foreach ($sectionList as $sect) { $sectionChecked[$sect['ID']] = $isPost == false || isset($_POST['section-' . $sect['ID']]); } ?> <form method="post" action="<?php echo get_admin_url(null, 'admin.php') . "?page=sa-export"; ?> " > <input type="hidden" name="sa-export-form" value="1" />