| Server IP : 127.0.0.1 / Your IP : 216.73.216.48 Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64 User : win 10 ( 0) PHP Version : 8.2.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/Desktop/cb_music/ |
Upload File : |
<html>
<head>
<title>Coblaa Music: Download ugandan music 2024</title>
<link rel="icon" type="image/jpg" href="http://craneblue.com/cb_image/main_icon/coot_icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main_css/album.css?v7" />
<meta name="google-adsense-account" content="ca-pub-4728417548940171"><!--gog ads -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4728417548940171"crossorigin="anonymous"></script><!-- ad unit -->
</head>
<?php
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$city = $geo["geoplugin_city"];
$country = $geo["geoplugin_countryName"];
//echo" mmm $user_ip";
?>
<?php
session_start();
include('db.php');
$curr_day = date("d");
$curr_month = date("m");
$curr_year = date("Y");
if(isset($_SESSION['my_id']))
{
$user_id = $_SESSION['my_id'];
}else{
$user_id = $user_ip;
}
?>
<input id="my_id" value="<?php echo $user_id ?>" style="display:none;" />
<input type="text" id="user_ip" value="<?php echo"$user_ip";?>" style="display:none;" />
<input type="text" id="user_city" value="<?php echo"$city";?>" style="display:none;" />
<input type="text" id="user_country" value="<?php echo"$country";?>" style="display:none;" />
<body>
<div class="main_home_div" >
<div class="main_search_div" >
<button class="clear_main_ser_btn" >x</button>
<input class="ser_input" placeholder="Search Music" />
<div class="main_sear_icon_div" ><img src="main_icon/search_icon.png" onClick="search_album();" class="main_sear_icon_img" /></div>
</div>
</div>
<div class="positioning_div"></div>
<button onClick="show_album_div();" class="create_albm_btn">Albums</button>
<button onClick="show_create_album_div();" class="create_albm_btn">Create Album</button>
<div id="content_div" class="content_div" >
<div id="art_album_output" ></div>
<!--div class="single_song_div" >
<img src="artist_profile/bobi.jfif" class="artist_img" />
<div class="album_name" >Bobi Wine</div>
<div class="song_count" >200 songs</div>
<div class="song_count" style="float:right;margin-right:2%;text-align:right;" >1.5k views</div>
<button class="add_song_btn">Add</button>
</div>
<div class="single_song_div" >
<img src="artist_profile/mima.jfif" class="artist_img" />
<div class="album_name" >Bobi Wine</div>
<div class="song_count" >200 songs</div>
<div class="song_count" style="float:right;margin-right:2%;text-align:right;" >1.5k views</div>
<button class="add_song_btn">Add</button>
</div>
<div class="single_song_div" >
<img src="main_icon/mima.jfif" class="artist_img" />
<div class="album_name" >Bobi Wine</div>
<div class="song_count" >200 songs</div>
<div class="song_count" style="float:right;margin-right:2%;text-align:right;color:#0d9a42;" >1.5k views</div>
<button class="add_song_btn">Add</button>
</div-->
</div><!-- end of content_div -->
<div id="new_album_div" class="new_album_div" >
<span class="create_album_title" >Create new album</span>
<form method="post" enctype="multipart/form-data" />
<input type="text" name="alb_name_input" class="new_album_name" placeholder="Album name..." />
<input type="file" name="alb_img_input" class="new_album_name" />
<?php
if(isset($_POST['add_new_album']))
{
$alb_name = $_POST['alb_name_input'];
$alb_img = $_FILES['alb_img_input']['name'];
$tmp_alb_img = $_FILES['alb_img_input']['tmp_name'];
$alb_img_type = explode('.',$alb_img);
$alb_img_type = end($alb_img_type);
$random_name = rand();
$random_name = mysqli_real_escape_string($con,$random_name);
$alb_name = mysqli_real_escape_string($con,$alb_name);
$chk_art_album ="select * from artist_album where album_name='$alb_name' ";
$run_chk_art_album = mysqli_query($con,$chk_art_album);
$chcek_art_album = mysqli_num_rows($run_chk_art_album);
if($chcek_art_album >0){ echo"Album name alredy exists";}else{
if($alb_img_type !=="PNG" && $alb_img_type !=="JPG" && $alb_img_type !=="JPEG" && $alb_img_type !=="JFIF" && $alb_img_type !=="png" && $alb_img_type !=="jpg" && $alb_img_type !=="jpeg" && $alb_img_type !=="jfif"){
echo"Image format not supported";
}else{
$insert_album ="insert into artist_album (user_ref_no,album_name,album_img,ipuser,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time)
values('$user_id','$alb_name','$random_name.$alb_img_type','$user_ip','$country','$city','$curr_day','$curr_month','$curr_year', CURTIME() )";
$run_insert_album = mysqli_query($con,$insert_album);
if($run_insert_album){
move_uploaded_file($tmp_alb_img,"artist_profile/$random_name.$alb_img_type");
echo"<span style='color:green;'>Album uploaded, Thanks</span>";
}else{echo"Album Not Uploaded, Something Went Wrong.";}
}
}
}
?>
<button name="add_new_album" class="add_song_btn">Save</button>
</form>
</div><!-- end of new_album_div -->
<?php
if(isset($_GET['idalbum'])){
$albumid = $_GET['idalbum'];
?>
<div id="add_song_div" class="new_album_div" stylek="display:block;" >
<span class="create_album_title" >Add new song</span>
<form method="post" enctype="multipart/form-data" >
<input type="text" name="song_title_input" class="new_album_name" placeholder="Song Title..." />
<input type="text" name="song_art_name_input" class="new_album_name" placeholder="Artist Name" />
<input type="file" name="song_cover_input" class="new_album_name" placeholder="Song Cover" />
<input type="text" name="song_release_date_input" class="new_album_name" placeholder="Release date" />
<select type="text" name="music_cat" class="new_album_name" >
<option>Local</option>
<option>Hip Hop</option>
<option>Gospel</option>
<option>R&B</option>
<option>Reggae</option>
<option>Country Music</option>
<option>Classical music</option>
<option>Vocal music</option>
<option>Dance Hall</option>
<option>Folk music</option>
<option>Jazz</option>
<option>Disco</option>
<option>Rock</option>
</select>
<input type="file" name="song_url_input" class="new_album_name" />
<?php
if(isset($_POST['add_song']))
{
$song_title = $_POST['song_title_input'];
$song_art_name = $_POST['song_art_name_input'];
$song_release_date = $_POST['song_release_date_input'];
$music_cat = $_POST['music_cat'];
$song_cover = $_FILES['song_cover_input']['name'];
$song_url = $_FILES['song_url_input']['name'];
$tmp_song_cover = $_FILES['song_cover_input']['tmp_name'];
$tmp_audio_url = $_FILES['song_url_input']['tmp_name'];
$song_cover_type = explode('.',$song_cover);
$song_cover_type = end($song_cover_type);
$song_cover_rand_name = rand();
$audio_type = explode('.',$song_url);
$audio_type = end($audio_type);
$random_name = rand();
$random_name = $song_url.'-'.$random_name;
$random_name = mysqli_real_escape_string($con,$random_name);
$song_title = mysqli_real_escape_string($con,$song_title);
$music_cat = mysqli_real_escape_string($con,$music_cat);
$song_art_name = mysqli_real_escape_string($con,$song_art_name);
$song_release_date = mysqli_real_escape_string($con,$song_release_date);
if($audio_type !=="MP3" && $audio_type !=="mp3"){
echo"Audio format not supported";
}else{
if($song_cover_type="" && $song_cover_type !=="JPG" && $song_cover_type !=="jpg" && $song_cover_type !=="PNG" && $song_cover_type !=="png" && $song_cover_type !=="JFIF" && $song_cover_type !=="jfif" && $song_cover_type !=="JPEG" && $song_cover_type !=="jpeg"){
echo"Song cover image format not supported";
}else{
if($song_cover_type==""){$full_audio_cover =""; }else{$full_audio_cover = $song_cover_rand_name.$song_cover_type; }
$get_song ="select * from musictb where song_title='$song_title' AND artist_name='song_art_name' ";
$run_get_song = mysqli_query($con,$get_song);
$check_song = mysqli_num_rows($run_get_song);
if($check_song >0){echo"Song alredy exists";}else{
$insert_song="insert into musictb(user_ref_no,album_id,song_title,artist_name,song_url,cover_img,release_date,song_category,cur_country,cur_city,cur_date,cur_time)
values('$user_id','$albumid','$song_title','$song_art_name','$random_name.$audio_type','$full_audio_cover','$song_release_date','$music_cat','$country','$city',CURDATE(),CURTIME() )";
$run_insert_song = mysqli_query($con,$insert_song);
if($run_insert_song){
move_uploaded_file($tmp_audio_url,"audios/$random_name.$audio_type");
move_uploaded_file($tmp_song_cover,"song_cover/$full_audio_cover");
echo"<span style='color:green;'>Song uploaded, Thanks</span>";
}else{echo"Song Not Uploaded, Something Went Wrong.";}
}
}
}
}
if ($user_id =='CB1'){ ?>
<button name="add_song" class="add_song_btn" stylek="display:none;">Save</button>
<?php } ?>
</form>
<script>
document.getElementById('add_song_div').style.display="block";
document.getElementById('new_album_div').style.display="none";
document.getElementById('content_div').style.display="none";
</script>
</div><!-- end of new_album_div -->
<?php } ?>
<div class="footer_div"></div>
<script>
disp_art_album();
function disp_art_album()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?status=disp_art_album",false);
xmlhttp.send(null);
document.getElementById('art_album_output').innerHTML=xmlhttp.responseText;
//alert(12345);
}
function show_album_div()
{
document.getElementById('new_album_div').style.display="none";
document.getElementById('content_div').style.display="block";
// document.getElementById('add_song_div').style.display="none";
}
function show_create_album_div()
{
document.getElementById('new_album_div').style.display="block";
//document.getElementById('add_song_div').style.display="none;";
document.getElementById('content_div').style.display="none";
}
function show_add_song_div()
{
document.getElementById('add_song_div').style.display="block";
document.getElementById('new_album_div').style.display="none";
document.getElementById('content_div').style.display="none";
}
function search_album()
{
alert(33);
}
</script>
</body>
</html>