D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
home
/
markniuj
/
bazmeasar.com
/
Filename :
mp42.php
back
Copy
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>MP4 Videos</title> <!-- Bootstrap CSS --> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <style> .video-box { padding: 5px; margin-bottom: 15px; border: 1px solid #ccc; } video { max-width: 100%; height: auto; } .download-link { display: inline-block; background-color: #007bff; color: #fff; text-decoration: none; padding: 8px 15px; border-radius: 5px; margin-top: 10px; font-size: 16px; } .download-link:hover { background-color: #0056b3; color: #fff; } @media (max-width: 768px) { .video-box { margin-bottom: 20px; } .download-link { font-size: 14px; padding: 6px 12px; } } </style> </head> <body> <div class="container-fluid"> <div class="row"> <?php include 'config.php'; // Pagination setup $limit = 6; // Items per page $page = (isset($_GET['page']) && is_numeric($_GET['page'])) ? $_GET['page'] : 1; $start = ($page - 1) * $limit; // Fetching MP4 data from the database with pagination $sql = "SELECT * FROM mp4 ORDER BY mp4_id DESC LIMIT $start, $limit"; $result = $conn->query($sql); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { // Display video content here $videoPath = 'admin/uploads/mp4/' . $row['mp4_name']; $videoName = $row['mp4_name']; // Video file name // Creating download link for each video $downloadLink = 'admin/uploads/mp4/' . $row['mp4_name']; // Adjust path if needed ?> <div class="col-lg-6"> <div class="video-box"> <video width="100%" controls> <source src="<?php echo $videoPath; ?>" type="video/mp4"> Your browser does not support the video tag. </video> <p><?php echo $row['mp4_title']; ?> <b>Date: <?php echo $row['mp4_date']; ?> </b></p> <p><?php echo $row['urdu']; ?></p> <p><?php echo $row['english']; ?></p> <!-- Download link --> <a href="<?php echo $downloadLink; ?>" download="<?php echo $videoName; ?>" class="download-link">Download</a> </div> </div> <?php } } else { echo "<div class='col-md-12'><p>No MP4 videos found.</p></div>"; } // Pagination links $sql = "SELECT COUNT(*) AS total FROM mp4"; $result = $conn->query($sql); $row = $result->fetch_assoc(); $total_pages = ceil($row["total"] / $limit); ?> </div> <nav aria-label="Page navigation example"> <ul class="pagination justify-content-center"> <?php $previous = $page - 1; $next = $page + 1; echo "<li class='page-item'><a class='page-link' href='?page=1'>First</a></li>"; if ($page > 1) { echo "<li class='page-item'><a class='page-link' href='?page=$previous'>Previous</a></li>"; } for ($i = 1; $i <= $total_pages; $i++) { echo "<li class='page-item'><a class='page-link' href='?page=$i'>$i</a></li>"; } if ($page < $total_pages) { echo "<li class='page-item'><a class='page-link' href='?page=$next'>Next</a></li>"; } echo "<li class='page-item'><a class='page-link' href='?page=$total_pages'>Last</a></li>"; ?> </ul> </nav> </div> <!-- Bootstrap JS and Popper.js --> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script> </body> </html>