//主程序download.php源代码如下:
1<html>
2<head>
3<meta content="zh-cn" http-equiv="Content-Language"/>
4<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
5<meta content="Microsoft FrontPage 4.0" name="GENERATOR"/>
6<meta content="FrontPage.Editor.Document" name="ProgId"/>
7<title>穷人网软件联盟</title>
8<script language="javascript">
9function popwin(parm)
10{ window.open("sign.php?"+parm,"","height=400,width=300,resizable=yes,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
11}
12</script>
13<style>
14
15BODY {
16FONT-SIZE: 9pt; LINE-HEIGHT: 12pt
17}
18TABLE {
19FONT-SIZE: 9pt; LINE-HEIGHT: 12pt
20}
21A:link {
22COLOR: blue; TEXT-DECORATION: none
23}
24A:visited {
25COLOR: #663300; TEXT-DECORATION: none
26}
27A:active {
28TEXT-DECORATION: none
29}
30A:hover {
31COLOR: #ff0000; TEXT-DECORATION: underline
32}
33</style>
34</head>
35<body>
36<table border="0" cellpadding="0" cellspacing="0" height="19" width="100%">
37<tr bgcolor="#f7f7ff">
38<td height="24" width="88%"> <font size="2">
39<? require ("../opendata.php") ?>
40</font> <font size="2"> 你的位置:<a href="http://poorren.yeah.net">首页</a>->> <a href="download.php?action=show">软件下载</a>->>
41<?
42switch($type)
43{
44case 1:echo "密码破解";break;
45case 2:echo "远程控制";break;
46case 3:echo "端口扫描";break;
47case 4:echo "字典工具";break;
48case 5:echo "系统安全";break;
49case 6:echo "各种炸弹";break;
50case 7:echo "加密软件";break;
51case 8:echo "源代码";break;
52case 9:echo "其它软件";break;
53default:echo "全部软件";
54}
55?>
56</font></td>
57<td height="24" width="12%">
58<div align="center"><font size="2"><a href="download.php?action=publish">发布软件</a></font></div>
59</td>
60</tr>
61</table>
62<font size="2"> </font>
63<table border="1" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" height="20" width="100%">
64<tr bgcolor="#f0f0ff" bordercolor="#FFFFFF">
65<td height="21" width="10%">
66<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=0&sort=<?=$sort?>&isdesc=<?=$isdesc?>">全部软件</a></font></div>
67</td>
68<td height="21" width="10%">
69<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=1&sort=<?=$sort?>&isdesc=<?=$isdesc?>">密码破解</a></font></div>
70</td>
71<td height="21" width="10%">
72<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=2&sort=<?=$sort?>&isdesc=<?=$isdesc?>">远程控制</a></font></div>
73</td>
74<td height="21" width="10%">
75<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=3&sort=<?=$sort?>&isdesc=<?=$isdesc?>">端口扫描</a></font></div>
76</td>
77<td height="21" width="10%">
78<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=4&sort=<?=$sort?>&isdesc=<?=$isdesc?>">字典工具</a></font></div>
79</td>
80<td height="21" width="10%">
81<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=5&sort=<?=$sort?>&isdesc=<?=$isdesc?>">系统安全</a></font></div>
82</td>
83<td height="21" width="10%">
84<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=6&sort=<?=$sort?>&isdesc=<?=$isdesc?>">各种炸弹</a></font></div>
85</td>
86<td height="21" width="10%">
87<div align="center"><a href="download.php?action=show&page=0&type=7&sort=<?=$sort?>&isdesc=<?=$isdesc?>"><font size="2">加密软件</font></a></div>
88</td>
89<td height="21" width="10%">
90<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=8&sort=<?=$sort?>&isdesc=<?=$isdesc?>">源代码</a></font></div>
91</td>
92<td height="21" width="10%">
93<div align="center"><font size="2"><a href="download.php?action=show&page=0&type=9&sort=<?=$sort?>&isdesc=<?=$isdesc?>">其它软件</a></font></div>
94</td>
95</tr>
96</table>
97<?
98$pagesize=10;
99if($action=="show")
100{
101switch($sort)
102{
103case "1":$sortby="id";break;
104case "2":$sortby="click";break;
105case "3";$sortby="title";break;
106default:$sortby="id";
107}
108if($isdesc=="1")
109$temp_isdesc="";
110else
111$temp_isdesc="desc";
112if($type==""||$type==0)
113$temp="";
114else
115$temp="where type=".$type;
116$rs=mysql_fetch_array(mysql_query("select count(*) from download ".$temp,$cn));
117$max_page=$rs[0];
118if($page>=$max_page)
119$page=$max_page-$pagesize;
120if($page<=0)
121$page=0;
122$result=mysql_query("select * from download ".$temp." order by ".$sortby." ".$temp_isdesc." limit ".$page.",".$pagesize,$cn);
123}
124if($action=="search")
125{
126
127switch($select)
128{
129case "软件名称":$object="title";break;
130case "作者":$object="author";break;
131case "简介":$object="say";
132}
133if($isdesc=="1")
134$temp_isdesc="";
135else
136$temp_isdesc="desc";
137switch($sort)
138{
139case "1":$sortby="id";break;
140case "2":$sortby="click";break;
141case "3";$sortby="title";break;
142default:$sortby="id";
143}
144if($type==""||$type==0)
145$temp="";
146else
147$temp="and type=".$type;
148
149$rs=mysql_fetch_array(mysql_query("select count(*) from download where ".$object." like('%".$content."%') ".$temp,$cn));
150$max_page=$rs[0];
151if($page>=$max_page)
152$page=$max_page-$pagesize;
153if($page<=0)
154$page=0;
155$sql="select * from download where ".$object." like('%".$content."%') ".$temp." order by ".$sortby." ".$temp_isdesc." limit ".$page.",".$pagesize;
156$result=mysql_query($sql,$cn);
157}
158?>
159
160<table border="0" cellpadding="0" cellspacing="0" height="28" width="100%">
161<form action="download.php?action=search&page=0&sort=<?=$sort?">&isdesc=<?=$isdesc?> method="post">
162<tr>
163<td height="35" width="37%"><font size="2"> 符合你要求的软件总数:
164<?=$max_page;?>
165</font></td>
166<td bordercolor="#FFFFFF" height="35" width="63%"> <font size="2"> 软件查找:
167<input name="content" size="20" type="text" value="<?=$content?>"/>
168查找对像
169<select name="select">
170<option><font size="2">软件名称</font></option>
171<option><font size="2">简介</font></option>
172</select>
173<select name="type">
174<option value="0">全部软件</option>
175<option selected="" value="<?=$type?>">当前类别</option>
176</select>
177<input name="search" type="submit" value="go"/>
178</font> </td>
179</tr> </form>
180</table>
181<table border="0" cellpadding="0" cellspacing="0" height="38" width="100%">
182<tr>
183<td width="66%"></td>
184<td width="34%">
185<form action="download.php?action=show&type=<?=$type?>" method="post">
186<div align="right"><font size="2">排序按:</font>
187<select name="sort">
188<option "selected";?="" <?if($sort="1)" echo=""> value="1">上传时间</option>
189<option "selected";?="" <?if($sort="2)" echo=""> value="2">下载次数</option>
190<option "selected";?="" <?if($sort="3)" echo=""> value="3">软件名称</option>
191</select>
192<select name="isdesc">
193<option "selected";?="" <?if($isdesc="2)" echo=""> value="2">降序</option>
194<option "selected";?="" <?if($isdesc="1)" echo=""> value="1">升序</option>
195</select>
196<input name="submit" type="submit" value="go"/>
197</div>
198</form>
199</td>
200</tr>
201</table>
202<?
203
204
205if($max_page==0&&$action!="publish")
206echo "<p align=center><font color="red" size="4">对不起,没能找到你想要的记录</font><br/>";
207else
208;
209?>
210<?if($action!="publish"){?>
211<p align="right"><font size="2">
212<?if($action=="search"){?>
213<?if($page>=1){?>
214<a href="download.php?page=0&action=search&content=<?=$content?">&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
215<?}?>
216<?if($page>=1){?>
217<a href="download.php?page=<?=$page-$pagesize;?">&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
218<?}?>
219<?if($page<$max_page-$pagesize){?>
220 <a href="download.php?page=<?=$page+$pagesize;?">&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
221<?}?>
222<?if($page<$max_page-$pagesize){?>
223 <a href="download.php?page=<?=$max_page-$pagesize;?">&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
224<?}?>
225<?}?>
226<?if($action=="show"){?>
227<?if($page>=1){?>
228<a href="download.php?page=0&type=<?=$type?">&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
229<?}?>
230<?if($page>=1){?>
231 <a href="download.php?page=<?=$page-$pagesize;?">&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
232<?}?>
233<?if($page<$max_page-$pagesize){?>
234 <a href="download.php?page=<?=$page+$pagesize;?">&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
235<?}?>
236<?if($page<$max_page-$pagesize){?>
237 <a href="download.php?page=<?=$max_page-$pagesize;?">&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
238<?}?>
239<?}?>
240</font></p>
241<?if($max_page>0){?>
242<table border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" height="58" width="100%">
243<tr bgcolor="#f0f0ff" bordercolor="#000000">
244<td height="25" width="25">
245<div align="center"><font size="2">编号</font></div>
246</td>
247<td height="25" width="41">
248<div align="right"><font size="2">软件名</font></div>
249</td>
250<td height="25" width="539">
251<div align="center"><font size="2">软件介绍</font></div>
252</td>
253<td height="25" width="31">
254<div align="center"><font size="2">大小</font></div>
255</td>
256<td height="25" width="31">
257<div align="center"><font size="2">下载次数</font></div>
258</td>
259<td height="25" width="82">
260<div align="center"> <font size="2">上传时间</font> </div>
261</td>
262</tr>
263<?
264}
265while ($rs=@mysql_fetch_array($result))
266{
267
268?>
269<tr bordercolor="#000000">
270<td height="25" width="25">
271<?=$rs["id"];?>
272<br/>
273<?if($session_power>=1)
274{
275?>
276<a href="chang.php?step=1&id=<?=$rs[" id"];?="">">更改</a>
277<?}?>
278</td>
279<td height="25" width="41">
280<div align="center"><font size="2"> <a href="sign.php?url=<?=$rs[" url"]?="">&action=download&id=<?=$rs["id"]?>" target=_blank>
281<?=$rs["title"];?>
282</a>
283</font></div>
284</td>
285<td height="25" width="539">
286<div align="left"><font size="2">
287<?=$rs["say"];?>
288<br/>
289<a href="sign.php?action=mail&id=<?=$rs[" id"]?="">&title=<?=$rs["title"]?>&type=<?=$rs["type"]?>">如果该链接有问题,请点这里
290</a></font></div>
291</td>
292<td height="25" width="31">
293<div align="center"><font size="2">
294<?=$rs["size"];?>
295</font></div>
296</td>
297<td height="25" width="31">
298<div align="center"><font size="2">
299<?=$rs["click"];?>
300</font> </div>
301</td>
302<td height="25" width="82">
303<div align="center"><font size="2">
304<?=$rs["ttime"];?>
305</font> </div>
306</td>
307</tr>
308<?}?>
309</table>
310<div align="right">
311<p><font size="2">
312<?if($action=="search"){?>
313<?if($page>=1){?>
314<a href="download.php?page=0&action=search&content=<?=$content?">&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
315<?}?>
316<?if($page>=1){?>
317<a href="download.php?page=<?=$page-$pagesize;?">&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
318<?}?>
319<?if($page<$max_page-$pagesize){?>
320 <a href="download.php?page=<?=$page+$pagesize;?">&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
321<?}?>
322<?if($page<$max_page-$pagesize){?>
323 <a href="download.php?page=<?=$max_page-$pagesize;?">&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
324<?}?>
325<?}?>
326<?if($action=="show"){?>
327<?if($page>=1){?>
328<a href="download.php?page=0&type=<?=$type?">&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
329<?}?>
330<?if($page>=1){?>
331 <a href="download.php?page=<?=$page-$pagesize;?">&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
332<?}?>
333<?if($page<$max_page-$pagesize){?>
334 <a href="download.php?page=<?=$page+$pagesize;?">&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
335<?}?>
336<?if($page<$max_page-$pagesize){?>
337 <a href="download.php?page=<?=$max_page-$pagesize;?">&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
338<?}?>
339<?}?>
340</font></p>
341</div>
342<font size="2">
343</font>
344<?}?>
345<?if($action=="publish"){?>
346<form action="sign.php?action=sign" method="POST">
347<table border="0" cellpadding="0" cellspacing="0" height="155" width="100%">
348<tr>
349<td height="20" width="28%"><font size="2">发布你的软件<br/>
350或你推荐软件 <br/>
351</font></td>
352<td height="20" width="72%"> </td>
353</tr>
354<tr>
355<td width="28%"><font size="2">软件名称:</font></td>
356<td width="72%"> <font size="2">
357<input name="title" size="20" type="text"/>
358</font></td>
359</tr>
360<tr>
361<td height="24" width="28%"><font size="2">软件大小:</font></td>
362<td height="24" width="72%"><font size="2">
363<input name="size" size="20" type="text"/>
364</font></td>
365</tr>
366<tr>
367<td width="28%"><font size="2">软件地址(<a href="mailto:[email protected]">如果没有,请打包给版主</a>)</font></td>
368<td width="72%"><font size="2">
369<input name="url" size="50" type="text"/>
370</font></td>
371</tr>
372<tr>
373<td height="21" width="28%"><font size="2">软件类型</font></td>
374<td height="21" width="72%"><font size="2">
375<select name="type">
376<option value="1">密码破解</option>
377<option value="2">远程控制</option>
378<option value="3">端口扫描</option>
379<option value="4">字典工具</option>
380<option value="5">系统安全</option>
381<option value="6">各种炸弹</option>
382<option value="7">加密软件</option>
383<option value="8">源代码</option>
384<option selected="" value="9">其它软件</option>
385</select>
386</font></td>
387</tr>
388<tr>
389<td width="28%"><font size="2">软件简介:</font></td>
390<td rowspan="2" width="72%"> <font size="2">
391<textarea cols="50" name="say" rows="8"></textarea>
392</font></td>
393</tr>
394<tr>
395<td width="28%"> </td>
396</tr>
397</table>
398<p align="left"> <font size="2">
399<input name="sign" type="submit" value="提交"/>
400<input type="reset" value="重写"/>
401</font>
402</p></form>
403<?}?>
404<div align="right"> <font size="2">
405<br/>
406</font></div>
407<p align="center"><font size="2"><br/>
408</font> </p>
409<p align="right"> </p>
410<p> </p>
411</body>
412</html>