X7ROOT File Manager
Current Path:
/home/u126090504/domains/sketkaranjia.com/public_html/admin
home
/
u126090504
/
domains
/
sketkaranjia.com
/
public_html
/
admin
/
📁
..
📄
achievers.php
(21.44 KB)
📄
achv_cat_manage.php
(7.99 KB)
📄
achv_edit.php
(9.58 KB)
📄
achv_list.php
(8.08 KB)
📄
achv_upload.php
(13.39 KB)
📄
admin-academic-calendar.php
(20.41 KB)
📄
admin-public-disclosure.php
(18.36 KB)
📄
admissions.php
(28.76 KB)
📄
admissions_error.log
(56 KB)
📁
assets
📄
banners.php
(9.78 KB)
📄
branding_settings.php
(5.93 KB)
📄
change_password.php
(3.01 KB)
📄
class_master.php
(4.32 KB)
📄
contacts.php
(3.83 KB)
📄
dashboard.php
(27.76 KB)
📄
downloads.php
(4.91 KB)
📄
edit_faculty.php
(6.85 KB)
📄
events.php
(920 B)
📄
export_franchise.php
(930 B)
📄
faculty.php
(8.36 KB)
📄
fees_list.php
(8.48 KB)
📄
fees_upload.php
(6.19 KB)
📄
forgot_password.php
(5.76 KB)
📄
franchise.php
(7.28 KB)
📄
gallery.php
(3.08 KB)
📄
grievance-update.php
(1003 B)
📄
grievance-view.php
(8.51 KB)
📄
grievances.php
(9.55 KB)
📄
homework_add.php
(5.98 KB)
📄
homework_edit.php
(9.39 KB)
📄
homework_list.php
(2.24 KB)
📁
img
📁
includes
📄
index.php
(82 B)
📄
login.php
(13.47 KB)
📄
logout.php
(102 B)
📄
manage_albums.php
(10.82 KB)
📄
manage_media.php
(11.77 KB)
📄
manage_photos.php
(6.35 KB)
📄
manage_videos.php
(18.38 KB)
📄
managing-committee.php
(13.64 KB)
📄
master_menu.php
(5.75 KB)
📄
master_menu_debug.php
(3.73 KB)
📄
new_password.php
(3.9 KB)
📄
non_academic_achievers.php
(21.2 KB)
📄
notice.php
(15.52 KB)
📄
notice_error.log
(38.45 KB)
📄
notices.php
(8.24 KB)
📄
payments.php
(14.96 KB)
📁
phpmailer
📄
popup.php
(14.07 KB)
📄
reset_password.php
(2.27 KB)
📄
section_master.php
(6.59 KB)
📄
sections_by_class.php
(346 B)
📄
secure_session.php
(1000 B)
📄
settings.php
(8.34 KB)
📄
student_photo_update.php
(1.8 KB)
📄
subject_master.php
(6.16 KB)
📄
submit-grievance.php
(4.97 KB)
📄
testimonials.php
(15.15 KB)
📄
update_status.php
(1.66 KB)
📄
upi_settings.php
(1.52 KB)
Editing: grievance-view.php
<?php include 'secure_session.php'; include 'includes/auth.php'; require_once '../config.php'; include 'includes/header.php'; $id = (int)($_GET['id'] ?? 0); if ($id <= 0) { die('Invalid id'); } $sql = "SELECT * FROM grievances WHERE id=?"; $stmt = $conn->prepare($sql); $stmt->bind_param('i', $id); $stmt->execute(); $res = $stmt->get_result(); $row = $res->fetch_assoc(); $stmt->close(); if (!$row) { die('Not found'); } // ---- files $files = []; if (!empty($row['files_json'])) { $tmp = json_decode($row['files_json'], true); if (is_array($tmp)) $files = $tmp; } // ---- options $statuses = ['Pending','Under Review','Action Taken','Resolved']; // ---- helpers function h($v){ return htmlspecialchars((string)$v, ENT_QUOTES, 'UTF-8'); } function status_class($s){ $s = strtolower(trim((string)$s)); return match(true){ str_contains($s,'pending') => 'st-pending', str_contains($s,'under') => 'st-review', str_contains($s,'action') => 'st-action', str_contains($s,'resolved') => 'st-resolved', default => 'st-default', }; } function fmt_date($d){ if(!$d || $d==='0000-00-00') return ''; $t = strtotime($d); if(!$t) return h($d); return date('d M Y', $t); } function fmt_time($t){ if(!$t || $t==='00:00:00') return ''; $ts = strtotime($t); if(!$ts) return h($t); return date('h:i A', $ts); } // CSRF for update form if (empty($_SESSION['csrf'])) { $_SESSION['csrf'] = bin2hex(random_bytes(32)); } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Grievance – View</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> :root{ --bg:#f3f4f6; --card:#fff; --line:#e5e7eb; --muted:#6b7280; --shadow:0 10px 24px rgba(0,0,0,.06); --accent:#ef4444; } *{box-sizing:border-box} body{font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);margin:0;color:#0f172a} .wrap{max-width:1100px;margin:24px auto;padding:0 16px} .topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px} .title{display:flex;align-items:center;gap:10px;font-weight:700;font-size:26px} .title:after{content:"";display:block;height:4px;background:var(--accent);border-radius:4px;width:240px;margin-left:12px} .pill{background:#f9fafb;border:1px solid var(--line);border-radius:999px;padding:6px 10px;font-size:13px} .actions{display:flex;gap:8px;align-items:center} .card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:16px;margin-bottom:12px} .grid{display:grid;grid-template-columns:1fr 1fr;gap:12px} .row{display:flex;flex-direction:column;gap:6px;border:1px dashed transparent;padding:6px 8px;border-radius:10px;background:#fff} label{font-weight:600;color:#111} .value{color:#111} .badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;border:1px solid var(--line);background:#f3f4f6} .st-pending{background:#fef3c7;border-color:#fde68a;color:#92400e} .st-review{background:#dbeafe;border-color:#bfdbfe;color:#1e3a8a} .st-action{background:#ede9fe;border-color:#ddd6fe;color:#5b21b6} .st-resolved{background:#dcfce7;border-color:#bbf7d0;color:#065f46} .st-default{background:#f3f4f6;border-color:#e5e7eb;color:#111827} pre{white-space:pre-wrap;margin:0;font-family:inherit;color:#111} .btn{display:inline-block;background:#111827;color:#fff;text-decoration:none;padding:9px 14px;border-radius:10px;border:1px solid transparent} .btn.gray{background:#6b7280} .btn.outline{background:#fff;color:#111827;border-color:var(--line)} .btn.small{padding:7px 10px;border-radius:8px;font-size:14px} input,select,textarea,button{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff} button{background:#2563eb;color:#fff;border:0;cursor:pointer} .list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px} .list li{display:flex} .muted{color:var(--muted)} @media (max-width:900px){ .grid{grid-template-columns:1fr} } </style> </head> <body> <div class="wrap"> <div class="topbar"> <div class="title">Grievance Details</div> <div class="actions"> <span class="pill">Tracking: <?= h($row['tracking_id']) ?></span> <span class="pill">Created: <?= h($row['created_at']) ?></span> <a class="btn outline small" href="grievances.php">Back</a> </div> </div> <div class="card grid"> <div class="row"><label>Name</label><div class="value"><?= h($row['name']) ?></div></div> <div class="row"><label>Email</label><div class="value"><?= h($row['email']) ?></div></div> <div class="row"><label>Contact</label><div class="value"><?= h($row['contact']) ?></div></div> <div class="row"><label>Course / Year</label><div class="value"><?= h($row['course']) ?> <?= $row['year_of_study']? ' / '.h($row['year_of_study']) : '' ?></div></div> <div class="row"><label>Department</label><div class="value"><?= h($row['department']) ?></div></div> <div class="row"><label>Hostel</label><div class="value"><?= h($row['hostel_resident']) ?></div></div> <div class="row"><label>Preferred Response</label><div class="value"><?= h($row['preferred_response']) ?></div></div> <div class="row"><label>Confidential</label><div class="value"><?= !empty($row['is_confidential']) ? 'Yes' : 'No' ?></div></div> <div class="row"><label>Category</label><div class="value"><?= h(trim($row['category'].' / '.$row['sub_category'],' /')) ?></div></div> <div class="row"><label>Impact</label><div class="value"><?= h($row['impact_level']) ?></div></div> <div class="row"><label>Expected Resolution</label><div class="value"><?= h($row['expected_resolution']) ?></div></div> <div class="row"><label>Status</label> <div class="value"><span class="badge <?= status_class($row['status']) ?>"><?= h($row['status'] ?: '—') ?></span></div> </div> <div class="row"><label>Incident</label> <div class="value"> <?php $inc = []; $fd = fmt_date($row['date_incident']); $ft = fmt_time($row['time_incident']); if($fd) $inc[] = $fd; if($ft) $inc[] = $ft; if(!empty($row['location'])) $inc[] = '@ '.h($row['location']); echo $inc ? implode(' ', $inc) : '—'; ?> </div> </div> <div class="row"><label>Persons Involved</label><div class="value"><?= $row['persons_involved'] ? h($row['persons_involved']) : '—' ?></div></div> </div> <div class="card"> <h3 style="margin:0 0 8px">Description</h3> <pre><?= $row['description'] ? h($row['description']) : '—' ?></pre> </div> <?php if(!empty($row['previous_attempts'])): ?> <div class="card"> <h3 style="margin:0 0 8px">Previous Attempts</h3> <pre><?= h($row['previous_attempts']) ?></pre> </div> <?php endif; ?> <?php if(!empty($row['desired_outcome'])): ?> <div class="card"> <h3 style="margin:0 0 8px">Desired Outcome</h3> <pre><?= h($row['desired_outcome']) ?></pre> </div> <?php endif; ?> <div class="card"> <h3 style="margin:0 0 8px">Attachments</h3> <?php if(!$files): ?> <div class="muted">No files</div> <?php else: ?> <ul class="list"> <?php foreach($files as $f): $url = '../uploads/grievances/'.rawurlencode($f); ?> <li><a class="btn outline small" href="<?= $url ?>" target="_blank" rel="noopener">Download: <?= h($f) ?></a></li> <?php endforeach; ?> </ul> <?php endif; ?> </div> <div class="card"> <h3 style="margin:0 0 8px">Update Status</h3> <form method="post" action="grievance-update.php" style="display:flex;flex-wrap:wrap;gap:10px;align-items:center"> <input type="hidden" name="csrf" value="<?= $_SESSION['csrf'] ?>"> <input type="hidden" name="id" value="<?= (int)$row['id'] ?>"> <label>Status</label> <select name="status" required> <?php foreach($statuses as $s): ?> <option value="<?= h($s) ?>" <?= $row['status']===$s?'selected':''; ?>><?= $s ?></option> <?php endforeach; ?> </select> <label>Meet Committee?</label> <select name="meet_committee"> <?php $mc = $row['meet_committee'] ?? 'No'; ?> <option <?= $mc==='No'?'selected':''; ?>>No</option> <option <?= $mc==='Yes'?'selected':''; ?>>Yes</option> </select> <button type="submit">Save</button> <a class="btn gray" href="grievances.php">Back</a> </form> </div> </div> <?php include 'includes/footer.php'; ?>
Upload File
Create Folder