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: payment.php
<?php require_once 'config.php'; // load settings $settings = []; $res = $conn->query("SELECT field, value FROM settings"); while ($row = $res->fetch_assoc()) $settings[$row['field']] = $row['value']; $minAdmission = isset($settings['min_admission_amount']) ? (float)$settings['min_admission_amount'] : 1000; $minTuition = isset($settings['min_installment_amount']) ? (float)$settings['min_installment_amount'] : 1; // reuse setting as Tuition min include 'header.php'; ?> <div class="container" style="max-width:900px; margin:auto;"> <div class="card shadow-lg border-0 rounded-4 my-5"> <div class="card-header text-white text-center rounded-top-4" style="background-color:#030142;"> <h3 class="mb-0" style="color:white;">Student Payment Form</h3> </div> <div class="card-body p-4"> <!-- File upload ke liye enctype --> <form action="payment_submit.php" method="POST" id="paymentForm" novalidate enctype="multipart/form-data"> <!-- Payment Type --> <div class="mb-4"> <label class="form-label d-block">Select Payment Type</label> <div class="form-check form-check-inline"> <input type="radio" id="p_new" class="form-check-input" name="payment_mode" value="new" required> <label for="p_new" class="form-check-label">New Admission</label> </div> <div class="form-check form-check-inline"> <input type="radio" id="p_tuition" class="form-check-input" name="payment_mode" value="tuition" required> <label for="p_tuition" class="form-check-label">Tuition Fee</label> </div> <div class="invalid-feedback d-block" style="display:none;" id="pmErr">Please choose a payment type.</div> </div> <!-- New Admission --> <div id="newAdmissionFields" style="display:none;"> <h5 class="fw-semibold mb-3">Student Details</h5> <div class="row g-3"> <div class="col-12 col-md-6"> <label class="form-label">Student Name</label> <!-- Admission Student Name --> <input type="text" class="form-control" name="student_name" id="student_name_adm" placeholder="Enter student full name"> </div> <div class="col-12 col-md-6"> <label class="form-label">Father's Name</label> <input type="text" class="form-control" name="father_name" id="father_name" placeholder="Enter father's name"> </div> <div class="col-12 col-md-6"> <label class="form-label">Mother's Name</label> <input type="text" class="form-control" name="mother_name" id="mother_name" placeholder="Enter mother's name"> </div> <div class="col-12 col-md-6"> <label class="form-label">Date of Birth</label> <input type="date" class="form-control" id="dob" name="dob" max="<?= date('Y-m-d') ?>"> </div> <div class="col-12 col-md-6"> <label class="form-label">Age</label> <input type="text" class="form-control" id="age" name="age" readonly placeholder="Auto calculated"> </div> <div class="col-12 col-md-6"> <label class="form-label">Class</label> <select class="form-select" name="class" id="class" required> <option value="">Select Class</option> <option>+2 Science</option> <option>+2 Arts</option> <option value="prathama"> ପ୍ରଥମା ଶ୍ରେଣୀ (ନିୟମିତ) </option> <option value="ditiya"> ଦ୍ୱିତୀୟା ଶ୍ରେଣୀ (ନିୟମିତ) </option> <option value="trutiya"> ତୃତୀୟା ଶ୍ରେଣୀ (ନିୟମିତ) </option> <option value="chaturthi"> ଚତୁର୍ଥୀ ଶ୍ରେଣୀ (ନିୟମିତ) </option> <option value="panchami"> ପଞ୍ଚମୀ ଶ୍ରେଣୀ (ନିୟମିତ) </option> <option value="sasthi"> ଷଷ୍ଠୀ ଶ୍ରେଣୀ (ଆବାସିକ) </option> <option value="saptami"> ସପ୍ତମୀ ଶ୍ରେଣୀ (ଆବାସିକ) </option> <option value="astami"> ଅଷ୍ଟମୀ ଶ୍ରେଣୀ (ଆବାସିକ) </option> <option value="nabami"> ନବମୀ ଶ୍ରେଣୀ (ଆବାସିକ) </option> <option value="dashami"> ଦଶମୀ ଶ୍ରେଣୀ (ଆବାସିକ) </option> <option>Integrated +2 Science Coaching (SVM Shyam)</option> <option>NEET Preparation (SVM Shyam)</option> <option>JEE (Main & Advanced) Preparation (SVM Shyam)</option> <option>OUAT Entrance Coaching (SVM Shyam)</option> <option>IISER Entrance Coaching (SVM Shyam)</option> <option>NISER Entrance Coaching (SVM Shyam)</option> </select> </div> <div class="col-12 col-md-6"> <label class="form-label">Sex</label> <select class="form-select" name="sex" id="sex"> <option value="">Select Sex</option> <option>Male</option> <option>Female</option> <option>Other</option> </select> </div> <div class="col-12 col-md-6"> <label class="form-label">Caste</label> <select class="form-select" name="caste" id="caste"> <option value="">Select Caste</option> <option>SC</option> <option>ST</option> <option>OBC</option> <option>GENERAL</option> </select> </div> <div class="col-12 col-md-6"> <label class="form-label">Blood Group</label> <select class="form-select" name="blood_group" id="blood_group"> <option value="">Select Blood Group</option> <option>A+</option><option>A-</option> <option>B+</option><option>B-</option> <option>AB+</option><option>AB-</option> <option>O+</option><option>O-</option> <option>Unknown</option> </select> </div> <div class="col-12 col-md-6"> <label class="form-label">Aadhaar Number</label> <input type="text" class="form-control" name="aadhaar" id="aadhaar" placeholder="12-digit Aadhaar" inputmode="numeric" maxlength="14" > <small class="text-muted" id="aadhaarHelp">Enter 12 digits (auto-formatted).</small> </div> <div class="col-12 col-md-6"> <label class="form-label d-block">Student Photo</label> <div class="d-flex align-items-center gap-3"> <label class="btn btn-outline-secondary mb-0"> Choose Photo <input type="file" class="d-none" name="photo" id="photo" accept="image/jpeg,image/png,image/webp"> </label> <img id="photoPreview" src="" alt="Preview" style="width:64px;height:64px;object-fit:cover;border-radius:50%;display:none;border:1px solid #e5e5e5;"> </div> <small class="text-muted d-block mt-1">JPG/PNG/WebP, max 2 MB.</small> <div class="invalid-feedback d-block" id="photoErr" style="display:none;">Please upload a valid image (JPG/PNG/WebP) under 2 MB.</div> </div> <div class="col-12 col-md-6"> <label class="form-label">Mobile Number</label> <input type="tel" class="form-control" name="mobile" id="mobile" placeholder="Enter 10-digit number" pattern="[0-9]{10}" maxlength="10" inputmode="numeric"> <small class="text-muted">Enter 10-digit mobile number</small> </div> <div class="col-12"> <label class="form-label">School Name</label> <input type="text" class="form-control" name="school" id="school" placeholder="New Admission/Previous School Name"> </div> <div class="col-12"> <label class="form-label">Address</label> <textarea class="form-control" name="address" id="address" placeholder="Enter full address" rows="2"></textarea> </div> </div> <hr class="my-4"> <h5 class="fw-semibold mb-3">Fee Details</h5> <div class="row g-3"> <div class="col-12 col-md-6"> <label class="form-label">Admission Fee (Min ₹<?= (int)$minAdmission ?>)</label> <input type="number" class="form-control" id="amount_admission" name="amount_admission" min="<?= (int)$minAdmission ?>" step="0.01" inputmode="decimal" placeholder="Minimum ₹<?= (int)$minAdmission ?>"> <div class="form-text" id="admPreview" aria-live="polite"></div> </div> </div> </div> <!-- Tuition Fee --> <div id="tuitionFields" style="display:none;"> <h5 class="fw-semibold mb-3">Tuition Fee Details</h5> <div class="row g-3"> <div class="col-12 col-md-6"> <label class="form-label">Roll No / Admission No</label> <input type="text" class="form-control" name="rollno" id="rollno" placeholder="Enter roll number"> </div> <!-- ✅ Tuition Student Name --> <div class="col-12 col-md-6"> <label class="form-label">Student Name</label> <input type="text" class="form-control" id="student_name_tui" placeholder="Enter student full name"> </div> <!-- Class (dropdown) + Section --> <div class="col-12 col-md-6"> <label class="form-label">Class (Name)</label> <select class="form-select" name="tuition_class" id="tuition_class"> <option value="">Select Class</option> <option>Nursery</option> <option>LKG</option> <option>UKG</option> <option>STD-I</option> <option>STD-II</option> <option>STD-III</option> <option>STD-IV</option> <option>STD-V</option> <option>STD-VI</option> <option>STD-VII</option> <option>STD-VIII</option> <option>Integrated Coaching – IX</option> <option>Integrated Coaching – X</option> <option>Integrated Coaching – XI</option> <option>Integrated Coaching – XII</option> </select> </div> <div class="col-12 col-md-6"> <label class="form-label">Section</label> <input type="text" class="form-control" name="tuition_section" id="tuition_section" placeholder="e.g., A / B / Red" maxlength="10"> </div> <div class="col-12 col-md-6"> <label class="form-label">Tuition Amount (Min ₹<?= (int)$minTuition ?>)</label> <input type="number" class="form-control" id="amount_tuition" name="amount_tuition" min="<?= (int)$minTuition ?>" step="0.01" inputmode="decimal" placeholder="Minimum ₹<?= (int)$minTuition ?>"> <div class="form-text" id="tuiPreview" aria-live="polite"></div> </div> </div> </div> <!-- Hidden normalized fields sent to server --> <input type="hidden" name="amount" id="amount" value=""> <input type="hidden" name="payment_type" id="payment_type" value=""> <button type="submit" class="btn btn-success w-100 mt-4" id="submitBtn">Proceed to Pay</button> </form> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function () { const MIN_ADM = <?= json_encode((float)$minAdmission) ?>; const MIN_TUI = <?= json_encode((float)$minTuition) ?>; const form = document.getElementById('paymentForm'); const newAdm = document.getElementById('newAdmissionFields'); const tuition = document.getElementById('tuitionFields'); const amtAdm = document.getElementById('amount_admission'); const amtTui = document.getElementById('amount_tuition'); const hiddenAmt = document.getElementById('amount'); const paymentTypeInput = document.getElementById('payment_type'); const btn = document.getElementById('submitBtn'); const admPreview = document.getElementById('admPreview'); const tuiPreview = document.getElementById('tuiPreview'); const pmErr = document.getElementById('pmErr'); // admission fields const student_name_adm = document.getElementById('student_name_adm'); const father_name = document.getElementById('father_name'); const mother_name = document.getElementById('mother_name'); const dob = document.getElementById('dob'); const age = document.getElementById('age'); const clsSelect = document.getElementById('class'); const sex = document.getElementById('sex'); const caste = document.getElementById('caste'); const blood = document.getElementById('blood_group'); const aadhaar = document.getElementById('aadhaar'); const aadhaarHelp = document.getElementById('aadhaarHelp'); const photo = document.getElementById('photo'); const photoPreview = document.getElementById('photoPreview'); const photoErr = document.getElementById('photoErr'); const mobile = document.getElementById('mobile'); const school = document.getElementById('school'); const address = document.getElementById('address'); // tuition fields const rollno = document.getElementById('rollno'); const student_name_tui = document.getElementById('student_name_tui'); const tuitionClass = document.getElementById('tuition_class'); const tuitionSection = document.getElementById('tuition_section'); // helpers const inr = (v) => isNaN(v) || v === '' ? '' : 'You’ll pay: ₹' + Number(v).toLocaleString('en-IN', {minimumFractionDigits: 2, maximumFractionDigits: 2}); function toggleStudentNameBinding(mode) { // Ensure only one input carries name="student_name" if (mode === 'new') { if (student_name_tui) student_name_tui.removeAttribute('name'); if (student_name_adm) student_name_adm.setAttribute('name', 'student_name'); } else if (mode === 'tuition') { if (student_name_adm) student_name_adm.removeAttribute('name'); if (student_name_tui) student_name_tui.setAttribute('name', 'student_name'); } } function setVisible(mode) { toggleStudentNameBinding(mode); if (mode === 'new') { newAdm.style.display = 'block'; tuition.style.display = 'none'; // requireds in admission [student_name_adm, dob, clsSelect, sex, caste, aadhaar, photo, amtAdm].forEach(el => { if (el) el.required = true; }); // tuition fields optionalized + reset [rollno, student_name_tui, tuitionClass, tuitionSection, amtTui].forEach(el => { if (el) el.required = false; }); if (amtTui) { amtTui.value=''; tuiPreview.textContent=''; } paymentTypeInput.value = 'Admission Fee'; btn.textContent = 'Proceed to Pay (Admission)'; } else if (mode === 'tuition') { newAdm.style.display = 'none'; tuition.style.display = 'block'; // admission optionalized + reset some UI [student_name_adm, dob, clsSelect, sex, caste, aadhaar, photo, amtAdm].forEach(el => { if (el) el.required = false; }); if (amtAdm) { amtAdm.value=''; admPreview.textContent=''; } // tuition requireds [rollno, student_name_tui, tuitionClass, tuitionSection, amtTui].forEach(el => { if (el) el.required = true; }); paymentTypeInput.value = 'Tuition Fee'; btn.textContent = 'Proceed to Pay (Tuition)'; } } // radios document.querySelectorAll('input[name="payment_mode"]').forEach(r => { r.addEventListener('change', function() { setVisible(this.value); pmErr.style.display = 'none'; (this.value === 'new' ? newAdm : tuition).scrollIntoView({behavior:'smooth', block:'start'}); }); }); // live amount preview if (amtAdm) amtAdm.addEventListener('input', () => { admPreview.textContent = inr(amtAdm.value); }); if (amtTui) amtTui.addEventListener('input', () => { tuiPreview.textContent = inr(amtTui.value); }); // age calculation if (dob) dob.addEventListener('change', function(){ if (!this.value) return; const d = new Date(this.value); const now = new Date(); let a = now.getFullYear() - d.getFullYear(); const m = now.getMonth() - d.getMonth(); if (m < 0 || (m === 0 && now.getDate() < d.getDate())) a--; age.value = (a >= 0 ? a : 0) + " years"; }); // input hygiene if (mobile) mobile.addEventListener('input', () => { mobile.value = mobile.value.replace(/\D/g,'').slice(0,10); }); ;['student_name_adm','student_name_tui','father_name','mother_name','school','address','rollno','tuition_section'].forEach(id=>{ const el = document.getElementById(id); if (el) el.addEventListener('blur', ()=>{ el.value = el.value.trim(); }); }); // Aadhaar formatting (#### #### ####) + basic validation if (aadhaar) { aadhaar.addEventListener('input', () => { let v = aadhaar.value.replace(/\D/g, '').slice(0,12); v = v.replace(/(\d{4})(\d)/, '$1 $2').replace(/(\d{4}\s\d{4})(\d)/, '$1 $2'); aadhaar.value = v; const digits = v.replace(/\s/g,''); if (digits.length === 12) { aadhaar.classList.remove('is-invalid'); aadhaar.classList.add('is-valid'); aadhaarHelp.textContent = 'Looks good.'; } else { aadhaar.classList.remove('is-valid'); aadhaarHelp.textContent = 'Enter 12 digits (auto-formatted).'; } }); } // Photo validation + preview (<= 2MB, types) const allowedTypes = ['image/jpeg','image/png','image/webp']; const maxBytes = 2 * 1024 * 1024; // 2 MB if (photo) { photo.addEventListener('change', () => { photoErr.style.display = 'none'; const f = photo.files && photo.files[0]; if (!f) { photoPreview.style.display='none'; return; } if (!allowedTypes.includes(f.type) || f.size > maxBytes) { photoErr.style.display = 'block'; photo.value = ''; photoPreview.style.display='none'; return; } const reader = new FileReader(); reader.onload = (e) => { photoPreview.src = e.target.result; photoPreview.style.display = 'inline-block'; }; reader.readAsDataURL(f); }); } // submit normalize + guards form.addEventListener('submit', function(ev){ const checked = document.querySelector('input[name="payment_mode"]:checked'); if (!checked) { pmErr.style.display = 'block'; document.querySelector('input[name="payment_mode"]').scrollIntoView({behavior:'smooth', block:'center'}); ev.preventDefault(); return; } // Prevent double submit btn.disabled = true; btn.textContent = 'Processing...'; let used = ''; if (checked.value === 'tuition') { // Tuition required checks if (!student_name_tui.value.trim()) { alert('Please enter Student Name.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Tuition)'; ev.preventDefault(); return; } if (tuitionClass && !tuitionClass.value) { alert('Please select Class for Tuition Fee.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Tuition)'; ev.preventDefault(); return; } if (tuitionSection && !tuitionSection.value.trim()) { alert('Please enter Section.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Tuition)'; ev.preventDefault(); return; } if (amtTui && amtTui.value) { used = amtTui.value; } paymentTypeInput.value = 'Tuition Fee'; } else if (checked.value === 'new') { // Admission required checks const requiredSelects = [ [clsSelect, 'Please select Class.'], [sex, 'Please select Sex.'], [caste, 'Please select Caste.'], ]; for (const [el, msg] of requiredSelects) { if (el && !el.value) { alert(msg); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } } if (!student_name_adm.value.trim()) { alert('Please enter Student Name.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } if (dob && !dob.value) { alert('Please select Date of Birth.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } if (aadhaar) { const digits = aadhaar.value.replace(/\s/g,''); if (digits.length !== 12) { alert('Please enter a valid 12-digit Aadhaar number.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } } if (photo) { const f = photo.files && photo.files[0]; if (!f) { alert('Please upload student photo (JPG/PNG/WebP, max 2 MB).'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } if (!['image/jpeg','image/png','image/webp'].includes(f.type) || f.size > (2*1024*1024)) { alert('Invalid photo. Only JPG/PNG/WebP up to 2 MB allowed.'); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } } if (amtAdm && amtAdm.value) used = amtAdm.value; paymentTypeInput.value = 'Admission Fee'; } // normalize to 2 decimals if (used !== '') { const num = parseFloat(used); if (!isNaN(num)) used = num.toFixed(2); } hiddenAmt.value = used; // client-side min checks if (paymentTypeInput.value === 'Admission Fee' && (used === '' || parseFloat(used) < MIN_ADM)) { alert('Admission fee must be minimum ₹' + MIN_ADM); btn.disabled = false; btn.textContent = 'Proceed to Pay (Admission)'; ev.preventDefault(); return; } if (paymentTypeInput.value === 'Tuition Fee' && (used === '' || parseFloat(used) < MIN_TUI)) { alert('Tuition fee must be minimum ₹' + MIN_TUI); btn.disabled = false; btn.textContent = 'Proceed to Pay (Tuition)'; ev.preventDefault(); return; } // console for debug console.log('Submit:', { amount: hiddenAmt.value, type: paymentTypeInput.value, mode: checked.value }); }); }); </script> <?php include 'footer.php'; ?>
Upload File
Create Folder