Ejemplo n.º 1
0

		<?php 
            }
            // End if 'post' == get_post_type()
            ?>
		<h3 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></h3>
		<div class="tx-div small"></div>
		<p><?php 
            echo short_excerpt(24);
            ?>
</p>

		<?php 
            if ('post' == get_post_type()) {
                ?>
		<?php 
                if (!post_password_required() && (comments_open() || '0' != get_comments_number())) {
                    ?>
		<span class="comments-link"><?php 
                    comments_popup_link(__('Leave a comment', 'flatsome'), __('<strong>1</strong> Comment', 'flatsome'), __('<strong>%</strong> Comments', 'flatsome'));
                    ?>
</span>
		<?php 
                }
Ejemplo n.º 2
0
/**
 * Grab information to display on the search results
 *
 */
function fetchCompaniesAsJSON($q)
{
    global $dbconn, $User;
    $r = mysqli_query($dbconn, $q);
    $companies = array();
    $i = 1;
    while ($rs = $r->fetch_object()) {
        $company = new stdClass();
        $company->id = $rs->AutoID;
        $company->userFirstname = $rs->userFirstname;
        $company->userLastname = $rs->userLastname;
        $company->userCompany = $rs->userCompany;
        $company->userBio = $rs->userBio;
        $company->userBio_short = short_excerpt($rs->userBio, $company->id);
        // bio, userID
        $company->passingAllowed = false;
        $profileCategories = business_category($rs->AutoID);
        // Grab the categories the company falls under
        foreach ($profileCategories as $profileCategory) {
            if ($profileCategory != 0) {
                $company->profileCategories[] = business_category_list($profileCategory);
            }
        }
        if ($User->FirstName != '' && $User->LastName != '' && $User->Phone != '') {
            if ($User->ID != $company->id) {
                $company->passingAllowed = true;
            }
        }
        $companies[$i] = $company;
        // Google and IE order the list by the array key, id is based on the order in which it is returned.
        $i++;
    }
    return json_encode($companies);
}