当前位置: 首页 > 图文教程 > 网络编程 > PHP > 一个程序下载的管理程序(四)

PHP
PHP 柱状图实现代码
PHP 用数组降低程序的时间复杂度
PHP 读取文件内容代码(txt,js等)
Php 构造函数construct的前下划线是双的_
PHP 采集程序中常用的函数
一个比较简单的PHP 分页分组类
php下图片文字混合水印与缩略图实现代码
php5 图片验证码实现代码
phpmyadmin导入(import)文件限制的解决办法
php smarty模版引擎中变量操作符及使用方法
Php Mssql操作简单封装支持存储过程
php实现的仿阿里巴巴实现同类产品翻页
php入门教程 精简版
将文件夹压缩成zip文件的php代码
PHP开发过程中常用函数收藏
php csv操作类代码
php遍历目录viewDir函数
PHP 基本语法格式
php生成xml简单实例代码
PHP下编码转换函数mb_convert_encoding与iconv的使用说明

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 45 ::
收藏到网摘: n/a

//管理程序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>->><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="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");
}
?>