function renderItem(&$source) { $base_description = $this->_renderer->inSpan($source->getName(), array('class' => $this->_css_class_title)) . $this->_renderer->newline() . $this->_renderer->inSpan(DoDate($source->getItemDate(), 'l, F jS Y') . ($source->getItemDate() ? $this->_renderer->space(2) : '') . $source->getData('time') . $this->_renderer->newline() . $source->getShortLocation(), array('class' => $this->_css_class_details)); $blurb = ($description = $source->getBody()) ? $description : $source->getBlurb(); if ($blurb) { $blurb = $this->_renderer->inSpan(converttext($blurb), array('class' => $this->_css_class_blurb)); } $location = array(); $location_segments = array('location', 'laddress', 'lcity', 'lzip'); foreach ($location_segments as $location_data) { $location_value = $source->getData($location_data); if (!$location_value) { continue; } $location[$location_data] = $location_value; } $location['lcity'] = $source->getShortLocation(); $location_description = isset($location['location']) ? join($this->_renderer->newline(), $location) : ""; if ($location_description) { $location_description = $this->_renderer->bold(AMP_TEXT_LOCATION . ':') . $this->_renderer->newline() . $location_description; } $contact_output = ''; $contact_name = $source->getData('contact1'); $contact_email = $source->getData('email1'); $contact_phone = $source->getData('phone1'); if ($contact_name) { $contact_output .= $this->_renderer->newline() . $contact_name; } if ($contact_email) { $rendered_contact_email = AMP_protect_email($contact_email); $contact_output .= $this->_renderer->newline() . $rendered_contact_email; } if ($contact_phone) { $contact_output .= $this->_renderer->newline() . $contact_phone; } if ($contact_output) { $contact_output = $this->_renderer->bold(AMP_TEXT_CONTACT . ':') . $this->_renderer->newline() . $contact_output; } $sponsor_output = ''; if ($sponsor = $source->getData('org')) { $sponsor_output = $this->_renderer->bold(AMP_TEXT_SPONSORED . ':') . $this->_renderer->newline() . $sponsor; } $output_segments = array('base_description', 'blurb', 'location_description', 'contact_output', 'sponsor_output'); foreach ($output_segments as $block_name) { if (!${$block_name}) { continue; } $output_value[$block_name] = ${$block_name}; } return join($this->_renderer->newline(2), $output_value); }
function housing_display_request_list($data, &$udm) { $renderer = AMP_get_renderer(); $output = ''; $output .= $renderer->span('Contact:', array('class' => 'board_label')) . $renderer->space() . $renderer->span($data['First_Name'] . ' ' . $data['Last_Name'], array('class' => 'board_data')) . $renderer->newline(); if (isset($data['Company']) && $data['Company']) { $output .= $renderer->span('Org:', array('class' => 'board_label')) . $renderer->space() . $renderer->span($data['Company'], array('class' => 'board_data')) . $renderer->newline(); } if (isset($data['Phone']) && $data['Phone']) { $output .= $renderer->span('Phone:', array('class' => 'board_label')) . $renderer->space() . $renderer->span($data['Phone'], array('class' => 'board_data')) . $renderer->newline(); } if (isset($data['Email']) && $data['Email']) { $output .= $renderer->span('Email:', array('class' => 'board_label')) . $renderer->space() . $renderer->span(AMP_protect_email($data['Email']), array('class' => 'board_data')) . $renderer->newline(); } if (isset($data['custom16']) && $data['custom16']) { $output .= $renderer->span('Dates Needed:', array('class' => 'board_label')) . $renderer->space() . $renderer->span($data['custom16'], array('class' => 'board_data')) . $renderer->newline(); } if (isset($data['custom17']) && $data['custom17']) { $output .= $renderer->span('Number of People:', array('class' => 'board_label')) . $renderer->space() . $renderer->span($data['custom17'], array('class' => 'board_data')) . $renderer->newline(); } $summary_output = $renderer->div($output, array('class' => 'board_summary')); $output = ''; if (isset($data['custom18']) && $data['custom18']) { $output .= $renderer->span('Other Comments:', array('class' => 'board_label')) . $renderer->newline() . $renderer->span($data['custom18'], array('class' => 'board_data')) . $renderer->newline(2); } $detail_output = $renderer->div($output, array('class' => 'board_details')); return $summary_output . $detail_output; }
while (!$nhousing->EOF) { ?> <br> <table width="100%" border="0" cellpadding="2" bordercolor="#000000" class=boardbg> <tr > <td class="text"><strong>Contact: </strong><?php echo $nhousing->Fields("First_Name"); ?> <?php echo $nhousing->Fields("Last_Name"); ?> <?php echo $housing->Fields("Company"); ?> <?php AMP_protect_email($nhousing->Fields("Email")); ?> <?php echo $nhousing->Fields("Phone"); ?> </td> </tr> <tr > <td class="text"><b>Dates Needed :</b> <?php echo $nhousing->Fields("custom16"); ?> </td> </tr> <tr > <td class="text"><b>Number of People :</b> <?php
function mailto($address, $text = '', $attr_set = array()) { return AMP_protect_email($address, $text); //return $this->link( 'mailto:' . $address, ( $text?$text:$address), $attr_set ); }
function render_contact($source) { $contact_header = $this->_renderer->strong(ucwords(AMP_TEXT_CONTACT) . ':' . $this->_renderer->space()); $all_items = array(); if ($item = $source->getName()) { $all_items[] = $item; } if ($item = $source->getData('Company')) { $all_items[] = $item; } if ($item = $source->getData('Email')) { $all_items[] = AMP_protect_email($item); } if ($item = $source->getData('Phone')) { $all_items[] = $item; } return $contact_header . join($this->_renderer->space(2), $all_items); }