<%@ page language="C#" autoeventwireup="true" inherits="wap_user_wyhSlideEdit, kfenlei" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title><%=sWebName %> - 修改幻灯片</title>
<link rel="stylesheet" type="text/css" href="css.css" />
</head>
<body>
<%=qTemplate.Ac("wapUserTop.html") %>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<div align="left">
<div class="wapPageTitle"><a href="/wap/user/index2.aspx" class="infoback">返回</a>修改幻灯片</div>
<div class="clear10"></div>
<div class="infowrap" align="left">
<div class="userRight">
<div class="userRightContent">
<form action="/inc/kfUpload.aspx?s=nowatermark" style="display:none;" id="upFileForm" name="upFileForm" method="post" enctype="multipart/form-data">
<input type="file" id="upFile" name="upFile" />
<input type="submit" value="上传">
</form>
<form action="action.aspx?s=wyhSlideEdit" method="post" name="edit">
<input type="hidden" name="id" value="<%=id%>" />
<table width="100%" class="userMessTable" border="0" cellspacing="0" cellpadding="5">
<tr>
<td>
<input type="hidden" name="pic" id="inputpic1" value="<%=sPic %>" />
<img src="images/nopic2.gif" id="pic1" width="96" height="96" style="border:1px solid #e5e5e5; border-radius:3px; cursor:pointer;" class="fl5" onClick="upPic('inputpic1','pic1')" /> <a href="#nogo" class="bt2 fl5" onClick="upPic('inputpic1','pic1')">上传</a>
</td>
</tr>
<tr>
</tr>
</table>
<div class="clear10"></div>
<input type="submit" class="postSubmit" value="修改幻灯片" />
</form>
<script type="text/javascript">
function valiUpPic(picId,picValue)
{
	if(picValue!="")
	{
		$('#'+picId).attr('src','/'+picValue);
	}
	else
	{
		$('#'+picId).attr('src','/images/nopic.png');
	}
}
valiUpPic("pic1",document.getElementById("inputpic1").value);
var objPic='';
var objBtn='';
function upPic(pic,btn)
{
	objPic=pic;
	objBtn=btn;
	$("#upFile").click();
}
$('#upFile').change(function(){
$("#"+objBtn).attr('src',"/images/wait.gif");
$("#upFileForm").ajaxSubmit(
{
	url:"/inc/kfUpload.aspx",type:"POST",
	success:function(response)
	{
		var data=eval("("+response+")");
		if(data.status=="1")
		{
			$("#"+objPic).val(data.pic);
			$("#"+objBtn).attr('src',"/"+data.pic);
		}
		else
		{
			$("#"+objBtn).attr('src',"/"+$("#"+objPic).val());
  			alert(data.ps);
		}
  	},
 	error:function(msg)
	{
	}
});
$('#upFile').val('');
});
</script>
</div>
</div>
</div></div>
<div class="clear80"></div>
</body>
</html>
