示例#1
0
// Queries database to get track count for navigational functions //
$trackResult = $dbHandle->query($trackQuery);
$totalTracks = $trackResult->num_rows;
mysqli_free_result($trackResult);
// Reconstructs a query for section and page information that may or may not be provided //
$trackQuery = "SELECT * FROM track_list WHERE " . getSectionCriteria("track_name");
if (!$noInput) {
    if (!$albumInfo || !$artistInfo) {
        $trackQuery .= " AND album_id=0";
        $valid = false;
    } else {
        $valid = true;
        $trackQuery .= " AND album_id=\"" . $albumInfo['album_id'] . "\"";
    }
}
$trackQuery .= " " . getSortCriteria("track_name") . " " . getPageCriteria($totalTracks, $MAX_ITEMS_PER_PAGE, true);
$trackResult = $dbHandle->query($trackQuery);
?>
<a id="topofpage"></a>

<div id="content">
    <div id="breadcrumb">
        <?php 
// Constructs the breadcrumb using global locationinfo //
if (!$valid && !$noInput) {
    ?>
            <a href="<?php 
    echo $LOCATIONINFO['music'][1];
    ?>
"><?php 
    echo $LOCATIONINFO['music'][0];
示例#2
0
if (!$noInput) {
    $artistInfo = getSingleRow($dbHandle, "artist_list", "artist_name", $artistName);
    $artResult = $dbHandle->query("SELECT * FROM artist_artwork_list WHERE artist_id='" . $artistInfo['artist_id'] . "' AND image_size='" . $IMAGE_SIZE5 . "'");
    $artReturn = $artResult->fetch_array(MYSQLI_BOTH);
}
// Constructs the query to get both album info and artwork //
$albumQuery = "SELECT * FROM " . getJoinTable("album_list", "album_artwork_list") . " \n    WHERE " . getJoinMatch("album_list", "album_artwork_list", "album_id") . " \n        AND " . getImageType($IMAGE_SIZE3) . " \n            AND " . getSectionCriteria("album_title");
if (!$noInput) {
    $albumQuery .= " AND album_list.artist_id='" . $artistInfo['artist_id'] . "'";
}
$albumQuery .= " " . getSortCriteria("album_title");
// Gets the number of albums //
$totalResult = $dbHandle->query($albumQuery);
$totalCount = $totalResult->num_rows;
mysqli_free_result($totalResult);
$albumQuery .= " " . getPageCriteria($totalCount, $MAX_ITEMS_PER_PAGE, true);
$albumResult = $dbHandle->query($albumQuery);
?>

<a id="topofpage"></a>

<div id="content">
    <div id="breadcrumb">
        <?php 
// Constructs the breadcrumb using global locationinfo //
if ($noInput) {
    ?>
            <a href="<?php 
    echo $LOCATIONINFO['music'][1];
    ?>
"><?php