����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 162.0.232.25 / Your IP : 3.144.255.198 Web Server : LiteSpeed System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : kwacuqig ( 988) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/kwacuqig/malawisounds.com/ |
Upload File : |
<?php include 'connect.php'; session_start(); // Function to get the current page URL function getCurrentPageName() { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $currentUrl = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; return basename(parse_url($currentUrl, PHP_URL_PATH)); } $_SESSION['current_page'] = getCurrentPageName(); if (isset($_GET['title'], $_GET['type'], $_GET['name'])) { $type = mysqli_real_escape_string($conn, htmlentities(str_replace('-', ' ', $_GET['type']))); $title = mysqli_real_escape_string($conn, htmlentities(str_replace('-', ' ', $_GET['title']))); $artist = mysqli_real_escape_string($conn, htmlentities(str_replace('-', ' ', $_GET['name']))); if (!empty($title) && !empty($artist)) { $query1 = "SELECT * FROM `ulbum_music` WHERE `title`='$title' AND `artist`='$artist'"; $query2 = "SELECT `id`,`image`,`genre`,`type`,`mode`,`price` FROM `ulbum` WHERE `title`='$title' AND `artist`='$artist'"; if ($query_run1 = mysqli_query($conn, $query1)) { if ($query_run2 = mysqli_query($conn, $query2)) { list($aid, $image, $genre, $type, $mode, $price) = mysqli_fetch_array($query_run2); $artisturl = str_replace(' ', '-', strtolower($artist)); $titleurl = str_replace(' ', '-', strtolower($title)); if (mysqli_num_rows($query_run1) > 0) { } } else { die(mysqli_error($conn)); } } else { die(mysqli_error($conn)); } } else { ?> <script type="text/javascript"> alert('Incomplete') </script> <?php } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="./css/animate.css"> <link rel="stylesheet" type="text/css" href="./css/load.css"> <link rel="stylesheet" type="text/css" href="./css/w3.css"> <link rel="icon" type="x-icon" href="Icons/malawisounds.ico"> <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="css/fontawesome/all.min.css" /> <script type="text/javascript" src="js/ajax.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type='text/javascript' src='//platform-api.sharethis.com/js/sharethis.js#property=5b67c4f0f3815e0011ed2735&product=inline-share-buttons' async='async'></script> <script type="text/javascript" src="js/sweetalert.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <title><?php echo "$title by $artist [$type]"; ?></title> <!--og codes--> <meta property="og:url" content="https://malawisounds.com/album_songs.php?title=<?php echo $titleurl ?>&name=<?php echo $artisturl; ?>" /> <meta property="og:type" content="website" /> <meta property="og:title" content="<?php echo strtoupper($title) . ' BY ' . strtoupper($artist); ?>" /> <meta property="og:image" content="https://malawisounds.com/album_images/<?php echo $image; ?>" /> <meta property="og:description" content="<?php echo strtoupper($type); ?>" /> <meta property="fb:app_id" content="197362031139140" /> </head> <body> <!-- FaceBook API --> <div id="fb-root"></div> <script type="text/javascript" src="js/facebook-api.js"></script> <div class="margin"> <?php include './header.php'; ?> <!--Search bar--> <input type="text" id="search" placeholder=" SEARCH-MUSIC, ARTISTS" onkeyup="findmatch(this.value)" class="glyphicon glyphicon-search"> <!--search results goes here--> <div id="results" class="w3-container w3-light-grey"></div> <!-- End of nav Bar --> <?php /////////////////////////////////////////////////////////ARTISTS///////////////////////////////////////////// //query for selecting artists $sql1 = "SELECT * FROM `biography` WHERE `trending`=1 ORDER BY `id` DESC"; if ($query_run = mysqli_query($conn, $sql1)) { echo "<div class=\"artist_table\">"; echo "<center class=\"w3-display-container\">"; echo "<table>"; echo "<tr>"; while ($row = mysqli_fetch_array($query_run)) { $path = $row['path']; $name = $row['artist_name']; $id = $row['id']; ?> <td> <a href="artist=<?php echo str_replace(' ', '-', $name); ?>" target="_parent"> <img src="bio/<?php echo $path; ?>" alt="artist" /> </a> </td> <?php } echo "</tr>"; echo "</table>"; echo "</center>"; echo "</div>"; } else { die(mysqli_error($conn)); } //////////////////////////////////////////////////////ALBUM SONGS///////////////////////////////////////////// //album-art image ?> <div class="album-cover container-fluid"> <div class="row"> <div class="col-xs-4 col-sm-4"> <img src="album_images/<?php echo $image; ?>" alt="<?php echo $artist; ?>"> </div> <div class="col-xs-8 col-sm-8"> <h2 class="text-anime"><?php echo strtoupper($title); ?></h2> <h4><?php echo strtoupper($artist); ?></h4> <h5><i class="glyphicon glyphicon-headphones"></i> <?php echo strtoupper($genre) ?></h5> </div> </div> </div> <?php if (isset($_COOKIE["$type-$aid"])) { ?> <div class="album-content container-fluid"> <div class="row"> <?php //creating counter and initializing to 0 $count = 1; if (mysqli_num_rows($query_run1) > 0) { while ($row = mysqli_fetch_array($query_run1)) { $id = $row['id']; $downloads = $row['downloads']; $streamed = $row['listened']; $size = $row['size']; $album_path = 'album_songs/' . $row['music']; $music_title = $row['music_title']; $music_titleurl = str_replace(' ', '-', strtolower($row['music_title'])); ?> <div class="col-lg-12 wow fadeInUp" data-wow-delay="0.5s" id="make_see<?php echo $id; ?>"> <div class="song"> <h5><?php echo $count . '. ' . $music_title; ?></h5> <div class="options"> <a href="<?php echo "aid-$id-$type-stream-$music_titleurl"; ?>" class="album-play" target="_parent"> <i class="fa fa-play"></i> </a> <a href="download_album.php?id=<?php echo $id; ?>" class="album-download"> <i class="fa fa-download"></i> </a> <a href="#" class="album-more" data-toggle="modal" data-target="#modal-<?php echo $id; ?>"> <i class="fas fa-ellipsis-v"></i> </a> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="modal-<?php echo $id; ?>" role="dialog"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title"><?php echo $music_title; ?></h4> </div> <div class="modal-body"> <div><i class="fas fa-download"></i> Downloads: <?php echo $downloads; ?></div> <div><i class="fas fa-headphones"></i> Streams: <?php echo $streamed; ?></div> <div><i class="fas fa-file"></i> Size: <?php echo $size . ' mb'; ?></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <?php $count++; ?> <?php } } else { echo "<div class=\"danger\">No song was added on this $type</div>"; } ?> </div> </div> <!--Download Zip --> <center> <a href="album-zip.php?title=<?php echo $_GET['title']; ?>&name=<?php echo $_GET['name']; ?>" class="download-zip wow fadeInUp" data-wow-delay="0.9s">Download Zip <span class="far fa-file-archive"></span></a> </center> <?php } else { ?> <div class="container payment"> <div class="row"> <div class="col-md-6 col-md-offset-3"> <div class="panel panel-default"> <div class="panel-heading"> <h3>Payment Page</h3> </div> <div class="panel-body"> <form> <label for="mobileNumber">Price</label> <h2>K<?php echo $price; ?></h2> <div class="form-group"> <label for="mobileNumber">Phone Number</label> <input type="number" class="form-control" id="phone" placeholder="265xxxxxxxxx"> </div> <div class="form-group"> <label>Operator</label> <div class="row"> <div class="col-xs-6"> <div class="mno-option" id="airtelOption"> <img src="./Icons/airtel-money.png" alt="Airtel Money"> </div> </div> <div class="col-xs-6"> <div class="mno-option" id="mpambaOption"> <img src="./Icons/mpamba.png" alt="Mpamba"> </div> </div> </div> </div> <input type="hidden" id="hidden_provider" name="provider" value=""> <input type="hidden" id="description" name="description" value="<?php echo "$title by $artist"; ?>"> <div class="bg-danger" id="error"></div> <button type="button" id="pay_button" class="btn btn-primary btn-block">Pay</button> <img src="./Icons/please-wait.gif" id="loadingMessage" alt="Please Wait..."> </form> </div> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <p>Upon successful payment, you will be redirected to the <?php echo $type; ?> page.</p> <p>The link expires 12 hours after successful payment.</p> <p>For any enquiries, please contact +265 998 41 24 21.</p> </div> </div> </div> <?php } ?> <!--Facebook like button--> <div style="overflow-x:auto;margin-top:12px;"> <div class="fb-like" data-href="https://facebook.com/Malawi-Sounds-303591487173877/?_e_pi_=7%2CPAGE_ID10%2C3127301386" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div> </div> <!-- share button --> <div class="sharethis-inline-share-buttons"></div> <?php /////////////////////////////////////////////////////////////ADVERT///////////////////////////////////////////// //query for selecting adverts from db $sql3 = "SELECT aid,ads_name FROM `ads` ORDER BY `aid` DESC"; if ($query_run = mysqli_query($conn, $sql3)) { list($id, $imagepath) = mysqli_fetch_array($query_run); echo "<div style=\"overflow-x:auto;background-color:#b7b7b7;\" class=\"merchandise\">"; echo "<table>"; echo "<tr>"; ?> <td> <center><img src="ads/<?php echo $imagepath; ?>" alt="advert" /></center> </td> <?php echo "</tr>"; echo "</table>"; echo "</div>"; } else { die(mysqli_error($conn)); } ?> <!-- Footer --> <?php include './footer.php'; ?> </div> </body> </html> <script type="text/javascript" src="./js/nav.js"></script> <script src="./bootstrap/js/bootstrap.min.js"></script> <script src="./jquery-3.3.1.min.js"></script> <script src="./js/wow.js"></script> <script src="./js/all.min.js"></script> <script type="text/javascript"> function _(selector) { return document.querySelectorAll(selector); } _("ul li a")[3].style.backgroundColor = "#3f4243"; _("ul li a")[3].style.Color = "white"; function splash(id) { id = 'ad' + id; document.getElementById(id).style.display = "block"; } //scripts for trimming song titles x = document.querySelectorAll(".song h5"); for (i = 0; i < x.length; i++) { y = x[i].innerHTML; if (y.length <= 35) { z = x[i].innerHTML; } else { y = x[i].innerHTML.slice(0, 35); z = x[i].innerHTML = y + "..."; } } /* Animated Wow Js */ new WOW().init(); </script> <script> <?php if (!isset($_COOKIE["$type-$aid"])) { ?> document.addEventListener("DOMContentLoaded", function() { var data = { provider: null, price: "<?php echo $price; ?>", phone: null, description: null, }; // Get references to form elements var phoneInput = document.getElementById('phone'); var errorSpan = document.getElementById('error'); var hiddenProviderInput = document.getElementById('hidden_provider'); var description = document.getElementById('description'); var airtelOption = document.getElementById('airtelOption'); var mpambaOption = document.getElementById('mpambaOption'); function selectProvider(provider) { data.provider = provider; hiddenProviderInput.value = provider; // Remove 'selected' class from all options airtelOption.classList.remove('selected'); mpambaOption.classList.remove('selected'); // Add 'selected' class to the selected option if (provider === 'Airtel') { airtelOption.classList.add('selected'); } else if (provider === 'Tnm') { mpambaOption.classList.add('selected'); } } // Add click event listeners to the provider options airtelOption.addEventListener('click', function() { selectProvider('Airtel'); }); mpambaOption.addEventListener('click', function() { selectProvider('Tnm'); }); // Pay function function pay() { data.phone = phoneInput.value; data.description = description.value.slice(0, 22); if (!data.provider) { swal("", "Please select a provider", "warning"); return; } if (!data.phone) { swal("", "Please enter your phone number", "warning"); return; } document.getElementById("loadingMessage").style.display = "block"; console.log(data); data.action = "pay"; var formData = new FormData(); for (var key in data) { if (data.hasOwnProperty(key)) { formData.append(key, data[key]); } } axios.post('./pawapay/process-pawapay.php', formData) .then(function(res) { console.log(res.data); var credit = res.data; if (credit.error == null) { if (credit.response.status == "ACCEPTED") { checkStatus(credit.response.depositId); } } else { swal("ERROR", credit.error, "error"); document.getElementById("loadingMessage").style.display = "none"; } }); } //check Status Function function checkStatus(id) { data.action = "get-status"; data.id = id; const formData = new FormData(); for (const key in data) { formData.append(key, data[key]); } axios .post("./pawapay/process-pawapay.php", formData) .then(function(res) { console.log("Get Response:", res.data[0]); // Debugging if (res.data[0].status == "COMPLETED") { //if payment was successful by pawapay fetch("./pawapay/add-transaction.php", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(res.data[0]), }) .then((response) => response.json()) .then((data) => { if (data.status == "success") { document.getElementById("loadingMessage").style.display = "block"; swal("", "Please Wait!", "success"); fetch("./php/set-album-cookie.php", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ id: id, album: "<?php echo "$type-$aid"; ?>", page: "<?php echo $_SESSION['current_page']; ?>" }), }) .then((response) => { if (!response.ok) { throw new Error("Network response was not ok"); } return response.json(); }) .then((data) => { console.log(data); if (data.status == "success") { window.location = data.message; } else if (data.status == "error") { swal("", data.message, "error"); document.getElementById("loadingMessage").style.display = "none"; } }) .catch((error) => { console.error("Error:", error); document.getElementById("loadingMessage").style.display = "none"; }); } }) .catch((error) => console.error(error)); } else if (res.data[0].status == "FAILED") { //assumming payment failed swal("", "Payment Failed", "error"); document.getElementById("loadingMessage").style.display = "none"; } else { setTimeout(checkStatus(id), 1000); //recheck status } }) .catch((error) => { console.error("Payment error:", error); setTimeout(checkStatus(id), 1000); //recheck status }); } // Event listener for the Pay button document.getElementById('pay_button').addEventListener('click', pay); }); <?php } ?> // Disable right-click document.addEventListener('contextmenu', (e) => e.preventDefault()); //Disable specific keyboard shortcuts document.addEventListener('keydown', (e) => { if (e.ctrlKey && (e.key === 'u' || e.key === 'U' || e.key === 'i' || e.key === 'I')) { e.preventDefault(); } }); </script>