OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
knaadu
/
cms
/
inc
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
01/14/2024 11:47:41 AM
rwxr-xr-x
📄
common.js
26.12 KB
02/21/2023 05:55:13 AM
rwxr-xr-x
📄
jquery.magnific-popup.min.js
19.74 KB
06/04/2017 06:30:00 PM
rwxr-xr-x
📄
loader.gif
63.5 KB
07/08/2020 06:30:00 PM
rwxr-xr-x
📄
magnific-popup.css
6.79 KB
06/04/2017 06:30:00 PM
rwxr-xr-x
📄
style.css
194.39 KB
11/10/2021 03:20:00 AM
rwxr-xr-x
📄
validate.logged.php
370 bytes
12/18/2021 05:09:00 AM
rwxr-xr-x
Editing: common.js
Close
/***************************************************** * Common Javascript functions *****************************************************/ $(function() { $('#sidebarToggle').on('click', function(e) { e.preventDefault(); $('body').toggleClass('sb-sidenav-toggled'); }); }); function np() { return void(0); } function clearForm(wchForm) { $('#' + wchForm)[0].reset(); $('#panelStatus').html(''); return false; } function chkLogin() { var loginEmail = $('#loginEmail').val(); var loginPwd = $('#loginPwd').val(); if (loginEmail == '' || loginPwd == '') { alert('Both Login and Password are required!'); return false; } $.ajax({ url: 'process/chk.login.php', method: 'POST', data: {email: loginEmail, pwd: loginPwd}, }) .done(function(res) { console.log(res); if (res == 'OK') { window.location = 'dashboard.php'; } else { alert('ERROR: User or Password is incorrect!'); } }); return false; } function goSection(secName, elm, act) { $('.nav-link').removeClass('active'); $(elm).addClass('active'); if (act == undefined) act = ''; $('#panelContent').html('').show().load('process/get.section.' + secName + '.php', {act: act}); } function searchCategory(pageNum) { if (pageNum == undefined) pageNum = 1; var data = $('#frmSearch').serializeArray(); data.push({name: 'pageNum', value: pageNum}); $('#panelSearch').html('').load('process/get.section.category.php', data); return false; } function searchTag(pageNum) { if (pageNum == undefined) pageNum = 1; var data = $('#frmSearch').serializeArray(); data.push({name: 'pageNum', value: pageNum}); $('#panelSearch').html('').load('process/get.section.tag.php', data); return false; } function searchArticle(pageNum) { if (pageNum == undefined) pageNum = 1; var data = $('#frmSearch').serializeArray(); data.push({name: 'pageNum', value: pageNum}); $('#panelSearch').html('').load('process/get.section.article.php', data); return false; } function searchDownload(pageNum) { if (pageNum == undefined) pageNum = 1; var data = $('#frmSearch').serializeArray(); data.push({name: 'pageNum', value: pageNum}); $('#panelSearch').html('').load('process/get.section.general.php', data); return false; } function searchAuthor(pageNum) { if (pageNum == undefined) pageNum = 1; var data = $('#frmSearch').serializeArray(); data.push({name: 'pageNum', value: pageNum}); $('#panelSearch').html('').load('process/get.section.author.php', data); return false; } function searchUser(pageNum) { if (pageNum == undefined) pageNum = 1; var data = $('#frmSearch').serializeArray(); data.push({name: 'pageNum', value: pageNum}); $('#panelSearch').html('').load('process/get.section.user.php', data); return false; } function chkAddCategory() { $('#panelStatus').html(''); var categoryName = $('#categoryName').val(); if (categoryName == '') { $('#panelStatus').html('<small>Error: Category Name not entered!</small>'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.category.php', data: {act: 'chkExist', categoryName: categoryName} }) .done(function(response) { if (response == 'OK') { $.ajax({ method: 'POST', url: 'process/get.section.category.php', data: {act: 'add', categoryName: categoryName}, }) .done(function(response) { if (response == 'OK') { $('#panelSearch').html('<div class="m-2">Category has been added!</div>'); } else { $('#panelStatus').html('<small>Error: Could not add Category!</small>'); } }); } else { $('#panelStatus').html('<small>' + response + '</small>'); } }); return false; } function chkEditCategory() { $('#panelStatus').html(''); var editId = $('#editId').val(); var categoryName = $('#categoryName').val(); if (categoryName == '') { $('#panelStatus').html('<small>Error: Category Name not entered!</small>'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.category.php', data: {act: 'chkExist', editId: editId, categoryName: categoryName} }) .done(function(response) { if (response == 'OK') { $.ajax({ method: 'POST', url: 'process/get.section.category.php', data: $('#frmEdit').serializeArray(), }) .done(function(response) { if (response == 'OK') { $('#widgetEdit_B').html('Category has been edited!'); $('#widgetEdit_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchCategory(pageNum); } else { $('#panelStatus').html('<small>Error: Could not edit Category!</small>'); } }); } else { $('#panelStatus').html('<small>' + response + '</small>'); } }); return false; } function chkAddTag() { $('#panelStatus').html(''); var tagName = $('#tagName').val(); if (tagName == '') { $('#panelStatus').html('<small>Error: Tag Name not entered!</small>'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.tag.php', data: {act: 'chkExist', tagName: tagName} }) .done(function(response) { if (response == 'OK') { $.ajax({ method: 'POST', url: 'process/get.section.tag.php', data: {act: 'add', tagName: tagName} }) .done(function(response) { if (response == 'OK') { $('#panelSearch').html('<div class="m-2">Tag has been added!</div>'); } else { $('#panelStatus').html('<small>Error: Could not add Tag!</small>'); } }); } else { $('#panelStatus').html('<small>' + response + '</small>'); } }); return false; } function chkEditTag() { $('#panelStatus').html(''); var editId = $('#editId').val(); var tagName = $('#tagName').val(); if (tagName == '') { $('#panelStatus').html('<small>Error: Tag Name not entered!</small>'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.tag.php', data: {act: 'chkExist', editId: editId, tagName: tagName} }) .done(function(response) { if (response == 'OK') { $.ajax({ method: 'POST', url: 'process/get.section.tag.php', data: $('#frmEdit').serializeArray(), }) .done(function(response) { if (response == 'OK') { $('#widgetEdit_B').html('Tag has been edited!'); $('#widgetEdit_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchTag(pageNum); } else { $('#panelStatus').html('<small>Error: Could not edit Tag!</small>'); } }); } else { $('#panelStatus').html('<small>' + response + '</small>'); } }); return false; } function chkAddArticle() { var articleCategoryId = $('#articleCategoryId').val(); var articleTitle = $('#articleTitle').val(); var articleTag1 = $('#articleTag1').val(); var articleTag2 = $('#articleTag2').val(); var articleTag3 = $('#articleTag3').val(); var articleImg = $('#articleImg').val(); if (articleTitle == '') { alert('Article Title not entered!'); return false; } if (articleCategoryId == '') { alert('Category not selected!'); return false; } var formData = new FormData(); formData.append('act', 'insert'); formData.append('uploadCategory', articleCategoryId); formData.append('uploadTitle', articleTitle); formData.append('uploadTag1', articleTag1); formData.append('uploadTag2', articleTag2); formData.append('uploadTag3', articleTag3); for (var i = 0; i < $('#uploadAuthorFirstName\\[\\]').length; i++) { formData.append('uploadAuthorFirstName[]', $($('#uploadAuthorFirstName\\[\\]')[i]).val()); formData.append('uploadAuthorLastName[]', $($('#uploadAuthorLastName\\[\\]')[i]).val()); formData.append('uploadAuthorAffiliation[]', $($('#uploadAuthorAffiliation\\[\\]')[i]).val()); formData.append('uploadAuthorEmail[]', $($('#uploadAuthorEmail\\[\\]')[i]).val()); formData.append('uploadAuthorIdExist[]', $($('#uploadAuthorIdExist\\[\\]')[i]).val()); } formData.append('isActive', $('input[name=isActive]:checked').val()); formData.append('articleImg', $('#articleImg')[0].files[0]); $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: formData, processData: false, contentType: false, enctype: 'multipart/form-data', error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(response) { $('#panelContent').html('').show().load('process/get.section.article.php', {act: 'uploadNewStep2'}); }); return false; } function chkAddArticleStep2() { var articleText = tinymce.get('articleText').getContent(); if (articleText == '') { alert('Article not entered!'); return false; } $('#panelUpload').addClass('d-none'); $('#panelUploadProcessing').removeClass('d-none'); $('#panelUploadStatusBody').html(''); tinyMCE.triggerSave(); tinymce.activeEditor.uploadImages(function(success) { var formData = new FormData(); formData.append('act', 'insertStep2'); formData.append('uploadArticle', articleText); $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: formData, processData: false, contentType: false, enctype: 'multipart/form-data', error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(response) { $('#panelUploadProcessing').addClass('d-none'); $('#panelUpload').removeClass('d-none'); if (response != '') { tinymce.get('articleText').setContent(''); $('#panelUpload').html(response); } else { $('#panelUpload').html('<div class="m-2 text-danger">ERROR: Article could not be uploaded!</div>'); } }); }); return false; } function chkEditArticle() { $('#panelStatus').html(''); var editId = $('#editId').val(); var articleCategoryId = $('#articleCategoryId').val(); var articleTitle = $('#articleTitle').val(); var articleText = tinymce.get('articleText').getContent(); var articleTag1 = $('#articleTag1').val(); var articleTag2 = $('#articleTag2').val(); var articleTag3 = $('#articleTag3').val(); var articleImg = $('#articleImg').val(); if (articleTitle == '') { $('#panelStatus').html('<small>Error: Article Title not entered!</small>'); return false; } if (articleCategoryId == '') { $('#panelStatus').html('<small>Error: Article Category not selected!</small>'); return false; } tinyMCE.triggerSave(); tinymce.activeEditor.uploadImages(function(success) { var formData = new FormData(); formData.append('act', 'edit'); formData.append('editId', editId); formData.append('articleCategoryId', articleCategoryId); formData.append('articleTitle', articleTitle); formData.append('articleText', articleText); formData.append('articleTag1', articleTag1); formData.append('articleTag2', articleTag2); formData.append('articleTag3', articleTag3); for (var i = 0; i < $('#uploadAuthorFirstName\\[\\]').length; i++) { formData.append('uploadAuthorFirstName[]', $($('#uploadAuthorFirstName\\[\\]')[i]).val()); formData.append('uploadAuthorLastName[]', $($('#uploadAuthorLastName\\[\\]')[i]).val()); formData.append('uploadAuthorAffiliation[]', $($('#uploadAuthorAffiliation\\[\\]')[i]).val()); formData.append('uploadAuthorEmail[]', $($('#uploadAuthorEmail\\[\\]')[i]).val()); formData.append('uploadAuthorIdExist[]', $($('#uploadAuthorIdExist\\[\\]')[i]).val()); } formData.append('isActive', $('input[name=isActive]:checked').val()); formData.append('articleImg', $('#articleImg')[0].files[0]); $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: formData, processData: false, contentType: false, enctype: 'multipart/form-data' }) .done(function(response) { if (response != '') { $('#widgetEdit_B').html(response); $('#widgetEdit_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchArticle(pageNum); } else { $('#panelStatus').html('<small>Error: ' + response + '</small>'); } }); }); return false; } function chkEditAuthor() { $('#panelStatus').html(''); var editId = $('#editId').val(); var authorFirstName = $('#authorFirstName').val(); var authorLastName = $('#authorLastName').val(); var authorAffiliation = $('#authorAffiliation').val(); var authorProfile = $('#authorProfile').val(); if (authorFirstName == '') { $('#panelStatus').html('<small>Error: Author First name not entered!</small>'); return false; } if (authorLastName == '') { $('#panelStatus').html('<small>Error: Author Last name not entered!</small>'); return false; } var formData = new FormData(); formData.append('act', 'edit'); formData.append('editId', editId); formData.append('authorFirstName', authorFirstName); formData.append('authorLastName', authorLastName); formData.append('authorAffiliation', authorAffiliation); formData.append('authorProfile', authorProfile); formData.append('isActive', $('input[name=isActive]:checked').val()); formData.append('uploadImg', $('#uploadImg')[0].files[0]); $.ajax({ method: 'POST', url: 'process/get.section.author.php', data: formData, processData: false, contentType: false, enctype: 'multipart/form-data' }) .done(function(response) { if (response == 'OK') { $('#widgetEdit_B').html('Author has been edited!'); $('#widgetEdit_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchAuthor(pageNum); } else { $('#panelStatus').html('<small>Error: Could not edit Author!</small>'); } }); return false; } function chkAddUser() { $('#panelStatus').html(''); var userName = $('#userName').val(); var userPassword = $('#userPassword').val(); var userEmail = $('#userEmail').val(); if (userName == '') { $('#panelStatus').html('Error: User Name not entered!'); return false; } if (userPassword == '') { $('#panelStatus').html('Error: Password not entered!'); return false; } if (userEmail == '') { $('#panelStatus').html('Error: Email not entered!'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.user.php', data: {act: 'chkExist', userEmail: userEmail} }) .done(function(response) { if (response == 'OK') { $.ajax({ method: 'POST', url: 'process/get.section.user.php', data: $('#frmAdd').serializeArray(), }) .done(function(response) { if (response == 'OK') { $('#panelSearch').html('<div class="m-2">User has been added!</div>'); } else { $('#panelStatus').html('<small>Error: Could not add Issue!</small>'); } }); } else { $('#panelStatus').html('<small>' + response + '</small>'); } }); return false; } function chkEditUser() { $('#panelStatus').html(''); var editId = $('#editId').val(); var userName = $('#userName').val(); var userPassword = $('#userPassword').val(); var userEmail = $('#userEmail').val(); if (userName == '') { $('#panelStatus').html('<small>Error: User Name not entered!</small>'); return false; } if (userPassword == '') { $('#panelStatus').html('<small>Error: Password not entered!</small>'); return false; } if (userEmail == '') { $('#panelStatus').html('<small>Error: Email not entered!</small>'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.user.php', data: {act: 'chkExist', editId: editId, userEmail: userEmail} }) .done(function(response) { if (response == 'OK') { $.ajax({ method: 'POST', url: 'process/get.section.user.php', data: $('#frmEdit').serializeArray(), }) .done(function(response) { if (response == 'OK') { $('#widgetEdit_B').html('User has been edited!'); $('#widgetEdit_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchUser(pageNum); } else { $('#panelStatus').html('<small>Error: Could not edit User!</small>'); } }); } else { $('#panelStatus').html('<small>' + response + '</small>'); } }); return false; } function chkDecArticle() { $('#panelStatus').html(''); $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: $('#frmDel').serializeArray() }) .done(function(response) { if (response == 'OK') { $('#widgetDel_B').html('Article has been deactivated!'); $('#widgetDel_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchArticle(pageNum); } else { $('#panelStatus').html('<small>Error: Could not deactivate Article!</small>'); } }); return false; } function chkDelArticle() { $('#panelStatus').html(''); $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: $('#frmDel').serializeArray() }) .done(function(response) { if (response == 'OK') { $('#widgetDel_B').html('Article has been deleted!'); $('#widgetDel_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchArticle(pageNum); } else { $('#panelStatus').html('<small>Error: Could not delete Article!</small>'); } }); return false; } function chkDelAuthor() { $('#panelStatus').html(''); $.ajax({ method: 'POST', url: 'process/get.section.author.php', data: $('#frmDel').serializeArray() }) .done(function(response) { if (response == 'OK') { $('#widgetDel_B').html('Author has been deactivated!'); $('#widgetDel_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchAuthor(pageNum); } else { $('#panelStatus').html('<small>Error: Could not deactivate Author!</small>'); } }); return false; } function chkDelUser() { $('#panelStatus').html(''); $.ajax({ method: 'POST', url: 'process/get.section.user.php', data: $('#frmDel').serializeArray() }) .done(function(response) { if (response == 'OK') { $('#widgetDel_B').html('User has been deactivated!'); $('#widgetDel_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchUser(pageNum); } else { $('#panelStatus').html('<small>Error: Could not deactivate User!</small>'); } }); return false; } function chkDelSlide() { $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: $('#frmDel').serializeArray() }) .done(function(response) { $('#widgetDel_B').html('Slide has been deleted!'); $('#widgetDel_F').hide(); $('#panelContent').load('process/get.section.general.php', {act: 'banners'}); }); return false; } function chkDelSlidePDF() { $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: $('#frmDel').serializeArray() }) .done(function(response) { $('#widgetDel_B').html('Slide PDF has been deleted!'); $('#widgetDel_F').hide(); $('#panelContent').load('process/get.section.general.php', {act: 'banners'}); }); return false; } function chkDelCategory() { $('#panelStatus').html(''); $.ajax({ method: 'POST', url: 'process/get.section.category.php', data: $('#frmDel').serializeArray() }) .done(function(response) { if (response == 'OK') { $('#widgetDel_B').html('Category has been deleted!'); $('#widgetDel_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchCategory(pageNum); } else { $('#panelStatus').html('<small>Error: Could not delete Category!</small>'); } }); return false; } function chkDelTag() { $('#panelStatus').html(''); $.ajax({ method: 'POST', url: 'process/get.section.tag.php', data: $('#frmDel').serializeArray() }) .done(function(response) { if (response == 'OK') { $('#widgetDel_B').html('Tag has been deleted!'); $('#widgetDel_F').hide(); var pageNum = $('#listingPageNum').data('pagenum'); searchTag(pageNum); } else { $('#panelStatus').html('<small>Error: Could not delete Tag!</small>'); } }); return false; } function updatePublishedPages() { $('#panelSearch').html(''); var publishedPagesCounter = $('#publishedPagesCounter').val(); if (publishedPagesCounter == '') { $('#panelSearch').html('<div class="m-2 text-danger">Error: Published Pages value not entered!</div>'); return false; } $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: {act: 'publishedPagesUpdate', publishedPagesCounter: publishedPagesCounter} }) .done(function(response) { if (response == 'OK') { $('#panelSearch').html('<div class="m-2">Published Pages value has been updated!</div>'); } else { $('#panelSearch').html('<div class="m-2 text-danger">Error: Published Pages value could not be updated!</div>'); } }); return false; } function removeOrphanAuthors() { $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: {act: 'removedOrphanAuthors'} }) .done(function(response) { if (response == 'OK') { $('#panelResponse').html('<div class="m-2 text-success">Orphan Authors have been removed!</div>'); } else { $('#panelResponse').html('<div class="m-2 text-danger">Error: Orphan Authors could not be removed!</div>'); } }); return false; } function updateHeaderSlide(wchSlide) { var slide = $('#slideFile' + wchSlide).val(); if (slide == '') { alert('No file selected to upload!'); return false; } var formData = new FormData(); formData.append('act', 'slideUpload'); formData.append('uploadSlideNum', wchSlide); formData.append('uploadSlideFile', $('#slideFile' + wchSlide)[0].files[0]); $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: formData, processData: false, contentType: false, enctype: 'multipart/form-data', error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(res) { $('#panelContent').load('process/get.section.general.php', {act: 'banners'}); }); return false; } function updateHeaderSlidePDF(wchSlide) { var slide = $('#slidePDF' + wchSlide).val(); if (slide == '') { alert('No file selected to upload!'); return false; } var formData = new FormData(); formData.append('act', 'slideUploadPDF'); formData.append('uploadSlideNum', wchSlide); formData.append('uploadSlideFile', $('#slidePDF' + wchSlide)[0].files[0]); $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: formData, processData: false, contentType: false, enctype: 'multipart/form-data', error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(res) { $('#panelContent').load('process/get.section.general.php', {act: 'banners'}); }); return false; } function updateHeaderSlideURL(wchSlide) { var slideURL = $('#slideURL' + wchSlide).val(); $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: {act: 'updateSlideURL', slideNum: wchSlide, slideURL: slideURL}, error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(res) { $('#panelContent').load('process/get.section.general.php', {act: 'banners'}); }); return false; } function moveHeaderSlide(wchDir, wchSlide) { $.ajax({ method: 'POST', url: 'process/get.section.general.php', data: {act: wchDir, slideNum: wchSlide}, error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(res) { $('#panelContent').load('process/get.section.general.php', {act: 'banners'}); alert('Slide position has been updated!'); }); } function addCategory() { $('#panelSearch').html('').show().load('process/get.section.category.php', {act: 'addForm'}); } function addTag() { $('#panelSearch').html('').show().load('process/get.section.tag.php', {act: 'addForm'}); } function addVolume() { $('#panelSearch').html('').show().load('process/get.section.volume.php', {act: 'addForm'}); } function addIssue() { $('#panelSearch').html('').show().load('process/get.section.issue.php', {act: 'addForm'}); } function addUser() { $('#panelSearch').html('').show().load('process/get.section.user.php', {act: 'addForm'}); } function addAuthorMore() { var numAuthors = $('#numAuthors').val(); $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: {act: 'addAuthorMore', numAuthors: numAuthors}, error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(res) { if (res != '') { $('#panelAuthor').append(res); $('#numAuthors').val(parseInt($('#numAuthors').val()) + 1); } }); } function searchInputAuthor(wchId) { var firstName = $('#panelAuthor_' + wchId).find('#uploadAuthorFirstName\\[\\]').val(); var lastName = $('#panelAuthor_' + wchId).find('#uploadAuthorLastName\\[\\]').val(); if (firstName != '' || lastName != '') $('#panelSrchAuthor_' + wchId).load('process/get.section.article.php', {act: 'searchInputAuthor', id: wchId, firstName: firstName, lastName: lastName}); } function setInputAuthor(wchElm, wchId) { var newVal = $(wchElm).val(); $('#panelAuthor_' + wchId).find('#uploadAuthorIdExist\\[\\]').val(''); if ($(wchElm).is(':checked')) $('#panelAuthor_' + wchId).find('#uploadAuthorIdExist\\[\\]').val(newVal); $.each($('#panelSrchAuthor_' + wchId).find('.setInputAuthor'), function( index, value ) { if ($(value).val() != newVal) $(value).prop('checked', false); }); } function confirmDelArticleAuthor(articleId, authorId) { if (confirm('Are you sure you want to remove this author from this article?')) { $.ajax({ method: 'POST', url: 'process/get.section.article.php', data: {act: 'delArticleAuthor', articleId: articleId, authorId: authorId }, error: function (error) { alert('ERROR: There was an error processing your request!'); } }) .done(function(res) { if (res == 'OK') { $('#articleAuthor_' + articleId + '_' + authorId).html('Removed!'); } }); } } function replaceAll(find, replace, str) { return str.replace(new RegExp(find, 'g'), replace); } function exportXLS(wchDiv) { reportBody = $('#'+wchDiv).html(); reportBody = replaceAll('class="txtSmall"','border="1"',reportBody); reportBody = reportBody.replace(/<a(\s[^>]*)?>.*?<\/a>/ig,""); reportBody = encodeURIComponent(reportBody); window.open('data:application/vnd.ms-excel,' + reportBody); return false; }