Files
g.hnyhua.cn/Mtxfw.shop/_Admin/admin_weixin_add.aspx
2026-02-07 15:48:27 +08:00

316 lines
13 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="admin_weixin_add.aspx.cs" Inherits="Mtxfw.shop._Admin.admin_weixin_add" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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 runat="server">
<title></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/Burgundy.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/artDialog/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/artDialog/ueditor.all.min.js"> </script>
<!--建议手动加在语言避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/artDialog/lang/zh-cn/zh-cn.js"></script>
<script src="/scripts/jquery-1.7.2.js" type="text/javascript"></script>
<script type="text/javascript">
var checkForm = function () {
var Text_Title = $("#Text_Title");
if (Text_Title.val() == '') {
alert('请输入栏目名称!'); return false;
}
return true;
};
function onwtype() {
hidewb($("#wtype").val());
hidewb2($("#wtype2").val());
}
function onwtype2() {
hidewb2($("#wtype2").val());
}
function hidewb(wtype) {
if (wtype == "2") {
$("#tr_KeyWords").show();
} else {
$("#tr_KeyWords").hide();
}
if (wtype == "3" || wtype == "4") {
$("#tr_myhh").hide();
$("#trIFSend").show();
} else {
$("#tr_myhh").show();
$("#trIFSend").hide();
}
}
function hidewb2(wtype2) {
if (wtype2 == "0") {
$("#tr_Img").hide();
$("#tr_Content").hide();
$("#tr_Content2").show();
$("#tr_Paths").hide();
$("#tr_Paths2").hide();
$(".tdtitle1").html("");
} else if (wtype2 == "1") {
$("#tr_Img").show();
$("#tr_Content").show();
$("#tr_Content2").show();
$("#tr_Paths").show();
$("#tr_Paths2").hide();
$(".tdtitle1").html("图片");
} else if (wtype2 == "3") {
$("#tr_Img").show();
$("#tr_Content").hide();
$("#tr_Content2").hide();
$("#tr_Paths").show();
$("#tr_Paths2").hide();
}
else {
$("#tr_Img").show();
$("#tr_Content").hide();
$("#tr_Content2").show();
$("#tr_Paths").hide();
$("#tr_Paths2").show();
$(".tdtitle1").html("音乐");
$(".tdtitle2").html("省略图片");
$("#spanImg").html("省略图片必须小于64KB");
}
}
$(document).ready(function () {
hidewb("<%=strwtype %>");
hidewb2("<%=strwtype2 %>");
});
var DeletePic = function (pic, i) {
$("#inputTips2 #picli" + i).hide(300);
if ($("#hiddenphoto").val() != "") {
$("#hiddenphoto").val($("#hiddenphoto").val().replace(pic, ""));
}
};
</script>
<script src="/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
<script src="/artDialog/iframeTools.js" type="text/javascript"></script>
<script type="text/javascript">
var open = function (url) {
art.dialog.open(url, {
title: '插入图片',
width: '600px',
height: '400px',
lock: true,
id: 'dg_test34243'
});
};
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="main">
<div class="bt1">文章管理 - <%=TitName %><%=strtitle%></div>
<div class="bt2">
<div class="clear"></div>
</div>
<div class="bt3">
<table width="100%" class="addtable">
<tr>
<th width="10%">&nbsp;类型:</th>
<td>
<asp:DropDownList ID="wtype" runat="server">
<asp:ListItem Value="0">被添加时回复</asp:ListItem>
<asp:ListItem Value="1">消息自动回复</asp:ListItem>
<asp:ListItem Value="2">关键词自动回复</asp:ListItem>
<asp:ListItem Value="3">群发信息</asp:ListItem>
<asp:ListItem Value="4">菜单信息</asp:ListItem>
</asp:DropDownList> <asp:DropDownList ID="wtype2" runat="server">
<asp:ListItem Value="0">文本</asp:ListItem>
<asp:ListItem Value="3">图片</asp:ListItem>
<asp:ListItem Value="1">图文</asp:ListItem>
<asp:ListItem Value="2">音乐</asp:ListItem>
</asp:DropDownList> <!--<asp:ListItem Value="3">语音</asp:ListItem>
<asp:ListItem Value="4">视频</asp:ListItem>-->
</td>
</tr>
<tr id="tr_myhh" style=" display:none;">
<th width="10%">&nbsp;默认回复:</th>
<td>
<asp:CheckBox ID="myhh" runat="server" />是否默认回复
</td>
</tr>
<tr id="trIFSend" style=" display:none;">
<th width="10%">发送到微信:</th>
<td><asp:CheckBox ID="IFSend" runat="server" /></td>
</tr>
<tr>
<th width="10%">&nbsp;标题:</th>
<td>
<asp:TextBox ID="Text_Title" Columns="60" runat="server"></asp:TextBox>
</td>
</tr>
<tr id="tr_KeyWords" style=" display:none;">
<th width="10%">&nbsp;关键词:</th>
<td>
<asp:TextBox ID="Text_KeyWords" Columns="60" runat="server"></asp:TextBox>可添加多个关键字用“|”隔开
</td>
</tr>
<tr id="tr_Img" style=" display:none;">
<th>&nbsp;<span class="tdtitle2">默认图片</span></th>
<td>
<input name="hiddenphoto" id="hiddenphoto" type="hidden" value="" runat="server" />
<input name="hiddenphoto2" id="hiddenphoto2" type="hidden" value="" runat="server" />
<div id="inputTips2"><%=strimg %></div><br><br><a href="javascript:open('insertimage.aspx')" class="selectpica">插入图片</a>&nbsp;&nbsp;&nbsp;<span id="spanImg">较好的效果长宽比例为720*360像素</span>
</td>
</tr>
<tr id="tr_Content2" style=" display:none;">
<th width="10%">&nbsp;<span class="tdtitle1">图片</span>描述:</th>
<td>
<asp:TextBox ID="Text_Content2" Columns="60" Rows="10" TextMode="MultiLine" runat="server"></asp:TextBox>
</td>
</tr>
<tr id="tr_Paths2" style=" display:none;">
<th width="10%">&nbsp;音乐链接:</th>
<td>
<asp:TextBox ID="Text_Paths2" Columns="60" runat="server"></asp:TextBox><asp:TextBox ID="Text_media_id" Visible="true" runat="server"></asp:TextBox>
<asp:FileUpload ID="FileUpload1" runat="server" style="border:1px solid #ccc;" /><asp:Button ID="Btn_Upload" runat="server" CssClass="btn" Text="上传" />
</td>
</tr>
<tr id="tr_Paths" style=" display:none;">
<th width="10%">&nbsp;链接地址:</th>
<td>
<asp:TextBox ID="Text_Paths" Columns="60" runat="server"></asp:TextBox>例如http://www.hzmfgw.com/weixin.aspx?id=1
</td>
</tr>
<tr id="tr_Content" style=" display:none;">
<th width="10%">&nbsp;内容:</th>
<td>
<script id="editor" type="text/plain" style="width:720px;height:350px;"><%=strBody %></script>
<asp:HiddenField ID="Hidd_myEditor" runat="server" />
<asp:HiddenField ID="Hidd_C" runat="server" />
</td>
</tr>
<tr><th width="10%"></th>
<td>
<asp:Button ID="Btn_Insert" runat="server" CssClass="savebtn" Text="添加" OnClientClick="getContent();return checkForm();" />
<asp:Button ID="Btn_Update" runat="server" CssClass="savebtn" Text="更新" OnClientClick="getContent();return checkForm();" />
<input id="btn_back" type="button" value="返回" class="returnbtn" onclick="history.go(-1)" />
<asp:HiddenField ID="Hidd_Url" runat="server" />
</td>
</tr>
</table>
</div>
</div>
</form>
<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例如果在某个闭包下引用该编辑器直接调用UE.getEditor('editor')就能拿到相关的实例
UE.getEditor('editor');
function isFocus(e) {
alert(UE.getEditor('editor').isFocus());
UE.dom.domUtils.preventDefault(e)
}
function setblur(e) {
UE.getEditor('editor').blur();
UE.dom.domUtils.preventDefault(e)
}
function insertHtml() {
var value = prompt('插入html代码', '');
UE.getEditor('editor').execCommand('insertHtml', value)
}
function createEditor() {
enableBtn();
UE.getEditor('editor');
};
function getAllHtml() {
document.getElementById("Hidd_myEditor").value = UE.getEditor('editor').getAllHtml();
alert(UE.getEditor('editor').getAllHtml());
}
function getContent() {
document.getElementById("Hidd_myEditor").value = UE.getEditor('editor').getContent();
}
function getPlainTxt() {
var arr = [];
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
arr.push("内容为:");
arr.push(UE.getEditor('editor').getPlainTxt());
alert(arr.join('\n'))
}
function setContent(isAppendTo) {
//var arr = [];
//arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
//alert(arr.join("\n"));
}
function setDisabled() {
UE.getEditor('editor').setDisabled('fullscreen');
disableBtn("enable");
}
function setEnabled() {
UE.getEditor('editor').setEnabled();
enableBtn();
}
function getText() {
//当你点击按钮时编辑区域已经失去了焦点如果直接用getText将不会得到内容所以要在选回来然后取得内容
var range = UE.getEditor('editor').selection.getRange();
range.select();
var txt = UE.getEditor('editor').selection.getText();
alert(txt)
}
function getContentTxt() {
var arr = [];
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
arr.push("编辑器的纯文本内容为:");
arr.push(UE.getEditor('editor').getContentTxt());
alert(arr.join("\n"));
}
function hasContent() {
var arr = [];
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
arr.push("判断结果为:");
arr.push(UE.getEditor('editor').hasContents());
alert(arr.join("\n"));
}
function setFocus() {
UE.getEditor('editor').focus();
}
function deleteEditor() {
disableBtn();
UE.getEditor('editor').destroy();
}
function disableBtn(str) {
var div = document.getElementById('btns');
var btns = domUtils.getElementsByTagName(div, "button");
for (var i = 0, btn; btn = btns[i++]; ) {
if (btn.id == str) {
domUtils.removeAttributes(btn, ["disabled"]);
} else {
btn.setAttribute("disabled", "true");
}
}
}
function enableBtn() {
var div = document.getElementById('btns');
var btns = domUtils.getElementsByTagName(div, "button");
for (var i = 0, btn; btn = btns[i++]; ) {
domUtils.removeAttributes(btn, ["disabled"]);
}
}
function getLocalData() {
alert(UE.getEditor('editor').execCommand("getlocaldata"));
}
function clearLocalData() {
UE.getEditor('editor').execCommand("clearlocaldata");
alert("已清空草稿箱")
}
</script>
</body>
</html>