function print_nonmessage_info($bapi, $list_ids, $seg_ids, $delivery_date, $from_addr, $from_name, $reply_addr) { $lists = get_lists_using_ids($bapi, $list_ids); $seg_names = get_segment_names($bapi, $seg_ids); $reply_str = empty($reply_addr) ? "N/A" : $reply_addr; ?> <p> List(s) to be targeted: </p> <p> <?php if ($lists) { foreach ($lists as $list) { echo "<b>" . $list->name . "</b> [" . $list->activeCount . "]<br/>\n"; } } else { echo "<div class=\"warning\">No lists were selected.</div>"; } ?> </p> <p> Segment(s) to be targeted: </p> <p> <?php if (count($seg_names) > 0) { foreach ($seg_names as $sname) { echo "<b>{$sname}</b><br/>\n"; } } else { echo "<div class=\"warning\">No segments were selected.</div>"; } ?> </p> <p> Date to send: <b><?php echo $delivery_date; ?> </b> </p> <p> From: <b><?php echo $from_name; ?> <<?php echo $from_addr; ?> ></b> <br/>Reply-To: <b><?php echo $reply_str; ?> </b> </p> <?php }
function get_list_names($binding, $ids) { $lnames = array(); $lists = get_lists_using_ids($binding, $ids); if ($lists) { foreach ($lists as $list) { $lnames[] = $list->name; } } return $lnames; }