<%@ page language="C#" autoeventwireup="true" inherits="wap_user_weixinEdit, 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 href="/js/css/layui.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css.css" type="text/css" />
<%=tools.sUserHtmlEdit("html")%>
</head>
<body>
<%=qTemplate.Ac("wapUserTop.html") %>
<script type="text/javascript" language="javascript" src="/js/layui.js"></script>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<script type="text/javascript">
layui.use(['form','laydate'], function(){
var form = layui.form();
    form.render();
	form.on('radio(msgtype)', function(data){
	var sTop=$("input:radio[name='msgtype']:checked").val();
	fzdfs();
});
});
</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=weixinEdit" class="layui-form" name="weixinEdit" id="weixinEdit" method="post"><input type="hidden" value="<%=id%>" name="id" />
<table width="100%" border="0" class="userMessTable" cellspacing="0" cellpadding="0">
<tr>
<td class="head" width="80">触发词：</td>
<td><input type="text" class="inputText" value="<%=sWord %>" name="word" />
<div class="commentary">对应用户发送的词，多个词用豆号分隔。</div>
</td></tr>
<tr>
<td class="head">类别：</td>
<td><input type="radio" value="1" name="msgtype" lay-filter="msgtype" checked="checked" title="图文" /> <input type="radio" value="0" name="msgtype" lay-filter="msgtype" title="文字" /></td>
</tr>
<tr>
<td class="head">排序：</td>
<td><input type="text" class="inputText" value="<%=sOrder %>" name="order" /></td>
</tr>
<tr id="title">
<td class="head">标题：</td>
<td><input type="text" class="inputText" value="<%=sTitle %>" name="title" />
</td></tr>
<tr id="picurltb">
<td class="head">封图</td>
<td><input type="text" class="inputText" value="<%=sPicUrl %>" name="picurl" id="picurl" />
<div class="clear10"></div>
<a href="#nogo" id="picurl_btn" class="bt2 fl5" onClick="upPic('picurl','picurl_btn')">上传</a>
</td></tr>
<tr id="url">
<td class="head">链接：</td>
<td><input type="text" class="inputText" value="<%=sUrl %>" name="url" />
</td>
</tr>
<tr>
<td class="head">回复内容：</td>
<td><textarea name="content" class="inputTextarea" rows="10" cols="35"><%=sContent %></textarea></td>
</tr>
<tr id="html">
<td class="head">页面内容</td><td><div class="commentary">用户点击进入页面显示的内容，当设置了链接地址时，会直接跳转到链接地址，此项无效。</div></td></tr>
<tr id="html1"><td colspan="2"><textarea name="html" style="width:100%; height:300px;" class="inputTextarea" rows="30" cols="35"><%=sHtml %></textarea></td>
</tr>
</table>
<div class="clear10"></div>
<input type="submit" class="postSubmit" value="修改" />
</form>
<script type="text/javascript">
$(function(){
$(":radio[value='<%=sMsgType%>']").attr("checked","checked");
fzdfs();
});
var objPic='';
var objBtn='';
function upPic(pic,btn)
{
	objPic=pic;
	objBtn=btn;
	$("#upFile").click();
}
$('#upFile').change(function(){
$("#"+objBtn).html('正在上传……');
$("#upFileForm").ajaxSubmit(
{
	url:"/inc/kfUpload.aspx",type:"POST",
	success:function(response)
	{
		var data=eval("("+response+")");
		if(data.status=="1")
		{
			$("#"+objPic).val(data.pic);
			$("#"+objBtn).html('上传完成，重新上传');
		}
		else
		{
			$("#"+objBtn).html('上传');
  			alert(data.ps);
		}
  	},
 	error:function(msg)
	{
	}
});
$('#upFile').val('');
});
function fzdfs()
{
	var sTop=$("input:radio[name='msgtype']:checked").val();
	if(sTop=="1")
	{
		$('#title').show();$('#picurltb').show();$('#url').show();$('#html').show();$('#html1').show();
	}
	else
	{
		$('#title').hide();$('#picurltb').hide();$('#url').hide();$('#html').hide();$('#html1').hide();
	}
}

  function valiForm()
  {
    return true
  }
</script>
</div>
</div>
</div></div>
<div class="clear80"></div>
</body>
</html>
