include("./library/globals.php"); include("./library/review_index.php"); include("./library/html_encode.php"); list($q, $a) = makequery($remove_tags, $QUERY); ?> include('../header.php'); ?>
Search For a CD Review by band or album title. If you want to see all the reviews done for a particular month leave all fields blank except for the month.
$old_band = ''; if ($do_search and ($s_month or $s_band or $s_album or $s_post_by or $s_rating)) { if($reviews = $ri->get_search($s_band, $s_album, $s_month, $s_year, '', $s_post_by, $s_rating)) { echo template('entries_found', array('' => strval(count($reviews)))); $show_per_page = (int) $c->get('reviews_per_page'); for ($i = $pos; $i < ($pos + $show_per_page); $i++) { if (is_array($reviews[$i])) { $r = new review($reviews[$i]['id'], false, $reviews[$i]); list($r_url, $junk) = makequery(array(), array( 'band' => $s_band, 'album' => $s_album, 'post_by' => $s_post_by, 'rating' => $s_rating, 'month' => $s_month, 'year' => $s_year, 'pos' => $i )); if ($old_band == $r->get('band')) $use_template = 'review_azlist_sameband'; else $use_template = 'review_azlist_newband'; $old_band = $r->get('band'); echo template($use_template, array( '' => 'viewreview'.$ext.'?'.$r_url, '' => $r->get('band'), '' => $r->get('album') )); } } echo "\n\n"; ?>
$num_reviews = count($reviews); $d_and = ''; if (is_array($reviews[($pos - 1)])) { list($r_url, $junk) = makequery(array(), array( 'band' => $s_band, 'album' => $s_album, 'post_by' => $s_post_by, 'rating' => $s_rating, 'month' => $s_month, 'year' => $s_year, 'pos' => ($pos - $show_per_page) )); ?>PREVIOUS $d_and = ' - '; } if ($num_reviews >= ($pos + $show_per_page)) { list($r_url, $junk) = makequery(array(), array( 'band' => $s_band, 'album' => $s_album, 'post_by' => $s_post_by, 'rating' => $s_rating, 'month' => $s_month, 'year' => $s_year, 'pos' => ($pos + $show_per_page) )); ?>NEXT } ?> | $and = ''; for ($i = 0; ($i * $show_per_page) <= $num_reviews; $i++) { list($r_url, $junk) = makequery(array(), array( 'band' => $s_band, 'album' => $s_album, 'post_by' => $s_post_by, 'rating' => $s_rating, 'month' => $s_month, 'year' => $s_year, 'pos' => (int) ($i * $show_per_page) )); if ($pos == (int) ($i * $show_per_page)) $show_num = '['.($i + 1).']'; else $show_num = ($i + 1); echo "\n".$and; ?> $and = ' - '; } ?> |