一个程序下载的管理程序(二)

//主程序download.php源代码如下:
<?session_start();?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>穷人网软件联盟</title>
<script language="javascript">
function popwin(parm)
{    window.open("sign.php?"+parm,"","height=400,width=300,resizable=yes,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
}
</script>
<style>

BODY {
FONT-SIZE: 9pt; LINE-HEIGHT: 12pt
}
TABLE {
FONT-SIZE: 9pt; LINE-HEIGHT: 12pt
}
A:link {
COLOR: blue; TEXT-DECORATION: none
}
A:visited {
COLOR: #663300; TEXT-DECORATION: none
}
A:active {
TEXT-DECORATION: none
}
A:hover {
COLOR: #ff0000; TEXT-DECORATION: underline
}
</style>
</head>
<body>

<table width="100%" border="0" cellspacing="0" cellpadding="0" height="19">
  <tr bgcolor="#f7f7ff">  
    <td height="24" width="88%"> <font size="2">  
      <? require ("../opendata.php") ?>
      </font> <font size="2"> 你的位置:<a href="http://poorren.yeah.net">首页</a>->> <a href="download.php?action=show">软件下载</a>->>  
      <?
          switch($type)
          {
                  case 1:echo "密码破解";break;
                  case 2:echo "远程控制";break;
                 case 3:echo "端口扫描";break;
                 case 4:echo "字典工具";break;
                case 5:echo "系统安全";break;
                case 6:echo "各种炸弹";break;
                case 7:echo "加密软件";break;
                case 8:echo "源代码";break;
                case 9:echo "其它软件";break;
                default:echo "全部软件";
          }
          ?>
      </font></td>
    <td height="24" width="12%">  
      <div align="center"><font size="2"><a href="download.php?action=publish">发布软件</a></font></div>
    </td>
  </tr>
</table>

<font size="2"> </font>
<table width="100%" border="1" cellspacing="0" cellpadding="0" height="20" bordercolor="#FFFFFF">
  <tr bgcolor="#f0f0ff" bordercolor="#FFFFFF">  
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=0&sort=<?=$sort?>&isdesc=<?=$isdesc?>">全部软件</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=1&sort=<?=$sort?>&isdesc=<?=$isdesc?>">密码破解</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=2&sort=<?=$sort?>&isdesc=<?=$isdesc?>">远程控制</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=3&sort=<?=$sort?>&isdesc=<?=$isdesc?>">端口扫描</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=4&sort=<?=$sort?>&isdesc=<?=$isdesc?>">字典工具</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=5&sort=<?=$sort?>&isdesc=<?=$isdesc?>">系统安全</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=6&sort=<?=$sort?>&isdesc=<?=$isdesc?>">各种炸弹</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><a href="download.php?action=show&page=0&type=7&sort=<?=$sort?>&isdesc=<?=$isdesc?>"><font size="2">加密软件</font></a></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=8&sort=<?=$sort?>&isdesc=<?=$isdesc?>">源代码</a></font></div>
    </td>
    <td width="10%" height="21">  
      <div align="center"><font size="2"><a href="download.php?action=show&page=0&type=9&sort=<?=$sort?>&isdesc=<?=$isdesc?>">其它软件</a></font></div>
    </td>
  </tr>
</table>

<?
$pagesize=10;
if($action=="show")
{
switch($sort)
   {
   case "1":$sortby="id";break;
   case "2":$sortby="click";break;
   case "3";$sortby="title";break;
   default:$sortby="id";
   }
if($isdesc=="1")
   $temp_isdesc="";
   else
   $temp_isdesc="desc";
if($type==""||$type==0)
   $temp="";
else
   $temp="where type=".$type;
$rs=mysql_fetch_array(mysql_query("select count(*) from download ".$temp,$cn));
$max_page=$rs[0];
if($page>=$max_page)
$page=$max_page-$pagesize;
if($page<=0)
$page=0;
$result=mysql_query("select * from download  ".$temp." order by ".$sortby." ".$temp_isdesc." limit ".$page.",".$pagesize,$cn);
}
if($action=="search")
{

switch($select)
   {
   case "软件名称":$object="title";break;
   case "作者":$object="author";break;
   case "简介":$object="say";
   }
    if($isdesc=="1")
   $temp_isdesc="";
   else
   $temp_isdesc="desc";
   switch($sort)
   {
   case "1":$sortby="id";break;
   case "2":$sortby="click";break;
   case "3";$sortby="title";break;
   default:$sortby="id";
   }
  if($type==""||$type==0)
  $temp="";
  else
  $temp="and type=".$type;

$rs=mysql_fetch_array(mysql_query("select count(*) from download where ".$object." like('%".$content."%') ".$temp,$cn));
$max_page=$rs[0];
if($page>=$max_page)
$page=$max_page-$pagesize;
if($page<=0)
$page=0;
$sql="select * from download  where ".$object." like('%".$content."%') ".$temp." order by ".$sortby." ".$temp_isdesc." limit ".$page.",".$pagesize;
$result=mysql_query($sql,$cn);
}
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" height="28">
  <form action=download.php?action=search&page=0&sort=<?=$sort?>&isdesc=<?=$isdesc?> method="post">
    <tr>  
      <td width="37%" height="35"><font size="2"> 符合你要求的软件总数:
        <?=$max_page;?>
        </font></td>
      <td width="63%" height="35" bordercolor="#FFFFFF"> <font size="2"> 软件查找:
        <input type="text" name="content" size="20" value="<?=$content?>">
        查找对像
        <select name="select">
          <option><font size="2">软件名称</font></option>
          <option><font size="2">简介</font></option>
        </select>
        <select name="type" >
          <option value="0">全部软件</option>
          <option selected value="<?=$type?>">当前类别</option>
        </select>
        <input type="submit" name="search" value="go">
        </font> </td>
    </tr> </form>
  </table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="38">
  <tr>  
    <td width="66%"></td>
    <td width="34%">  
      <form action="download.php?action=show&type=<?=$type?>" method="post">
        <div align="right"><font size="2">排序按:</font>  
          <select name="sort">
            <option <?if($sort==1) echo "selected";?> value="1">上传时间</option>
            <option <?if($sort==2) echo "selected";?> value="2">下载次数</option>
            <option <?if($sort==3) echo "selected";?> value="3">软件名称</option>
          </select>
          <select name="isdesc">
            <option <?if($isdesc==2) echo "selected";?>  value="2">降序</option>
            <option <?if($isdesc==1) echo "selected";?>  value="1">升序</option>
          </select>
          <input type="submit" value="go" name="submit" >
        </div>
      </form>
    </td>
  </tr>
</table>
<?

if($max_page==0&&$action!="publish")
echo "<p align=center><font size=4 color=red>对不起,没能找到你想要的记录</font></p><br>";
else

?>
<?if($action!="publish"){?>
<p align="right"><font size="2">
  <?if($action=="search"){?>
  <?if($page>=1){?>
  <a href=download.php?page=0&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
  <?}?>
  <?if($page>=1){?>
  <a href=download.php?page=<?=$page-$pagesize;?>&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
  <?}?>
  <?if($page<$max_page-$pagesize){?>
  &nbsp&nbsp<a href=download.php?page=<?=$page+$pagesize;?>&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
  <?}?>
  <?if($page<$max_page-$pagesize){?>
  &nbsp&nbsp<a href=download.php?page=<?=$max_page-$pagesize;?>&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
  <?}?>
  <?}?>
  <?if($action=="show"){?>
  <?if($page>=1){?>
  <a href=download.php?page=0&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
  <?}?>
  <?if($page>=1){?>
  &nbsp&nbsp<a href=download.php?page=<?=$page-$pagesize;?>&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
  <?}?>
  <?if($page<$max_page-$pagesize){?>
  &nbsp&nbsp<a href=download.php?page=<?=$page+$pagesize;?>&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
  <?}?>
  <?if($page<$max_page-$pagesize){?>
  &nbsp&nbsp<a href=download.php?page=<?=$max_page-$pagesize;?>&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
  <?}?>
  <?}?>
  </font></p>
  <?if($max_page>0){?>
<table border="1" width="100%" height="58" cellspacing="0" cellpadding="0" bordercolor="#000000">
  <tr bordercolor="#000000" bgcolor="#f0f0ff">  
    <td width="25" height="25">  
      <div align="center"><font size="2">编号</font></div>
    </td>
    <td width="41" height="25">  
      <div align="right"><font size="2">软件名</font></div>
    </td>
    <td width="539" height="25">  
      <div align="center"><font size="2">软件介绍</font></div>
    </td>
    <td width="31" height="25">  
      <div align="center"><font size="2">大小</font></div>
    </td>
    <td width="31" height="25">  
      <div align="center"><font size="2">下载次数</font></div>
    </td>
    <td width="82" height="25">  
      <div align="center"> <font size="2">上传时间</font> </div>
    </td>
  </tr>
  <?
  }
  while ($rs=@mysql_fetch_array($result))
{

?>
  <tr bordercolor="#000000">  
    <td width="25" height="25">  
      <?=$rs["id"];?>
      <br>
      <?if($session_power>=1)
      {
      ?>
      <a href="chang.php?step=1&id=<?=$rs["id"];?>">更改</a>  
      <?}?>
    </td>
    <td width="41" height="25">  
      <div align="center"><font size="2"> <a href="sign.php?url=<?=$rs["url"]?>&action=download&id=<?=$rs["id"]?>" target=_blank>  
        <?=$rs["title"];?>
        </a>

</font></div>
    </td>
    <td width="539" height="25">  
      <div align="left"><font size="2">  
        <?=$rs["say"];?>
        <br>
        <a href="sign.php?action=mail&id=<?=$rs["id"]?>&title=<?=$rs["title"]?>&type=<?=$rs["type"]?>">如果该链接有问题,请点这里  
        </a></font></div>
    </td>
    <td width="31" height="25">  
      <div align="center"><font size="2">
        <?=$rs["size"];?>
        </font></div>
    </td>
    <td width="31" height="25">  
      <div align="center"><font size="2">
        <?=$rs["click"];?>
        </font> </div>
    </td>
    <td width="82" height="25">  
      <div align="center"><font size="2">
        <?=$rs["ttime"];?>
        </font> </div>
    </td>
  </tr>
  <?}?>
</table>
<div align="right">
  <p><font size="2">
    <?if($action=="search"){?>
    <?if($page>=1){?>
    <a href=download.php?page=0&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
    <?}?>
    <?if($page>=1){?>
    <a href=download.php?page=<?=$page-$pagesize;?>&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
    <?}?>
    <?if($page<$max_page-$pagesize){?>
    &nbsp&nbsp<a href=download.php?page=<?=$page+$pagesize;?>&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
    <?}?>
    <?if($page<$max_page-$pagesize){?>
    &nbsp&nbsp<a href=download.php?page=<?=$max_page-$pagesize;?>&action=search&content=<?=$content?>&type=<?=$type?>&select=<?=$select?>&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
    <?}?>
    <?}?>
    <?if($action=="show"){?>
    <?if($page>=1){?>
    <a href=download.php?page=0&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>第一页</a>
    <?}?>
    <?if($page>=1){?>
    &nbsp&nbsp<a href=download.php?page=<?=$page-$pagesize;?>&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>上一页</a>
    <?}?>
    <?if($page<$max_page-$pagesize){?>
    &nbsp&nbsp<a href=download.php?page=<?=$page+$pagesize;?>&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>下一页</a>
    <?}?>
    <?if($page<$max_page-$pagesize){?>
    &nbsp&nbsp<a href=download.php?page=<?=$max_page-$pagesize;?>&type=<?=$type?>&action=show&sort=<?=$sort?>&isdesc=<?=$isdesc?>>最后页</a>
    <?}?>
    <?}?>
    </font></p>

</div>
<font size="2">

</font>
<?}?>
<?if($action=="publish"){?>
<form method="POST" action="sign.php?action=sign">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="155">
    <tr>
      <td height="20" width="28%"><font size="2">发布你的软件<br>
        或你推荐软件 <br>
        </font></td>
      <td height="20" width="72%"> </td>
    </tr>
    <tr>
      <td width="28%"><font size="2">软件名称:</font></td>
      <td width="72%"> <font size="2">
        <input type="text" name="title" size="20">
        </font></td>
    </tr>
    <tr>
      <td width="28%" height="24"><font size="2">软件大小:</font></td>
      <td width="72%" height="24"><font size="2">
        <input type="text" name="size" size="20">
        </font></td>
    </tr>
    <tr>
      <td width="28%"><font size="2">软件地址(<a href="mailto:hack99@163.net">如果没有,请打包给版主</a>)</font></td>
      <td width="72%"><font size="2">
        <input type="text" name="url" size="50">
        </font></td>
    </tr>
    <tr>
      <td width="28%" height="21"><font size="2">软件类型</font></td>
      <td width="72%" height="21"><font size="2">
        <select name="type">
          <option value="1">密码破解</option>
          <option value="2">远程控制</option>
          <option value="3">端口扫描</option>
          <option value="4">字典工具</option>
          <option value="5">系统安全</option>
          <option value="6">各种炸弹</option>
          <option value="7">加密软件</option>
          <option value="8">源代码</option>
          <option selected value="9">其它软件</option>
        </select>
        </font></td>
    </tr>
    <tr>
      <td width="28%"><font size="2">软件简介:</font></td>
      <td width="72%" rowspan="2"> <font size="2">
        <textarea rows="8" name="say" cols="50"></textarea>
        </font></td>
    </tr>
    <tr>
      <td width="28%"> </td>
    </tr>
  </table>
  <p align="left"> <font size="2">
    <input type="submit" value="提交" name="sign">
    <input type="reset" value="重写" >
    </font>
</form>
<?}?>
<div align="right"> <font size="2">
  <br>
  </font></div>
<p align="center"><font size="2"><br>
  </font> </p>
<p align="right"> </p>
<p>  </p>

</body>
</html>

(0)

相关推荐

  • 一个程序下载的管理程序(二)

    //主程序download.php源代码如下: <?session_start();?> <html> <head> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <

  • 一个程序下载的管理程序(四)

    //管理程序chang.php源代码如下: <? session_start() ?> <? if($session_power==""||$session_power<1) { header("location: ../message.php?redirect=default.php&message=你不是理员"); break; }?> <?require ("../opendata.php");?

  • 一个程序下载的管理程序(一)

    该程序的一些功能有几点: 1:完整的搜索引擎 2:三种排序对象.(加入时间,下载次数,程序名字).及两种排序方法(倒序,顺序). 3:管理员随时修改. 4:报告链接错误.供管理员随时修正. 5:分页功能. 创建表: CREATE TABLE download (    author varchar(15),    title varchar(30),    url varchar(200),    say text,    ttime datetime,    click bigint(20),

  • 一个程序下载的管理程序(三)

    //后台程序sign.php源代码如下: <?require("../opendata.php");?> <? if($action=="sign") { if($say==""||$title==""||$url==""||$size=="") { header("location:../message.php?message=资料不完整&redir

  • Android实现软件列表的点击启动另外一个程序功能【附demo源码下载】

    本文实例讲述了Android实现软件列表的点击启动另外一个程序功能.分享给大家供大家参考,具体如下: 目前面世的许多软件中有这么一个功能:设备中安装了哪些软件,他们会以一个软件列表清单的形式向用户展示出来. 今天我们就来实现这一功能: 运行环境: motorola defy+ 系统2.3.6 主要 API : PackageInfo,PackageManager,LayoutInflater,ApplicationInfo PackageManger类,它的主要职责是管理应用程序包. 通过它,我

  • 微信小程序下载工具及调试详解

    昨天晚些时候微信团队发布了微信小程序开发者工具.微信小程序开发文档和微信小程序设计指南,全新的开发者工具,集成了开发调试.代码编辑及程序发布等功能,帮助开发者简单和高效地开发微信小程序.以下是官方文档,内含小程序开发者工具下载地址及调试指南. 下载地址:开发者工具0.9.092300版 windows 64版:windows 32版:mac版 为了帮助开发者简单和高效地开发微信小程序,我们推出了全新的开发者工具,集成了开发调试.代码编辑及程序发布等功能. devtools 扫码登录 启动工具时,

  • 小程序扫描普通链接二维码跳转小程序指定界面方法

    微信官方文档https://developers.weixin.qq.com/miniprogram/introduction/qrcode.html 看了官方文档之后,还是存在很多困惑,微信小程序是托管到微信服务器上的,要想扫描普通链接跳转指定界面,首先要知道微信把小程序放的服务器的访问路径,这些最初想法,可是看微信官方文档,感觉不是我想的这样的 文档上:"二维码规则的域名须通过ICP备案的验证."如果是微信的服务器,那他们就不必这么写了, 可是小程序是托管微信服务器上的,为什么扫码

  • LNMP系列教程之 SSL安装WordPress博客(程序下载与安装)

    在之前的文章中,老左已经在VPS中添加了站点,然后我们就需要传程序建站.我们可以利用WinSCP工具直接向我们的对应的站点目录中传程序,然后添加数据库安装网站.但是今天我分享的这个方法是比较先进的SSL远程下载程序,这样的好处是万一我们用的CMS程序较大,可以直接下载至VPS中,省的我们再去FTP传.用命令操作一来可以显得牛X,二来可以节省时间. 首先,用Putty登陆我们的VPS,到我们的站点目录下,今天我以安装wordpress建立博客为例: 其次,输入远程下载程序的命令: wget htt

  • 微信小程序将字符串生成二维码图片的操作方法

    最近接到这样一个需求,需要在小程序里将十几位随机字符串转换为二维码的形式展示.公众号中(另一终端)调用JSSDK扫一扫功能,去扫描小程序生成的二维码.得到字符串,然后进行接下来的逻辑处理. 下面记录的是小程序中生成二维码图片这一操作,用的是原文作者改版后的生成二维码工具weapp-qrcode.js(demo的众多文件中只需将util下的这个文件拷贝到自己项目中),可在原文地址里clone demo. 截图(copy原文) 使用 1.页面wxml中放置绘制二维码的canvas 加入点击改变二维码

  • Python实现一个论文下载器的过程

    在科研学习的过程中,我们难免需要查询相关的文献资料,而想必很多小伙伴都知道SCI-HUB,此乃一大神器,它可以帮助我们搜索相关论文并下载其原文.可以说,SCI-HUB造福了众多科研人员,用起来也是"美滋滋". 然而,当师姐告诉我:"xx,可以帮我下载几篇文献嘛?".乐心助人的我自当是满口答应了,心想:"这种小事就交给我叭~" 于是乎,我收到了一个excel文档,66篇论文的列表安静地趟在里面(此刻心中碎碎念:"这尼玛,是几篇嘛...&q

随机推荐