X7ROOT File Manager
Current Path:
/home/u126090504/domains/oceanicabeachresort.com/public_html
home
/
u126090504
/
domains
/
oceanicabeachresort.com
/
public_html
/
📁
..
📄
.htaccess
(0 B)
📁
Version
📄
about.php
(4.19 KB)
📁
admin
📁
assets
📄
booking.php
(4.55 KB)
📄
booking_details.php
(4.43 KB)
📄
booking_process.php
(1.12 KB)
📄
config.php
(914 B)
📄
contact.php
(14.48 KB)
📄
contactdb.php
(796 B)
📄
footer.php
(13.26 KB)
📄
gallery.php
(2.82 KB)
📄
header.php
(19.3 KB)
📁
images
📄
index.php
(2.27 KB)
📄
indexx.php
(75.25 KB)
📁
lib
📄
oce.zip
(106.17 MB)
📄
payment.php
(6.79 KB)
📄
payment_submit.php
(15.1 KB)
📄
payment_verify.php
(2.31 KB)
📁
qrcodes
📄
room-service.php
(8.98 KB)
📄
search_videos.php
(1.76 KB)
📄
services.php
(14.04 KB)
📄
success.php
(2.06 KB)
📄
test_mailer.php
(372 B)
📄
thank-you.php
(1.28 KB)
📁
uploads
📄
videos.php
(6.87 KB)
Editing: videos.php
<?php include("header.php"); include("config.php"); /* ---------- Helper Functions ---------- */ function h($s){ return htmlspecialchars($s ?? '', ENT_QUOTES, 'UTF-8'); } function detect_video($url){ $u = trim($url ?? ''); if (preg_match('~(?:youtube\.com/(?:watch\?v=|embed/)|youtu\.be/)([A-Za-z0-9_\-]{6,})~', $u, $m)) return ['p'=>'youtube','id'=>$m[1]]; if (preg_match('~drive\.google\.com/(?:file/d/|open\?id=)([^/&\?]+)~', $u, $m)) return ['p'=>'drive','id'=>$m[1]]; if (preg_match('~vimeo\.com/(?:video/)?(\d+)~', $u, $m)) return ['p'=>'vimeo','id'=>$m[1]]; return ['p'=>'other','id'=>null]; } function embed_url($url){ $d = detect_video($url); if ($d['p']==='youtube') return 'https://www.youtube.com/embed/'.$d['id']; if ($d['p']==='drive') return 'https://drive.google.com/file/d/'.$d['id'].'/preview'; if ($d['p']==='vimeo') return 'https://player.vimeo.com/video/'.$d['id']; return $url; } function thumb_url($url){ $d = detect_video($url); if ($d['p']==='youtube') return 'https://img.youtube.com/vi/'.$d['id'].'/hqdefault.jpg'; if ($d['p']==='drive') return 'https://drive.google.com/thumbnail?id='.$d['id']; return null; } /* ---------- Fetch Data ---------- */ $cat = trim($_GET['cat'] ?? ''); $where = $cat ? "WHERE category='". $conn->real_escape_string($cat) ."'" : ""; $res = $conn->query("SELECT * FROM videos $where ORDER BY id DESC"); $cats = []; $cq = $conn->query("SELECT DISTINCT category FROM videos WHERE category!=''"); if ($cq) while($r=$cq->fetch_assoc()) $cats[]=$r['category']; ?> <!-- Page Title --> <div class="ttm-page-title-row"> <div class="ttm-page-title-row-inner ttm-textcolor-white"> <div class="container"> <div class="row align-items-center"> <div class="col-lg-12 text-center"> <div class="page-title-heading"><h2 class="title">Video Gallery</h2></div> </div> </div> </div> </div> </div> <!-- Site Main --> <div class="site-main"> <section class="ttm-row portfolio-section clearfix"> <div class="container"> <!-- 🔍 Search + Category --> <div class="row mb-4 align-items-center"> <div class="col-md-8 mb-2"> <div class="search-box"> <i class="fas fa-search search-icon"></i> <input type="text" id="searchInput" class="form-control stylish-input" placeholder="Search videos by title..."> </div> </div> <div class="col-md-4 mb-2"> <form method="get" class="d-flex gap-2"> <select name="cat" class="form-select stylish-select"> <option value="">All Categories</option> <?php foreach($cats as $c): ?> <option value="<?=h($c)?>" <?=($c==$cat)?'selected':''?>><?=h($c)?></option> <?php endforeach; ?> </select> <button class="btn btn-danger fw-bold" type="submit">Filter</button> </form> </div> </div> <!-- 🎥 Gallery --> <div class="row" id="videoGallery"> <?php if($res && $res->num_rows): while($row=$res->fetch_assoc()): $title = h($row['title']); $embed = embed_url($row['video_url']); $thumb = thumb_url($row['video_url']) ?: "https://via.placeholder.com/640x360/0409B0/fff?text=Video"; $cat = h($row['category']); $date = date('d M Y', strtotime($row['created_at'] ?? 'now')); ?> <div class="col-lg-3 col-md-4 col-sm-6 mb-4 video-card"> <div class="card video-card-neo h-100"> <div class="video-thumb" data-embed="<?=$embed?>"> <img src="<?=$thumb?>" alt="<?=$title?>"> <span class="play-badge"><i class="fa fa-play"></i></span> </div> <div class="card-body text-center"> <h5 class="card-title video-title text-danger fw-bold"><?=$title?></h5> <small class="text-muted"><?=$date?><?= $cat ? " • ".$cat : "" ?></small> </div> </div> </div> <?php endwhile; else: ?> <p class="text-center">No Videos Available</p> <?php endif; ?> </div> </div> </section> </div> <!-- 🎨 CSS --> <style> #videoGallery, .video-thumb, .search-box { position:relative; z-index:5; } .search-box{position:relative;width:100%;} .stylish-input{border-radius:50px;padding:12px 40px 12px 20px;border:2px solid #0409B0;transition:0.3s;} .stylish-input:focus{border-color:#007bff;box-shadow:0 0 8px rgba(0,123,255,.4);} .search-icon{position:absolute;right:15px;top:50%;transform:translateY(-50%);color:#007bff;} .stylish-select{border-radius:12px;padding:10px 12px;} .video-card-neo{border:none;border-radius:16px;overflow:hidden;box-shadow:0 4px 10px rgba(0,0,0,.08);} .video-thumb{position:relative;cursor:pointer;background:#000;aspect-ratio:16/9;} .video-thumb img{width:100%;height:100%;object-fit:cover;display:block;} .play-badge{position:absolute;right:10px;bottom:10px;background:rgba(0,0,0,.7);color:#fff;padding:6px 10px;border-radius:6px;z-index:2;} .video-iframe{position:absolute;inset:0;width:100%;height:100%;border:0;z-index:3;} .player-close{ position:absolute;top:8px;right:8px;z-index:4;border:0;border-radius:999px; width:32px;height:32px;line-height:32px;text-align:center;font-weight:700; background:rgba(0,0,0,.7);color:#fff;cursor:pointer; } .video-thumb.playing .play-badge{display:none;} </style> <!-- ⚡ JS --> <script> // Search filter document.getElementById("searchInput")?.addEventListener("keyup", function(){ let q = this.value.toLowerCase(); document.querySelectorAll("#videoGallery .video-card").forEach(card=>{ const t = card.querySelector(".video-title")?.textContent.toLowerCase() || ''; card.style.display = t.includes(q) ? "" : "none"; }); }); // Inline play (no modal) document.addEventListener("click", function(e){ const thumb = e.target.closest(".video-thumb"); if (!thumb) return; if (thumb.classList.contains("playing")) return; const embed = thumb.getAttribute("data-embed"); if (!embed) return; thumb.classList.add("playing"); const iframe = document.createElement("iframe"); iframe.className = "video-iframe"; const src = embed.includes("?") ? embed+"&autoplay=1" : embed+"?autoplay=1"; iframe.src = src; iframe.allow = "autoplay; fullscreen"; iframe.setAttribute("allowfullscreen",""); const btn = document.createElement("button"); btn.className = "player-close"; btn.type = "button"; btn.innerHTML = "×"; thumb.appendChild(iframe); thumb.appendChild(btn); }); // Stop video on close document.addEventListener("click", function(e){ const btn = e.target.closest(".player-close"); if (!btn) return; const wrap = btn.closest(".video-thumb"); wrap.querySelectorAll(".video-iframe").forEach(n=>n.remove()); btn.remove(); wrap.classList.remove("playing"); }); </script> <?php include("footer.php"); ?>
Upload File
Create Folder