Tn Jones Shell Bypass
:
3.140.185.250
:
160.187.54.56 / upgov.net
:
Linux 160-187-54-56.cprapid.com 4.18.0-553.22.1.lve.1.el7h.x86_64 #1 SMP Tue Oct 8 14:36:03 UTC 2024 x86_64
:
/
home
/
upgov
/
www
/
rpl
/
css
/
Upload File:
files >> /home/upgov/www/rpl/css/DocumentUpload.js.download
var _Handler; //$(document).ready(function () { // _Handler = new _DocumentUpload(); // _Handler.BindEvents(); //}); //UploadFormDocument("PROJECT CLOSURE","PROJECT CLOSURE","PROJECT CLOSURE","PROJECT CLOSURE","fileUpload","aView","hdnDocID","aDeleteDoc","ds") // Upload Form Document function function UploadFormDocument(SystemProcesses, Document_Category, Document_Type, Section, FIleUpload, aView, DocId, aDeleteDoc,lblDocName) { var strProcessIdentity = ''; if (Document_Category != '') { // Document_Category = Document_Category.split('/').join(''); strProcessIdentity = strProcessIdentity + '/' + Document_Category; } if (Document_Type != '') { strProcessIdentity = strProcessIdentity + '/' + Document_Type; } if (Section != '') { strProcessIdentity = strProcessIdentity + '/' + Section; } if (typeof (FormData) == 'undefined') { // This browser does not have native FormData support. Use the FormDataCompatibility // class which implements the needed fucncitonlity foro building multi part HTTP POST requests // var data = new FormDataCompatibility(); $('#progress').hide(); Getalert('warning', 'warning', "Browser not supported. Suggested browser Chrome and Mozilla."); return false; } else { var data = new FormData(); } var files = $('#' + FIleUpload).get(0).files; // Add the uploaded image content to the form data collection if (files.length > 0) { data.append("UploadedImage", files[0]); } if (files.length == 0) { Getalert('warning', 'Warning', "Please select document to upload."); $('#progress').hide(); return false; } var exts = ['jpg', 'jpeg', 'png', 'gif', 'pdf']; // first check if file field has any value if (files) { // split file name at dot var get_ext = files[0].name.split('.'); // reverse name to check extension get_ext = get_ext.reverse(); // check file type is valid as given in 'exts' array if ($.inArray(get_ext[0].toLowerCase(), exts) > -1) { } else { $('#progress').hide(); Getalert('warning', 'Warning', 'Invalid file format!, Please upload ".jpg, .jpeg, .png, .pdf" file format.'); return false; } } if (files) { // split file name at dot var get_size = files[0].size; if (get_size > 5242880) { $('#progress').hide(); Getalert('warning', 'Warning', 'The file "' + files[0].name + '" size exceed the limit allowed (5 MB).'); return false; } } //$('#progress').show(); $.ajax({ type: "POST", url: "/Home/DocumentUpload?SetPathURL=" + strProcessIdentity + "&SystemProcesses=" + SystemProcesses + "&Document_Category=" + Document_Category + "&Document_Type=" + Document_Type, data: data, contentType: false, processData: false, dataType: 'html', async: false, success: function (data2) { var Jdata = JSON.parse(data2); // alert(Jdata.Document_View_Path); if (aView != '') { if (Jdata.UploadDocInfo == null) { $('#progress').hide(); Getalert('warning', 'Warning', "File did not upload successfully."); return false; } else { $('#' + aView).attr('href', Jdata.Document_View_Path); $('#' + aView).css("display", "block"); $('#' + aDeleteDoc).css("display", "block"); $('#' + DocId).val(Jdata.UploadDocInfo.Id); if ($('#' + lblDocName).length > 0) { $('#' + lblDocName).html(Jdata.Original_Document_Name); } $('#progress').hide(); Getalert('success', 'Information', "File successfully uploaded."); //Loading(); } } }, error: function (data2) { $('#progress').hide(); return false; } }); } //UPLOAD DOCUMENT NON LOGIN function UploadFormDocumentForNonLogIn(SystemProcesses, Document_Category, Document_Type, Section, FIleUpload, aView, DocId, aDeleteDoc, lblDocName, DoUniqueCode) { var strProcessIdentity = ''; if (Document_Category != '') { // Document_Category = Document_Category.split('/').join(''); strProcessIdentity = strProcessIdentity + '/' + Document_Category; } if (Document_Type != '') { strProcessIdentity = strProcessIdentity + '/' + Document_Type; } if (Section != '') { strProcessIdentity = strProcessIdentity + '/' + Section; } if (typeof (FormData) == 'undefined') { // This browser does not have native FormData support. Use the FormDataCompatibility // class which implements the needed fucncitonlity foro building multi part HTTP POST requests // var data = new FormDataCompatibility(); $('#progress').hide(); Getalert('warning', 'warning', "Browser not supported. Suggested browser Chrome and Mozilla."); return false; } else { var data = new FormData(); } var files = $('#' + FIleUpload).get(0).files; // Add the uploaded image content to the form data collection if (files.length > 0) { data.append("UploadedImage", files[0]); } if (files.length == 0) { Getalert('warning', 'Warning', "Please select document to upload."); $('#progress').hide(); return false; } var exts = ['jpg', 'jpeg', 'png', 'gif', 'pdf']; // first check if file field has any value if (files) { // split file name at dot var get_ext = files[0].name.split('.'); // reverse name to check extension get_ext = get_ext.reverse(); // check file type is valid as given in 'exts' array if ($.inArray(get_ext[0].toLowerCase(), exts) > -1) { } else { $('#progress').hide(); Getalert('warning', 'Warning', 'Invalid file format!, Please upload ".jpg, .jpeg, .png, .pdf" file format.'); return false; } } if (files) { // split file name at dot var get_size = files[0].size; if (get_size > 5242880) { $('#progress').hide(); Getalert('warning', 'Warning', 'The file "' + files[0].name + '" size exceed the limit allowed (5 MB).'); return false; } } //$('#progress').show(); $.ajax({ type: "POST", url: "/Home/DocumentUploadNonLogin?SetPathURL=" + strProcessIdentity + "&SystemProcesses=" + SystemProcesses + "&Document_Category=" + Document_Category + "&Document_Type=" + Document_Type + "&DoUniqueCode=" + DoUniqueCode, data: data, contentType: false, processData: false, dataType: 'html', async: false, success: function (data2) { var Jdata = JSON.parse(data2); // alert(Jdata.Document_View_Path); if (aView != '') { if (Jdata.Document_Id == null) { $('#progress').hide(); Getalert('warning', 'Warning', "File did not upload successfully."); return false; } else { $('#' + aView).attr('href', Jdata.Document_View_Path); $('#' + aView).css("display", "block"); $('#' + aDeleteDoc).css("display", "block"); $('#' + DocId).val(Jdata.Document_Id); if ($('#' + lblDocName).length > 0) { $('#' + lblDocName).html(Jdata.Original_Document_Name); } $('#progress').hide(); Getalert('success', 'Information', "File successfully uploaded."); //Loading(); } } }, error: function (data2) { $('#progress').hide(); return false; } }); }