<?php 
	session_start(); 
	require_once('inc/conn.php');
	require_once('inc/constant.php');
	require_once('inc/ls_syscode.php');
	require_once('inc/check.php');
	$opendb=new mydb();
	$ls_msg="修改下载操作";
	$id=$_GET['id'];
	
	$download_sql="select * from ls_download where ID=".$id." ";
	$download_query=$opendb->query($download_sql);
	$download_rows=mysql_fetch_assoc($download_query);
	
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="css/admin.css" rel="stylesheet" type="text/css">
		<script language="JavaScript" src="js/ls.js"></script>
		<title>无标题文档</title>
		
	</head>

	<body>
		<table width="96%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6396d6">
			<tr>
				<td height="18" background="images/admin_bg.gif"><div align="center"><font color="#ffffff"><strong>修改下载</strong></font></div>
				</td>
			</tr>
			<tr>
				<td height="213" valign="top" bgcolor="#dee7ff"><br>
				 <form name="newsform" enctype="multipart/form-data" method="post" action="savedownload.php" onSubmit="return Checkaddnews()">
					<input type="hidden" value="update" name="ls">
					<input type="hidden" value="<?php echo $id;?>" name="id">
					<input type="hidden" value="<?php echo $download_rows['downloadName'];?>" name="Pic">
					<input type="hidden" name="ChangecatePagePic" value="no">
					<table border="0" width="90%" align="center">
						<tr>
							<td>提示：<font color="#FF0000"><?php echo $ls_msg; ?></font></td>
							<td align="right"><img src="images/shao.gif">&nbsp;<a href="download.php"><u>返回</u></a></td>
						</tr>
					</table>
					<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
					 
					  <tr bgcolor="#B9DAFF"> 
						<td height="28" colspan="2"></td>
					  </tr>
					  <tr bgcolor="#f4f4f4"> 
						<td style="padding-left:50px;" width="20%">标题：</td>
						<td><input type="text" name="downloadTitle" style="width:300px;" value="<?php echo $download_rows['downloadTitle'];?>"></td>
					  </tr>
					 
					  <tr bgcolor="#f4f4f4"> 
						<td style="padding-left:50px;" width="30%">下载文件：
							<?php
								$name=substr($download_rows['downloadName'],-3);
								//echo $name;
								switch ($name)
								{
									case "doc":
										echo "<a href=\"../".$downloadFolders."/".$download_rows['downloadName']."\" title=\"查看\">";
										echo "<img src='images/doc.gif' border='0'>";
										echo "</a>";
										break;
									case "xls":
										echo "<a href=\"../".$downloadFolders."/".$download_rows['downloadName']."\" title=\"查看\">";
										echo "<img src='images/xls.gif' border='0'>";
										echo "</a>";
										break;
									case "rar":
										echo "<a href=\"../".$downloadFolders."/".$download_rows['downloadName']."\" title=\"查看\" >";
										echo "<img src='images/rar.gif' border='0'>";
										echo "</a>";
										break;
								}	
							?>
							
						</td>
						<td>
						<input type="file" name="downloadName" style="width:300px;" onChange="newsform.ChangecatePagePic.value='yes';">
						</td>
					  </tr>
					  <tr bgcolor="#B9DAFF"> 
						<td height="25" colspan="2" align="center"><input type="submit" value="修改下载文件"></td>
					  </tr>
					</table>
				</form>
				</td>
			</tr>
		</table>
	</body>
</html>