-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuploadmusic.php
72 lines (72 loc) · 4.3 KB
/
uploadmusic.php
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
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Thêm nhạc</title>
<?php include './assets/include/framework.php'; ?>
<link rel="stylesheet" href="./assets/css/uploadmusic.css">
</head>
<body>
<?php include './assets/include/header.php'; ?>
<?php include './assets/include/check.php'; ?>
<?php include './assets/include/check-invalid-user.php'; ?>
<main>
<form action="./assets/PHP/addmusic.php" method="post" enctype="multipart/form-data">
<div class="container rounded bg-white mt-5 mb-5">
<div class="row main-edit">
<div class="col-md-3 border-right">
<div>
<h4 class="p-3 mb-2 mt-2 bg-info text-light rounded text-center">Chọn file nhạc của bạn</h4>
<p id="filename"></p>
<input type="file" class="hidden" id="updateFile" accept=".mp3" name="mp3fileRG" onchange="getnamefile()">
<label class="input-group-text" for="updateFile">
<div style="width: 300px; height: 100px;" class="beautiful-img" data-bs-toggle="tooltip" data-bs-placement="right" title="Ấn vào đây để thêm file nhạc"><i class="fas fa-upload" style="font-size: 80px; margin: 10px;"></i></div>
</label>
<h4 class="p-3 mb-2 mt-2 bg-info text-light rounded">Ảnh</h4>
<input type="file" class="hidden" id="updateIMG" accept="image/*" name="mp3pictureRG" onchange="getnameimg()">
<label class="input-group-text" for="updateIMG">
<img class="beautiful-img img-fluid" id="IMGshow" src="<?php echo './Profile Storage/'.$mp3createby.'/img/'.$mp3pic;?>" onError="this.onerror=null;this.src=`./assets/img/vector60-1116-01.jpg`;" width="280px" height="250px" data-bs-toggle="tooltip" data-bs-placement="right" title="Ấn vào đây để thêm ảnh">
</label>
</div>
</div>
<div class="col-md-5 border-right">
<div class="ms-5">
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="text-right p-3 mb-2 mt-2 bg-info text-light rounded">Thông tin nhạc</h4>
</div>
<div class="row mt-3">
<div class="col-md-12"><label class="labels">Tiêu đề</label><input type="text" class="form-control" name="mp3titleRG" placeholder="Tiêu đề" required></div>
<div class="col-md-12"><label class="labels">Tác giả</label><input type="text" class="form-control" name="mp3authorRG" placeholder="Tác giả"></div>
<label class="labels">Thể loại</label>
<div class="input-group mb-3">
<select class="form-select" name="mp3genderRG" required>
<option selected hidden>Chọn thể loại nhạc</option>
<?php
$sql_gender="SELECT gender FROM gender ORDER BY gender";
$result=$conn->query($sql_gender) or die("$conn->error");
while($row=$result->fetch_assoc())
{
$gender=$row["gender"];
echo "<option value='".$gender."'>".$gender."</option>";
}
?>
</select>
</div>
<div class="col-md-12"><label class="labels">Mô tả</label><textarea class="form-control" name="mp3descRG" placeholder="Mô tả" rows="5" cols="10" maxlength="255"></textarea></div>
<div class="mt-5 text-center"><button class="btn btn-primary profile-button" type="submit">Thêm</button></div>
</div>
</div>
</div>
</div>
</form>
<br>
<?php include "./assets/include/music-kit.php"; ?>
</main>
<?php include './assets/include/footer.php'; ?>
<script src="./assets/javascript/seefilename.js"></script>
<script src="./assets/javascript/showimg.js"></script>
</body>
</html>