<label>缩略图:
</label>
<div style="float:left;">
<div style="float:left;"><input id="file_litpic" type="file" multiple="true" /></div>
<div style="float:left;"> <input type="text" name="litpic" id="litpic" class="dfinput" /> <span style=\"color:red;\" id=\"text_litpic\"></span></div>
<div id="queue"></div>
</div>
<?php
$timestamp = time();
?>
<script type="text/javascript">
$(function() {
$('#file_litpic').uploadify({
'formData' : {
'timestamp' : '
<?php echo $timestamp?>',
'token' : '
<?php echo md5('unique_salt' . $timestamp)?>',
'session_id' : '
<?php echo $session_id?>'
},
'swf' : '/tool/uploadify/uploadify.swf',
'uploader' : '
<?php echo base_url('monz/sendLitpic/')?>',
'multi' : false,
'buttonText' : '选择上传图片',
'onUploadSuccess' : function(file,data,response) {//上传完成时触发(每个文件触发一次)
$('#litpic').val(data);
$('#view_litpic').css('display', 'block');
$('#view_litpic').attr('src', data);
},
'onUploadError' : function(file,errorCode,errorMsg,errorString,swfuploadifyQueue){
$('#text_litpic').html('上传文件出错,请检查文件是否为可上传类型');
}
});
});
</script>