Example #1
0
function show_search_form($book_list, $title, $user_id)
{
    ?>
			<div class="well search_well">
				<form role="form">
				  <div class="form-group">
				    <label for="searchBox">Search for Books</label>
				    <input type="text" class="form-control" id="searchBox" placeholder="Search by Title, Description, or Author">
				  </div>
				  <p>
				  	<a class="pull-right" id="clear_form">Or View All Books</a>
				  </p>
				  <br />
				  <hr />
				</form>
				<?php 
    echo isset($title) ? "<h1>{$title}</h1>" : '<br />';
    ?>
				<div class="results book_list row"></div>
				<?php 
    if (count($book_list) > 0) {
        print_books($book_list, 6, 4, 2, $user_id);
    } else {
        ?>
					<div class="original book_list row">
						<p class="no_books">Unfortunately, there are currently no books in this view. If you would like to start your own book, you may instead choose to <a href="./?action=create">Create a Book</a></p>
					</div>
				<?php 
    }
    ?>
			</div>
		<?php 
}
Example #2
0
<div>
<div><input type="text" name="sq" class="generic_text_input" value="<?php 
echo isset($_REQUEST['sq']) ? trim(htmlspecialchars($_REQUEST['sq'])) : '';
?>
" /></div>
<div><input type="submit" class="generic_button" value="Search" /></div>
<div><button type="submit" class="generic_button" value="1" name="view_all" >View All</button></div>
</div>
</form>
<?
if (isset($book_list_search_error)) {
	echo '<p class="error">'.$book_list_search_error.'</p>';
}
?>
<br clear="both" />
<? if (count($other_books) > 0) print_books($other_books) ?>
</div>

<?
if ($login->is_logged_in) {
	echo '<div id="user_books"><h3>Your Books</h3>';
	if (count($user_books) > 0) {
		echo '<ul class="book_icons">';
		print_books($user_books, true);
	} else {
		echo '<p>You haven\'t created any books yet.</p>';
	}
	echo '</div>';
}
?>
<br clear="both" />