Esempio n. 1
0
	public function search() {
		if (!$this->input->post('search')) {
			$this->template->title(_('Search'));
			$this->template->build('search_pre');
			return TRUE;
		}

		$search = HTMLpurify($this->input->post('search'), 'unallowed');
		$this->template->title(_('Search'));

		$comics = new Comic();
		$comics->ilike('name', $search)->limit(20)->get();
		foreach ($comics->all as $comic) {
			$comic->latest_chapter = new Chapter();
			$comic->latest_chapter->where('comic_id', $comic->id)->order_by('created', 'DESC')->limit(1)->get()->get_teams();
		}


		$this->template->set('search', $search);
		$this->template->set('comics', $comics);
		$this->template->build('search');
	}
Esempio n. 2
0
        echo '</div>';
    }
}
echo '</div><div class="group">
					<div class="title">' . _('Members') . '</div>
				';
if (count($members) == 0) {
    echo '<div class="element">
					<div class="title">' . _("No members in this team") . '.</div>
				</div>';
} else {
    foreach ($members->all as $key => $member) {
        if ($member->is_leader) {
            continue;
        }
        echo '<div class="element">
					<div class="image">' . get_gravatar($member->email, 75, NULL, NULL, TRUE) . '</div>
					<div class="info"><b>' . HTMLpurify($member->profile_display_name ? $member->profile_display_name : $member->username, 'unallowed') . '</b></div>';
        if ($member->profile_bio) {
            echo '<div class="info">' . _('Bio') . ': ' . HTMLpurify($member->profile_bio, 'unallowed') . '</div>';
        }
        if ($member->profile_twitter) {
            echo '<div class="info">' . _('Twitter') . ': <a href="http://twitter.com/' . HTMLpurify($member->profile_twitter, 'unallowed') . '" target="_blank">' . HTMLpurify($member->profile_twitter, 'unallowed') . '</a></div>';
        }
        echo '</div>';
    }
}
echo '</div>';
?>
</div>