summaryrefslogtreecommitdiff
path: root/album.php
blob: c52d876c268c4ec167c7258f66809914873c3994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<html> 

<head>
<title>Dachai's Music</title>
<link rel="icon" type="image/x-icon" href="./res/dachai.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, target-densityDpi=device-dpi">
<link rel="stylesheet" href="./res/styles.css">
<script src="./res/main.js"></script>
<script>
</script>
<style type="text/css">
.album_container{
    float:left;
}
</style>
</head>

<body> 
<div id="container"> 
    <?php include_once('header.php');?>
    <?php include_once('titlebar.php');?>
    
    <div id="music_player_container"> 

        <div id="album_detail"> 

            <?php 
                require_once 'music.php';
                require_once 'template.php';

                $id = $_GET['id'];
                $album = fetch_album_by_id($id);

                html_album($album);
            ?>

            <label style="font-size:20px;"><?php echo $album->description;?></label>

            <div style="clear:both;"></div>

        </div>
                <?php require_once 'template.php'?>

        <div id="album_music_list">
            <?php 
                $current_page_index = $_GET['page'];
                if($current_page_index == null){
                    $current_page_index = 0;
                }
                $url = "./album.php?id=" . $id;
                $total_page = ceil(get_all_album_music_count($album->uid) / Config::$music_per_page);
                $musiclist = fetch_album_music_ranged($album->uid, $current_page_index * Config::$music_per_page, Config::$music_per_page);
            ?>

            <div style="clear:both;"></div>
            <label style="font-size:25px;font-weight:bold; margin:10px;line-height:30px;color: #c5c5c5;display:block;border-bottom: 2px solid rgb(223, 223, 223);">Music</label>
            <div id="music_outer"> 

                <?php 
                    $index = $current_page_index * Config::$music_per_page;
                    if($musiclist != null) {
                        foreach($musiclist as $music){
                            html_music_wide($music, $index + 1);
                            $index++;
                        }
                    }
                ?>

            </div>

        </div>

    </div>

    <div style="clear:both;"></div>

    <?php include 'paginate.php' ?>

</div>
</body>

</html>