diff options
author | chai <chaifix@163.com> | 2022-03-17 21:02:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-03-17 21:02:13 +0800 |
commit | 90483f6eb389f041e0dbd0fca8bb766edbc85910 (patch) | |
tree | 125e5d01012cbab1ada0546dc5b9771af573a9ea /search.php |
+init
Diffstat (limited to 'search.php')
-rw-r--r-- | search.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/search.php b/search.php new file mode 100644 index 0000000..4a838e4 --- /dev/null +++ b/search.php @@ -0,0 +1,43 @@ +<html> + +<head> +<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> +</head> + +<body> +<div id="container"> + <?php include_once('music.php');?> + <?php include_once('header.php');?> + <?php include_once('titlebar.php');?> + <?php include_once 'config.php'?> + <?php + $type = $_GET['type']; // 'tag', 'name' + $value = $_GET['value']; // tag id, name + $page = $_GET['page']; // page从0开始 + ?> + <div id="search-condition"> + <?php + $musiclist = null; + if($type == "tag") { + echo '<label class="search-hint">Tag : </label>'; + $tag = fetch_tag_by_id($value); + echo '<label class="search-value">' . $tag->name . "</label>"; + $musiclist = fetch_musics_by_tag($tag->uid, $page * Config::$music_per_page, Config::$music_per_page); + } + else if($type == "name") { + echo '<label class="search-hint">Searching : </label>'; + echo '<label class="search-value">' . $value . "</label>"; + + $musiclist = fetch_musics_by_name($value, $page * Config::$music_per_page, Config::$music_per_page); + } + + ?> + </div> + <?php include_once('musiclist.php');?> + +</div> +</body> + +</html>
\ No newline at end of file |