澳门新浦京娱乐游戏一个程序下载的管理程序(三)

该程序的一些功能有几点: 1:完整的搜索引擎
2:三种排序对象.(加入时间,下载次数,程序名字).及两种排序方法(倒序,顺序).
3:管理员随时修改. 4:报告链接错误.供管理员随时修正. 5:分页功能. 创建表:
CREATE TABLE download ( author varchar(15), title varchar(30), url
varchar(200), say text, ttime datetime, click bigint(20), id bigint(20)
NOT NULL auto_increment, type tinyint(3) unsigned DEFAULT ‘1’ NOT NULL,
size varchar(10), PRIMARY KEY (id) ); 一些说明: author:程序作者
title:程序名字 url:程序地址 say:程序简介 ttime:加入时间 click:下载次数
id:程序编号.自动增加 type:程序分类 size:程序大小 该程序和管理员登录接口
登录时令session_power为大于1(权限).并注册它. opendata.php源代码如下: ?
$cn = mysql_connect(localhost,,); if(!mysql_select_db(mydb,$cn)) ?
链接到download.php的url为:download.php?ac

//后台程序sign.php源代码如下: ?require(../opendata.php);? ?
if($action==sign) { if($say==||$title==||$url==||$size==) {
header(location:../message.php?message=资料不完整&redirect=download/download.php?page=0%26action=publish);
break; }$say=htmlspecialchars($say); $title=htmlspecialchars($title);
$say=str_replace( ,&nbsp,$say); $say=nl2br($say); $now_time=getdate();
$ttime=$now_time[year].-.$now_time[mon].-.$now_time[mday].
.$now_time[hours].:.$now_time[minutes].:.$now_time[seconds];
$str=insert into download (title,say,click,ttime,url,size,type) values
(‘.$title.’,’.$say.’,0,’#.$ttime.#’,’.$url.’,’.$size.’,.$type.);
mysql_query($str,$cn);
header(location:download.php?page=0&action=show); }
if($action==download) { mysql_query(update download set click=click+1
where id=.$id,$cn); ? ? header(Content-type: text/html);
if(header(location:$url)) echo error; ? html p align=centera
href=?=$url?如果你的浏览器没有弹出下载窗口,请点这里/a/p p align=centera
href=javascript:self.close()关闭窗口/a/p p/p /html ?}?
?if($action==mail) {
mail(khj99@163.net,该链接有问题,请更正,id=$id;程序名=$title;类别=$type,From:khj99@163.netnReply-To:khj99@163.netn);
header(location:download.php?action=show&type=$type); } ?

//管理程序chang.php源代码如下: ? session_start() ? ?
if($session_power==||$session_power1) { header(location:
../message.php?redirect=default.php&message=你不是理员); break; }?
?require (../opendata.php);? ? if($step==1) {
if(!($rs=mysql_fetch_array(mysql_query(select * from download where
id=’.$id.’,$cn)))) echo 提取资料出错; else { ? html head
title修改资料/title meta content=text/html; charset=gb2312 /headbody
table width=100% border=0 cellspacing=0 cellpadding=0 tr td
height=29font size=2你的位置:a href=../default.php首页/a-a
href=download.php?action=show下载基地/a-修改资料/font/td /tr /table
table width=100% border=0 cellspacing=0 cellpadding=0 height=446 tr td
height=335 width=77% bgcolor=#99cc00 table width=100% border=0
cellspacing=0 cellpadding=0 height=335 tr td colspan=2 height=42/td /tr
form method=post action=chang.php?step=2&id=?=$id? tr td height=35
width=19%font size=2软件名称/font/td td height=35 width=81% input
name=title value=?=$rs[title];? /td /tr tr td height=36 width=19%font
size=2软件地址/font/td td height=36 width=81% input name=url size=50
value=?=$rs[url];? /td /tr tr td height=34 width=19%font
size=2大小/font/td td height=34 width=81% font size=2 input type=text
name=size size=12 value=?=$rs[size]? /font/td /tr tr td height=42
width=19% div align=leftfont size=2分类/font/div /td td height=42
width=81%font size=2 select name=type option ?if($rs[type]==1) echo
selected; ? value=1密码破解/option option ?if($rs[type]==2) echo
selected; ? value=2远程控制/option option ?if($rs[type]==3) echo
selected; ? value=3端口扫描/option option ?if($rs[type]==4) echo
selected; ? value=4字典工具/option option ?if($rs[type]==5) echo
selected; ? value=5系统安全/option option ?if($rs[type]==6) echo
selected; ? value=6各种炸弹/option option ?if($rs[type]==7) echo
selected; ? value=7加密软件/option option ?if($rs[type]==8) echo
selected; ? value=8源代码/option option ?if($rs[type]==9) echo
selected; ? value=9其它软件/option /select /font /td /tr tr td height=31
width=19%font size=2简介:/font/td td height=31 width=81% textarea
name=say cols=50 rows=10?=$rs[say];?/textarea /td /tr tr td height=37
colspan=2 div align=center input type=submit value=搞定 name=submit /div
/td /tr /form /table /td /tr /table /body /html ? } } if($step==2) {
mysql_query(update download set title=’.$title.’,
say=’.$say.’,url=’.$url.’,size=’.$size.’,type=’.$type.’ where
id=.$id,$cn); header(location:download.php?action=show&type=$type); } ?

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图