<?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'];
	
	$workshop_sql="select * from ls_workshop where ID=".$id." ";
	$workshop_query=$opendb->query($workshop_sql);
	$workshop_rows=mysql_fetch_assoc($workshop_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="myform" enctype="multipart/form-data" method="post" action="saveworkshop.php" >
					<input type="hidden" value="update" name="ls">
					<input type="hidden" value="<?php echo $id;?>" name="id">
					<input type="hidden" value="<?php echo $workshop_rows['workshopPic'];?>" 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="workshop.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;" >缩略图：</td>
						<td style="padding-left:5px;" >
							<img src="<?php echo "../".$WorkShopFolders."/".$SmallFoldersProducts."/".$workshop_rows['workshopPic']?>" width="<?php echo $SmallPicW ?>" height="<?php echo $SmallPicH?>" border="1" name="pic" style="float:left;">
						  <span style="padding-left:50px;">*</span><br><br><br><br>
							<br />
					    <span style="padding-left:30px;">图片宽度应在200-400点、高度在200-300点，格式为jpg，大小不要超过50KB </span></td>
					  </tr>
					  <tr bgcolor="#f4f4f4"> 
						<td style="padding-left:50px;" >工厂图片：</td>
						<td><input type="file" name="productPic" style="width:300px;" onBlur="document.pic.src=myform.productPic.value"; onChange="myform.ChangecatePagePic.value='yes';"></td>
					  </tr>
					  <tr bgcolor="#f4f4f4"> 
						<td style="padding-left:50px;" width="20%">工厂简介：</td>
						<td><textarea name="workshopText" style="width:400px; height:80px;" ><?php echo $workshop_rows['workshopText'];?></textarea></td>
					  </tr>
					  <tr bgcolor="#B9DAFF"> 
						<td height="25" colspan="2" align="center"><input type="submit" value="修改工厂图片">
							<input name="重置" type="reset"  value="重置"></td>
					  </tr>
					</table>
					<br />
                 </form>
				</td>
			</tr>
		</table>
	</body>
    <?  if($_SESSION["refreshModi"]){?>
	<script> document.execCommand('Refresh') ;</script>
	<? 
	$_SESSION["refreshModi"]=false;
	}?>
</html>