X7ROOT File Manager
Current Path:
/home/u126090504/domains/saiadarshainternationalschool.org.in/public_html
home
/
u126090504
/
domains
/
saiadarshainternationalschool.org.in
/
public_html
/
📁
..
📄
.htaccess
(0 B)
📄
Antiraging-Cell.php
(2.73 KB)
📄
SVM-INT (1) (1).zip
(117.51 MB)
📄
about-us.php
(5.86 KB)
📄
academic-calendar.php
(2.73 KB)
📄
achievements.php
(9.56 KB)
📄
achievers.php
(15.19 KB)
📁
admin
📄
admission-process.php
(6.85 KB)
📄
admission.php
(12.93 KB)
📄
admission_submit.php
(3.38 KB)
📄
album.php
(890 B)
📄
assessment-policy.php
(6.8 KB)
📄
cbse-curriculum-summary.php
(5.99 KB)
📄
computer-courses.php
(22.83 KB)
📄
config.php
(1.27 KB)
📄
contact-us.php
(14.63 KB)
📄
contactdb.php
(796 B)
📄
courses.php
(10.44 KB)
📁
css
📄
director's-message.php
(6.54 KB)
📄
downloads.php
(2.9 KB)
📄
error.log
(14.6 KB)
📄
facilities.php
(6.04 KB)
📄
faculty.php
(10.27 KB)
📄
fee-structure.php
(7.97 KB)
📁
fonts
📄
footer.php
(23.95 KB)
📄
franchise.php
(2.09 KB)
📄
gallery.php
(3.05 KB)
📄
google929b505e9f42f894.html
(53 B)
📄
grievance-form.php
(16.52 KB)
📄
header.php
(19.69 KB)
📄
homework.php
(9.64 KB)
📁
images
📄
index.php
(39.38 KB)
📄
infrastructure-details.php
(5.39 KB)
📁
js
📁
lib
📄
managing-committee.php
(3.34 KB)
📄
media-corner.php
(2.48 KB)
📄
non-academic-achievers.php
(14.65 KB)
📄
payment.php
(21.85 KB)
📄
payment_submit.php
(15.1 KB)
📄
payment_verify.php
(2.31 KB)
📄
placement.php
(8.33 KB)
📄
principal's-message.php
(6.65 KB)
📄
public-disclosure.php
(3.38 KB)
📁
qrcodes
📁
revolution
📁
sai
📄
scope.php
(14.14 KB)
📄
search_videos.php
(1.76 KB)
📄
sitemap.xml
(4.69 KB)
📄
subjects-offered.php
(6 KB)
📄
submit-grievance.php
(3.88 KB)
📁
svm
📄
thank-you.php
(1.28 KB)
📄
u126090504_svmint.sql
(40.87 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