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

所属分类: 网络编程 / PHP编程 阅读数: 209
收藏 0 赞 0 分享

//管理程序chang.php源代码如下:
<? session_start() ?>
<? if($session_power==""||$session_power<1)
{
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 http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="29"><font size="2">你的位置:<a href="../default.php">首页</a>-&gt;&gt;<a href="download.php?action=show">下载基地</a>-&gt;&gt;修改资料</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">&nbsp;</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="left"><font 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");
}
?>

更多精彩内容其他人还在看

TP5(thinkPHP5)框架基于ajax与后台数据交互操作简单示例

这篇文章主要介绍了TP5(thinkPHP5)框架基于ajax与后台数据交互操作,结合实例形式分析了thinkPHP5前端基于jQuery的ajax数据提交及后台数据接收、处理相关操作技巧,需要的朋友可以参考下
收藏 0 赞 0 分享

PHP利用Mysql锁解决高并发的方法

这篇文章主要介绍了PHP利用Mysql锁解决高并发的方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

php 后端实现JWT认证方法示例

这篇文章主要介绍了php 后端实现JWT认证方法示例,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

ThinkPHP框架实现定时执行任务的两种方法分析

这篇文章主要介绍了ThinkPHP框架实现定时执行任务的两种方法,结合实例形式分析了2种被动执行定时任务的相关操作技巧与注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

PHP命名空间与自动加载类详解

这篇文章主要介绍了PHP命名空间与自动加载类,结合实例形式详细分析了php自动加载类与命名空间原理、使用方法及相关操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

PHP时间处理类操作示例

这篇文章主要介绍了PHP时间处理类,结合实例形式分析了DateTime、DateTimeZone、DateInterval及DatePeriod等常用日期时间处理类简单操作技巧,需要的朋友可以参考下
收藏 0 赞 0 分享

利用PHP扩展Xhprof分析项目性能实践教程

XHProf是Facebook开发的性能调试工具,能帮助直观的统计显示PHP程序执行中各方法函数调用次数和消耗时间,以方便我们排查性能瓶颈并进行调优。下面这篇文章主要给大家介绍了关于利用PHP扩展Xhprof分析项目性能实践的相关资料,需要的朋友可以参考下
收藏 0 赞 0 分享

Django 标签筛选的实现代码(一对多、多对多)

这篇文章主要介绍了Django 标签筛选的实现代码(一对多、多对多),本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

PHP使用pdo实现事务处理操作示例

这篇文章主要介绍了PHP使用pdo实现事务处理操作,结合实例形式较为详细的分析了php基于pdo实现事务处理的相关原理与操作技巧,需要的朋友可以参考下
收藏 0 赞 0 分享

thinkPHP框架实现类似java过滤器的简单方法示例

这篇文章主要介绍了thinkPHP框架实现类似java过滤器的简单方法,结合实例形式分析了thinkPHP基于继承实现的登录验证功能相关操作方法,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多