home.html
6.35 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript">
var oper;
jQuery(function($) {
// 页面方法
oper = {
form : document.form1,
list : function() {
var url = 'admin/home';
this.form.action = url;
this.form.submit();
}
};
//显示Menu索引
showMenu('page_home');
});
</script>
<%
};
%>
<%
var bodyContent = {
%>
<!-- 菜单 -->
<% include("/pages/template/menu.html"){} %>
<%
// 传递变量
// 文章列表 articlelist 必填
// 默认图片 defalutimg 选填
var sessionUserId = isEmpty(session.session_user) ? 0: session.session_user.userid;
%>
<div class="container" style="margin-top: 10px;">
<div class="row">
<div class="col-md-8">
<% if(!isEmpty(articles)){ %>
<!-- 最新文章 -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">文章TOP10 <a href="admin/article/list" style="font-size: 12px;color:green;">更多</a></h3>
</div>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>序号</th>
<% // 列表头部 %>
<th>栏目</th>
<th>名称</th>
<th>排序</th>
<th>状态</th>
<th>评论</th>
<th>推荐</th>
<th>发布时间</th>
<th>发布者</th>
</tr>
</thead>
<tbody>
<% for(item in articles){ %>
<tr>
<td>${itemLP.index }</td>
<% // 列表内容 %>
<td>${item.folderName }</td>
<td title="${item.title}">
<a href="front/article/${item.id}.html" class="btn btn-link" target="_blank">
<% if (strutil.length(item.title) > 12) { %>
${strutil.subStringTo(item.title, 0, 12)}...
<% } else { %>
${item.title}
<% } %>
</a>
</td>
<td>${item.sort}</td>
<td>
<% if(item.status=='2') { %>
隐藏
<% } %>
<% if(item.status=='1') { %>
显示
<% } %>
</td>
<td>
<% if(item.is_comment==2) { %>
否
<% } %>
<% if(item.is_comment==1) { %>
是
<% } %>
</td>
<td>
<% if(item.is_recommend==2) { %>
否
<% } %>
<% if(item.is_recommend==1) { %>
是
<% } %>
</td>
<td>${item.publish_time}</td>
<td>${item.publish_user}</td>
</tr>
<% } %>
</tbody>
</table>
</div>
<% } %>
<% if(!isEmpty(comments)){ %>
<!-- 最新回复 -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">回复TOP10 <a href="admin/comment/list" style="font-size: 12px;color:green;">更多</a></h3>
</div>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>序号</th>
<% // 列表头部 %>
<th>创建时间</th>
<th>文章</th>
<th>回复人</th>
<th>被回复人</th>
<th>内容</th>
</tr>
</thead>
<tbody>
<% for(item in comments){ %>
<tr>
<td>${itemLP.index }</td>
<% // 列表内容 %>
<td>${item.create_time}</td>
<td>
<a href="front/article/${item.article_id}.html#article_comment" class="btn btn-link" target="_blank">
<% if (strutil.length(item.articleName) > 12) { %>
${strutil.subStringTo(item.articleName, 0, 12)}...
<% } else { %>
${item.articleName}
<% } %>
</a>
</td>
<td>${flyfox.getUserName(item.create_id)}</td>
<td>${flyfox.getUserName(item.reply_userid)}</td>
<td title="${flyfox.showHTML(item.content, 200, '...')}">
${flyfox.showHTML(item.content, 30, '...')}
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
<% } %>
</div>
<div class="col-md-4">
<!-- 用户信息 -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">个人信息 <a href="admin/person" style="font-size: 12px;color:green;">编辑</a></h3>
</div>
<div class="panel-body">
<form class="form-horizontal" name="form1" action="" method="post">
<div class="form-group">
<label for="username" class="col-sm-3 control-label">登录名</label>
<div class="col-sm-9">
${nowUser.username!''}
</div>
</div>
<div class="form-group">
<label for="realname" class="col-sm-3 control-label">昵称</label>
<div class="col-sm-9">
${nowUser.realname!''}
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-3 control-label">email</label>
<div class="col-sm-9">
${nowUser.email!''}
</div>
</div>
<div class="form-group">
<label for="tel" class="col-sm-3 control-label">手机号</label>
<div class="col-sm-9">
${nowUser.tel!''}
</div>
</div>
<div class="form-group">
<label for="remark" class="col-sm-3 control-label">备注</label>
<div class="col-sm-9">
${nowUser.remark!''}
</div>
</div>
</form>
</div>
</div>
<% if(!isEmpty(pageViews)){ %>
<!-- 最新访客 -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">访客TOP10 <a href="admin/pageview" style="font-size: 12px;color:green;">更多</a></h3>
</div>
<ul class="list-group">
<% for(item in pageViews){ %>
<li class="list-group-item">
<span class="badge">${item.create_time}</span>
${item.ip}(${item.userid})
</li>
<% } %>
</ul>
</div>
<% } %>
<% if(!isEmpty(users)){ %>
<!-- 最新注册用户 -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">注册用户TOP10 <a href="system/user/list" style="font-size: 12px;color:green;">更多</a></h3>
</div>
<ul class="list-group">
<% for(item in users){ %>
<li class="list-group-item">
<span class="badge">${item.create_time}</span>
用户:${item.realname}<br>邮箱:${item.email}
</li>
<% } %>
</ul>
</div>
<% } %>
</div>
</div>
<%}; %>
<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>