X7ROOT File Manager
Current Path:
/home/u126090504/domains/svmbaripada.org.in/public_html
home
/
u126090504
/
domains
/
svmbaripada.org.in
/
public_html
/
π
+2-science-&-+2arts.php
(8.87 KB)
π
..
π
.htaccess
(1.12 KB)
π
Antiraging-Cell.php
(2.73 KB)
π
about-us.php
(8.85 KB)
π
academic-calendar.php
(2.73 KB)
π
achievements.php
(9.56 KB)
π
achievers.php
(15.19 KB)
π
admin
π
admission-process.php
(9.23 KB)
π
admission.php
(13.96 KB)
π
admission_submit.php
(3.38 KB)
π
album.php
(890 B)
π
assessment-policy.php
(7.08 KB)
π
class-1-to-5th.php
(7.78 KB)
π
class6th-to-10th.php
(7.96 KB)
π
computer-courses.php
(22.83 KB)
π
config.php
(1.21 KB)
π
contact-us.php
(14.63 KB)
π
contactdb.php
(796 B)
π
courses.php
(10.44 KB)
π
css
π
director's-message.php
(6.49 KB)
π
downloads.php
(2.9 KB)
π
error.log
(14.6 KB)
π
facilities.php
(6.57 KB)
π
faculty.php
(10.27 KB)
π
fee-structure.php
(7.97 KB)
π
fonts
π
footer.php
(17.95 KB)
π
franchise.php
(2.09 KB)
π
gallery.php
(3.05 KB)
π
grievance-form.php
(16.84 KB)
π
header.php
(20.08 KB)
π
homework.php
(9.64 KB)
π
images
π
index.php
(46.64 KB)
π
infrastructure-details.php
(5.48 KB)
π
js
π
lib
π
managing-committee.php
(3.34 KB)
π
media-corner.php
(2.48 KB)
π
non-academic-achievers.php
(14.65 KB)
π
payment.php
(23.12 KB)
π
payment_submit.php
(15.1 KB)
π
payment_verify.php
(2.31 KB)
π
peret.php
(266.87 KB)
π
placement.php
(8.33 KB)
π
principal's-message.php
(6.33 KB)
π
public-disclosure.php
(3.38 KB)
π
qrcodes
π
revolution
π
scope.php
(14.14 KB)
π
search_videos.php
(1.76 KB)
π
shyam-classes.php
(6.91 KB)
π
submit-grievance.php
(3.88 KB)
π
thank-you.php
(1.28 KB)
π
uploads
π
videos.php
(6.87 KB)
Editing: achievements.php
<?php include("header.php"); ?><!--header end--> <?php require_once 'config.php'; ?> <?php // ===== Fetch categories (active) ===== $cats = []; try { $cres = $conn->query("SELECT id, name, slug FROM achievement_categories WHERE is_active=1 ORDER BY display_order ASC, name ASC"); while ($c = $cres->fetch_assoc()) $cats[] = $c; } catch (Throwable $e) { // ignore for frontend; show empty state later } // ===== Fetch achievements (joined) ===== $rows = []; try { $sql = "SELECT a.*, c.name AS cat_name, c.id AS cat_id FROM achievements a JOIN achievement_categories c ON c.id=a.category_id WHERE a.is_active=1 AND c.is_active=1 ORDER BY a.display_order ASC, a.event_date DESC, a.created_at DESC"; $res = $conn->query($sql); while ($r = $res->fetch_assoc()) $rows[] = $r; } catch (Throwable $e) { // ignore; weβll show a graceful error box $rows = []; $cats = $cats ?? []; $frontend_error = $e->getMessage(); } ?> <!-- 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"> <div class="page-title-heading"> <h2 class="title">School Achievements</h2> </div> </div> </div> </div> </div> </div><!-- page-title end--> <!--site-main start--> <div class="site-main"> <section id="achievements" class="achv-wrap" aria-label="Achievements"> <style> .achv-wrap{ --brand:#ea0000; --muted:#6f6f6f; --ink:#111; --ring:#f0f0f0; background:#fff; padding:40px 0 80px; font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial; } .achv-head{max-width:1100px;margin:0 auto 16px;padding:0 16px;} .achv-head h3{margin:0;font-size:28px;color:var(--ink)} .achv-head p{margin:6px 0 0;color:var(--muted)} /* Tabs */ .tabs{max-width:1100px;margin:10px auto 24px;padding:0 16px;display:flex;gap:10px;flex-wrap:wrap} .tab{padding:8px 14px;border:1px solid var(--ring);border-radius:999px;background:#fff;color:var(--ink);cursor:pointer} .tab.active{background:var(--brand);color:#fff;border-color:var(--brand)} .tab:focus{outline:2px solid rgba(234,0,0,.25); outline-offset:2px;} /* Grid & Card */ .grid{max-width:1100px;margin:0 auto;padding:0 16px;display:grid;gap:18px;grid-template-columns:repeat(3,1fr)} .card{border:1px solid #eee;border-radius:18px;overflow:hidden;background:linear-gradient(180deg,#fff,#fbfbfd);box-shadow:0 6px 24px rgba(0,0,0,.06)} .thumb-wrap{background:#f8f8f8; position:relative;} .thumb{ width:100%; aspect-ratio:16/9; /* fixed frame */ object-fit:contain !important; /* π§ no crop */ display:block; background:#f8f8f8; } .meta{padding:14px 16px;border-top:1px dashed #ececec} .title{font-weight:800;color:#111;font-size:16px;margin:0 0 4px} .line{display:flex; align-items:center; gap:8px; font-size:13px; color:#444; margin-top:4px;} .line svg{width:16px;height:16px;flex:0 0 16px} .desc{font-size:14px;color:#333;margin-top:10px;line-height:1.55} .row-actions{display:flex;gap:10px;margin-top:12px} .btn{padding:8px 12px;border-radius:10px;text-decoration:none;display:inline-block;font-weight:700} .btn-dark{background:#111;color:#fff} .btn-light{background:#f2f2f2;color:#111} /* Empty / Error states */ .empty-wrap{max-width:900px;margin:10px auto 0;padding:24px 16px;color:#444} .empty-card{ border:1px dashed #e3e3e3; border-radius:16px; padding:26px; background:#fcfcfc; display:flex; gap:16px; align-items:center; box-shadow: inset 0 0 0 6px rgba(234,0,0,.04); } .empty-card svg{width:36px;height:36px;opacity:.75} .empty-title{font-weight:800;margin:0 0 4px} .empty-muted{color:#666;margin:0} .err{background:#fff6d5;border:1px solid #ffe7a3;color:#7a5a00;border-radius:12px;padding:10px 12px;margin:0 auto 14px;max-width:1100px} @media (max-width:992px){.grid{grid-template-columns:repeat(2,1fr)}} @media (max-width:600px){.grid{grid-template-columns:1fr}} </style> <div class="achv-head"> <h3>Celebrating Excellence</h3> <p>Browse by category</p> </div> <!-- Tabs (show 'All' always; other tabs only if categories exist) --> <div class="tabs" id="achvTabs"> <button class="tab active" data-cat="all">All</button> <?php if (!empty($cats)): foreach($cats as $c): ?> <button class="tab" data-cat="cat-<?= (int)$c['id'] ?>"><?= htmlspecialchars($c['name']) ?></button> <?php endforeach; endif; ?> </div> <?php if (isset($frontend_error)): ?> <div class="err"><strong>Note:</strong> <?= htmlspecialchars($frontend_error) ?></div> <?php endif; ?> <?php if (empty($rows)): ?> <!-- Empty state (no data uploaded) --> <div class="empty-wrap"> <div class="empty-card"> <!-- inbox icon --> <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h4l2 3h6l2-3h4v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6z" stroke="currentColor" stroke-width="1.5"/> <path d="M3 13V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6M9 7h6" stroke="currentColor" stroke-width="1.5"/> </svg> <div> <p class="empty-title">No achievements to show (yet)</p> <p class="empty-muted">As soon as the school adds Awards, Competition results or Alumni success stories, theyβll appear here.</p> </div> </div> </div> <?php endif; ?> <!-- Cards --> <div class="grid" id="achvGrid"> <?php foreach ($rows as $r): ?> <article class="card" data-cat="cat-<?= (int)$r['cat_id'] ?>"> <div class="thumb-wrap"> <?php if (!empty($r['image_path'])): ?> <img class="thumb" src="<?= htmlspecialchars($r['image_path']) ?>" alt="<?= htmlspecialchars($r['title']) ?>"> <?php else: ?> <!-- placeholder (no image) --> <img class="thumb" src="data:image/svg+xml;utf8, <?= rawurlencode('<svg xmlns="http://www.w3.org/2000/svg" width="800" height="450"> <rect width="100%" height="100%" fill="#f2f2f2"/> <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="#9a9a9a" font-family="Arial, sans-serif" font-size="22"> No image </text></svg>'); ?>" alt="No image"> <?php endif; ?> </div> <div class="meta"> <h4 class="title"><?= htmlspecialchars($r['title']) ?></h4> <?php if (!empty($r['sub_title'])): ?> <div class="line"> <!-- award icon --> <svg viewBox="0 0 24 24" fill="none"><path d="M8 12a4 4 0 1 1 8 0v1a4 4 0 1 1-8 0v-1z" stroke="currentColor" stroke-width="1.5"/><path d="M12 17v5l3-2 3 2v-5" stroke="currentColor" stroke-width="1.5"/></svg> <span><?= htmlspecialchars($r['sub_title']) ?></span> </div> <?php endif; ?> <div class="line"> <!-- folder/tag icon --> <svg viewBox="0 0 24 24" fill="none"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z" stroke="currentColor" stroke-width="1.5"/></svg> <span>Category: <?= htmlspecialchars($r['cat_name']) ?></span> </div> <?php if (!empty($r['event_date'])): ?> <div class="line"> <!-- calendar icon --> <svg viewBox="0 0 24 24" fill="none"><rect x="3" y="4" width="18" height="17" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M8 2v4M16 2v4M3 9h18" stroke="currentColor" stroke-width="1.5"/></svg> <span><?= htmlspecialchars($r['event_date']) ?></span> </div> <?php endif; ?> <?php if (!empty($r['description'])): ?> <div class="desc"><?= nl2br(htmlspecialchars($r['description'])) ?></div> <?php endif; ?> <div class="row-actions"> <?php if (!empty($r['external_link'])): ?> <a class="btn btn-dark" target="_blank" href="<?= htmlspecialchars($r['external_link']) ?>">Read More</a> <?php endif; ?> <?php if (!empty($r['image_path'])): ?> <a class="btn btn-light" target="_blank" href="<?= htmlspecialchars($r['image_path']) ?>">View Image</a> <?php endif; ?> </div> </div> </article> <?php endforeach; ?> </div> <script> // Filter tabs (function(){ const tabs = document.querySelectorAll('#achvTabs .tab'); const cards = document.querySelectorAll('#achvGrid [data-cat]'); tabs.forEach(t=>{ t.addEventListener('click', ()=>{ tabs.forEach(x=>x.classList.remove('active')); t.classList.add('active'); const cat = t.dataset.cat; let any = false; cards.forEach(c=>{ const show = (cat==='all' || c.dataset.cat===cat); c.style.display = show ? 'block' : 'none'; if(show) any = true; }); // if selected tab has no cards, smooth scroll stays window.scrollTo({top: document.querySelector('#achvTabs').offsetTop - 120, behavior:'smooth'}); }); }); })(); </script> </section> </div><!--site-main end--> <?php include("footer.php"); ?><!--footer end-->
Upload File
Create Folder