/
upload.php
69 lines (62 loc) · 2.64 KB
/
upload.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
// +----------------------------------------------------------------------
// | Copyright (C) 2008-2012 OSDU.Net www.osdu.net admin@osdu.net
// +----------------------------------------------------------------------
// | Licensed: ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 左手边的回忆 QQ:858908467 E-mail:858908467@qq.com
// +----------------------------------------------------------------------
require('./init.php');
if(!Auth::is_login()){
redirect('./login.php?act=in');
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="renderer" content="webkit">
<title>WebFTP 文件上传组件</title>
<script src="static/js/jquery-1.7.2.min.js"></script>
<script src="static/plupload/plupload.min.js"></script>
<!-- <script src="static/plupload/plupload.js"></script>
<script src="static/plupload/plupload.flash.js"></script>
<script src="static/plupload/plupload.html4.js"></script>
<script src="static/plupload/plupload.html5.js"></script> -->
<link rel="stylesheet" href="static/plupload/jquery.plupload.queue/jquery.plupload.queue.css" />
<script src="static/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js"></script>
<script src="static/js/webftp.core.js"></script>
<script src="static/js/webftp.upload.js"></script>
<style type="text/css">
body { font-family:Verdana, Geneva, sans-serif; font-size: 13px; color: #333; margin: 0; }
.plupload_container {padding: 0;};
</style>
</head>
<body >
<div id="uploader" style="width:100%;height:10%;">Your browser doesn't support upload.</div>
<script type="text/javascript">
$(function () {
// 配置参数
// app.debug = true;
app.api = {
key: 'KHSDLG80346JJSDG',
url: './webftp.php?mod=nfs&act=upload',
path: '/?/', cover: 0,
webftp_sessid: '<?php echo Session::id();?>',
webftp_uname: '<?php echo Cookie::get('uname');?>',
webftp_tokey: '<?php echo Cookie::get('tokey');?>'
};
app.settings = {
max_file_size: '<?php echo C('UPLOAD.MAX_FILE_SIZE');?>',
chunk_size: '<?php echo C('UPLOAD.CHUNK_SIZE');?>',
filters: []
};
// 执行初始化
app.upload.init();
window.dialog = parent.$.dialog({id : 'upload'});
window.dialog.title('文件上传 - 准备就绪');
});
</script>
</body>
</html>