Skip to content

Commit 76401e9

Browse files
committed
资源
1 parent 76f1bea commit 76401e9

File tree

255 files changed

+77311
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+77311
-0
lines changed
+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<form method="post" class="form-inline" action="{:U('Admin/saveAvatar')}" id="form-save" enctype="multipart/form-data">
2+
<div class="modal-header">
3+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
4+
aria-hidden="true">&times;</span></button>
5+
<h4 class="modal-title" id="myModalLabel">修改头像</h4>
6+
</div>
7+
<div class="modal-body">
8+
<input type='hidden' name="admin_id" value="<?php echo $info['admin_id'];?>" data-value="<?php echo $info['admin_id'];?>" />
9+
<div style="padding:20px 20px 0 20px;">
10+
<input type="file" accept="image/*" name="avatar" class="btn btn-danger center-block" style="width: 90px;opacity: 0;" onchange="this.value && $('#image-button').text(this.value)"/>
11+
<button class="btn btn-danger center-block" id="image-button" style="margin-top: -35px">请选择文件</button>
12+
</div>
13+
</div>
14+
<div class="modal-footer">
15+
<input type="button" class="btn btn-primary" onclick="ajaxFilePost(this.form.action, this.form)" value="确定"/>
16+
<input type="reset" class="btn btn-warning" value=" 重置 "/>
17+
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
18+
</div>
19+
<div class="error-msg"></div>
20+
</form>
21+
<script type="text/javascript">
22+
function ajaxFilePost(url, form) {
23+
var formData = new FormData($(form)[0]);//html5
24+
//只追加一个progress元素
25+
if(!$(form).find(".progress").length) {
26+
//进度条
27+
var html = '<div class="progress">' +
28+
'<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"' +
29+
' aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em;">0%</div></div>';
30+
$(form).append(html);
31+
}
32+
var progress = $(".progress").children("div");
33+
$.ajax({
34+
url: url,
35+
type: 'post',
36+
xhr: function() {
37+
//自定义xhr对象
38+
myXhr = $.ajaxSettings.xhr();
39+
if(myXhr.upload){
40+
myXhr.upload.onprogress = function(e) {
41+
//监测进度
42+
var percent = Math.floor(e.loaded / e.total * 100);
43+
progress.width(percent+"%");
44+
progress.text(percent+"%");
45+
}
46+
}
47+
return myXhr;
48+
},
49+
success: function (data) {
50+
if (data.status) {
51+
$(form).find(".error-msg").html("");
52+
var html = '<div class="alert alert-success" role="alert">' + data.info + '</div>';
53+
$(form).append(html);
54+
window.setTimeout(function () {
55+
$('#avatar').modal('toggle');
56+
$("#admin-avatar").html('<img alt="image" class="img-circle avatar" src="'+data.url+'"/>');
57+
}, 500);
58+
} else {
59+
var html = '<div role="alert" class="alert alert-warning alert-dismissible fade in">';
60+
html += '<button aria-label="Close" data-dismiss="alert" class="close" type="button"><span aria-hidden="true">×</span></button>';
61+
html += '<strong>' + data.info + '</strong></div>'
62+
$(form).find(".error-msg").html(html);
63+
progress.width("0%");
64+
progress.text("0%");
65+
}
66+
},
67+
data: formData,
68+
dataType: 'json',
69+
cache: false,
70+
contentType: false,
71+
processData: false
72+
});
73+
}
74+
</script>
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<form method="post" class="form-inline" action="__MODULE__/Admin/savePost" id="form-save">
2+
<div class="modal-header">
3+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
4+
aria-hidden="true">&times;</span></button>
5+
<h4 class="modal-title" id="myModalLabel">查看资料</h4>
6+
</div>
7+
<div class="modal-body">
8+
<input type='hidden' name="admin_id" value="<?php echo $info['admin_id']; ?>" data-value="<?php echo $info['admin_id']; ?>" />
9+
10+
<div style="padding:20px 20px 0 20px;">
11+
<table>
12+
<tr style="margin-bottom:10px;display:block;">
13+
<td width="90">用户名:</td>
14+
<td><input type="text" class="form-control" placeholder="用户名" name="username"
15+
value="<?php echo $info['username']; ?>" data-value="<?php echo $info['username']; ?>" maxlength="30"/><span class="text-info">*</span>
16+
</td>
17+
</tr>
18+
<tr style="margin-bottom:10px;display:block;">
19+
<td width="90">密码:</td>
20+
<td><input type="password" class="form-control" placeholder="密码" name="password" value="123456" data-value=""
21+
maxlength="32"/><span class="text-info">*</span></td>
22+
</tr>
23+
<tr style="margin-bottom:10px;display:block;">
24+
<td width="90">邮箱:</td>
25+
<td><input type="text" class="form-control" placeholder="邮箱" name="email"
26+
value="<?php echo $info['email']; ?>" data-value="<?php echo $info['email']; ?>" maxlength="30"/></td>
27+
</tr>
28+
</table>
29+
</div>
30+
</div>
31+
<div class="modal-footer">
32+
<input type="button" class="btn btn-primary" onclick="save(this.form)" value="确定"/>
33+
<input type="reset" class="btn btn-warning" value=" 重置 "/>
34+
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
35+
</div>
36+
<div class="error-msg"></div>
37+
</form>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Home\Controller;
3+
4+
use Think\Controller;
5+
6+
class EmptyController extends Controller {
7+
public function index() {
8+
$this->display('Empty:404');
9+
}
10+
}

Application/Home/View/Empty/404.html

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
6+
<meta charset="utf-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
9+
10+
<title>404 页面</title>
11+
12+
<link rel="shortcut icon" href="__PUBLIC__/H+/favicon.ico">
13+
<link href="__PUBLIC__/H+/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
14+
<link href="__PUBLIC__/H+/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
15+
16+
<link href="__PUBLIC__/H+/css/animate.min.css" rel="stylesheet">
17+
<link href="__PUBLIC__/H+/css/style.min.css?v=4.1.0" rel="stylesheet">
18+
<base target="_blank">
19+
20+
</head>
21+
22+
<body class="gray-bg">
23+
<div class="middle-box text-center animated fadeInDown">
24+
<h1>404</h1>
25+
<h3 class="font-bold">页面未找到!</h3>
26+
27+
<div class="error-desc">
28+
抱歉,页面好像去火星了~
29+
<form class="form-inline m-t" role="form">
30+
<div class="form-group">
31+
<input type="email" class="form-control" placeholder="请输入您需要查找的内容 …">
32+
</div>
33+
<button type="submit" class="btn btn-primary">搜索</button>
34+
</form>
35+
</div>
36+
</div>
37+
<!--<script src="__PUBLIC__/H+/js/jquery.min.js?v=2.1.4"></script>
38+
<script src="__PUBLIC__/H+/js/bootstrap.min.js?v=3.3.5"></script>-->
39+
</body>
40+
41+
</html>

Public/H+/css/animate.min.css

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Public/H+/css/demo/webuploader-demo.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Public/H+/css/login.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
25.7 KB
Loading
32.3 KB
Loading
5.74 KB
Loading

Public/H+/css/patterns/shattered.png

135 KB
Loading

0 commit comments

Comments
 (0)