NEW RELEASES
Pete Heller
Dirty Grooves- Nite:Life 014
(NRK)
Rithma
Music Fiction
(Om Records)
DJ Sage
Drum & Bass Elements 01
(Moonshine)
Darren Emerson & Mutiny
Underwater Episode vol.2
(Underwater Records)
Jamez
Dreamchasing
(Future Groove)
Dave Ralph
Resident Alien
(System Recordings)
Jaga Jazzist
Stix
(Ninja Tune)
|
.
|
<%doc>
URL TYPE 1 - /reviews/r0201_001.htm
URL TYPE 2 - /reviews/pf_r0201_001.htm
URL TYPE 3 - /reviews/ft/20020321/7823/Straight_Edge_Trio.html
URL TYPE 4 - /reviews/pf/20020321/7823/Straight_Edge_Trio.html
%doc>
<%init>
my $dbh = DBI->connect("DBI:mysql:allaboutjazz", 'vxweb', 'vx232web');
%init>
<%cleanup>
$dbh->disconnect();
%cleanup>
<%perl>
my @args = split('/', $r->uri);
my ($title, $album, $artist, $id, $month, $year, $seq, $sql, $stmt);
if ($args[2] =~ /r(\d\d)(\d\d)_(\d+)\.(htm|html)/i)
{
$month = $1;
$year = $2;
$seq = $3;
$sql = "SELECT album, artist, id FROM cd_review WHERE month = ? and year = ? and seq = ?";
$stmt = $dbh->prepare($sql);
$stmt->execute($month, $year, $seq);
($album, $artist, $id) = $stmt->fetchrow_array();
$stmt->finish();
}
elsif ($args[2] =~ /^(pf|ft)$/i and $args[3] =~ /^(\d+)$/ and
$args[4] =~ /^(\d+)$/ and
$args[5] =~ /^(\w+)\.(htm|html)$/i)
{
$id = $2;
$sql = "SELECT album, artist FROM cd_review WHERE id = ?";
$stmt = $dbh->prepare($sql);
$stmt->execute($id);
($album, $artist) = $stmt->fetchrow_array();
$stmt->finish();
}
if ($album and $artist) {
$title = "$artist - $album";
}
else {
$m->comp('/title.tmp', static_title => 1);
}
%perl>
<% $title %>
 |
 |
<& /adsystem/rotate.tmp &>
|
|
|
 |
|
NEW RELEASES
Pete Heller
Dirty Grooves- Nite:Life 014
(NRK)
Rithma
Music Fiction
(Om Records)
DJ Sage
Drum & Bass Elements 01
(Moonshine)
Darren Emerson & Mutiny
Underwater Episode vol.2
(Underwater Records)
Jamez
Dreamchasing
(Future Groove)
Dave Ralph
Resident Alien
(System Recordings)
Jaga Jazzist
Stix
(Ninja Tune)
|
.
|
<%args>
$results_page => 10
$search_type => 'album'
$sort_type => ''
$keywords => ''
$page => 1
%args>
<%init>
my $dbh = DBI->connect("DBI:mysql:aadj", 'vxweb', 'vx232web');
my ($id, $origfile, $album, $artist, $label, $author, $review, $pretty);
my ($s_page, $e_page);
$search_type = lc $search_type;
$search_type = 'album' if not $search_type =~ /^(album|artist|author|label)$/;
my $cnt_sql = "SELECT count(id) FROM cd_review WHERE MATCH($search_type) AGAINST(?)";
my $sth = $dbh->prepare($cnt_sql);
$sth->execute($keywords);
my ($total_cnt) = $sth->fetchrow_array();
$sth->finish();
my $sql = qq{ SELECT id, origfile, album, artist, label, author, review,
DATE_FORMAT(date_published, '%M %e, %Y') As PrettyDate
FROM cd_review
WHERE MATCH($search_type) AGAINST(?)
};
$sql .= " ORDER BY $sort_type " if $sort_type;
$sql .= " LIMIT ?,?";
my $sth2 = $dbh->prepare($sql);
my $offset = (($page-1) * $results_page) + 1;
$sth2->execute($keywords, ($page * $results_page) - $results_page, $results_page);
my $total_pages = int( $total_cnt / $results_page );
my $total_rpages = int ( $total_cnt % $results_page );
$total_pages++ if $total_rpages;
$e_page = ($page eq $total_pages and $total_rpages) ? (($page-1) * $results_page) + $total_rpages : $page * $results_page;
%init>
<%cleanup>
$dbh->disconnect();
%cleanup>
|
|
% if ($keywords) {
|
Sort By:
|
Displaying Results Per Page
|
% }
|
% if ($keywords and not $total_cnt) {
No Records Found!
% }
% elsif ($keywords) {
Search Results For: <% $keywords %>
Displaying Results <% $offset %> through <% $e_page %> of <% $total_cnt %>
<%perl>
while ( ($id, $origfile, $album, $artist, $label, $author, $review, $pretty) = $sth2->fetchrow_array() )
{
my $token;
foreach $token (split /\s/, $keywords)
{
$album =~ s#($token)#$1#ig if $search_type =~ /album/i;
$artist =~ s#($token)#$1#ig if $search_type =~ /artist/i;
$author =~ s#($token)#$1#ig if $search_type =~ /author/i;
$label =~ s#($token)#$1#ig if $search_type =~ /label/i;
}
%perl>
<% $album %>
Artist: <% $artist %>
Label: <% $label %>
Author: <% $author %>
Review Publish Date: <% $pretty %>
% }
% if ($total_pages > 1 ) {
Result Page:
% if ($page > 1) {
Previous
% }
% my $i=1;
% for ($i=1;$i <= $total_pages; $i++)
% {
<% ($i != $page) ? "$i" : "$i" %>
% }
% if ($page < $total_pages) {
Next
% }
% }
% }
|
|
|
<& /adsystem/rotate.tmp &>
|
|
| All material copyright © 2003 All About DJ and contributing writers. All rights reserved. |
Privacy Policy |
|
|