Code: Select all
$session = session_id();
$action = html_entity_decode($this->_createAjax('category_image_upload', $id, $returnid));
$this->smarty->assign('script', "
<__script__ type='text/javascript'>
$(function() {
$('#m1_uploadify').uploadify({
'uploader' : '".$this->GetModuleURLPath()."/js/uploadify/uploadify.swf',
'script' : '".$action."',
'cancelImg' : '".$this->GetModuleURLPath()."/js/uploadify/cancel.png',
'folder' : '/uploads/shop',
'auto' : true,
'onComplete' : function(event, ID, fileObj, response, data) {
console.log(response)
},
'scriptData' : { 'PHPSESSID': '".session_id()."', '_sx_': '".$_REQUEST['_sx_']."' }
});
})
</__script>
");
cms version: 1.10.3
kubuntu
php 5.3.6