/
home
/
u764571690
/
domains
/
savitrfoundation.com
/
public_html
/
admin
/
pages
/
/home/u764571690/domains/savitrfoundation.com/public_html/admin/pages
mkdir
upload
Name
Size
Mode
Actions
add_admission.php
11418
0644
edit
dl
rm
add_blog.php
3882
0644
edit
dl
rm
add_campaign.php
4326
0644
edit
dl
rm
add_certificate.php
3756
0644
edit
dl
rm
add_college.php
5839
0644
edit
dl
rm
add_college_courses.php
6366
0644
edit
dl
rm
add_content.php
5380
0644
edit
dl
rm
add_course.php
3249
0644
edit
dl
rm
add_expense.php
3847
0644
edit
dl
rm
add_expenses.php
4373
0644
edit
dl
rm
add_fees.php
4576
0644
edit
dl
rm
add_gallery.php
4054
0644
edit
dl
rm
add_intern.php
29360
0644
edit
dl
rm
add_internship.php
6273
0644
edit
dl
rm
add_internship_gallery.php
5994
0644
edit
dl
rm
add_intern_blog.php
7234
0644
edit
dl
rm
add_receive.php
3836
0644
edit
dl
rm
add_service.php
2773
0644
edit
dl
rm
add_specialisation.php
3713
0644
edit
dl
rm
add_stream.php
2405
0644
edit
dl
rm
admission_report.php
10404
0644
edit
dl
rm
appointment_list.php
2138
0644
edit
dl
rm
campaign_list.php
1733
0644
edit
dl
rm
campaign_update.php
3882
0644
edit
dl
rm
certificate_edit.php
3586
0644
edit
dl
rm
contact_form.php
1972
0644
edit
dl
rm
contact_us.php
2009
0644
edit
dl
rm
content_pages.php
3154
0644
edit
dl
rm
edit_add.php
3836
0644
edit
dl
rm
edit_admission.php
8973
0644
edit
dl
rm
edit_blog.php
3913
0644
edit
dl
rm
edit_campaign.php
6227
0644
edit
dl
rm
edit_college.php
6421
0644
edit
dl
rm
edit_college_courses.php
7991
0644
edit
dl
rm
edit_course.php
3661
0644
edit
dl
rm
edit_courses_content.php
3623
0644
edit
dl
rm
edit_donation.php
3588
0644
edit
dl
rm
edit_expense.php
3865
0644
edit
dl
rm
edit_expenses.php
3911
0644
edit
dl
rm
edit_fees.php
3357
0644
edit
dl
rm
edit_fees_type.php
2850
0644
edit
dl
rm
edit_gallery.php
4658
0644
edit
dl
rm
edit_intern.php
35116
0644
edit
dl
rm
edit_internship.php
7595
0644
edit
dl
rm
edit_internship_gallery.php
7328
0644
edit
dl
rm
edit_intern_blog.php
8254
0644
edit
dl
rm
edit_invoice.php
4916
0644
edit
dl
rm
edit_report.php
19
0644
edit
dl
rm
edit_service.php
3127
0644
edit
dl
rm
edit_specialisation.php
4712
0644
edit
dl
rm
edit_stream.php
2783
0644
edit
dl
rm
edit_student_list.php
0
0644
edit
dl
rm
edit_user.php
3547
0644
edit
dl
rm
edit_volunteer.php
4110
0644
edit
dl
rm
enquiry.php
3070
0644
edit
dl
rm
fees_type.php
3127
0644
edit
dl
rm
foot.php
6385
0644
edit
dl
rm
gallery.php
3996
0644
edit
dl
rm
gallery_edit.php
3460
0644
edit
dl
rm
gallery_view.php
1734
0644
edit
dl
rm
get.php
28
0644
edit
dl
rm
head.php
13417
0644
edit
dl
rm
home.php
4504
0644
edit
dl
rm
home_enquiry.php
2024
0644
edit
dl
rm
important.php
15460
0644
edit
dl
rm
logout.php
60
0644
edit
dl
rm
postAcceptor.php
2170
0644
edit
dl
rm
student_list.php
9476
0644
edit
dl
rm
view_admission.php
2875
0644
edit
dl
rm
view_blog.php
4991
0644
edit
dl
rm
view_campaign.php
5875
0644
edit
dl
rm
view_certificate.php
1678
0644
edit
dl
rm
view_college.php
3611
0644
edit
dl
rm
view_college_courses.php
4203
0644
edit
dl
rm
view_course.php
3579
0644
edit
dl
rm
view_donation.php
1817
0644
edit
dl
rm
view_expense.php
1897
0644
edit
dl
rm
view_expenses.php
1848
0644
edit
dl
rm
view_fees.php
1825
0644
edit
dl
rm
view_fees_type.php
1679
0644
edit
dl
rm
view_gallery.php
4592
0644
edit
dl
rm
view_interns.php
4184
0644
edit
dl
rm
view_internship.php
4092
0644
edit
dl
rm
view_internship_gallery.php
5239
0644
edit
dl
rm
view_intern_blog.php
5330
0644
edit
dl
rm
view_invoice.php
15361
0644
edit
dl
rm
view_invoice2.php
1898
0644
edit
dl
rm
view_message.php
2367
0644
edit
dl
rm
view_report.php
9643
0644
edit
dl
rm
view_service.php
1691
0644
edit
dl
rm
view_specialisation.php
3605
0644
edit
dl
rm
view_stream.php
3579
0644
edit
dl
rm
view_user.php
3894
0644
edit
dl
rm
view_user2.php
1809
0644
edit
dl
rm
volunteer.php
2110
0644
edit
dl
rm
Edit:
/home/u764571690/domains/savitrfoundation.com/public_html/admin/pages/edit_internship_gallery.php
(7328B)
<style> .content-wrapper>.content { padding-top: 24px; } </style> <!-- Main content --> <?php if (@$con) { } else { $con = connection(); } date_default_timezone_set('Asia/Kolkata'); // Get the internship gallery item ID from URL path // For URL like /admin/edit_internship_gallery/4, we need to extract the ID $path = ltrim($_SERVER['REQUEST_URI'], '/'); // Trim leading slash(es) $elements = explode('/', $path); $id = 0; // The ID should be the 3rd element in the path (index 2) // e.g. admin/edit_internship_gallery/4 if(isset($elements[2]) && is_numeric($elements[2])) { $id = intval($elements[2]); } // Fetch the internship gallery item data $gallery_item = array(); if ($id > 0) { $result = mysqli_query($con, "SELECT * FROM internship_gallery WHERE id = $id"); $gallery_item = mysqli_fetch_assoc($result); } if (!$gallery_item) { echo "<div class='alert alert-danger'>Internship gallery item not found.</div>"; exit; } ?> <div class="content-wrapper"> <section class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h4>Edit Internship Gallery</h4> </div> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="/">Home</a></li> <li class="breadcrumb-item active">Edit Internship Gallery</li> </ol> </div> </div> </div><!-- /.container-fluid --> </section> <section class="content"> <div class="row"> <div class="col-md-12"> <!-- general form elements disabled --> <div id="web_settings" class="card card-primary "> <div class="card-header bg-info"> <h3 class="card-title">Edit Internship Gallery</h3> </div> <!-- /.card-header --> <div class="card-body"> <div id="msgbox" class="alert alert-success d-none">Data Updated Successfully</div> <form name="edit_internship_gallery" method="post" id="edit_internship_gallery" enctype="multipart/form-data"> <input type="hidden" name="id" value="<?php echo $gallery_item['id']; ?>"> <div class="row"> <div class="col-sm-6"> <div class="form-group ctrl_box"> <label>Title</label> <input type="text" class="form-control" name="title" id="title" placeholder="Enter Title " value="<?php echo htmlspecialchars($gallery_item['title']); ?>"> </div> </div> <div class="col-sm-6"> <div class="form-group ctrl_box"> <label>Subtitle</label> <input type="text" class="form-control" name="subtitle" id="subtitle" placeholder="Enter Subtitle " value="<?php echo htmlspecialchars($gallery_item['subtitle']); ?>"> </div> </div> <div class="col-sm-6"> <div class="form-group ctrl_box"> <label>Image</label> <div class="custom-file ctrl_box"> <input type="file" name="image" id="image" onchange="loadLogo(this);" class="form-control custom-file-input" accept="image/*"> <label class="custom-file-label" for="customFile">Choose file</label> </div> </div> </div> <div class="col-sm-6"> </div> <div class="col-sm-6"> <div class="form-group" style="text-align: center;"> <?php if (!empty($gallery_item['image']) && file_exists('../uploads/' . $gallery_item['image'])): ?> <img class="preview_image img-fluid" id="logo" src="../uploads/<?php echo $gallery_item['image']; ?>" alt="Current image"> <?php else: ?> <img class="preview_image img-fluid" id="logo" src="assets/img/icons8-add-96.png" alt="your image"> <?php endif; ?> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <input type="submit" name="edit_internship_gallery" class="btn btn-info btn-block" value="Update" /> </div> </div> </div> </form> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> </div> </section> </div> <script> function loadLogo(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('#logo') .attr('src', e.target.result) .width(100) .height(100); }; reader.readAsDataURL(input.files[0]); } } $(document).ready(function() { // Handle form submission for editing internship gallery $('#edit_internship_gallery').on('submit', function(e) { e.preventDefault(); var formData = new FormData(this); $.ajax({ url: 'ajax/action/edit_internship_gallery_ajax.php', type: 'POST', data: formData, contentType: false, processData: false, success: function(response) { if (response == 'success') { $('#msgbox').removeClass('d-none').addClass('alert-success').text('Internship Gallery Item Updated Successfully'); } else { $('#msgbox').removeClass('d-none').addClass('alert-danger').text('Error: ' + response); } }, error: function() { $('#msgbox').removeClass('d-none').addClass('alert-danger').text('Error occurred while updating internship gallery item'); } }); }); }); </script>
Save
cmd:
run