first commit
16
public/assets/adm/js/_base.js
Executable file
@@ -0,0 +1,16 @@
|
||||
$(function () {
|
||||
|
||||
|
||||
$('.subnavbar').find ('li').each (function (i) {
|
||||
|
||||
var mod = i % 3;
|
||||
|
||||
if (mod === 2) {
|
||||
$(this).addClass ('subnavbar-open-right');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
161
public/assets/adm/js/base.js
Executable file
@@ -0,0 +1,161 @@
|
||||
var sessionExist=1;
|
||||
|
||||
$( document ).ready(function() {
|
||||
setInterval(function() {
|
||||
if(sessionExist==1){
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if(sessionExist==0){
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 60000);
|
||||
});
|
||||
|
||||
$(document).on("click", "#ajaxLoginbtn", function(event){
|
||||
$.post("/admin/ajax/login", {
|
||||
username: $('#username').val(),
|
||||
password: $('#password').val()
|
||||
}).done(function(data) {
|
||||
if(data==1){
|
||||
$('#loginModal').modal('hide');
|
||||
sessionExist=1;
|
||||
} else {
|
||||
$('#loginError').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('.subnavbar').find ('li').each (function (i) {
|
||||
var mod = i % 3;
|
||||
if (mod === 2) {
|
||||
$(this).addClass ('subnavbar-open-right');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#remote-modals').on("hidden.bs.modal", ".modal:not(.local-modal)", function (e) {
|
||||
$(e.target).removeData("bs.modal").find(".modal-content").empty();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".URLField").blur(function() {
|
||||
var identbefore=$(".URLField").val();
|
||||
var ident=identbefore.toLowerCase();
|
||||
ident=ident.replace(/ /g,'-');
|
||||
ident=ident.replace(/_/g,'-');
|
||||
ident=ident.replace(/[^\w-]+/g,'');
|
||||
$(".URLField").val(ident);
|
||||
if( identbefore.length >ident.length ) {
|
||||
alert("URL amended\nPlease use only a-z,0-9 or dash");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
var field;
|
||||
function fancybox(elem) {
|
||||
field = $(elem).parent().prev();
|
||||
$.fancybox.open({
|
||||
width : '900',
|
||||
height : '600',
|
||||
href: elem,
|
||||
type: 'iframe'
|
||||
});
|
||||
}
|
||||
|
||||
function responsive_filemanager_callback(field_id){
|
||||
var url=jQuery('#'+field_id).val();
|
||||
$(field).val(url);
|
||||
|
||||
}
|
||||
$(function(){
|
||||
$('#searchString').on("keyup", function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$("#searchBtn").trigger("click");
|
||||
}
|
||||
});
|
||||
});
|
||||
function doPostSearch(){
|
||||
$('#postContainer').html("");
|
||||
$('#loadingSpinner').show();
|
||||
$.post("/admin/ajax/post-search", {
|
||||
term: $('#searchString').val(),
|
||||
}).done(function(data) {
|
||||
$('#loadingSpinner').hide();
|
||||
$('#postContainer').html(data);
|
||||
if($('#searchString').val()==""){
|
||||
$('#paginationContainer').show();
|
||||
} else {
|
||||
$('#paginationContainer').hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function doCategorySearch(){
|
||||
$('#categoryContainer').html("");
|
||||
$('#loadingSpinner').show();
|
||||
$.post("/admin/ajax/category-search", {
|
||||
term: $('#searchString').val(),
|
||||
}).done(function(data) {
|
||||
$('#loadingSpinner').hide();
|
||||
$('#categoryContainer').html(data);
|
||||
if($('#searchString').val()==""){
|
||||
$('#paginationContainer').show();
|
||||
} else {
|
||||
$('#paginationContainer').hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function doPageSearch(){
|
||||
$('#pageContainer').html("");
|
||||
$('#loadingSpinner').show();
|
||||
$.post("/admin/ajax/page-search", {
|
||||
term: $('#searchString').val(),
|
||||
}).done(function(data) {
|
||||
$('#loadingSpinner').hide();
|
||||
$('#pageContainer').html(data);
|
||||
if($('#searchString').val()==""){
|
||||
$('#paginationContainer').show();
|
||||
} else {
|
||||
$('#paginationContainer').hide();
|
||||
} });
|
||||
}
|
||||
function doRoleSearch(){
|
||||
$('#roleContainer').html("");
|
||||
$('#loadingSpinner').show();
|
||||
$.post("/admin/ajax/role-search", {
|
||||
term: $('#searchString').val(),
|
||||
}).done(function(data) {
|
||||
$('#loadingSpinner').hide();
|
||||
$('#roleContainer').html(data);
|
||||
if($('#searchString').val()==""){
|
||||
$('#paginationContainer').show();
|
||||
} else {
|
||||
$('#paginationContainer').hide();
|
||||
} });
|
||||
}
|
||||
function doUserSearch(){
|
||||
$('#userContainer').html("");
|
||||
$('#loadingSpinner').show();
|
||||
$.post("/admin/ajax/user-search", {
|
||||
term: $('#searchString').val(),
|
||||
}).done(function(data) {
|
||||
$('#loadingSpinner').hide();
|
||||
$('#userContainer').html(data);
|
||||
if($('#searchString').val()==""){
|
||||
$('#paginationContainer').show();
|
||||
} else {
|
||||
$('#paginationContainer').hide();
|
||||
} });
|
||||
}
|
||||
|
||||
|
||||
1920
public/assets/adm/js/bootstrap-datepicker.js
vendored
Executable file
13
public/assets/adm/js/bootstrap-datepicker.kr.js
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Korean translation for bootstrap-datepicker
|
||||
* Gu Youn <http://github.com/guyoun>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['kr'] = {
|
||||
days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"],
|
||||
daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"],
|
||||
daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"],
|
||||
months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
|
||||
monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
|
||||
};
|
||||
}(jQuery));
|
||||
2363
public/assets/adm/js/bootstrap.js
vendored
Executable file
7
public/assets/adm/js/bootstrap.min.js
vendored
Executable file
457
public/assets/adm/js/cm-adm-Fm5tZ263ZtdEmbvT.js
Executable file
@@ -0,0 +1,457 @@
|
||||
$(function () {
|
||||
CM = { fn: {}, el: {} }
|
||||
$('.select2').select2();
|
||||
|
||||
if ($(".cm-table").length) {
|
||||
$.extend(CM.fn, {
|
||||
titleFormatter: function (value, row, index) {
|
||||
return '<a href="javascript:;" class="cm-title-link" data-index="' + index + '">' + value + '</a>' + (row.isSetDptime ? ' <i class="glyphicon glyphicon-time"></i>' + row.display_date : '')
|
||||
},
|
||||
imageFormatter: function (value, row, index) {
|
||||
return '<img src="' + (value.indexOf('://') > -1 ? '' : 'https://crossmap.christiandaily.co.kr') + value + '" class="cm-list-img-size"/>'
|
||||
},
|
||||
operateFormatter: function (value, row, index) {
|
||||
var operateBtns = [
|
||||
'<a class="edit" href="javascript:void(0)" title="Edit">',
|
||||
'<i class="glyphicon glyphicon-edit"></i>',
|
||||
'</a> ',
|
||||
'<a class="remove" href="javascript:void(0)" title="Remove">',
|
||||
'<i class="glyphicon glyphicon-remove"></i>',
|
||||
'</a>'
|
||||
];
|
||||
return operateBtns.join('');
|
||||
},
|
||||
operateEvents: {
|
||||
'click .edit': function (e, value, row, index) {
|
||||
CM.el.editDpModal.find('.cm-config-add .cm-saved-config-dp-edit-btn').data('post-id', row.idx);
|
||||
CM.el.editDpModal.find('.cm-config-add .cm-set-content-title-head').val(row.title);
|
||||
CM.el.editDpModal.find('.cm-config-add .cm-set-content-title').val(row.title);
|
||||
CM.el.editDpModal.find('.cm-set-dptime-content-title').val(row.title);
|
||||
CM.el.editDpModal.find('.cm-set-content-display .cm-uploaded-img').attr('src', (row.mainImg.indexOf('://') > -1 ? '' : 'https://crossmap.christiandaily.co.kr') + row.mainImg).show();
|
||||
CM.el.editDpModal.modal('show')
|
||||
},
|
||||
'click .remove': function (e, value, row, index) {
|
||||
bootbox.confirm('삭제할까요?', function (ok) {
|
||||
if (ok) {
|
||||
$.ajax({
|
||||
url: '/adm/' + location.href.split('/')[4] + '/content_delete',
|
||||
method: 'DELETE',
|
||||
data: JSON.stringify({ contentId: row.idx }),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else {
|
||||
bootbox.alert('삭제되었습니다.')
|
||||
CM.el.searchBtn.trigger('click')
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
operateCommentEvents: {
|
||||
'click .edit': function (e, value, row, index) {
|
||||
|
||||
},
|
||||
'click .remove': function (e, value, row, index) {
|
||||
bootbox.confirm('삭제할까요?', function (ok) {
|
||||
if (ok) {
|
||||
$.ajax({
|
||||
url: '/adm/' + location.href.split('/')[4] + '/content_delete',
|
||||
method: 'DELETE',
|
||||
data: JSON.stringify({ contentId: row.commentId }),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else {
|
||||
bootbox.alert('삭제되었습니다.')
|
||||
CM.el.searchBtn.trigger('click')
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$.extend(CM.el, {
|
||||
categorySelect: $('.cm-submenu-select'),
|
||||
subChgBtn: $('.cm-submenuchg-btn').on('click', function (e) {
|
||||
if (CM.el.table.bootstrapTable('getSelections').length) CM.el.submenuChangeModal.modal('show'); else bootbox.alert('선택')
|
||||
}),
|
||||
subChgCatSelect: $('.cm-subchg-category-select'),
|
||||
subChgEditorSelect: $('.cm-subchg-editor-select'),
|
||||
categoryChangeBtn: $('.cm-submenuchange-save').on('click', function (e) {
|
||||
bootbox.confirm('이동할까요?', function (ok) {
|
||||
if (ok) {
|
||||
$.ajax({
|
||||
url: '/adm/' + location.href.split('/')[4] + '/content_category',
|
||||
method: 'PUT',
|
||||
data: JSON.stringify({
|
||||
contentId: $.map(CM.el.table.bootstrapTable('getSelections'), function (r) {
|
||||
return r.idx
|
||||
}), category: CM.el.subChgCatSelect.val(), editor: CM.el.subChgEditorSelect.val()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else {
|
||||
bootbox.alert(CM.el.table.bootstrapTable('getSelections').length + ' 개의 글이 이동하였습니다')
|
||||
CM.el.submenuChangeModal.modal('hide')
|
||||
CM.el.searchBtn.trigger('click')
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}),
|
||||
hiddenForm: $('.cm-hidden-form'),
|
||||
editorSelect: $('.cm-editor-select'),
|
||||
searchWord: $('.cm-search-word').on('keypress', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
CM.el.searchBtn.trigger('click')
|
||||
}
|
||||
}),
|
||||
searchBtn: $('.cm-search-btn').on('click', function () {
|
||||
CM.el.table.bootstrapTable('refresh')
|
||||
}),
|
||||
submenuChangeModal: $('.cm-submenuchange-modal').on('hide.bs.modal', function () {
|
||||
$(this).find('form')[0].reset();
|
||||
}),
|
||||
editDpModal: $('.cm-editdp-modal').on('hide.bs.modal', function () {
|
||||
$.map($(this).find('form'), function (el) { el.reset() })
|
||||
CM.el.tabConfigContentDptime.trigger('click')
|
||||
})
|
||||
});
|
||||
$(".cm-table").bootstrapTable({
|
||||
queryParams: function (params) {
|
||||
return $.extend(params, {
|
||||
term: CM.el.searchWord.val(),
|
||||
editor: CM.el.editorSelect.val(),
|
||||
category: CM.el.categorySelect.val()
|
||||
})
|
||||
}
|
||||
}).on('load-success.bs.table', function () {
|
||||
CM.el.table = $(this)
|
||||
$('.cm-title-link').on('click', function (e) {
|
||||
var row = CM.el.table.bootstrapTable('getData')[$(e.target).data('index')]
|
||||
var frm = CM.el.hiddenForm[0];
|
||||
frm.idx.value = row.idx;
|
||||
frm.mode.value = 'edit';
|
||||
frm.action = '/admin/life/life_reg/5';
|
||||
frm.submit();
|
||||
})
|
||||
});
|
||||
}
|
||||
if ($(".cm-category-table").length) {
|
||||
$.extend(CM.fn, {
|
||||
operateFormatter: function (value, row, index) {
|
||||
var operateBtns = [
|
||||
'<a class="edit" href="javascript:void(0)" title="Edit">',
|
||||
'<i class="glyphicon glyphicon-edit"></i>',
|
||||
'</a> ',
|
||||
'<a class="remove" href="javascript:void(0)" title="Remove">',
|
||||
'<i class="glyphicon glyphicon-remove"></i>',
|
||||
'</a>'
|
||||
];
|
||||
return operateBtns.join('');
|
||||
},
|
||||
operateEvents: {
|
||||
'click .edit': function (e, value, row, index) {
|
||||
CM.el.editModal.find('form')[0].id.value = row.categoryId;
|
||||
CM.el.editModal.find('.cm-submenu-categoryname').val(row.categoryName);
|
||||
CM.el.editModal.find('.cm-submenu-dporder').val(row.displayOrder);
|
||||
CM.el.editModal.modal('show');
|
||||
},
|
||||
'click .remove': function (e, value, row, index) {
|
||||
bootbox.confirm('삭제할까요?', function (ok) {
|
||||
if (ok) {
|
||||
$.ajax({
|
||||
url: '/adm/' + location.href.split('/')[4] + '/category_delete',
|
||||
method: 'DELETE',
|
||||
data: JSON.stringify({ id: row.categoryId }),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else {
|
||||
bootbox.alert('삭제되었습니다.')
|
||||
CM.el.searchBtn.trigger('click')
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$.extend(CM.el, {
|
||||
|
||||
searchWord: $('.cm-search-word').on('keypress', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
CM.el.searchBtn.trigger('click')
|
||||
}
|
||||
}),
|
||||
searchBtn: $('.cm-search-btn').on('click', function () {
|
||||
CM.el.table.bootstrapTable('refresh')
|
||||
}),
|
||||
editModal: $('.cm-submenu-modal').on('hide.bs.modal', function () {
|
||||
$(this).find('form')[0].id.value = ''; $(this).find('form')[0].reset();
|
||||
}),
|
||||
editSaveBtn: $('.cm-submenu-save').on('click', function () {
|
||||
var params = {
|
||||
id: CM.el.editModal.find('form')[0].id.value,
|
||||
name: CM.el.editModal.find('.cm-submenu-categoryname').val(),
|
||||
order: CM.el.editModal.find('.cm-submenu-dporder').val()
|
||||
}
|
||||
$.ajax({
|
||||
url: '/adm/' + location.href.split('/')[4] + '/category_save',
|
||||
method: 'PUT',
|
||||
data: JSON.stringify(params),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else {
|
||||
bootbox.alert((params.id ? '변경' : '추가') + ' 되었습니다.')
|
||||
CM.el.searchBtn.trigger('click')
|
||||
CM.el.editModal.modal('hide')
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
$(".cm-category-table").bootstrapTable({
|
||||
queryParams: function (params) {
|
||||
return $.extend(params, {
|
||||
term: CM.el.searchWord.val()
|
||||
})
|
||||
}
|
||||
}).on('load-success.bs.table', function () {
|
||||
CM.el.table = $(this)
|
||||
});
|
||||
}
|
||||
if ($('.cm-upload-file').length) {
|
||||
$('.cm-upload-file').on('change', function () {
|
||||
var frm = $(this).parents('form')
|
||||
frm.ajaxSubmit(function (res) {
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else {
|
||||
frm.find('.cm-uploaded-img').attr('src', res.data.url).show()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
if ($('.cm-set-content-display').length) {
|
||||
CM.fn.contentDisplayData = function () {
|
||||
return CM.el.tabpanelConfigContentDisplay.find('.cm-uploaded-img').data('update') == 'Y' ? {
|
||||
type: 'display',
|
||||
id: CM.el.tabpanelConfigContentDisplay.find('.cm-config-edit .cm-saved-config-dp-edit-btn').data('config-id'),
|
||||
postid: CM.el.tabpanelConfigContentDisplay.find('.cm-config-edit .cm-saved-config-dp-edit-btn').data('post-id'),
|
||||
name: CM.el.tabConfigContentDisplay.data('name'),
|
||||
page: CM.el.tabpanelConfigContentDisplay.find('form')[0].dp_part.value,
|
||||
title: CM.el.tabpanelConfigContentDisplay.find('.cm-config-edit .cm-set-content-title').val(),
|
||||
headline: CM.el.tabpanelConfigContentDisplay.find('.cm-config-edit .cm-set-content-title-head').val(),
|
||||
order: CM.el.tabpanelConfigContentDisplay.find('.cm-config-edit .cm-set-content-order').val(),
|
||||
thumbnail: CM.el.tabpanelConfigContentDisplay.find('.cm-uploaded-img').attr('src'),
|
||||
} : {
|
||||
type: 'display',
|
||||
postid: CM.el.tabpanelConfigContentDisplay.find('.cm-config-add .cm-saved-config-dp-edit-btn').data('post-id'),
|
||||
name: CM.el.tabConfigContentDisplay.data('name'),
|
||||
page: CM.el.tabpanelConfigContentDisplay.find('form')[0].dp_part.value,
|
||||
title: CM.el.tabpanelConfigContentDisplay.find('.cm-config-add .cm-set-content-title').val(),
|
||||
headline: CM.el.tabpanelConfigContentDisplay.find('.cm-config-add .cm-set-content-title-head').val(),
|
||||
order: CM.el.tabpanelConfigContentDisplay.find('.cm-config-add .cm-set-content-order').val(),
|
||||
thumbnail: CM.el.tabpanelConfigContentDisplay.find('.cm-uploaded-img').attr('src'),
|
||||
};
|
||||
}
|
||||
CM.el.saveConfigEditBtn = $('.cm-saved-config-dp-edit-btn').on('change', function () {
|
||||
if (this.value == 'edit') {
|
||||
var changed = this;
|
||||
$(this).parents('.cm-config-display').addClass('cm-config-edit');
|
||||
$(this).prev().show();
|
||||
CM.el.tabpanelConfigContentDisplay.find('.cm-uploaded-img').data('update', 'Y').attr('src', $(this).data('config-thumbnail')).show();
|
||||
CM.el.tabpanelConfigContentDisplay.find('.cm-config-add').hide();
|
||||
$.map($('.cm-saved-config-dp-edit-btn'), function (el) { if (el != changed) { el.selectedIndex = 0, $(el).prev().hide() } })
|
||||
} else if (this.value == 'delete') {
|
||||
$.ajax({
|
||||
url: '/adm/content/config',
|
||||
method: 'DELETE',
|
||||
data: JSON.stringify({ id: $(this).data('config-id') }),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
alert(res.message)
|
||||
} else {
|
||||
alert(res.message)
|
||||
CM.el.tabpanelConfigContentDisplay.find('form')[0].reset();
|
||||
CM.el.tabpanelConfigContentDisplay.find('.cm-config-add').show();
|
||||
CM.el.tabpanelConfigContentDisplay.find('.cm-uploaded-img').data('update', 'N')
|
||||
$('.cm-set-content-dp-part:checked').trigger('click')
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
CM.el.editDpModal.on('show.bs.modal', function () {
|
||||
$('.cm-config-display-copy').remove();
|
||||
});
|
||||
CM.el.tabConfigContentDptime = $('a[href=".cm-set-content-dptime"]');
|
||||
CM.el.tabConfigDptimeDatepicker = $('.cm-set-dptime').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' });
|
||||
CM.el.tabConfigContentDisplay = $('a[href=".cm-set-content-display"]').on('show.bs.tab', function () {
|
||||
$.ajax({
|
||||
url: '/adm/content/config',
|
||||
method: 'PUT',
|
||||
data: JSON.stringify({
|
||||
type: 'display',
|
||||
name: $(this).data('name'),
|
||||
page: CM.el.tabpanelConfigContentDisplay.find('form')[0].dp_part.value
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
$('.cm-config-display-copy').remove();
|
||||
if (res.code != 200) {
|
||||
bootbox.alert(res.message)
|
||||
} else if (res.data.length) {
|
||||
var dp = $('.cm-config-add');
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
var dpc = dp.clone(true);
|
||||
dpc.removeClass('cm-config-add')
|
||||
dpc.addClass('cm-config-display-copy')
|
||||
dpc.find('.cm-set-content-order').val(res.data[i].OrderNum);
|
||||
dpc.find('.cm-set-content-title-head').val(res.data[i].Headline);
|
||||
dpc.find('.cm-set-content-title').val(res.data[i].Title);
|
||||
dpc.find('.cm-saved-config-dp-edit-btn').data('post-id', res.data[i].PostId).data('config-id', res.data[i].Id).data('config-thumbnail', res.data[i].Thumbnail).show();
|
||||
dp.before(dpc);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
$('.cm-set-content-dp-part').on('click', function () {
|
||||
CM.el.tabConfigContentDisplay.trigger('show.bs.tab')
|
||||
CM.el.tabpanelConfigContentDisplay.find('.cm-config-add').show();
|
||||
});
|
||||
CM.el.tabpanelConfigDptime = $('.cm-set-content-dptime');
|
||||
CM.el.tabpanelConfigDptime.find('.btn-primary').on('click', function () {
|
||||
if (CM.el.tabConfigDptimeDatepicker.val()) {
|
||||
$.ajax({
|
||||
url: '/adm/content/config',
|
||||
method: 'POST',
|
||||
data: JSON.stringify({
|
||||
dptime: CM.el.tabConfigDptimeDatepicker.val(),
|
||||
postid: CM.el.tabpanelConfigContentDisplay.find('.cm-config-add .cm-saved-config-dp-edit-btn').data('post-id'),
|
||||
type: 'dptime'
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
alert(res.message)
|
||||
} else {
|
||||
alert(res.message)
|
||||
CM.el.searchBtn.trigger('click');
|
||||
CM.el.editDpModal.modal('hide')
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('예약시간 설정')
|
||||
}
|
||||
});
|
||||
CM.el.tabpanelConfigContentDisplay = $('.cm-set-content-display')
|
||||
CM.el.tabpanelConfigContentDisplay.find('.btn-primary').on('click', function () {
|
||||
if (CM.fn.contentDisplayData().order && CM.fn.contentDisplayData().title) {
|
||||
$.ajax({
|
||||
url: '/adm/content/config',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(CM.fn.contentDisplayData()),
|
||||
dataType: 'json'
|
||||
}).done(function (res) {
|
||||
if (res.code != 200) {
|
||||
alert(res.message)
|
||||
} else {
|
||||
alert(res.message)
|
||||
var checked = $('.cm-set-content-dp-part:checked').trigger('click')
|
||||
CM.el.tabpanelConfigContentDisplay.find('form')[0].reset();
|
||||
checked[0].checked = true;
|
||||
CM.el.tabpanelConfigContentDisplay.find('.cm-uploaded-img').data('update', 'N').hide();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('정보입력')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if ($("#flot-chart-pie").length) {
|
||||
var data = [
|
||||
{ label: "Series 0", data: 1 },
|
||||
{ label: "Series 1", data: 3 },
|
||||
{ label: "Series 2", data: 9 },
|
||||
{ label: "Series 3", data: 20 }
|
||||
];
|
||||
|
||||
var plotObj = $.plot($("#flot-chart-pie"), data, {
|
||||
series: {
|
||||
pie: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
hoverable: true
|
||||
},
|
||||
tooltip: true,
|
||||
tooltipOpts: {
|
||||
content: "%p.0%, %s", // show percentages, rounding to 2 decimal places
|
||||
shifts: {
|
||||
x: 20,
|
||||
y: 0
|
||||
},
|
||||
defaultTheme: false
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if ($("#flot-chart-line").length) {
|
||||
var offset = 0;
|
||||
plot();
|
||||
function plot() {
|
||||
var sin = [], cos = [];
|
||||
for (var i = 0; i < 12; i += 0.2) {
|
||||
sin.push([i, Math.sin(i + offset)]);
|
||||
cos.push([i, Math.cos(i + offset)]);
|
||||
}
|
||||
|
||||
var options = {
|
||||
series: {
|
||||
lines: { show: true },
|
||||
points: { show: true }
|
||||
},
|
||||
grid: {
|
||||
hoverable: true //IMPORTANT! this is needed for tooltip to work
|
||||
},
|
||||
yaxis: { min: -1.2, max: 1.2 },
|
||||
tooltip: true,
|
||||
tooltipOpts: {
|
||||
content: "'%s' of %x.1 is %y.4",
|
||||
shifts: {
|
||||
x: -60,
|
||||
y: 25
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var plotObj = $.plot($("#flot-chart-line"),
|
||||
[{ data: sin, label: "sin(x)" }, { data: cos, label: "cos(x)" }],
|
||||
options);
|
||||
}
|
||||
}
|
||||
|
||||
if($('.cm-register-btn').length) {
|
||||
$('.cm-register-btn').on('click', function(){
|
||||
$('.cm-register-modal').modal('show')
|
||||
})
|
||||
}
|
||||
})
|
||||
983
public/assets/adm/js/common.js
Executable file
@@ -0,0 +1,983 @@
|
||||
function changemenu(menukey) {
|
||||
if ($('#menu_collapse' + menukey).parent().hasClass('active')) {
|
||||
close_admin_menu();
|
||||
} else {
|
||||
if (menukey.indexOf('set') == 0) menukey = 'pageset';
|
||||
open_admin_menu(menukey);
|
||||
}
|
||||
}
|
||||
|
||||
function close_admin_menu() {
|
||||
$('.menu_collapse').collapse('hide');
|
||||
$('.nav-first-level').removeClass('active');
|
||||
$('.menu-arrow-icon').removeClass('fa-angle-down').addClass('fa-angle-left');
|
||||
}
|
||||
|
||||
function open_admin_menu(menukey) {
|
||||
close_admin_menu();
|
||||
$('.nav-first-level.nav_menuname_' + menukey).addClass('active');
|
||||
$('.menu-arrow-icon.' + menukey).removeClass('fa-angle-left').addClass('fa-angle-down');
|
||||
$('#menu_collapse' + menukey).collapse('toggle');
|
||||
}
|
||||
|
||||
if (typeof(COMMON_JS) === 'undefined') {
|
||||
|
||||
var COMMON_JS = true;
|
||||
|
||||
$(document).on('click', '.btn-history-back', function() {
|
||||
history.back();
|
||||
});
|
||||
|
||||
$(document).on('click', '.alertclose', function() {
|
||||
$(this).closest('.alert').hide();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
window.setTimeout(function() {
|
||||
$('.alert-auto-close').hide();
|
||||
}, 2500);
|
||||
});
|
||||
|
||||
$(document).on('click', '#chkall', function() {
|
||||
var chk = document.getElementsByName('chk[]');
|
||||
for (i = 0; i < chk.length; i++)
|
||||
chk[i].checked = this.checked;
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.datepicker').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: 'kr',
|
||||
autoclose: true,
|
||||
todayHighlight: true
|
||||
});
|
||||
});
|
||||
|
||||
function trim(s) {
|
||||
var t = '';
|
||||
var from_pos = to_pos = 0;
|
||||
|
||||
for (i = 0; i < s.length; i++) {
|
||||
if (s.charAt(i) === ' ') {
|
||||
continue;
|
||||
} else {
|
||||
from_pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = s.length; i >= 0; i--) {
|
||||
if (s.charAt(i - 1) === ' ') {
|
||||
continue;
|
||||
} else {
|
||||
to_pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
t = s.substring(from_pos, to_pos);
|
||||
return t;
|
||||
}
|
||||
|
||||
function select_submit(f, acttype, actpage) {
|
||||
var str = '';
|
||||
|
||||
if ($("input[name='chk[]']:checked").length < 1) {
|
||||
alert('자료를 하나 이상 선택하세요.');
|
||||
return;
|
||||
} else if (acttype == 'reserve' && $("input[name='chk[]']:checked").length > 1) {
|
||||
alert('자료를 하나만 선택하세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (acttype === 'delete' && !confirm('선택한 자료를 정말 삭제 하시겠습니까?')) return;
|
||||
if (acttype === 'recover' && !confirm('선택한 자료를 정말 복원 하시겠습니까?')) return;
|
||||
if (acttype === 'trash' && !confirm('선택한 자료를 정말 휴지통으로 이동하시겠습니까?')) return;
|
||||
|
||||
$("input[name='chk[]']:checked").each(function() {
|
||||
str += $(this).val() + '-'
|
||||
})
|
||||
|
||||
f.action = actpage;
|
||||
f.acttype.value = acttype
|
||||
f.list.value = str.substring(0, str.length - 1)
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function deletecheck() {
|
||||
if (confirm('정말 삭제하시겠습니까? 삭제하신 후에는 복구가 불가능합니다')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', '.btn-list-update', function() {
|
||||
select_submit(document.flist, 'update', $(this).attr('data-list-update-url'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-list-delete', function() {
|
||||
select_submit(document.flist, 'delete', $(this).attr('data-list-delete-url'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-list-trash', function() {
|
||||
select_submit(document.flist, 'trash', $(this).attr('data-list-trash-url'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-list-recover', function() {
|
||||
select_submit(document.flist, 'recover', $(this).attr('data-list-recover-url'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-list-reserve', function() {
|
||||
select_submit(document.flist, 'reserve', $(this).attr('data-list-reserve-url'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-one-delete', function() {
|
||||
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
document.location.href = $(this).attr('data-one-delete-url');
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-list-truncate', function() {
|
||||
if (confirm("휴지통 전체를 비웁니다.\n\n비운 자료는 절대 복구가 불가능합니다. \n\n그래도 진행하시겠습니까?")) {
|
||||
document.location.href = $(this).attr('data-list-truncate-url');
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-one-recover', function() {
|
||||
if (confirm('선택한 자료를 정말 복원하시겠습니까?')) {
|
||||
document.location.href = $(this).attr('data-one-recover-url');
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-one-trash', function() {
|
||||
if (confirm('선택한 자료를 정말 휴지통으로 이동하시겠습니까?')) {
|
||||
document.location.href = $(this).attr('data-one-trash-url');
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.list-chkbox, #chkall', function() {
|
||||
var $checkedCheckboxes = $('.list-chkbox:checked');
|
||||
var $checkboxes = $('.list-chkbox');
|
||||
if ($checkedCheckboxes.length) {
|
||||
$('.btn-list-update , .btn-list-selected').removeClass('disabled');
|
||||
} else {
|
||||
$('.btn-list-update , .btn-list-selected').addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.view_full_image', function() {
|
||||
window.open(cb_url + '/helptool/viewimage?imgurl=' + encodeURIComponent($(this).attr('data-origin-image-url')),
|
||||
'large_image', 'location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no');
|
||||
return false;
|
||||
});
|
||||
|
||||
function post_like(post_id, like_type, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (post_id == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
href = cb_url + '/postact/post_like/' + post_id + '/' + like_type;
|
||||
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
$('.' + classname).text(number_format(String(data.count)));
|
||||
$('#btn-' + classname).effect('highlight', { color: '#f37f60' }, 300);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function comment_like(cmt_id, like_type, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (cmt_id == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
href = cb_url + '/postact/comment_like/' + cmt_id + '/' + like_type;
|
||||
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
$('.' + classname).text(number_format(String(data.count)));
|
||||
$('#btn-' + classname).effect('highlight', { color: '#f37f60' }, 500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function post_scrap(post_id, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (post_id == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
href = cb_url + '/postact/post_scrap/' + post_id;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
$('.' + classname).text('+' + number_format(String(data.count)));
|
||||
$('#btn-scrap').effect('highlight', { color: '#af75b2' }, 3000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function post_blame(post_id, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (post_id == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!confirm("이 글을 신고하시겠습니까?\n\n한번 신고하신 후에는 취소가 불가능합니다")) { return false; }
|
||||
|
||||
href = cb_url + '/postact/post_blame/' + post_id;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
$('.' + classname).text('+' + number_format(String(data.count)));
|
||||
$('#btn-blame').effect('highlight', { color: '#af75b2' }, 3000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function comment_blame(cmt_id, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (cmt_id == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!confirm("이 댓글을 신고하시겠습니까?\n\n한번 신고하신 후에는 취소가 불가능합니다")) { return false; }
|
||||
|
||||
href = cb_url + '/postact/comment_blame/' + cmt_id;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
$('.' + classname).text('+' + number_format(String(data.count)));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function post_action(action_type, action_id, flag, msg) {
|
||||
var href;
|
||||
if (action_type == '') {
|
||||
return false;
|
||||
}
|
||||
if (action_id == '') {
|
||||
return false;
|
||||
}
|
||||
if (msg) {
|
||||
if (!confirm(msg)) { return false; }
|
||||
}
|
||||
href = cb_url + '/postact/' + action_type + '/' + action_id + '/' + flag;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'post',
|
||||
data: {
|
||||
csrf_test_name: cb_csrf_hash
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
alert(data.success);
|
||||
if (data.url) {
|
||||
document.location.href = data.url;
|
||||
} else {
|
||||
document.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function post_multi_action(action_type, flag, msg) {
|
||||
var href;
|
||||
if (action_type == '') {
|
||||
return false;
|
||||
}
|
||||
if (msg) {
|
||||
if (!confirm(msg)) { return false; }
|
||||
}
|
||||
href = cb_url + '/postact/' + action_type + '/' + flag;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'post',
|
||||
data: $('#fboardlist').serialize() + '&csrf_test_name=' + cb_csrf_hash,
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
alert(data.success);
|
||||
if (data.url) {
|
||||
document.location.href = data.url;
|
||||
} else {
|
||||
document.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function makeSerializable(elem) {
|
||||
return $(elem).prop('elements', $('*', elem).andSelf().get());
|
||||
}
|
||||
|
||||
function comment_multi_action(id, post_id, action_type, flag, msg) {
|
||||
var href;
|
||||
if (action_type == '') {
|
||||
return false;
|
||||
}
|
||||
if (msg) {
|
||||
if (!confirm(msg)) { return false; }
|
||||
}
|
||||
|
||||
var sdata = makeSerializable('#viewcomment').serialize();
|
||||
|
||||
href = cb_url + '/postact/' + action_type + '/' + flag;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'post',
|
||||
data: sdata + '&csrf_test_name=' + cb_csrf_hash,
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
alert(data.success);
|
||||
if (data.url) {
|
||||
document.location.href = data.url;
|
||||
} else {
|
||||
view_comment(id, post_id, '1');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function add_follow(userid, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (userid == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
href = cb_url + '/profile/add_follow/' + userid;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
alert(data.success);
|
||||
if (classname)
|
||||
$('.' + classname).text(number_format(String(data.target_count)));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delete_follow(userid, classname) {
|
||||
|
||||
var href;
|
||||
|
||||
if (userid == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
href = cb_url + '/profile/delete_follow/' + userid;
|
||||
var $that = $(this);
|
||||
$.ajax({
|
||||
url: href,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
alert(data.success);
|
||||
if (classname)
|
||||
$('.' + classname).text(number_format(String(data.target_count)));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('mouseenter', '.admin-manage-post', function() {
|
||||
$manage_button = $(this);
|
||||
$('.admin-manage-post-layer').css('top', $manage_button.position().top);
|
||||
$('.admin-manage-post-layer').css('left', $manage_button.position().left - ($('.admin-manage-post-layer').width() - $manage_button.width()));
|
||||
$('.admin-manage-post-layer').css('display', 'block');
|
||||
$(document).on('mouseenter', '.admin-manage-post-layer .item', function() {
|
||||
$(this).css('background-color', '#DEDEDE');
|
||||
});
|
||||
$(document).on('mouseleave', '.admin-manage-post-layer .item', function() {
|
||||
$(this).css('background-color', '#FFFFFF');
|
||||
});
|
||||
});
|
||||
$(document).on('mouseenter', '.admin-manage-list', function() {
|
||||
$manage_button_list = $(this);
|
||||
$('.admin-manage-layer-list').css('top', $manage_button_list.position().top);
|
||||
$('.admin-manage-layer-list').css('left', $manage_button_list.position().left - ($('.admin-manage-layer-list').width() - $manage_button_list.width()));
|
||||
$('.admin-manage-layer-list').css('display', 'block');
|
||||
$(document).on('mouseenter', '.admin-manage-layer-list .item', function() {
|
||||
$(this).css('background-color', '#DEDEDE');
|
||||
});
|
||||
$(document).on('mouseleave', '.admin-manage-layer-list .item', function() {
|
||||
$(this).css('background-color', '#FFFFFF');
|
||||
});
|
||||
});
|
||||
$(document).on('mouseenter', '.admin-manage-comment', function() {
|
||||
$manage_button_comment = $(this);
|
||||
$('.admin-manage-layer-comment').css('top', $manage_button_comment.position().top);
|
||||
$('.admin-manage-layer-comment').css('left', $manage_button_comment.position().left - ($('.admin-manage-layer-comment').width() - $manage_button_comment.width()));
|
||||
$('.admin-manage-layer-comment').css('display', 'block');
|
||||
$(document).on('mouseenter', '.admin-manage-layer-comment .item', function() {
|
||||
$(this).css('background-color', '#DEDEDE');
|
||||
});
|
||||
$(document).on('mouseleave', '.admin-manage-layer-comment .item', function() {
|
||||
$(this).css('background-color', '#FFFFFF');
|
||||
});
|
||||
});
|
||||
$(document).on('mouseleave', '.btn-admin-manage-layer', function() {
|
||||
$(this).css('display', 'none');
|
||||
});
|
||||
|
||||
// 쿠키 입력
|
||||
function set_cookie(name, value, expirehours, domain) {
|
||||
var today = new Date();
|
||||
today.setTime(today.getTime() + (60 * 60 * 1000 * expirehours));
|
||||
document.cookie = cookie_prefix + name + '=' + escape(value) + '; path=/; expires=' + today.toGMTString() + ';';
|
||||
if (domain) {
|
||||
document.cookie += 'domain=' + domain + ';';
|
||||
}
|
||||
}
|
||||
|
||||
// 쿠키 얻음
|
||||
function get_cookie(cookie_name) {
|
||||
var find_sw = false;
|
||||
var start, end;
|
||||
var i = 0;
|
||||
|
||||
name = cookie_prefix + cookie_name
|
||||
|
||||
for (i = 0; i <= document.cookie.length; i++) {
|
||||
start = i;
|
||||
end = start + name.length;
|
||||
|
||||
if (document.cookie.substring(start, end) == name) {
|
||||
find_sw = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (find_sw === true) {
|
||||
start = end + 1;
|
||||
end = document.cookie.indexOf(';', start);
|
||||
|
||||
if (end < start) {
|
||||
end = document.cookie.length;
|
||||
}
|
||||
|
||||
return document.cookie.substring(start, end);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
// 쿠키 지움
|
||||
function delete_cookie(name) {
|
||||
var today = new Date();
|
||||
|
||||
today.setTime(today.getTime() - 1);
|
||||
var value = get_cookie(name);
|
||||
if (value) {
|
||||
document.cookie = cookie_prefix + name + '=' + value + '; path=/; expires=' + today.toGMTString();
|
||||
}
|
||||
}
|
||||
|
||||
// 숫자에 , 를 출력
|
||||
function number_format(data) {
|
||||
|
||||
var tmp = '';
|
||||
var number = '';
|
||||
var cutlen = 3;
|
||||
var comma = ',';
|
||||
var i;
|
||||
|
||||
var sign = data.match(/^[\+\-]/);
|
||||
if (sign) {
|
||||
data = data.replace(/^[\+\-]/, '');
|
||||
}
|
||||
|
||||
len = data.length;
|
||||
mod = (len % cutlen);
|
||||
k = cutlen - mod;
|
||||
for (i = 0; i < data.length; i++) {
|
||||
number = number + data.charAt(i);
|
||||
|
||||
if (i < data.length - 1) {
|
||||
k++;
|
||||
if ((k % cutlen) === 0) {
|
||||
number = number + comma;
|
||||
k = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sign !== null) {
|
||||
number = sign + number;
|
||||
}
|
||||
|
||||
return number;
|
||||
}
|
||||
|
||||
// 글자수 검사
|
||||
function check_byte(content, target) {
|
||||
var cont = $('#' + content).val();
|
||||
|
||||
// 숫자를 출력
|
||||
$('#' + target).text(cont.length);
|
||||
|
||||
return cont.length;
|
||||
}
|
||||
|
||||
function resize_textarea(id, mode) {
|
||||
if (mode === 'down') {
|
||||
$('#' + id).height($('#' + id).height() + 50);
|
||||
} else if (mode === 'up') {
|
||||
$('#' + id).height($('#' + id).height() - 50);
|
||||
} else {
|
||||
$('#' + id).height(mode);
|
||||
}
|
||||
}
|
||||
|
||||
function note_write(userid) {
|
||||
window.open(cb_url + '/note/write/' + userid, 'win_note', 'left=100,top=100,width=730,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function note_list(note_id) {
|
||||
if (note_id) {
|
||||
note_url = cb_url + '/note/view/recv/' + note_id;
|
||||
} else {
|
||||
note_url = cb_url + '/note/lists/recv';
|
||||
}
|
||||
window.open(note_url, 'win_note', 'left=100,top=100,width=730,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function open_profile(userid) {
|
||||
window.open(cb_url + '/profile/' + userid, 'win_profile', 'left=100,top=100,width=720,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function email_write(userid) {
|
||||
window.open(cb_url + '/formmail/write/' + userid, 'win_note', 'left=100,top=100,width=720,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function post_print(post_id) {
|
||||
window.open(cb_url + '/print/' + post_id, 'win_print', 'left=100,top=100,width=900,height=600,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function post_history(post_id) {
|
||||
window.open(cb_url + '/helptool/post_history/' + post_id, 'win_post_history', 'left=100,top=100,width=620,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function download_log(post_id) {
|
||||
window.open(cb_url + '/helptool/download_log/' + post_id, 'win_download_log', 'left=100,top=100,width=620,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function link_click_log(post_id) {
|
||||
window.open(cb_url + '/helptool/link_click_log/' + post_id, 'win_link_click_log', 'left=100,top=100,width=620,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function post_copy(type, post_id) {
|
||||
window.open(cb_url + '/helptool/post_copy/' + type + '/' + post_id, 'win_post_copy', 'left=100,top=100,width=620,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function post_change_category(post_id) {
|
||||
window.open(cb_url + '/helptool/post_change_category/' + post_id, 'win_post_change_category', 'left=100,top=100,width=620,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function post_multi_copy(ptype) {
|
||||
var f = document.fboardlist;
|
||||
var sub_win = window.open('', 'move', 'left=100, top=100, width=620, height=500, scrollbars=1');
|
||||
|
||||
f.target = 'move';
|
||||
f.method = 'post';
|
||||
f.action = cb_url + '/helptool/post_copy/' + ptype;
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function post_multi_change_category() {
|
||||
var f = document.fboardlist;
|
||||
var sub_win = window.open('', 'change_category', 'left=100, top=100, width=620, height=500, scrollbars=1');
|
||||
|
||||
f.target = 'change_category';
|
||||
f.method = 'post';
|
||||
f.action = cb_url + '/helptool/post_change_category';
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function open_google_map() {
|
||||
window.open(cb_url + '/helptool/googlemap_search', 'win_map', 'left=100,top=100,width=720,height=500,scrollbars=1');
|
||||
return false;
|
||||
}
|
||||
|
||||
function all_boardlist_checked(flag) {
|
||||
var f = document.fboardlist;
|
||||
for (var i = 0; i < f.length; i++) {
|
||||
if (f.elements[i].name === 'chk_post_id[]') {
|
||||
f.elements[i].checked = flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function all_commentlist_checked(flag) {
|
||||
checkboxes = document.getElementsByName('chk_comment_id[]');
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
checkboxes[i].checked = flag;
|
||||
}
|
||||
}
|
||||
|
||||
function auto_tempsave(brd_key) {
|
||||
var post_title = $('#post_title').val();
|
||||
if (typeof(oEditors) !== 'undefined') {
|
||||
oEditors.getById['post_content'].exec('UPDATE_CONTENTS_FIELD', []);
|
||||
}
|
||||
var post_content = $('#post_content').val();
|
||||
|
||||
$.ajax({
|
||||
url: cb_url + '/postact/tempsave',
|
||||
data: {
|
||||
brd_key: brd_key,
|
||||
post_title: encodeURIComponent(post_title),
|
||||
post_content: encodeURIComponent(post_content),
|
||||
csrf_test_name: cb_csrf_hash
|
||||
},
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function get_tempsave(brd_key) {
|
||||
if (confirm("임시 저장한 내용이 있습니다.\n\n불러오시겠습니까?")) {
|
||||
|
||||
$.ajax({
|
||||
url: cb_url + '/postact/get_tempsave',
|
||||
data: {
|
||||
brd_key: brd_key,
|
||||
csrf_test_name: cb_csrf_hash
|
||||
},
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
$('#post_title').val(data.tmp_title);
|
||||
$('#post_content').val(data.tmp_content);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function ajax_notification_load() {
|
||||
$.ajax({
|
||||
url: cb_url + '/notification/ajax_list',
|
||||
type: 'post',
|
||||
data: {
|
||||
csrf_test_name: cb_csrf_hash
|
||||
},
|
||||
success: function(data) {
|
||||
$('.notifications-menu').html(data);
|
||||
$('.notification_num').html($('#notification_count').text());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '.notifications', function() {
|
||||
var display = $('.notifications-menu').css('display');
|
||||
if (display === 'none') {
|
||||
$('.notifications-menu').show();
|
||||
ajax_notification_load();
|
||||
} else {
|
||||
$('.notifications-menu').hide();
|
||||
}
|
||||
});
|
||||
$(document).on('click', '.notification_read.note', function() {
|
||||
$.ajax({
|
||||
url: cb_url + '/notification/readajax/' + $(this).attr('data-not-id'),
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).on('click', '.noti-all-read', function() {
|
||||
$.ajax({
|
||||
url: cb_url + '/notification/readallajax/',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
} else if (data.success) {
|
||||
//alert(data.success);
|
||||
ajax_notification_load();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.url-qrcode', function() {
|
||||
var toggled = $(this).attr('data-toggled');
|
||||
if (toggled == 'on') {
|
||||
$("#qrcode-content").hide('fast');
|
||||
$('.url-qrcode').attr('data-toggled', 'off');
|
||||
} else {
|
||||
$("body").append("<div id='qrcode-content'></div>");
|
||||
var url = $(this).attr("data-qrcode-url");
|
||||
var x = $(this).offset().top;
|
||||
var y = $(this).offset().left;
|
||||
|
||||
$("#qrcode-content").hide();
|
||||
$("#qrcode-content").css("top", x + 20).css("left", y);
|
||||
$("#qrcode-content").html("<div class='qrcode_code'><img src='https://chart.googleapis.com/chart?cht=qr&chld=H|2&chs=100&chl=" + url + "'></div><div class='qrcode_info'>모바일로 QR코드를 스캔하면 해당 링크에 바로 접속할 수 있습니다.</div>").show("fast");
|
||||
$('.url-qrcode').attr('data-toggled', 'off');
|
||||
$(this).attr('data-toggled', 'on');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 우편번호 창
|
||||
**/
|
||||
var win_zip = function(frm_name, frm_zipcode, frm_address1, frm_address2, frm_address3, frm_address4) {
|
||||
if (typeof daum === 'undefined') {
|
||||
alert('다음 juso.js 파일이 로드되지 않았습니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
var zip_case = 1; //0이면 레이어, 1이면 페이지에 끼워 넣기, 2이면 새창
|
||||
|
||||
var complete_fn = function(data) {
|
||||
// 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
|
||||
|
||||
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
|
||||
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
|
||||
var fullAddr = ''; // 최종 주소 변수
|
||||
var extraAddr = ''; // 조합형 주소 변수
|
||||
|
||||
// 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
|
||||
if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
|
||||
fullAddr = data.roadAddress;
|
||||
|
||||
} else { // 사용자가 지번 주소를 선택했을 경우(J)
|
||||
fullAddr = data.jibunAddress;
|
||||
}
|
||||
|
||||
// 사용자가 선택한 주소가 도로명 타입일때 조합한다.
|
||||
if (data.userSelectedType === 'R') {
|
||||
//법정동명이 있을 경우 추가한다.
|
||||
if (data.bname !== '') {
|
||||
extraAddr += data.bname;
|
||||
}
|
||||
// 건물명이 있을 경우 추가한다.
|
||||
if (data.buildingName !== '') {
|
||||
extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
|
||||
}
|
||||
// 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다.
|
||||
extraAddr = (extraAddr !== '' ? ' (' + extraAddr + ')' : '');
|
||||
}
|
||||
|
||||
// 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다.
|
||||
var of = document[frm_name];
|
||||
|
||||
of[frm_zipcode].value = data.zonecode;
|
||||
|
||||
of[frm_address1].value = fullAddr;
|
||||
of[frm_address3].value = extraAddr;
|
||||
|
||||
if (of[frm_address4] !== undefined) {
|
||||
of[frm_address4].value = data.userSelectedType;
|
||||
}
|
||||
|
||||
of[frm_address2].focus();
|
||||
};
|
||||
|
||||
switch (zip_case) {
|
||||
case 1: //iframe을 이용하여 페이지에 끼워 넣기
|
||||
var daum_pape_id = 'daum_juso_page' + frm_zipcode,
|
||||
element_wrap = document.getElementById(daum_pape_id),
|
||||
currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
|
||||
if (element_wrap === null) {
|
||||
element_wrap = document.createElement('div');
|
||||
element_wrap.setAttribute('id', daum_pape_id);
|
||||
element_wrap.style.cssText = 'display:none;border:1px solid;left:0;width:100%;height:300px;margin:5px 0;position:relative;-webkit-overflow-scrolling:touch;';
|
||||
element_wrap.innerHTML = '<img src="//i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-21px;z-index:1" class="close_daum_juso" alt="접기 버튼">';
|
||||
jQuery('form[name="' + frm_name + '"]').find('input[name="' + frm_address1 + '"]').before(element_wrap);
|
||||
jQuery('#' + daum_pape_id).off('click', '.close_daum_juso').on('click', '.close_daum_juso', function(e) {
|
||||
e.preventDefault();
|
||||
jQuery(this).parent().hide();
|
||||
});
|
||||
}
|
||||
|
||||
new daum.Postcode({
|
||||
oncomplete: function(data) {
|
||||
complete_fn(data);
|
||||
// iframe을 넣은 element를 안보이게 한다.
|
||||
element_wrap.style.display = 'none';
|
||||
// 우편번호 찾기 화면이 보이기 이전으로 scroll 위치를 되돌린다.
|
||||
document.body.scrollTop = currentScroll;
|
||||
},
|
||||
// 우편번호 찾기 화면 크기가 조정되었을때 실행할 코드를 작성하는 부분.
|
||||
// iframe을 넣은 element의 높이값을 조정한다.
|
||||
onresize: function(size) {
|
||||
element_wrap.style.height = size.height + 'px';
|
||||
},
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}).embed(element_wrap);
|
||||
|
||||
// iframe을 넣은 element를 보이게 한다.
|
||||
element_wrap.style.display = 'block';
|
||||
break;
|
||||
case 2: //새창으로 띄우기
|
||||
new daum.Postcode({
|
||||
oncomplete: function(data) {
|
||||
complete_fn(data);
|
||||
}
|
||||
}).open();
|
||||
break;
|
||||
default: //iframe을 이용하여 레이어 띄우기
|
||||
var rayer_id = 'daum_juso_rayer' + frm_zipcode,
|
||||
element_layer = document.getElementById(rayer_id);
|
||||
if (element_layer === null) {
|
||||
element_layer = document.createElement('div');
|
||||
element_layer.setAttribute('id', rayer_id);
|
||||
element_layer.style.cssText = 'display:none;border:5px solid;position:fixed;width:300px;height:460px;left:50%;margin-left:-155px;top:50%;margin-top:-235px;overflow:hidden;-webkit-overflow-scrolling:touch;z-index:10000';
|
||||
element_layer.innerHTML = '<img src="//i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnCloseLayer" style="cursor:pointer;position:absolute;right:-3px;top:-3px;z-index:1" class="close_daum_juso" alt="닫기 버튼">';
|
||||
document.body.appendChild(element_layer);
|
||||
jQuery('#' + rayer_id).off('click', '.close_daum_juso').on('click', '.close_daum_juso', function(e) {
|
||||
e.preventDefault();
|
||||
jQuery(this).parent().hide();
|
||||
});
|
||||
}
|
||||
|
||||
new daum.Postcode({
|
||||
oncomplete: function(data) {
|
||||
complete_fn(data);
|
||||
// iframe을 넣은 element를 안보이게 한다.
|
||||
element_layer.style.display = 'none';
|
||||
},
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}).embed(element_layer);
|
||||
|
||||
// iframe을 넣은 element를 보이게 한다.
|
||||
element_layer.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
104
public/assets/adm/js/date.js
Executable file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* Version: 1.0 Alpha-1
|
||||
* Build Date: 13-Nov-2007
|
||||
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
||||
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
||||
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
||||
*/
|
||||
Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
||||
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
||||
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
||||
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
||||
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
||||
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
||||
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
||||
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
||||
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
||||
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
||||
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
||||
if(x.year||x.years){this.addYears(x.year||x.years);}
|
||||
if(x.day||x.days){this.addDays(x.day||x.days);}
|
||||
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
||||
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
||||
if(!x.second&&x.second!==0){x.second=-1;}
|
||||
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
||||
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
||||
if(!x.day&&x.day!==0){x.day=-1;}
|
||||
if(!x.month&&x.month!==0){x.month=-1;}
|
||||
if(!x.year&&x.year!==0){x.year=-1;}
|
||||
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
||||
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
||||
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
||||
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
||||
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
||||
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
||||
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
||||
if(x.timezone){this.setTimezone(x.timezone);}
|
||||
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
||||
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
||||
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
||||
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
||||
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
||||
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
||||
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
||||
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
||||
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
||||
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
||||
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
||||
break;}
|
||||
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
||||
rx.push(r[0]);s=r[1];}
|
||||
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
||||
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
||||
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
||||
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
||||
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
||||
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
||||
if(r){return r;}}
|
||||
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
||||
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
||||
rx.push(r[0]);s=r[1];}
|
||||
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
||||
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
||||
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
||||
s=q[1];}
|
||||
if(!r){throw new $P.Exception(s);}
|
||||
if(q){throw new $P.Exception(q[1]);}
|
||||
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
||||
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
||||
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
||||
if(!last&&q[1].length===0){last=true;}
|
||||
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
||||
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
||||
if(rx[1].length<best[1].length){best=rx;}
|
||||
if(best[1].length===0){break;}}
|
||||
if(best[0].length===0){return best;}
|
||||
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
||||
best[1]=q[1];}
|
||||
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
||||
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
||||
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
||||
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
||||
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
||||
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
||||
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
||||
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
||||
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
||||
if(this.now){return new Date();}
|
||||
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
||||
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
||||
if(!this.unit){this.unit="day";}
|
||||
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
||||
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
||||
this[this.unit+"s"]=this.value*orient;}
|
||||
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
||||
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
||||
if(this.month&&!this.day){this.day=1;}
|
||||
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
||||
fn=_C[keys]=_.any.apply(null,px);}
|
||||
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
||||
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
||||
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
||||
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
||||
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
||||
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
||||
418
public/assets/adm/js/datepicker/jquery.datetimepicker.css
Executable file
@@ -0,0 +1,418 @@
|
||||
.xdsoft_datetimepicker{
|
||||
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
|
||||
background: #FFFFFF;
|
||||
border-bottom: 1px solid #BBBBBB;
|
||||
border-left: 1px solid #CCCCCC;
|
||||
border-right: 1px solid #CCCCCC;
|
||||
border-top: 1px solid #CCCCCC;
|
||||
color: #333333;
|
||||
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
|
||||
padding: 8px;
|
||||
padding-left: 0;
|
||||
padding-top: 2px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker iframe {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 75px;
|
||||
height: 210px;
|
||||
background: transparent;
|
||||
border:none;
|
||||
}
|
||||
/*For IE8 or lower*/
|
||||
.xdsoft_datetimepicker button {
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
.xdsoft_noselect{
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.xdsoft_noselect::selection { background: transparent; }
|
||||
.xdsoft_noselect::-moz-selection { background: transparent; }
|
||||
.xdsoft_datetimepicker.xdsoft_inline{
|
||||
display: inline-block;
|
||||
position: static;
|
||||
box-shadow: none;
|
||||
}
|
||||
.xdsoft_datetimepicker *{
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{
|
||||
display:none;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active{
|
||||
display:block;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker{
|
||||
width: 224px;
|
||||
float:left;
|
||||
margin-left:8px;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{
|
||||
width: 256px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker{
|
||||
width: 58px;
|
||||
float:left;
|
||||
text-align:center;
|
||||
margin-left:8px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{
|
||||
margin-top:8px;
|
||||
margin-bottom:3px
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_mounthpicker{
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label i,
|
||||
.xdsoft_datetimepicker .xdsoft_prev,
|
||||
.xdsoft_datetimepicker .xdsoft_next,
|
||||
.xdsoft_datetimepicker .xdsoft_today_button{
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label i{
|
||||
opacity:0.5;
|
||||
background-position:-92px -19px;
|
||||
display: inline-block;
|
||||
width: 9px;
|
||||
height: 20px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_prev{
|
||||
float: left;
|
||||
background-position:-20px 0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_today_button{
|
||||
float: left;
|
||||
background-position:-70px 0;
|
||||
margin-left:5px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_next{
|
||||
float: right;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_next,
|
||||
.xdsoft_datetimepicker .xdsoft_prev ,
|
||||
.xdsoft_datetimepicker .xdsoft_today_button{
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
border: 0 none currentColor;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 30px;
|
||||
opacity: 0.5;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
||||
outline: medium none currentColor;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
text-indent: 100%;
|
||||
white-space: nowrap;
|
||||
width: 20px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{
|
||||
float:none;
|
||||
background-position:-40px -15px;
|
||||
height: 15px;
|
||||
width: 30px;
|
||||
display: block;
|
||||
margin-left:14px;
|
||||
margin-top:7px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{
|
||||
background-position:-40px 0;
|
||||
margin-bottom:7px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{
|
||||
height:151px;
|
||||
overflow:hidden;
|
||||
border-bottom:1px solid #DDDDDD;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{
|
||||
background: #F5F5F5;
|
||||
border-top:1px solid #DDDDDD;
|
||||
color: #666666;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
border-collapse:collapse;
|
||||
cursor:pointer;
|
||||
border-bottom-width: 0;
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{
|
||||
border-top-width: 0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_today_button:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_next:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_prev:hover {
|
||||
opacity: 1;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label{
|
||||
display: inline;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
margin: 0;
|
||||
padding: 5px 3px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
background-color: #fff;
|
||||
float:left;
|
||||
width:182px;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label:hover>span{
|
||||
text-decoration:underline;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label:hover i{
|
||||
opacity:1.0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{
|
||||
border:1px solid #ccc;
|
||||
position:absolute;
|
||||
right: 0;
|
||||
top:30px;
|
||||
z-index:101;
|
||||
display:none;
|
||||
background:#fff;
|
||||
max-height:160px;
|
||||
overflow-y:hidden;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;}
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;}
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
|
||||
color: #fff;
|
||||
background: #ff8000;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{
|
||||
padding:2px 10px 2px 5px;
|
||||
text-decoration:none !important;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
|
||||
background: #33AAFF;
|
||||
box-shadow: #178FE5 0 1px 3px 0 inset;
|
||||
color:#fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_month{
|
||||
width:100px;
|
||||
text-align:right;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar{
|
||||
clear:both;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_year{
|
||||
width: 48px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar table{
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td > div{
|
||||
padding-right:5px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar th{
|
||||
height: 25px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{
|
||||
width:14.2857142%;
|
||||
background: #F5F5F5;
|
||||
border:1px solid #DDDDDD;
|
||||
color: #666666;
|
||||
font-size: 12px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
border-collapse:collapse;
|
||||
cursor:pointer;
|
||||
height: 25px;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{
|
||||
width:12.5%;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar th{
|
||||
background: #F1F1F1;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{
|
||||
color:#33AAFF;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
|
||||
background: #33AAFF;
|
||||
box-shadow: #178FE5 0 1px 3px 0 inset;
|
||||
color:#fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
|
||||
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{
|
||||
opacity:0.5;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{
|
||||
opacity:0.2;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
|
||||
color: #fff !important;
|
||||
background: #ff8000 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover{
|
||||
color: inherit !important;
|
||||
background: inherit !important;
|
||||
box-shadow: inherit !important;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar th{
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
cursor:default;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;}
|
||||
.xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;}
|
||||
.xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;}
|
||||
|
||||
|
||||
.xdsoft_time_box{
|
||||
position:relative;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
.xdsoft_scrollbar >.xdsoft_scroller{
|
||||
background:#ccc !important;
|
||||
height:20px;
|
||||
border-radius:3px;
|
||||
}
|
||||
.xdsoft_scrollbar{
|
||||
position:absolute;
|
||||
width:7px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
cursor:pointer;
|
||||
}
|
||||
.xdsoft_scroller_box{
|
||||
position:relative;
|
||||
}
|
||||
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark{
|
||||
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
|
||||
background: #000000;
|
||||
border-bottom: 1px solid #444444;
|
||||
border-left: 1px solid #333333;
|
||||
border-right: 1px solid #333333;
|
||||
border-top: 1px solid #333333;
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{
|
||||
border-bottom:1px solid #222222;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{
|
||||
background: #0a0a0a;
|
||||
border-top:1px solid #222222;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{
|
||||
background-color: #000;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{
|
||||
border:1px solid #333;
|
||||
background:#000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
|
||||
color: #000;
|
||||
background: #007fff;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
|
||||
background: #cc5500;
|
||||
box-shadow: #b03e00 0 1px 3px 0 inset;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
|
||||
background: #0a0a0a;
|
||||
border:1px solid #222222;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
|
||||
background: #0e0e0e;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{
|
||||
color:#cc5500;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
|
||||
background: #cc5500;
|
||||
box-shadow: #b03e00 0 1px 3px 0 inset;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
|
||||
color: #000 !important;
|
||||
background: #007fff !important;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
|
||||
color: #666;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;}
|
||||
|
||||
|
||||
.xdsoft_dark .xdsoft_time_box{
|
||||
border:1px solid #333;
|
||||
}
|
||||
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{
|
||||
background:#333 !important;
|
||||
}
|
||||
1849
public/assets/adm/js/datepicker/jquery.datetimepicker.js
Executable file
1
public/assets/adm/js/excanvas.min.js
vendored
Executable file
692
public/assets/adm/js/filemanager/ajax_calls.php
Executable file
@@ -0,0 +1,692 @@
|
||||
<?php
|
||||
|
||||
$config = include 'config/config.php';
|
||||
//TODO switch to array
|
||||
extract($config, EXTR_OVERWRITE);
|
||||
|
||||
require_once 'include/utils.php';
|
||||
|
||||
if ($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager")
|
||||
{
|
||||
response(trans('forbiden').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
$languages = include 'lang/languages.php';
|
||||
|
||||
if (isset($_SESSION['RF']['language']) && file_exists('lang/' . basename($_SESSION['RF']['language']) . '.php'))
|
||||
{
|
||||
if(array_key_exists($_SESSION['RF']['language'],$languages)){
|
||||
include 'lang/' . basename($_SESSION['RF']['language']) . '.php';
|
||||
}else{
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
$ftp = ftp_con($config);
|
||||
|
||||
if(isset($_GET['action']))
|
||||
{
|
||||
switch($_GET['action'])
|
||||
{
|
||||
case 'new_file_form':
|
||||
echo trans('Filename') . ': <input type="text" id="create_text_file_name" style="height:30px"> <select id="create_text_file_extension" style="margin:0;width:100px;">';
|
||||
foreach($config['editable_text_file_exts'] as $ext){
|
||||
echo '<option value=".'.$ext.'">.'.$ext.'</option>';
|
||||
}
|
||||
echo '</select><br><hr><textarea id="textfile_create_area" style="width:100%;height:150px;"></textarea>';
|
||||
break;
|
||||
case 'view':
|
||||
if(isset($_GET['type']))
|
||||
{
|
||||
$_SESSION['RF']["view_type"] = $_GET['type'];
|
||||
}
|
||||
else
|
||||
{
|
||||
response(trans('view type number missing').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
case 'filter':
|
||||
if (isset($_GET['type']))
|
||||
{
|
||||
if (isset($remember_text_filter) && $remember_text_filter)
|
||||
{
|
||||
$_SESSION['RF']["filter"] = $_GET['type'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
response(trans('view type number missing').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
case 'sort':
|
||||
if (isset($_GET['sort_by']))
|
||||
{
|
||||
$_SESSION['RF']["sort_by"] = $_GET['sort_by'];
|
||||
}
|
||||
|
||||
if (isset($_GET['descending']))
|
||||
{
|
||||
$_SESSION['RF']["descending"] = $_GET['descending'];
|
||||
}
|
||||
break;
|
||||
case 'image_size': // not used
|
||||
$pos = strpos($_POST['path'], $upload_dir);
|
||||
if ($pos !== false)
|
||||
{
|
||||
$info = getimagesize(substr_replace($_POST['path'], $current_path, $pos, strlen($upload_dir)));
|
||||
response($info)->send();
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
case 'save_img':
|
||||
$info = pathinfo($_POST['name']);
|
||||
|
||||
if (
|
||||
strpos($_POST['path'], '/') === 0
|
||||
|| strpos($_POST['path'], '../') !== false
|
||||
|| strpos($_POST['path'], './') === 0
|
||||
|| (strpos($_POST['url'], 'http://s3.amazonaws.com/feather') !== 0
|
||||
&& strpos($_POST['url'], 'https://s3.amazonaws.com/feather') !== 0)
|
||||
|| $_POST['name'] != fix_filename($_POST['name'], $config)
|
||||
|| ! in_array(strtolower($info['extension']), array( 'jpg', 'jpeg', 'png' ))
|
||||
)
|
||||
{
|
||||
response(trans('wrong data').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
$image_data = get_file_by_url($_POST['url']);
|
||||
if ($image_data === false)
|
||||
{
|
||||
response(trans('Aviary_No_Save').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!checkresultingsize(strlen($image_data))) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
if($ftp){
|
||||
|
||||
$temp = tempnam('/tmp','RF');
|
||||
unlink($temp);
|
||||
$temp .=".".substr(strrchr($_POST['url'],'.'),1);
|
||||
file_put_contents($temp,$image_data);
|
||||
|
||||
$ftp->put($ftp_base_folder.$upload_dir . $_POST['path'] . $_POST['name'], $temp, FTP_BINARY);
|
||||
|
||||
create_img($temp,$temp,122,91);
|
||||
$ftp->put($ftp_base_folder.$ftp_thumbs_dir. $_POST['path'] . $_POST['name'], $temp, FTP_BINARY);
|
||||
|
||||
unlink($temp);
|
||||
}else{
|
||||
|
||||
file_put_contents($current_path . $_POST['path'] . $_POST['name'],$image_data);
|
||||
create_img($current_path . $_POST['path'] . $_POST['name'], $thumbs_base_path.$_POST['path'].$_POST['name'], 122, 91);
|
||||
// TODO something with this function cause its blowing my mind
|
||||
new_thumbnails_creation(
|
||||
$current_path.$_POST['path'],
|
||||
$current_path.$_POST['path'].$_POST['name'],
|
||||
$_POST['name'],
|
||||
$current_path,
|
||||
$relative_image_creation,
|
||||
$relative_path_from_current_pos,
|
||||
$relative_image_creation_name_to_prepend,
|
||||
$relative_image_creation_name_to_append,
|
||||
$relative_image_creation_width,
|
||||
$relative_image_creation_height,
|
||||
$relative_image_creation_option,
|
||||
$fixed_image_creation,
|
||||
$fixed_path_from_filemanager,
|
||||
$fixed_image_creation_name_to_prepend,
|
||||
$fixed_image_creation_to_append,
|
||||
$fixed_image_creation_width,
|
||||
$fixed_image_creation_height,
|
||||
$fixed_image_creation_option
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 'extract':
|
||||
if (strpos($_POST['path'], '/') === 0 || strpos($_POST['path'], '../') !== false || strpos($_POST['path'], './') === 0)
|
||||
{
|
||||
response(trans('wrong path'.AddErrorLocation()))->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if($ftp){
|
||||
$path = $ftp_base_url.$upload_dir . $_POST['path'];
|
||||
$base_folder = $ftp_base_url.$upload_dir . fix_dirname($_POST['path']) . "/";
|
||||
}else{
|
||||
$path = $current_path . $_POST['path'];
|
||||
$base_folder = $current_path . fix_dirname($_POST['path']) . "/";
|
||||
}
|
||||
|
||||
$info = pathinfo($path);
|
||||
|
||||
if($ftp){
|
||||
$tempDir = tempdir();
|
||||
$temp = tempnam($tempDir,'RF');
|
||||
unlink($temp);
|
||||
$temp .=".".$info['extension'];
|
||||
$handle = fopen($temp, "w");
|
||||
fwrite($handle, file_get_contents($path));
|
||||
fclose($handle);
|
||||
$path = $temp;
|
||||
$base_folder = $tempDir."/";
|
||||
}
|
||||
|
||||
$info = pathinfo($path);
|
||||
|
||||
switch ($info['extension'])
|
||||
{
|
||||
case "zip":
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open($path) === true)
|
||||
{
|
||||
//get total size
|
||||
$sizeTotalFinal = 0;
|
||||
for ($i = 0; $i < $zip->numFiles; $i++)
|
||||
{
|
||||
$aStat = $zip->statIndex($i);
|
||||
$sizeTotalFinal += $aStat['size'];
|
||||
}
|
||||
if (!checkresultingsize($sizeTotalFinal)) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
//make all the folders
|
||||
for ($i = 0; $i < $zip->numFiles; $i++)
|
||||
{
|
||||
$OnlyFileName = $zip->getNameIndex($i);
|
||||
$FullFileName = $zip->statIndex($i);
|
||||
if (substr($FullFileName['name'], -1, 1) == "/")
|
||||
{
|
||||
create_folder($base_folder . $FullFileName['name']);
|
||||
}
|
||||
}
|
||||
//unzip into the folders
|
||||
for ($i = 0; $i < $zip->numFiles; $i++)
|
||||
{
|
||||
$OnlyFileName = $zip->getNameIndex($i);
|
||||
$FullFileName = $zip->statIndex($i);
|
||||
|
||||
if ( ! (substr($FullFileName['name'], -1, 1) == "/"))
|
||||
{
|
||||
$fileinfo = pathinfo($OnlyFileName);
|
||||
if (in_array(strtolower($fileinfo['extension']), $ext))
|
||||
{
|
||||
copy('zip://' . $path . '#' . $OnlyFileName, $base_folder . $FullFileName['name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
$zip->close();
|
||||
} else {
|
||||
response(trans('Zip_No_Extract').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "gz":
|
||||
// No resulting size pre-control available
|
||||
$p = new PharData($path);
|
||||
$p->decompress(); // creates files.tar
|
||||
|
||||
break;
|
||||
|
||||
case "tar":
|
||||
// No resulting size pre-control available
|
||||
// unarchive from the tar
|
||||
$phar = new PharData($path);
|
||||
$phar->decompressFiles();
|
||||
$files = array();
|
||||
check_files_extensions_on_phar($phar, $files, '', $ext);
|
||||
$phar->extractTo($base_folder, $files, true);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
response(trans('Zip_Invalid').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if($ftp){
|
||||
unlink($path);
|
||||
$ftp->putAll($base_folder, "/".$ftp_base_folder . $upload_dir . fix_dirname($_POST['path']), FTP_BINARY);
|
||||
deleteDir($base_folder);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case 'media_preview':
|
||||
if($ftp){
|
||||
$preview_file = $ftp_base_url.$upload_dir . $_GET['file'];
|
||||
}else{
|
||||
$preview_file = $current_path . $_GET["file"];
|
||||
}
|
||||
$info = pathinfo($preview_file);
|
||||
ob_start();
|
||||
?>
|
||||
<div id="jp_container_1" class="jp-video " style="margin:0 auto;">
|
||||
<div class="jp-type-single">
|
||||
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
|
||||
<div class="jp-gui">
|
||||
<div class="jp-video-play">
|
||||
<a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
|
||||
</div>
|
||||
<div class="jp-interface">
|
||||
<div class="jp-progress">
|
||||
<div class="jp-seek-bar">
|
||||
<div class="jp-play-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jp-current-time"></div>
|
||||
<div class="jp-duration"></div>
|
||||
<div class="jp-controls-holder">
|
||||
<ul class="jp-controls">
|
||||
<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
|
||||
<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
|
||||
<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
|
||||
<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
|
||||
<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
|
||||
<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
|
||||
</ul>
|
||||
<div class="jp-volume-bar">
|
||||
<div class="jp-volume-bar-value"></div>
|
||||
</div>
|
||||
<ul class="jp-toggles">
|
||||
<li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
|
||||
<li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
|
||||
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
|
||||
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="jp-title" style="display:none;">
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jp-no-solution">
|
||||
<span>Update Required</span>
|
||||
To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(in_array(strtolower($info['extension']), $ext_music)): ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#jquery_jplayer_1").jPlayer({
|
||||
ready: function () {
|
||||
$(this).jPlayer("setMedia", {
|
||||
title:"<?php $_GET['title']; ?>",
|
||||
mp3: "<?php echo $preview_file; ?>",
|
||||
m4a: "<?php echo $preview_file; ?>",
|
||||
oga: "<?php echo $preview_file; ?>",
|
||||
wav: "<?php echo $preview_file; ?>"
|
||||
});
|
||||
},
|
||||
swfPath: "js",
|
||||
solution:"html,flash",
|
||||
supplied: "mp3, m4a, midi, mid, oga,webma, ogg, wav",
|
||||
smoothPlayBar: true,
|
||||
keyEnabled: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php elseif(in_array(strtolower($info['extension']), $ext_video)): ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#jquery_jplayer_1").jPlayer({
|
||||
ready: function () {
|
||||
$(this).jPlayer("setMedia", {
|
||||
title:"<?php $_GET['title']; ?>",
|
||||
m4v: "<?php echo $preview_file; ?>",
|
||||
ogv: "<?php echo $preview_file; ?>",
|
||||
flv: "<?php echo $preview_file; ?>"
|
||||
});
|
||||
},
|
||||
swfPath: "js",
|
||||
solution:"html,flash",
|
||||
supplied: "mp4, m4v, ogv, flv, webmv, webm",
|
||||
smoothPlayBar: true,
|
||||
keyEnabled: false
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php endif;
|
||||
|
||||
$content = ob_get_clean();
|
||||
|
||||
response($content)->send();
|
||||
exit;
|
||||
|
||||
break;
|
||||
case 'copy_cut':
|
||||
if ($_POST['sub_action'] != 'copy' && $_POST['sub_action'] != 'cut')
|
||||
{
|
||||
response(trans('wrong sub-action').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (trim($_POST['path']) == '')
|
||||
{
|
||||
response(trans('no path').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$msg_sub_action = ($_POST['sub_action'] == 'copy' ? trans('Copy') : trans('Cut'));
|
||||
$path = $current_path . $_POST['path'];
|
||||
|
||||
if (is_dir($path))
|
||||
{
|
||||
// can't copy/cut dirs
|
||||
if ($copy_cut_dirs === false)
|
||||
{
|
||||
response(sprintf(trans('Copy_Cut_Not_Allowed'), $msg_sub_action, trans('Folders')).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
list($sizeFolderToCopy,$fileNum,$foldersCount) = folder_info($path,false);
|
||||
// size over limit
|
||||
if ($copy_cut_max_size !== false && is_int($copy_cut_max_size)) {
|
||||
if (($copy_cut_max_size * 1024 * 1024) < $sizeFolderToCopy) {
|
||||
response(sprintf(trans('Copy_Cut_Size_Limit'), $msg_sub_action, $copy_cut_max_size).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// file count over limit
|
||||
if ($copy_cut_max_count !== false && is_int($copy_cut_max_count))
|
||||
{
|
||||
if ($copy_cut_max_count < $fileNum)
|
||||
{
|
||||
response(sprintf(trans('Copy_Cut_Count_Limit'), $msg_sub_action, $copy_cut_max_count).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (!checkresultingsize($sizeFolderToCopy)) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
// can't copy/cut files
|
||||
if ($copy_cut_files === false)
|
||||
{
|
||||
response(sprintf(trans('Copy_Cut_Not_Allowed'), $msg_sub_action, trans('Files')).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['RF']['clipboard']['path'] = $_POST['path'];
|
||||
$_SESSION['RF']['clipboard_action'] = $_POST['sub_action'];
|
||||
break;
|
||||
case 'clear_clipboard':
|
||||
$_SESSION['RF']['clipboard'] = null;
|
||||
$_SESSION['RF']['clipboard_action'] = null;
|
||||
break;
|
||||
case 'chmod':
|
||||
if($ftp){
|
||||
$path = $ftp_base_url . $upload_dir . $_POST['path'];
|
||||
if (
|
||||
($_POST['folder']==1 && $chmod_dirs === false)
|
||||
|| ($_POST['folder']==0 && $chmod_files === false)
|
||||
|| (is_function_callable("chmod") === false) )
|
||||
{
|
||||
response(sprintf(trans('File_Permission_Not_Allowed'), (is_dir($path) ? trans('Folders') : trans('Files')), 403).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
$info = $_POST['permissions'];
|
||||
}else{
|
||||
$path = $current_path . $_POST['path'];
|
||||
if (
|
||||
(is_dir($path) && $chmod_dirs === false)
|
||||
|| (is_file($path) && $chmod_files === false)
|
||||
|| (is_function_callable("chmod") === false) )
|
||||
{
|
||||
response(sprintf(trans('File_Permission_Not_Allowed'), (is_dir($path) ? trans('Folders') : trans('Files')), 403).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$perms = fileperms($path) & 0777;
|
||||
|
||||
$info = '-';
|
||||
|
||||
// Owner
|
||||
$info .= (($perms & 0x0100) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0080) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0040) ?
|
||||
(($perms & 0x0800) ? 's' : 'x' ) :
|
||||
(($perms & 0x0800) ? 'S' : '-'));
|
||||
|
||||
// Group
|
||||
$info .= (($perms & 0x0020) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0010) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0008) ?
|
||||
(($perms & 0x0400) ? 's' : 'x' ) :
|
||||
(($perms & 0x0400) ? 'S' : '-'));
|
||||
|
||||
// World
|
||||
$info .= (($perms & 0x0004) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0002) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0001) ?
|
||||
(($perms & 0x0200) ? 't' : 'x' ) :
|
||||
(($perms & 0x0200) ? 'T' : '-'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ret = '<div id="files_permission_start">
|
||||
<form id="chmod_form">
|
||||
<table class="table file-perms-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>r </td>
|
||||
<td>w </td>
|
||||
<td>x </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>'.trans('User').'</td>
|
||||
<td><input id="u_4" type="checkbox" data-value="4" data-group="user" '.(substr($info, 1,1)=='r' ? " checked" : "").'></td>
|
||||
<td><input id="u_2" type="checkbox" data-value="2" data-group="user" '.(substr($info, 2,1)=='w' ? " checked" : "").'></td>
|
||||
<td><input id="u_1" type="checkbox" data-value="1" data-group="user" '.(substr($info, 3,1)=='x' ? " checked" : "").'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.trans('Group').'</td>
|
||||
<td><input id="g_4" type="checkbox" data-value="4" data-group="group" '.(substr($info, 4,1)=='r' ? " checked" : "").'></td>
|
||||
<td><input id="g_2" type="checkbox" data-value="2" data-group="group" '.(substr($info, 5,1)=='w' ? " checked" : "").'></td>
|
||||
<td><input id="g_1" type="checkbox" data-value="1" data-group="group" '.(substr($info, 6,1)=='x' ? " checked" : "").'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.trans('All').'</td>
|
||||
<td><input id="a_4" type="checkbox" data-value="4" data-group="all" '.(substr($info, 7,1)=='r' ? " checked" : "").'></td>
|
||||
<td><input id="a_2" type="checkbox" data-value="2" data-group="all" '.(substr($info, 8,1)=='w' ? " checked" : "").'></td>
|
||||
<td><input id="a_1" type="checkbox" data-value="1" data-group="all" '.(substr($info, 9,1)=='x' ? " checked" : "").'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3"><input type="text" class="input-block-level" name="chmod_value" id="chmod_value" value="" data-def-value=""></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>';
|
||||
|
||||
if ((!$ftp && is_dir($path)) )
|
||||
{
|
||||
$ret .= '<div class="hero-unit" style="padding:10px;">'.trans('File_Permission_Recursive').'<br/><br/>
|
||||
<ul class="unstyled">
|
||||
<li><label class="radio"><input value="none" name="apply_recursive" type="radio" checked> '.trans('No').'</label></li>
|
||||
<li><label class="radio"><input value="files" name="apply_recursive" type="radio"> '.trans('Files').'</label></li>
|
||||
<li><label class="radio"><input value="folders" name="apply_recursive" type="radio"> '.trans('Folders').'</label></li>
|
||||
<li><label class="radio"><input value="both" name="apply_recursive" type="radio"> '.trans('Files').' & '.trans('Folders').'</label></li>
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$ret .= '</form></div>';
|
||||
|
||||
response($ret)->send();
|
||||
exit;
|
||||
|
||||
break;
|
||||
case 'get_lang':
|
||||
if ( ! file_exists('lang/languages.php'))
|
||||
{
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$languages = include 'lang/languages.php';
|
||||
if ( ! isset($languages) || ! is_array($languages))
|
||||
{
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$curr = $_SESSION['RF']['language'];
|
||||
|
||||
$ret = '<select id="new_lang_select">';
|
||||
foreach ($languages as $code => $name)
|
||||
{
|
||||
$ret .= '<option value="' . $code . '"' . ($code == $curr ? ' selected' : '') . '>' . $name . '</option>';
|
||||
}
|
||||
$ret .= '</select>';
|
||||
|
||||
response($ret)->send();
|
||||
exit;
|
||||
|
||||
break;
|
||||
case 'change_lang':
|
||||
$choosen_lang = (!empty($_POST['choosen_lang']))? $_POST['choosen_lang']:"en_EN";
|
||||
|
||||
if(array_key_exists($choosen_lang,$languages)){
|
||||
if ( ! file_exists('lang/' . $choosen_lang . '.php'))
|
||||
{
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}else{
|
||||
$_SESSION['RF']['language'] = $choosen_lang;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 'get_file': // preview or edit
|
||||
$sub_action = $_GET['sub_action'];
|
||||
$preview_mode = $_GET["preview_mode"];
|
||||
|
||||
if ($sub_action != 'preview' && $sub_action != 'edit')
|
||||
{
|
||||
response(trans('wrong action').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if($ftp){
|
||||
$selected_file = ($sub_action == 'preview' ? $ftp_base_url.$upload_dir . $_GET['file'] : $ftp_base_url.$upload_dir . $_POST['path']);
|
||||
}else{
|
||||
$selected_file = ($sub_action == 'preview' ? $current_path . $_GET['file'] : $current_path . $_POST['path']);
|
||||
|
||||
if ( ! file_exists($selected_file))
|
||||
{
|
||||
response(trans('File_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$info = pathinfo($selected_file);
|
||||
|
||||
if ($preview_mode == 'text')
|
||||
{
|
||||
$is_allowed = ($sub_action == 'preview' ? $preview_text_files : $edit_text_files);
|
||||
$allowed_file_exts = ($sub_action == 'preview' ? $previewable_text_file_exts : $editable_text_file_exts);
|
||||
} elseif ($preview_mode == 'viewerjs') {
|
||||
$is_allowed = $viewerjs_enabled;
|
||||
$allowed_file_exts = $viewerjs_file_exts;
|
||||
} elseif ($preview_mode == 'google') {
|
||||
$is_allowed = $googledoc_enabled;
|
||||
$allowed_file_exts = $googledoc_file_exts;
|
||||
}
|
||||
|
||||
if ( ! isset($allowed_file_exts) || ! is_array($allowed_file_exts))
|
||||
{
|
||||
$allowed_file_exts = array();
|
||||
}
|
||||
|
||||
if ( ! in_array($info['extension'], $allowed_file_exts)
|
||||
|| ! isset($is_allowed)
|
||||
|| $is_allowed === false
|
||||
|| (!$ftp && ! is_readable($selected_file))
|
||||
)
|
||||
{
|
||||
response(sprintf(trans('File_Open_Edit_Not_Allowed'), ($sub_action == 'preview' ? strtolower(trans('Open')) : strtolower(trans('Edit')))).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
if ($sub_action == 'preview')
|
||||
{
|
||||
if ($preview_mode == 'text')
|
||||
{
|
||||
// get and sanities
|
||||
$data = stripslashes(htmlspecialchars(file_get_contents($selected_file)));
|
||||
|
||||
$ret = '';
|
||||
|
||||
if ( ! in_array($info['extension'],$previewable_text_file_exts_no_prettify))
|
||||
{
|
||||
$ret .= '<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang='.$info['extension'].'&skin=sunburst"></script>';
|
||||
$ret .= '<pre class="prettyprint">'.$data.'</pre>';
|
||||
} else {
|
||||
$ret .= '<pre class="no-prettify">'.$data.'</pre>';
|
||||
}
|
||||
|
||||
}
|
||||
// elseif ($preview_mode == 'viewerjs') {
|
||||
// if($ftp){
|
||||
// $ret = '<iframe id="viewer" src="'.$selected_file.'" allowfullscreen="" webkitallowfullscreen="" class="viewer-iframe"></iframe>';
|
||||
// }else{
|
||||
// $ret = '<iframe id="viewer" src="js/ViewerJS/#../../'.$selected_file.'" allowfullscreen="" webkitallowfullscreen="" class="viewer-iframe"></iframe>';
|
||||
// }
|
||||
|
||||
// }
|
||||
elseif ($preview_mode == 'google' || $preview_mode == 'viewerjs') {
|
||||
if($ftp){
|
||||
$url_file = $selected_file;
|
||||
}else{
|
||||
$url_file = $base_url . $upload_dir . str_replace($current_path, '', $_GET["file"]);
|
||||
}
|
||||
|
||||
$googledoc_url = urlencode($url_file);
|
||||
$googledoc_html = "<iframe src=\"http://docs.google.com/viewer?url=" . $url_file . "&embedded=true\" class=\"google-iframe\"></iframe>";
|
||||
$ret = $googledoc_html;
|
||||
}
|
||||
} else {
|
||||
$data = stripslashes(htmlspecialchars(file_get_contents($selected_file)));
|
||||
$ret = '<textarea id="textfile_edit_area" style="width:100%;height:300px;">'.$data.'</textarea>';
|
||||
}
|
||||
|
||||
response($ret)->send();
|
||||
exit;
|
||||
|
||||
break;
|
||||
default:
|
||||
response(trans('no action passed').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
response(trans('no action passed').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
36
public/assets/adm/js/filemanager/css/style.css
Executable file
1143
public/assets/adm/js/filemanager/dialog.php
Executable file
30
public/assets/adm/js/filemanager/error_log
Executable file
@@ -0,0 +1,30 @@
|
||||
[26-Nov-2016 21:09:04 Europe/Rome] PHP Notice: Undefined index: language in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 33
|
||||
[26-Nov-2016 21:09:04 Europe/Rome] PHP Warning: scandir(../source/): failed to open dir: No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:09:04 Europe/Rome] PHP Warning: scandir(): (errno 2): No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:09:04 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 543
|
||||
[26-Nov-2016 21:09:04 Europe/Rome] PHP Notice: Undefined variable: files_prevent_duplicate in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:09:04 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:10:56 Europe/Rome] PHP Warning: scandir(../source/): failed to open dir: No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:10:56 Europe/Rome] PHP Warning: scandir(): (errno 2): No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:10:56 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 543
|
||||
[26-Nov-2016 21:10:56 Europe/Rome] PHP Notice: Undefined variable: files_prevent_duplicate in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:10:56 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:11:23 Europe/Rome] PHP Warning: scandir(../source/): failed to open dir: No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:11:23 Europe/Rome] PHP Warning: scandir(): (errno 2): No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:11:23 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 543
|
||||
[26-Nov-2016 21:11:23 Europe/Rome] PHP Notice: Undefined variable: files_prevent_duplicate in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:11:23 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:13:04 Europe/Rome] PHP Warning: scandir(../../../images/): failed to open dir: No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:13:04 Europe/Rome] PHP Warning: scandir(): (errno 2): No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:13:04 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 543
|
||||
[26-Nov-2016 21:13:04 Europe/Rome] PHP Notice: Undefined variable: files_prevent_duplicate in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:13:04 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:13:08 Europe/Rome] PHP Warning: scandir(../../../images/): failed to open dir: No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:13:08 Europe/Rome] PHP Warning: scandir(): (errno 2): No such file or directory in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 531
|
||||
[26-Nov-2016 21:13:08 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 543
|
||||
[26-Nov-2016 21:13:08 Europe/Rome] PHP Notice: Undefined variable: files_prevent_duplicate in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 21:13:08 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 1089
|
||||
[26-Nov-2016 22:17:23 Europe/Rome] PHP Notice: Undefined index: language in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 33
|
||||
[27-Nov-2016 13:04:09 Europe/Rome] PHP Notice: Undefined index: language in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 33
|
||||
[27-Nov-2016 14:15:35 Europe/Rome] PHP Notice: Undefined index: language in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 33
|
||||
[17-Dec-2016 21:46:33 Europe/Rome] PHP Notice: Undefined index: language in /home/theloxie/public_html/betahoosk/theme/admin/js/filemanager/dialog.php on line 33
|
||||
522
public/assets/adm/js/filemanager/execute.php
Executable file
@@ -0,0 +1,522 @@
|
||||
<?php
|
||||
$config = include 'config/config.php';
|
||||
//TODO switch to array
|
||||
extract($config, EXTR_OVERWRITE);
|
||||
|
||||
include 'include/utils.php';
|
||||
|
||||
if ($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager")
|
||||
{
|
||||
response(trans('forbiden').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (strpos($_POST['path'],'/')===0
|
||||
|| strpos($_POST['path'],'../')!==FALSE
|
||||
|| strpos($_POST['path'],'./')===0)
|
||||
{
|
||||
response(trans('wrong path'.AddErrorLocation()))->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_SESSION['RF']['language']) && file_exists('lang/' . basename($_SESSION['RF']['language']) . '.php'))
|
||||
{
|
||||
$languages = include 'lang/languages.php';
|
||||
if(array_key_exists($_SESSION['RF']['language'],$languages)){
|
||||
include 'lang/' . basename($_SESSION['RF']['language']) . '.php';
|
||||
}else{
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
response(trans('Lang_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$ftp = ftp_con($config);
|
||||
|
||||
$base = $current_path;
|
||||
$path = $base.$_POST['path'];
|
||||
$cycle = TRUE;
|
||||
$max_cycles = 50;
|
||||
$i = 0;
|
||||
while($cycle && $i<$max_cycles)
|
||||
{
|
||||
$i++;
|
||||
if ($path == $base) $cycle=FALSE;
|
||||
|
||||
if (file_exists($path."config.php"))
|
||||
{
|
||||
require_once $path."config.php";
|
||||
$cycle = FALSE;
|
||||
}
|
||||
$path = fix_dirname($path)."/";
|
||||
}
|
||||
|
||||
$path = $current_path.$_POST['path'];
|
||||
$path_thumb = $thumbs_base_path.$_POST['path'];
|
||||
|
||||
if($ftp){
|
||||
$path = $ftp_base_folder.$upload_dir.$_POST['path'];
|
||||
$path_thumb = $ftp_base_folder.$ftp_thumbs_dir.$_POST['path'];
|
||||
}
|
||||
|
||||
if (isset($_POST['name']))
|
||||
{
|
||||
$name = fix_filename($_POST['name'],$config);
|
||||
if (strpos($name,'../') !== FALSE)
|
||||
{
|
||||
response(trans('wrong name').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$info = pathinfo($path);
|
||||
if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action']=='delete_folder') && !in_array(strtolower($info['extension']), $ext) && $_GET['action'] != 'create_file')
|
||||
{
|
||||
response(trans('wrong extension').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET['action']))
|
||||
{
|
||||
switch($_GET['action'])
|
||||
{
|
||||
case 'delete_file':
|
||||
if ($delete_files){
|
||||
if($ftp){
|
||||
try{
|
||||
$ftp->delete("/".$path);
|
||||
@$ftp->delete("/".$path_thumb);
|
||||
}catch(FtpClient\FtpException $e){
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
|
||||
unlink($path);
|
||||
if (file_exists($path_thumb)){
|
||||
unlink($path_thumb);
|
||||
}
|
||||
}
|
||||
|
||||
$info=pathinfo($path);
|
||||
if (!$ftp && $relative_image_creation){
|
||||
foreach($relative_path_from_current_pos as $k=>$path)
|
||||
{
|
||||
if ($path!="" && $path[strlen($path)-1]!="/") $path.="/";
|
||||
|
||||
if (file_exists($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']))
|
||||
{
|
||||
unlink($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$ftp && $fixed_image_creation)
|
||||
{
|
||||
foreach($fixed_path_from_filemanager as $k=>$path)
|
||||
{
|
||||
if ($path!="" && $path[strlen($path)-1] != "/") $path.="/";
|
||||
|
||||
$base_dir=$path.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
|
||||
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
|
||||
{
|
||||
unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete_folder':
|
||||
if ($delete_folders){
|
||||
|
||||
if($ftp){
|
||||
deleteDir($path,$ftp,$config);
|
||||
deleteDir($path_thumb,$ftp,$config);
|
||||
}else{
|
||||
if (is_dir($path_thumb))
|
||||
{
|
||||
deleteDir($path_thumb);
|
||||
}
|
||||
|
||||
if (is_dir($path))
|
||||
{
|
||||
deleteDir($path);
|
||||
if ($fixed_image_creation)
|
||||
{
|
||||
foreach($fixed_path_from_filemanager as $k=>$paths){
|
||||
if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.="/";
|
||||
|
||||
$base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
|
||||
if (is_dir($base_dir)) deleteDir($base_dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'create_folder':
|
||||
if ($create_folders)
|
||||
{
|
||||
|
||||
$name = fix_filename($_POST['name'],$config);
|
||||
$path .= $name;
|
||||
$path_thumb .= $name;
|
||||
create_folder(fix_path($path,$config),fix_path($path_thumb,$config),$ftp,$config);
|
||||
}
|
||||
break;
|
||||
case 'rename_folder':
|
||||
if ($rename_folders){
|
||||
$name=fix_filename($name,$config);
|
||||
$name=str_replace('.','',$name);
|
||||
|
||||
if (!empty($name)){
|
||||
if (!rename_folder($path,$name,$ftp,$config))
|
||||
{
|
||||
response(trans('Rename_existing_folder').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
rename_folder($path_thumb,$name,$ftp,$config);
|
||||
if (!$ftp && $fixed_image_creation){
|
||||
foreach($fixed_path_from_filemanager as $k=>$paths){
|
||||
if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.="/";
|
||||
|
||||
$base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
|
||||
rename_folder($base_dir,$name,$ftp,$config);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
response(trans('Empty_name').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'create_file':
|
||||
if ($create_text_files === FALSE) {
|
||||
response(sprintf(trans('File_Open_Edit_Not_Allowed'), strtolower(trans('Edit'))).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($editable_text_file_exts) || !is_array($editable_text_file_exts)){
|
||||
$editable_text_file_exts = array();
|
||||
}
|
||||
|
||||
// check if user supplied extension
|
||||
if (strpos($name, '.') === FALSE){
|
||||
response(trans('No_Extension').' '.sprintf(trans('Valid_Extensions'), implode(', ', $editable_text_file_exts)).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
// correct name
|
||||
$old_name = $name;
|
||||
$name=fix_filename($name,$config);
|
||||
if (empty($name))
|
||||
{
|
||||
response(trans('Empty_name').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
// check extension
|
||||
$parts = explode('.', $name);
|
||||
if (!in_array(end($parts), $editable_text_file_exts)) {
|
||||
response(trans('Error_extension').' '.sprintf(trans('Valid_Extensions'), implode(', ', $editable_text_file_exts)), 400)->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$content = $_POST['new_content'];
|
||||
|
||||
if($ftp){
|
||||
$tmp = time().$name;
|
||||
file_put_contents($tmp, $content);
|
||||
$ftp->put("/".$path.$name, $tmp, FTP_BINARY);
|
||||
unlink($tmp);
|
||||
response(trans('File_Save_OK'))->send();
|
||||
}else{
|
||||
if (!checkresultingsize(strlen($content))) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
// file already exists
|
||||
if (file_exists($path.$name)) {
|
||||
response(trans('Rename_existing_file').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (@file_put_contents($path.$name, $content) === FALSE) {
|
||||
response(trans('File_Save_Error').AddErrorLocation())->send();
|
||||
exit;
|
||||
} else {
|
||||
if (is_function_callable('chmod') !== FALSE){
|
||||
chmod($path.$name, 0644);
|
||||
}
|
||||
response(trans('File_Save_OK'))->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 'rename_file':
|
||||
if ($rename_files){
|
||||
$name=fix_filename($name,$config);
|
||||
if (!empty($name))
|
||||
{
|
||||
if (!rename_file($path,$name,$ftp,$config))
|
||||
{
|
||||
response(trans('Rename_existing_file').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
rename_file($path_thumb,$name,$ftp,$config);
|
||||
|
||||
if ($fixed_image_creation)
|
||||
{
|
||||
$info=pathinfo($path);
|
||||
|
||||
foreach($fixed_path_from_filemanager as $k=>$paths)
|
||||
{
|
||||
if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.="/";
|
||||
|
||||
$base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
|
||||
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
|
||||
{
|
||||
rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k],$ftp,$config);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
response(trans('Empty_name').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'duplicate_file':
|
||||
if ($duplicate_files)
|
||||
{
|
||||
$name=fix_filename($name,$config);
|
||||
if (!empty($name))
|
||||
{
|
||||
if (!$ftp && !checkresultingsize(filesize($path))) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
if (!duplicate_file($path,$name,$ftp,$config))
|
||||
{
|
||||
response(trans('Rename_existing_file').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
duplicate_file($path_thumb,$name,$ftp,$config);
|
||||
|
||||
if (!$ftp && $fixed_image_creation)
|
||||
{
|
||||
$info=pathinfo($path);
|
||||
foreach($fixed_path_from_filemanager as $k=>$paths)
|
||||
{
|
||||
if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.= "/";
|
||||
|
||||
$base_dir=$paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
|
||||
|
||||
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
|
||||
{
|
||||
duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
response(trans('Empty_name').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'paste_clipboard':
|
||||
if ( ! isset($_SESSION['RF']['clipboard_action'], $_SESSION['RF']['clipboard']['path'])
|
||||
|| $_SESSION['RF']['clipboard_action'] == ''
|
||||
|| $_SESSION['RF']['clipboard']['path'] == '')
|
||||
{
|
||||
response()->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$action = $_SESSION['RF']['clipboard_action'];
|
||||
$data = $_SESSION['RF']['clipboard'];
|
||||
|
||||
|
||||
if($ftp){
|
||||
if($_POST['path']!=""){
|
||||
$path.=DIRECTORY_SEPARATOR;
|
||||
$path_thumb.=DIRECTORY_SEPARATOR;
|
||||
}
|
||||
$path_thumb .= basename($data['path']);
|
||||
$path .= basename($data['path']) ;
|
||||
$data['path_thumb'] = DIRECTORY_SEPARATOR.$config['ftp_base_folder'].$config['ftp_thumbs_dir'].$data['path'];
|
||||
$data['path'] = DIRECTORY_SEPARATOR.$config['ftp_base_folder'].$config['upload_dir'].$data['path'];
|
||||
}else{
|
||||
$data['path_thumb'] = $thumbs_base_path.$data['path'];
|
||||
$data['path'] = $current_path.$data['path'];
|
||||
}
|
||||
|
||||
$pinfo = pathinfo($data['path']);
|
||||
|
||||
// user wants to paste to the same dir. nothing to do here...
|
||||
if ($pinfo['dirname'] == rtrim($path, DIRECTORY_SEPARATOR)) {
|
||||
response()->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
// user wants to paste folder to it's own sub folder.. baaaah.
|
||||
if (is_dir($data['path']) && strpos($path, $data['path']) !== FALSE){
|
||||
response()->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
// something terribly gone wrong
|
||||
if ($action != 'copy' && $action != 'cut'){
|
||||
response(trans('wrong action').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
if($ftp){
|
||||
if ($action == 'copy')
|
||||
{
|
||||
$tmp = time().basename($data['path']);
|
||||
$ftp->get($tmp, $data['path'], FTP_BINARY);
|
||||
$ftp->put(DIRECTORY_SEPARATOR.$path, $tmp, FTP_BINARY);
|
||||
unlink($tmp);
|
||||
|
||||
if(url_exists($data['path_thumb'])){
|
||||
$tmp = time().basename($data['path_thumb']);
|
||||
@$ftp->get($tmp, $data['path_thumb'], FTP_BINARY);
|
||||
@$ftp->put(DIRECTORY_SEPARATOR.$path_thumb, $tmp, FTP_BINARY);
|
||||
unlink($tmp);
|
||||
}
|
||||
|
||||
} elseif ($action == 'cut') {
|
||||
$ftp->rename($data['path'], DIRECTORY_SEPARATOR.$path);
|
||||
if(url_exists($data['path_thumb'])){
|
||||
@$ftp->rename($data['path_thumb'], DIRECTORY_SEPARATOR.$path_thumb);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// check for writability
|
||||
if (is_really_writable($path) === FALSE || is_really_writable($path_thumb) === FALSE){
|
||||
response(trans('Dir_No_Write').'<br/>'.str_replace('../','',$path).'<br/>'.str_replace('../','',$path_thumb).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
// check if server disables copy or rename
|
||||
if (is_function_callable(($action == 'copy' ? 'copy' : 'rename')) === FALSE){
|
||||
response(sprintf(trans('Function_Disabled'), ($action == 'copy' ? (trans('Copy')) : (trans('Cut')))).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
if ($action == 'copy')
|
||||
{
|
||||
list($sizeFolderToCopy,$fileNum,$foldersCount) = folder_info($path,false);
|
||||
if (!checkresultingsize($sizeFolderToCopy)) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
rcopy($data['path'], $path);
|
||||
rcopy($data['path_thumb'], $path_thumb);
|
||||
} elseif ($action == 'cut') {
|
||||
rrename($data['path'], $path);
|
||||
rrename($data['path_thumb'], $path_thumb);
|
||||
|
||||
// cleanup
|
||||
if (is_dir($data['path']) === TRUE){
|
||||
rrename_after_cleaner($data['path']);
|
||||
rrename_after_cleaner($data['path_thumb']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cleanup
|
||||
$_SESSION['RF']['clipboard']['path'] = NULL;
|
||||
$_SESSION['RF']['clipboard_action'] = NULL;
|
||||
|
||||
break;
|
||||
case 'chmod':
|
||||
$mode = $_POST['new_mode'];
|
||||
$rec_option = $_POST['is_recursive'];
|
||||
$valid_options = array('none', 'files', 'folders', 'both');
|
||||
$chmod_perm = ($_POST['folder'] ? $chmod_dirs : $chmod_files);
|
||||
|
||||
// check perm
|
||||
if ($chmod_perm === FALSE) {
|
||||
response(sprintf(trans('File_Permission_Not_Allowed'), (is_dir($path) ? (trans('Folders')) : (trans('Files')) )).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
// check mode
|
||||
if (!preg_match("/^[0-7]{3}$/", $mode)){
|
||||
response(trans('File_Permission_Wrong_Mode').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
// check recursive option
|
||||
if (!in_array($rec_option, $valid_options)){
|
||||
response(trans("wrong option").AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
// check if server disabled chmod
|
||||
if (!$ftp && is_function_callable('chmod') === FALSE){
|
||||
response(sprintf(trans('Function_Disabled'), 'chmod').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$mode = "0".$mode;
|
||||
$mode = octdec($mode);
|
||||
if($ftp){
|
||||
$ftp->chmod($mode, "/".$path);
|
||||
}else{
|
||||
rchmod($path, $mode, $rec_option);
|
||||
}
|
||||
|
||||
break;
|
||||
case 'save_text_file':
|
||||
$content = $_POST['new_content'];
|
||||
// $content = htmlspecialchars($content); not needed
|
||||
// $content = stripslashes($content);
|
||||
|
||||
if($ftp){
|
||||
$tmp = time();
|
||||
file_put_contents($tmp, $content);
|
||||
try{
|
||||
$ftp->put("/".$path, $tmp, FTP_BINARY);
|
||||
}catch(FtpClient\FtpException $e){
|
||||
echo $e->getMessage();
|
||||
}
|
||||
unlink($tmp);
|
||||
response(trans('File_Save_OK'))->send();
|
||||
}else{
|
||||
// no file
|
||||
if (!file_exists($path)) {
|
||||
response(trans('File_Not_Found').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
// not writable or edit not allowed
|
||||
if (!is_writable($path) || $edit_text_files === FALSE) {
|
||||
response(sprintf(trans('File_Open_Edit_Not_Allowed'), strtolower(trans('Edit'))).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!checkresultingsize(strlen($content))) {
|
||||
response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
if (@file_put_contents($path, $content) === FALSE) {
|
||||
response(trans('File_Save_Error').AddErrorLocation())->send();
|
||||
exit;
|
||||
} else {
|
||||
response(trans('File_Save_OK'))->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
response(trans('wrong action').AddErrorLocation())->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
?>
|
||||
149
public/assets/adm/js/filemanager/force_download.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
$config = include 'config/config.php';
|
||||
|
||||
|
||||
//TODO switch to array
|
||||
extract($config, EXTR_OVERWRITE);
|
||||
|
||||
include 'include/utils.php';
|
||||
|
||||
$ftp = ftp_con($config);
|
||||
|
||||
if ($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager")
|
||||
{
|
||||
response(trans('forbiden').AddErrorLocation(), 403)->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
include 'include/mime_type_lib.php';
|
||||
|
||||
|
||||
if (
|
||||
strpos($_POST['path'], '/') === 0
|
||||
|| strpos($_POST['path'], '../') !== false
|
||||
|| strpos($_POST['path'], './') === 0
|
||||
)
|
||||
{
|
||||
response(trans('wrong path'.AddErrorLocation()), 400)->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (strpos($_POST['name'], '/') !== false)
|
||||
{
|
||||
response(trans('wrong path'.AddErrorLocation()), 400)->send();
|
||||
exit;
|
||||
}
|
||||
if($ftp){
|
||||
$path = $ftp_base_url . $upload_dir . $_POST['path'];
|
||||
}else{
|
||||
$path = $current_path . $_POST['path'];
|
||||
}
|
||||
|
||||
$name = $_POST['name'];
|
||||
|
||||
$info = pathinfo($name);
|
||||
|
||||
if ( ! in_array(fix_strtolower($info['extension']), $ext))
|
||||
{
|
||||
response(trans('wrong extension'.AddErrorLocation()), 400)->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$file_name = $info['basename'];
|
||||
$file_ext = $info['extension'];
|
||||
$file_path = $path . $name;
|
||||
|
||||
// make sure the file exists
|
||||
if($ftp){
|
||||
$file_url = 'http://www.myremoteserver.com/file.exe';
|
||||
header('Content-Type: application/octet-stream');
|
||||
header("Content-Transfer-Encoding: Binary");
|
||||
header("Content-disposition: attachment; filename=\"" . $file_name . "\"");
|
||||
readfile($file_path);
|
||||
}elseif (is_file($file_path) && is_readable($file_path))
|
||||
{
|
||||
if ( ! file_exists($path . $name))
|
||||
{
|
||||
response(trans('File_Not_Found'.AddErrorLocation()), 404)->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
$size = filesize($file_path);
|
||||
$file_name = rawurldecode($file_name);
|
||||
if (function_exists('mime_content_type')){
|
||||
$mime_type = mime_content_type($file_path);
|
||||
}elseif(function_exists('finfo_open')){
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$mime_type = finfo_file($finfo, $file_path);
|
||||
}else{
|
||||
include 'include/mime_type_lib.php';
|
||||
$mime_type = get_file_mime_type($file_path);
|
||||
}
|
||||
|
||||
@ob_end_clean();
|
||||
if(ini_get('zlib.output_compression')){
|
||||
ini_set('zlib.output_compression', 'Off');
|
||||
}
|
||||
header('Content-Type: ' . $mime_type);
|
||||
header('Content-Disposition: attachment; filename="'.$file_name.'"');
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header('Accept-Ranges: bytes');
|
||||
|
||||
if(isset($_SERVER['HTTP_RANGE']))
|
||||
{
|
||||
list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2);
|
||||
list($range) = explode(",",$range,2);
|
||||
list($range, $range_end) = explode("-", $range);
|
||||
$range=intval($range);
|
||||
if(!$range_end) {
|
||||
$range_end=$size-1;
|
||||
} else {
|
||||
$range_end=intval($range_end);
|
||||
}
|
||||
|
||||
$new_length = $range_end-$range+1;
|
||||
header("HTTP/1.1 206 Partial Content");
|
||||
header("Content-Length: $new_length");
|
||||
header("Content-Range: bytes $range-$range_end/$size");
|
||||
} else {
|
||||
$new_length=$size;
|
||||
header("Content-Length: ".$size);
|
||||
}
|
||||
|
||||
$chunksize = 1*(1024*1024);
|
||||
$bytes_send = 0;
|
||||
if ($file = fopen($file_path, 'r'))
|
||||
{
|
||||
if(isset($_SERVER['HTTP_RANGE']))
|
||||
fseek($file, $range);
|
||||
|
||||
while(!feof($file) &&
|
||||
(!connection_aborted()) &&
|
||||
($bytes_send<$new_length)
|
||||
)
|
||||
{
|
||||
$buffer = fread($file, $chunksize);
|
||||
echo($buffer);
|
||||
flush();
|
||||
$bytes_send += strlen($buffer);
|
||||
}
|
||||
fclose($file);
|
||||
} else {
|
||||
die('Error - can not open file.');
|
||||
}
|
||||
|
||||
die();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// file does not exist
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
exit;
|
||||
}
|
||||
|
||||
exit;
|
||||
BIN
public/assets/adm/js/filemanager/img/clipboard_apply.png
Executable file
|
After Width: | Height: | Size: 189 B |
BIN
public/assets/adm/js/filemanager/img/clipboard_clear.png
Executable file
|
After Width: | Height: | Size: 195 B |
BIN
public/assets/adm/js/filemanager/img/copy.png
Executable file
|
After Width: | Height: | Size: 238 B |
BIN
public/assets/adm/js/filemanager/img/cut.png
Executable file
|
After Width: | Height: | Size: 173 B |
BIN
public/assets/adm/js/filemanager/img/date.png
Executable file
|
After Width: | Height: | Size: 611 B |
BIN
public/assets/adm/js/filemanager/img/dimension.png
Executable file
|
After Width: | Height: | Size: 489 B |
BIN
public/assets/adm/js/filemanager/img/down.png
Executable file
|
After Width: | Height: | Size: 163 B |
BIN
public/assets/adm/js/filemanager/img/download.png
Executable file
|
After Width: | Height: | Size: 674 B |
BIN
public/assets/adm/js/filemanager/img/duplicate.png
Executable file
|
After Width: | Height: | Size: 245 B |
BIN
public/assets/adm/js/filemanager/img/edit_img.png
Executable file
|
After Width: | Height: | Size: 673 B |
BIN
public/assets/adm/js/filemanager/img/file_edit.png
Executable file
|
After Width: | Height: | Size: 764 B |
BIN
public/assets/adm/js/filemanager/img/glyphicons-halflings-white.png
Executable file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
public/assets/adm/js/filemanager/img/glyphicons-halflings.png
Executable file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ac3.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/accdb.jpg
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ade.jpg
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/adp.jpg
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ai.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/aiff.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/avi.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/bmp.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/css.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/csv.jpg
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/default.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/dmg.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/doc.jpg
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/docx.jpg
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/favicon.ico
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/fla.jpg
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/flv.jpg
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/folder.png
Executable file
|
After Width: | Height: | Size: 737 B |
BIN
public/assets/adm/js/filemanager/img/ico/folder_back.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/gif.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/gz.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/html.jpg
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/iso.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/jpeg.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/jpg.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/log.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/m4a.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mdb.jpg
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mid.jpg
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mov.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mp3.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mp4.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mpeg.jpg
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/mpg.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/odb.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/odf.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/odg.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/odp.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ods.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/odt.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ogg.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/otg.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/otp.jpg
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ots.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ott.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/pdf.jpg
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/png.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/ppt.jpg
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/pptx.jpg
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/psd.jpg
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/rar.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/rtf.jpg
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/sql.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/svg.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/tar.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/tiff.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/txt.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/wav.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/webm.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/wma.jpg
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/xhtml.jpg
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/xls.jpg
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/xlsx.jpg
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/xml.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico/zip.jpg
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/adm/js/filemanager/img/ico_dark/ac3.jpg
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/assets/adm/js/filemanager/img/ico_dark/accdb.jpg
Executable file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/assets/adm/js/filemanager/img/ico_dark/ade.jpg
Executable file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/assets/adm/js/filemanager/img/ico_dark/adp.jpg
Executable file
|
After Width: | Height: | Size: 4.0 KiB |