Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if( isset( $_REQUEST['vCard'] ) ) {
- $filename = strtolower( preg_replace( '/W+/', '_', $_REQUEST['vCard'] ) );
- // Set headers to force download
- $now = gmdate('D, d M Y H:i:s') . ' GMT'; // Header expires
- #header("Content-Type: text/x-vCard");
- #header("Content-Disposition: attachment; filename=" . $filename . "");
- #header("Connection: close");
- #header('Expires: ' . $now);
- #header("Pragma: no-cache");
- var_dump( $the_name );
- makeVcard();
- exit;
- }
- ?>
- <?php get_header(); ?>
- <div id="listingwrap">
- <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <div id="sidebar" class="right">
- <aside id="author-widget" class="left">
- <div id="authorinfo" class="left">
- <p id="presented"><?php _e('Agent Information', 'theme_textdomain'); ?></p>
- <p id="author"><?php the_author_meta('first_name'); ?> <?php the_author_meta('last_name'); ?></p>
- <ul class="authorDetails" class="left">
- <?php if(get_the_author_meta('phone')) { ?>
- <li class="authorPhone"><?php the_author_meta('phone'); ?></li>
- <?php } ?>
- <li class="authorListings">
- <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>">View All Listings</a>
- </li>
- <li class="authorVcard">
- <?php
- $last = get_the_author_meta('last_name');
- $first = get_the_author_meta('first_name');
- $the_name = $first."_".$last;
- $the_name = strtolower( preg_replace( '/W+/', '_', $the_name ) );
- ?>
- <a href="<?php echo add_query_arg('vCard', $the_name); ?>">Download Contact Info</a>
- </li>
- </ul>
- </div>
- <?php if(get_the_author_meta('ct_profile_url')) { ?><img id="authorimg" class="right" src="<?php bloginfo('template_directory'); ?>/img_resize/timthumb.php?src=<?php the_author_meta('ct_profile_url'); ?>&h=92&w=78&zc=1" /><?php } ?>
- </aside>
- <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Listing Sidebar') ) :else: endif; ?>
- </div>
- <div class="clear"></div>
- <?php endwhile; ?>
- </div>
- <div class="clear"></div>
- <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment