if ($cresults[$i]['table'] == "companies") { echo "Company"; } else { if ($cresults[$i]['table'] == "people") { echo "Person"; } else { if ($cresults[$i]['table'] == "investment_orgs") { echo "Investment Organization"; } } } ?> </div> <div class='description'> <?php echo word_limit(trim($cresults[$i]['description']), 50); ?> </div> </td> </tr> </table> <?php } /* $cresults = $results['companies']['results']; $t = count($cresults); for($i=0; $i<$t; $i++){ $value = $cresults[$i]; ?> <table class='seachblock'> <tr>
} else { $count = 0; while (have_posts()) { $count++; the_post(); ?> <div class='pagetitle'><a href='<?php the_permalink(); ?> '><?php the_title(); ?> </a></div><?php ?> <div class='pagecontent' style='padding-bottom:20px'><?php echo word_limit(strip_tags($post->post_content), 30); ?> </div><?php } ?> <div id='no_results' style='' ><?php posts_nav_link(' · ', 'Previous Page', 'Next Page'); ?> </div><?php if (!$count) { ?> <div id='prev_next' style='' >No Results</div><?php } } ?> </div>
function person27x($slug, $id = "") { $json = file_get_contents("http://27x.co/person/" . $slug . "~json/" . $id); $data27x = json_decode($json); if (!trim($data27x->name)) { return false; } ?> <table class='x27tablecontent'> <tr> <td width='25%'> <a href='http://27x.co/person/<?php echo $data27x->slug; ?> '><img title="<?php echo htmlentities($data27x->name); ?> " alt="<?php echo htmlentities($data27x->name); ?> " src='http://27x.co/media/image.php?p=<?php echo $data27x->profile_image; ?> &mx=150&square=1' /></a> </td> <td width='25%'> <div class='label'>Name</div> <div class='value'><?php echo $data27x->name; ?> </div> <?php if (trim($data27x->blog_url)) { $website = preg_replace("/http:\\/\\//i", "", $data27x->blog_url); $website = preg_replace("/https:\\/\\//i", "", $data27x->blog_url); $website = trim($website, "/"); if (strpos(strtolower(trim($data27x->blog_url)), "http://") === false && strpos(strtolower(trim($data27x->blog_url)), "https://") === false) { $hwebsite = "http://" . $website; } else { $hwebsite = $website; } $hwebsite = "http://27x.co/l?url=" . urlencode($hwebsite); ?> <div class='label'>Blog</div> <div class='value'><a href='<?php echo $hwebsite; ?> '><?php echo $website; ?> </a></div> <?php } ?> </td> <td width='50%'> <div class='description'> <?php echo nl2br(word_limit($data27x->description, 45)); ?> <div class='more'><a href='http://27x.co/person/<?php echo $data27x->slug; ?> ' >More on <?php echo $data27x->name; ?> »</a></div> </div> </td> </tr> </table> <?php }