AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.117
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/components/com_djclassifieds/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/components/com_djclassifieds/assets/js/djuploader.js
/**
 * @package DJ-Classifieds
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email: contact@dj-extensions.com
 */

function startUpload(up,files)
{
	up.start();
}

function injectUploaded(up,file,info,site_url,label_generator,upload_path)
{
	upload_path = (typeof upload_path !== 'undefined') ?  upload_path : '/tmp/djupload';
	
    try{
        var response = JSON.parse(info.response);
    }catch(e){
		injectUploadedFailLog(file,"File can't be uploaded due to the server-related issue - Check the site's .htaccess file or contact your web host provider");
        return false;
    }

	if(!response){
		injectUploadedFailLog(file,"File can't be uploaded");
		return false;
	}
	if(response.error){
		injectUploadedFailLog(file,response.error.message);
		return false;
	}
	
	var img_caption = '';
	if(label_generator==1){
		img_caption = stripExt(file.name);
	}
	var html = '<img src="'+site_url+upload_path+'/'+file.target_name+'" alt="'+file.name+'" />';
	html += '	<div class="imgMask">';
	html += '	<input type="hidden" name="img_id[]" value="0">';
	html += '	<input type="hidden" name="img_image[]" value="'+file.target_name+';'+file.name+'">';
	html += '	<input type="hidden" name="img_rotate[]" class="input_rotate" value="0">';
	html += '	<input type="text" class="itemInput editTitle" name="img_caption[]" value="'+img_caption+'">';
	html += '	<span class="delBtn"></span><span rel="'+upload_path+'/'+file.target_name+'" alt="'+file.name+'" class="rotateBtn"></span></div>';
	var item = jQuery('<div class="itemImage">'+html+'</div>');
	initItemEvents(item, jQuery('.adminItemImages').length ? true : false);
	// add uploaded image to the list and make it sortable
	item.appendTo(jQuery('#itemImagesWrap #itemImages'));
	if(typeof this.djsortables !== 'undefined'){
		this.djsortables.append(item);
	}
	up.removeFile(file);

	if(up.total.queued == 0){
		jQuery('#dj-classifieds #submit_button').prop('disabled', false);
	}
	
	return true;
}

function injectFrontUploaded(up,file,info,site_url,label_generator,upload_path)
{
	injectUploaded(up,file,info,site_url,label_generator,upload_path);
	if(typeof djImgReqHelper === 'function'){
		djImgReqHelper();
	}
}

function injectUploadedFailLog(file,msg)
{
	file.status = plupload.FAILED;
	file.name += ' - ' + msg;
	jQuery('#'+file.id).addClass('ui-state-error');
	jQuery('#'+file.id).find('td.plupload_file_name').append(' - ' + msg);
}

function initItemEvents(item, is_admin)
{
	is_admin = (typeof is_admin !== 'undefined') ?  is_admin : false;
	item = jQuery(item);
	if(!item.length) return;
	item.find('.delBtn').on('click',function(){
		item.detach();
		if(typeof djImgReqHelper === 'function'){
			djImgReqHelper();
		}
		return false;
	});
	
	var img_rotate = 0;
	var image = item.find('img');
	var img_src_org = image.attr('src');

	if(item.find('.rotateBtn').length){
		item.find('.rotateBtn').on('click',function(btn){
			img_src = jQuery(this).attr('rel');		
			
			if(parseInt(jQuery(this).parent().find('[name="img_id[]"]').val())){
				img_rotate++;
				item.find('.input_rotate').val(img_rotate);	
				jQuery(this).closest('.itemImage').find('img').css('transform', 'rotate('+ 90*img_rotate +'deg)');
				return false;
			}

			var data_obj =  {
				'option': 'com_djclassifieds',
				'img_src': img_src	
			};

			if(is_admin){
				data_obj.task = 'item.rotateImage';
			}else{
				data_obj.view = 'additem';
				data_obj.task = 'rotateImage';
			}

			jQuery.ajax({
				url: typeof window.djRootUrl !== 'undefined' ? window.djRootUrl : 'index.php',
				type: 'post',
				data: data_obj
			}).done(function (response, textStatus, jqXHR){
				if(textStatus == 'success'){
					image.removeAttr('src'); 
					img_rotate++;
					image.attr('src', img_src_org+'?r='+img_rotate);
					item.find('.input_rotate').val(img_rotate);
				}
			});		
		});		
	}
	
	item.find('input').each(function(){
		var input = jQuery(this);
		input.on('focus',function(){
			item.addClass('active');
		});
		input.on('blur',function(){
			item.removeClass('active');
		});
	});
}

function stripExt(filename)
{
	var pattern = /\.[^.]+$/;
	return filename.replace(pattern, "");	
}

jQuery(function(){
	if(typeof jQuery.fn.sortable != 'undefined'){
		window.djsortables = jQuery('#itemImages').sortable({
			cancel: '.delBtn,.rotateBtn,input,a',
			cursor: 'move',
			opacity: 0.3
		});
	}

	jQuery('.itemImage').each(function(){
		initItemEvents(this, jQuery('.adminItemImages').length ? true : false);
	});

	if(typeof djImgReqHelper === 'function'){
		djImgReqHelper();
	}
});

Anon7 - 2022
AnonSec Team