-
Notifications
You must be signed in to change notification settings - Fork 8
/
en-US.php
230 lines (227 loc) · 7.52 KB
/
en-US.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
224
225
226
227
228
229
230
<?php
include("./includes/common.php");
$title = $conf['title'];
include SYSTEM_ROOT.'en-header.php';
$type = isset($_GET['type'])?trim($_GET['type']):0;
$dstatus = isset($_GET['dstatus'])?trim($_GET['dstatus']):0;
if (isset($_GET['dstatus']) && $_GET['dstatus']>0) {
if($_GET['dstatus']==3){
$sqls = " AND `block`=2";
$links = "&dstatus=".$_GET['dstatus'];
}elseif($_GET['dstatus']==2){
$sqls = " AND `block`=1";
$links = "&dstatus=".$_GET['dstatus'];
}elseif($_GET['dstatus']==1){
$sqls = " AND `block`=0";
$links = "&dstatus=".$_GET['dstatus'];
}
}
if(isset($_GET['kw']) && !empty($_GET['kw'])) {
$type = intval($_GET['type']);
$kw = trim(daddslashes($_GET['kw']));
if($type == 1){
$sql=" `name` LIKE '%{$kw}%'";
}elseif($type == 2){
$sql=" `hash`='{$kw}'";
}elseif($type == 3){
$sql=" `type`='{$kw}'";
}elseif($type == 4){
$sql=" `ip`='{$kw}'";
}
$sql.=$sqls;
}else{
$sql=" 1".$sqls;
}
$sql .= " and hide=0";
?>
<style
type="text/css">
<!--
a:link
{
text-decoration:
none;
}
a:visited
{
text-decoration:
none;
}
a:hover
{
text-decoration:
none;
}
a:active
{
text-decoration:
none;
}
-->
</style>
<script>
function searchClear(){
$("input[name='kw']").val('');
$("select[name='type']").val(1);
$("select[name='dstatus']").val(0);
$('#search-btn').click()
}
</script>
</div>
<style type="text/css">
</style>
<div style="font:14px Microsoft YaHei;">
<div class="col-xs-12 center-block" style="float: none; margin:0px auto; text-align:center;">
<div class="btn-group pull-right" style="display: inline-block;">
</div>
</div>
<div class="container">
<div class="col-xs-12 col-sm-6 center-block" style="float: none;">
<form onsubmit="return searchFile()" method="GET" class="form-inline">
<div class="form-group">
<label>Search</label>
<select name="type" class="form-control">
<option value="1" <?php if($type==1){echo "selected";};?>>File Name</option>
<option value="2" <?php if($type==2){echo "selected";};?>>File Hash</option>
<option value="3" <?php if($type==3){echo "selected";};?>>File Format</option>
<option value="4" <?php if($type==4){echo "selected";};?>>Upload Ip</option>
</select>
</div>
<div class="form-group" id="searchword">
<input type="text" class="form-control" name="kw" placeholder="Search content" value="<?php echo trim($_GET['kw'])?>">
</div>
<div class="form-group">
<a href="javascript:searchClear()" class="btn btn-default"><i class="fa fa-repeat"></i>Reset</a>
<button class="btn btn-primary" type="submit" id="search-btn"><i class="fa fa-search"></i>Search</button>
</div>
</div>
</form>
<div id="listTable"></div>
</div>
</div>
<div class="container">
<h3>File list</h3>
<div class="table-responsive">
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>#</th>
<th>operation</th>
<th>file name</th>
<th>file size</th>
<th>file format</th>
<th>Upload time</th>
<th>Upload IP / downloads</th>
</tr>
</thead>
<tbody>
<?php
$numrows=$DB->getColumn("SELECT count(*) from pre_file WHERE {$sql}");
$pagesize=15;
$pages=ceil($numrows/$pagesize);
$page=isset($_GET['page'])?intval($_GET['page']):1;
$offset=$pagesize*($page - 1);
$rs=$DB->query("SELECT * FROM pre_file WHERE {$sql} order by id desc limit $offset,$pagesize");
$i=1;
while($res = $rs->fetch())
{
$fileurl = './en-down.php/'.$res['hash'].'.'.($res['type']?$res['type']:'file');
$viewurl = './en-file.php?hash='.$res['hash'];
echo '<tr><td><b>'.$i++.'</b></td><td><a href="'.$fileurl.'" class="btn btn-xs btn-warning">Download</a></td><td><a href="'.$viewurl.'"><i class="fa '.type_to_icon($res['type']).' fa-fw"></i>'.$res['name'].'</td><td>'.size_format($res['size']).'</td><td><font color="blue">'.($res['type']?$res['type']:'unknown').'</font></td><td>'.$res['addtime'].'</td><td>'.preg_replace('/\d+$/','* / <font color="blue">',$res['ip']),$res['count'].'</b></td></tr>';
}
?>
</tbody>
</table>
</div>
<div style="font:12px Microsoft YaHei;">
<div class="row">
<div class="col-md-6"><br>A total of <?php echo $numrows?> a file The current first <?php echo $page?> page,A total of <?php echo $pages?> page</div>
<div class="col-md-6"><nav>
<ul class="pagination pagination-sm" style="float:right;">
<?php
$first=1;
$prev=$page-1;
$next=$page+1;
$last=$pages;
if ($page>1)
{
echo '<li><a href="en-US.php?page='.$first.$link.'">Home page</a></li>';
echo '<li><a href="en-US.php?page='.$prev.$link.'">previous page</a></li>';
} else {
echo '<li class="disabled"><a>Home page</a></li>';
echo '<li class="disabled"><a>previous page</a></li>';
}
$start=$page-5>1?$page-5:1;
$end=$page+10<$pages?$page+10:$pages;
for ($i=$start;$i<$page;$i++)
echo '<li><a href="en-US.php?page='.$i.$link.'">'.$i .'</a></li>';
echo '<li class="disabled"><a>'.$page.'</a></li>';
for ($i=$page+1;$i<=$end;$i++)
echo '<li><a href="en-US.php?page='.$i.$link.'">'.$i .'</a></li>';
echo '';
if ($page<$pages)
{
echo '<li><a href="en-US.php?page='.$next.$link.'">next page</a></li>';
echo '<li><a href="en-US.php?page='.$last.$link.'">back</a></li>';
} else {
echo '<li class="disabled"><a>next page</a></li>';
echo '<li class="disabled"><a>back</a></li>';
}
?>
</ul>
</nav></div>
</div>
</div>
</div>
</div>
<?php include SYSTEM_ROOT.'en-footer.php';?>
<?php if(!empty($conf['en_gonggao'])){?>
<link href="//cdn.staticfile.org/snackbarjs/1.1.0/snackbar.min.css" rel="stylesheet">
<script src="//cdn.staticfile.org/snackbarjs/1.1.0/snackbar.min.js"></script>
<script>
$(function() {
$.snackbar({content: "<?php echo $conf['en_gonggao']?>", timeout: 10000});
});
</script>
<?php }?>
<div style="text-align: center;">
<style>
.f6F9Be{background:#F5F5F5;line-height:40px;min-width:980px;border-top:1px solid #F5F5F5;min-width:400px}
.B4GxFc{margin-left:166px}
.fbar p,.fbar a,#fsettl,#fsett a{color:#E0E0E0}
.fbar a:hover,#fsett a:hover{color:#333}
.fbar{font-size:14px}
.EvHmz{left:0;right:0}
.hRvfYe a:hover{text-decoration:0}#fsl{margin-left:30px;float:left}#fsr{float:right;margin-right:30px;}
</style>
<style
type="text/css">
<!--
a:link
{
text-decoration:
none;
}
a:visited
{
text-decoration:
none;
}
a:hover
{
text-decoration:
none;
}
a:active
{
text-decoration:
none;
}
-->
</style>
<a class="btn" href="https://www.toopan.cn/" target="_blank"><font color="#6496b4">首页</a> | <a class="btn" href="https://www.mediy.cn/" target="_blank"><font color="#6496b4">社区论坛</a> | <a class="btn" href="https://www.doodq.com/Agreement.php" target="_blank"><font color="#6496b4">用户协议</a> | <a class="btn" href="https://www.toopan.cn" target="_blank"><font color="#6496b4">文件广场</a>
<hr/>
<div style="font:12px Microsoft YaHei; margin:0px auto; text-align:center;">
<link href="//cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<a class="btn" href="https://www.mediy.cn" target="_blank"><font color="#757575">Copyright © 2020 Mediy.cn 版权所有</a><a class="btn" href="https://beian.miit.gov.cn" target="_blank"><font color="#757575">蜀ICP备2020028076号</a>
</div>