-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
223 lines (206 loc) · 7.97 KB
/
index.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
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
<?php
if($_SERVER['HTTP_HOST']=='fcdh.net'){
header("location:https://www.fcdh.net/");
exit;
}
include 'sqlite_db.php';
include 'function.php';
$name=load_config('name');
$verify=load_config('verify');
?>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0 user-scalable=0" />
<meta name="author" content="viggo" />
<title>留言板 - 非常导航</title>
<meta name="keywords" content="留言板,非常导航">
<meta name="description" content="留言板,非常导航">
<link rel="shortcut icon" href="./assets/images/favicon.png">
<link rel="stylesheet" href="https://apps.bdimg.com/libs/fontawesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./assets/css/fcdh.css">
<link rel="stylesheet" href="./assets/css/bbs.css">
<script src="https://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<!-- 最外层容器 -->
<div id="container">
<div id="sidebar"class="toggle-others">
<div class="ti-fix">
<header class="logo-env">
<!-- logo -->
<div class="logo">
<a href="https://www.fcdh.net/" class="logo-expanded">
<img src="./assets/images/logo@2x.png"alt="非常导航之电脑版本logo" />
</a>
<a href="https://www.fcdh.net/" class="logo-collapsed">
<img src="./assets/images/logo-collapsed@2x.png"alt="非常导航之手机版本logo" />
</a>
</div>
</header>
<ul id="menu">
<li class="active">
<a href="#this" class="smooth">
<span>最新留言</span>
<i class="fa-fire"></i>
</a>
</li>
<li>
<a href="sitesub.php" class="smooth">
<span>提交网站</span>
<i class="fa-link"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="content">
<nav class="navbar user-info-navbar" role="navigation">
<!-- User Info, Notifications and Menu Bar -->
<!-- Left links for user info navbar -->
<ul class="user-info-menu">
<li id="ti-side">
<a href="#">
<i class="fa-bars"></i>
</a>
</li>
<li id="ti-menu">
<a href="#">
<i class="fa fa-bars"></i>
</a>
</li>
<li id="ti-home">
<a href="./">
<i class="fa-home"></i>
</a>
</li>
<li>
<div id="ti-search"class="searchs">
<form action="https://www.baidu.com/s" target="_blank" method="get">
<div class="input-group">
<img id="ti-icon"src="assets/images/baidu.png" alt="0">
<ul id="ti-engine">
</ul>
<!-- 搜索热词 -->
<input id="txt"type="text" class="form-control" name="word" placeholder="随时搜索一下" maxlength="255"autocomplete="off">
<span class="input-group-btn">
<button type="submit"class="btn btn-primary fa-search"> 百度</button>
</span>
<ul id="box">
</ul>
</div>
</form>
</div>
</li>
</ul>
<ul class="ti-ads">
<li><a href="https://www.fcdh.net/">非常导航</a></li>
</ul>
</nav>
<br/>
<br/>
<form id="myform">
<h3><a class="c10"><i class="fa-bookmark"></i> BBS留言</a> <strong id="info"class="c2"></strong></h3>
<p>
<label><a class="c2"><i class="fa-bookmark"></i> 电子邮箱</a> <a href="https://www.fcdh.net/youxiang.html" title="免费电子邮箱申请"class="ti-more"target="_blank">◆邮箱申请 »</a> <strong id="info"class="c2"></strong></label><input type="text" class="form-control" name="email"maxlength="21"style="width:100%" id="email" placeholder="电子邮箱,方便回复您"></p>
<p>
<label><a class="c5"><i class="fa-bookmark"></i> 留言内容</a></label>
<textarea rows="5" id="text" placeholder="留言内容" maxlength="100"></textarea>
</p>
<p>
<label><?php if(load_config('scode')=='1'){?><img src="scode.php"alt="点击刷新" title="点击刷新" id="scodeimg" ></label><input type="text" class="form-control" name="code"maxlength="4"style="width:123px" id="scode" placeholder="验证码"><?php }?><button type="submit" class="btn btn-primary"value="4">发布留言</button></p>
</form>
<div id="main">
<h3><a><i class="fa-bookmark"></i>留言列表</a></h3>
<div id="top">
</div>
<div id="list">
</div>
</div>
<br/><br/><br/>
<footer class="footer">
<div class="vcenter">
Since 2020 <strong><a href="https://www.fcdh.net/">www.fcdh.net</a></strong> <span class="ti-more"><a href="https://beian.miit.gov.cn/">渝ICP备20001609号</a></a>
</div>
<div id="go-up">
<a href="#" rel="go-top"title="顶部">
<i class="fa-tree"></i>
</a>
</div>
</footer>
<div id="ti-meng"></div>
</div>
</div> <!-- end 最处层容器 -->
<!-- 确定信息 -->
<div class="modal fade" id="warning" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> × </button>
<h3 class="modal-title" id="myModalLabel"> 提示信息 </h3>
</div>
<div class="modal-body"><p class="modal-body"><strong id="msg"></strong></p></div>
<div class="modal-footer">
<button id="cancel"type="submit" class="btn btn-primary" data-dismiss="modal"> 确 定 </button>
</div>
</div><!-- end 模态 -->
</div>
<script src="./assets/js/fcdh.js"></script>
<script>
$(function(){
$('#scodeimg').bind('click',function(){this.src='scode.php?rand='+Math.random();});
$('#myform').bind('submit',function(){
if($('#text').val().trim()==''){
$('#msg').html('请填写留言内容');
$('#warning').modal('show');
return false;
}
if($('#scode').val()==''){
$('#msg').html('请填写验证码');
$('#warning').modal('show');
return false;
}
$.post('js_post.php',{'content':$('#text').val(),'scode':$('#scode').val(),'rand':Math.random(),'email':$('#email').val()},function(data){
if(data=='success'){
$('#text').val('');
$('#scode').val('');
$('#email').val('');
offset=0;
load_content();
}else if(data=='scode'){
$('#scode').val('');
$('#msg').html('验证码有误');
$('#warning').modal('show');
}else{
$('#scode').val('');
$('#msg').html('电子邮箱包含不合法字符');
$('#warning').modal('show');
}
$('#scodeimg').attr('src','scode.php?rand='+Math.random());
});
return false;
});
$(window).bind('hashchange',function(){
load_content();
});
function load_content(){
var page=window.location.hash;
page=page.replace('#','');
if(page=='') page=1;
$('#list').html('数据加载中');
$.post('js_content.php',{'page':page,'rand':Math.random()},function(data){
$('#list').html(data);
});
}
function load_top(){
$.post('js_top.php',{},function(data){
$('#top').html(data);
});
}
load_top();
load_content();
});
</script>
</body>
</html>