<%@ page language="C#" autoeventwireup="true" inherits="acad_weiyouhui_wyhInfoEdit, kfenlei" %><%@ Register Src="../inc/adminTop.ascx" TagName="adminTop" TagPrefix="qth8" %><!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>
<title>框分类信息系统 后台管理</title>
<link href="../css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
<div class="main" align="left">
<qth8:adminTop ID="AdminTop1" runat="server" />
<div class="d01">
<div class="tabTitle">产品修改</div>
<form name="fEdit" id="fEidt" class="layui-form" action="action.aspx?s=wyhInfoEdit&id=<%=id%>" method="post">
<table width="100%" border="0" class="layui-table" cellspacing="0" cellpadding="0">
<tr><td width="200">ID</td><td><%=id%></td></tr>
<tr><td>用户ID</td><td><input name="uid" value="<%=sUid%>" type="text" size="50"  class="inputText" /></td></tr>
<tr><td>标题</td><td><input name="title" type="text" size="50" value="<%=sTitle%>"  class="inputText" /></td></tr>
<tr><td>分类</td><td><div class="selectDivLine"><div><select name="sort" id="sort">
<option value="">请选择</option>
<%=sSortList %>
</select></div></div></td></tr>
<tr><td>市场价格</td><td><input name="price" type="text" size="50" value="<%=sPrice%>" class="inputText" /></td></tr>
<tr><td>会员价格</td><td><input name="price1" type="text" size="50" value="<%=sPrice1%>" class="inputText" /></td></tr>
<tr><td>封面图片</td>
<td><div style="position:relative;"><div class="upfileDiv1" id="upfileDiv" style="top:0px; width:410px; left:0px;">
<div class="upfileClose" onclick="$('#upfileDiv').fadeOut(300)">关闭</div>
<iframe width="400" height="100" style=" padding:0px; margin:0px;" src="../inc/upFile.aspx?tn=pic&fn=fEdit&size=200,0&js=top.hideDiv('upfileDiv');top.valiUpPic('pic1','{picUrl}');" frameborder="0" scrolling="no"></iframe>
</div></div>
<input type="hidden" name="pic" id="inputpic1" value="<%=sPic %>" />
<img src="/user/images/nopic2.gif" id="pic1" width="96" height="96" style="border:1px solid #dedede; cursor:pointer;" onclick="$('#upfileDiv').fadeIn(800)" /> <a href="#nogo" onclick="$('#upfileDiv').fadeIn(800)">[上传封图]</a>	
</td>
</tr>
<tr><td class="head">产品图片列表</td>
<td>
<input type="hidden" name="picList" id="picList" value="<%=sPicList %>" />
<div class="pfInput">
<div class="label1">上传图片：<span style="line-height:40px; font-size:12px; color:#000000; letter-spacing:1px; color:#333333;">可上传<strong><%=iCount.ToString() %></strong>张图片，图片请小于<%=sFileByte %></span></div>
<div class="inputDiv1" style="height:auto;">
<div class="swfupload-control">
<ul id="preview" class="preview"></ul>
<div class="clear"></div></div>
<div>
<script language="javascript">
	document.write('<iframe src="../inc/uploadWap.aspx?tn=picList&fn=fabu&dn=uPic&size=600,0" frameborder="0" scrolling="no" width="100%" height="80"></iframe>')</script>
</div>
</div>
 </div>
</td>
</tr>
<tr><td>内容</td>
<td><textarea name="content" class="textarea01"  cols="135" rows="10"><%=sContent%></textarea></td>
</tr>
<tr><td class="head">IP</td><td><%=sIp%></td></tr>
<tr><td class="head">发布日期</td><td><%=sPostDate%></td></tr>
<tr>
<td class="head"></td><td>
<input type="submit" name="Submit" class="layui-btn" value="修改信息" /></td>
</tr>
</table>
</form>
</div></div>
<script language="javascript" type="text/javascript">
$("#sort [value='<%=sSort %>']").attr("selected","selected");
  function valiUpPic(picId,picValue)
  {
  	document.getElementById("input"+picId).value=picValue
	if(picValue!="")
	{
		document.getElementById(picId).src="/"+picValue
	}
	else
	{
		document.getElementById(picId).src="/user/images/nopic2.gif"
	}
  }
  function showStartUp(picId)
  {
  		document.getElementById(picId).src="/user/images/startUp.gif"
  }
  valiUpPic("pic1",document.getElementById("inputpic1").value)
  function showDiv(divId)
  {
  	var obj=divId.split(',');
	if(obj.length>0)
	{
		for(i=0;i<obj.length;i++)
		{
  			document.getElementById(obj[i]).style.display="block";
		}
	}
  }
  function hideDiv(divId)
  {
  	var obj=divId.split(',');
	if(obj.length>0)
	{
		for(i=0;i<obj.length;i++)
		{
  			document.getElementById(obj[i]).style.display="none";
		}
	}
  }
  
  
function uPic()
{
	var duCount=$("#picList").val().split(',').length-1;
	var sPic=$("#picList").val();
	if(sPic!="")
	{
		var saPic=sPic.split(',');
		var sPreview="";
		for(i=0;i<saPic.length-1;i++)
		{
			sPreview+='<li id=\'pic'+duCount+'\'><div><img src="/'+saPic[i]+'" height="100" width="100" /></div><div class="previewDel" onclick="delUp('+i+')">删除</div></li>';
		}
		$("#preview").html(sPreview);
	}
}
iPicCount=<%=iCount.ToString() %>;
function startUp()
{
	var duCount=$("#picList").val().split(',').length-1;
	if($("#picList").val().split(',').length>iPicCount)
	{
		alert("最多可上传"+iPicCount+"张图片!");
	}
	else
	{
		$("#preview").append('<li id=\'pic'+duCount+'\'><img src="/images/wait.gif" class="previewWait" /><div class="previewDel">上传中</div></li>');
	}
}
function doneUp(picname)
{
	var duCount=$("#picList").val().split(',').length-1;
	if($("#picList").val().split(',').length>iPicCount)
	{
	}
	else
	{
	$("#preview li:last").html('<div><img src="/'+picname+'" height="100" width="100" /></div><div class="previewDel" onclick="delUp(\''+picname+'\','+duCount+')">删除</div>');  
	$("#picList").val($("#picList").val()+picname+",");
	}
}
function delUp(picName,num)
{
	var sPic=$("#picList").val();
	if(sPic!="")
	{
		var saPic=sPic.split(',');
		var sPicValue="";
		for(i=0;i<saPic.length-1;i++)
		{
			if(picName!=saPic[i])sPicValue+=saPic[i]+",";
		}
		$("#picList").val(sPicValue);
	}
	$("#preview li#pic"+num).remove();
}
uPic();
</script>
</body>
</html>
