5 echo "<h3>Streams</h3>\n<p>";
8 if ( isset($search) ) {
9 $where = "(stream_url ~* :search OR playlist_url ~* :search OR genre ~* :search OR description ~* :search) ";
10 $params[':search'] = $search;
14 $where .= ($where == ''?
'' : ' AND ');
15 $where .= '(description ~ :match)';
16 $params[':match'] = '^'.$altr;
18 if ( $where != '' ) $where = 'WHERE '. $where;
19 $sql = 'SELECT * FROM streams '.$where.' ORDER BY lower(description)';
20 $qry = new AwlQuery( $sql, $params );
22 if ( $qry->Exec('album') && $qry->rows() > 0 ) {
23 while ( $stream = $qry->Fetch() ) {
24 $display = htmlspecialchars($stream->description
);
25 if ( $display == '' ) $display = htmlspecialchars($stream->stream_url
);
26 $title = htmlspecialchars($stream->stream_url
);
27 if ( trim($display) == "" ) $display = "«unknown»";
28 echo " <a href=\"?type=stream&url=" . urlencode($stream->stream_url
) . "$letter_get\" class=\"stream\" title=\"$title\">$display</a>\n";