/*  */
function mode_edImportBtn_exec(path, sval, mode, ditem, table, fdname, dform, deri, fow, inidval) {
	var inid = $(inidval),
		zmode = $('#SUB_MODE'+fow).val();
	var filelen = (inid[0].files[0].size).toString(),
		zform = '#detail_form_'+zmode+fow;
	var zeri = ($(zform+' #ERI').length > 0 && $(zform+' #ERI').val() != '') ? $(zform+' #ERI').val() : $(zform+' #TEMPERI').val();
	var ueri = $(dform+' #'+fdname+'_ERI'+((deri == '') ? '' : '_'+deri)).val(),
		keyfd = $(dform+' #'+fdname+'_ERI'+((deri == '') ? '' : '_'+deri)).attr('keyfd'),
		idnm = EncodeURLutf8(dform+' #'+fdname+((deri == '') ? '' : '_'+deri));
	var fdata = new FormData();
	fdata.append('file', inid[0].files[0]);
	var url = path+'core/cw5e_import.php?sid='+sval+'&parent='+EncodeURLutf8(path)+'&act=imptfile';
	url += '&mode='+mode+'&ditem='+ditem+'&table='+table+'&fdname='+fdname+'&keyfd='+keyfd;
	url += '&ueri='+ueri+'&dform='+EncodeURLutf8(dform)+'&idnm='+idnm+'&fow='+fow;
	url += '&zmode='+zmode+'&zeri='+zeri+'&filelen='+filelen;
	//console.log(url);
	$.ajax({
		url: url,
		type: 'POST',
		data: fdata,
		processData: false,
		contentType: false,
		beforeSend: function(){
			$('#popup_box').empty().append('<img src="images/image-loading.gif" alt="loading">');
		},
		success: function(msg){
			// console.log(msg);
			var ret_msg = JSON.parse(msg);
			if (ret_msg[0].result == 'false') {
				//if (ret_msg[0].message) alert(ret_msg[0].message);
				if (ret_msg[0].message) {
					$('#popup_box').empty().append(ret_msg[0].message);
				}
			} else {
				if (ret_msg[0].html_str) {
					$('#popup_box').empty().append(ret_msg[0].html_str);
				}
			}
		}
	});
}