453 lines
17 KiB
Plaintext
453 lines
17 KiB
Plaintext
<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="Admin_Member_gong_add1.aspx.cs" Inherits="Mtxfw.VipSite.Admin_Member_gong_add1" %>
|
||
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head id="Head1" runat="server">
|
||
<title></title>
|
||
|
||
|
||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||
<meta http-equiv="Cache-Control" content="no-store" />
|
||
<meta http-equiv="Pragma" content="no-cache" />
|
||
<meta http-equiv="Expires" content="0" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9,IE=10" />
|
||
<script src="/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
|
||
<script type="text/javascript" src="/Scripts/bootstrap.min.js"></script>
|
||
<script type="text/javascript" charset="utf-8" src="/Scripts/vod-js-sdk-v6.js"></script>
|
||
<script src="/Scripts/common.js" type="text/javascript"></script>
|
||
<script type="text/javascript" src="/layer/layer.js"></script>
|
||
<script type="text/javascript" src="/Scripts/long.js"></script>
|
||
<link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||
|
||
<!-- Basic Styles -->
|
||
|
||
<meta name="description" content="">
|
||
<meta name="author" content="">
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/bootstrap.css">
|
||
<!--[if IE 7]>
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/font-awesome-ie7.min.css">
|
||
<![endif]-->
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/smartadmin-production.css">
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/smartadmin-skins.css">
|
||
|
||
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/your_style.css">
|
||
|
||
<!-- Demo purpose only: goes with demo.js, you can delete this css when designing your own WebApp -->
|
||
<link rel="stylesheet" type="text/css" media="screen" href="/css/demo.css">
|
||
|
||
|
||
<!-- FAVICONS -->
|
||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||
|
||
<link rel="stylesheet" type="text/css" href="/css/cjadd.css">
|
||
<link href="artDialog/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
|
||
<script type="text/javascript" charset="utf-8" src="/artDialog/umeditor.config.js?t=0"></script>
|
||
<script type="text/javascript" charset="utf-8" src="/artDialog/umeditor.min.js?t=0"> </script>
|
||
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
|
||
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
|
||
<script type="text/javascript" charset="utf-8" src="/artDialog/lang/zh-cn/zh-cn.js"></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: '700px',
|
||
height: '500px',
|
||
lock: true,
|
||
id: 'dg_test34243'
|
||
});
|
||
};
|
||
</script>
|
||
<style type="text/css">
|
||
.uploadvideobox{ display:inline-block; width:15em;}
|
||
.uploadvideobtnbox{ position:relative;
|
||
float:left;
|
||
width: 8em;
|
||
height: 2em;
|
||
line-height: 2em;
|
||
margin: 1em auto;
|
||
background: linear-gradient(to right, #fec02e, #fc9b06);
|
||
border-radius: 0.5em;
|
||
|
||
color:#fff;}
|
||
.uploadvideobtnbox span{width: 100%;height: 100%; display:block;text-align:center;}
|
||
.uploadvideobtnbox input#videofile{position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
opacity: 0;
|
||
border:0;
|
||
background-color:#000;}
|
||
.processbox{ width: 100%;height: 0.5em;border-radius: 10px;background: #999;margin: 10px auto;border: 1px solid #ff6780; display:none}
|
||
.child{position: relative;height:100%;border-radius:inherit; background-color:#ff4500;}
|
||
|
||
.process-animate{background: #ff6780;position: absolute;left: 0;top: 0;bottom: 0;border-radius:inherit;
|
||
animation: process 1s linear forwards ;
|
||
}
|
||
@keyframes process
|
||
{
|
||
0%{
|
||
left:0;right:100%;
|
||
}
|
||
20%{
|
||
right:80%
|
||
}
|
||
40%{
|
||
right:60%;
|
||
}
|
||
60%{right:40%;}
|
||
80%{right:20%;}
|
||
100%{right:0;}
|
||
}
|
||
.delvideobtnbox{display:inline-block; margin-left:1em; margin-top:1em; width:2em; height:2em; background-color:#fff; cursor:pointer; display:none}
|
||
.delvideobtnbox img{display:inline-block; width:100%; height:100%;}
|
||
</style>
|
||
<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'
|
||
});
|
||
};
|
||
var open0 = function (url) {
|
||
art.dialog.open(url, {
|
||
title: '插入视频',
|
||
width: '700px',
|
||
height: '500px',
|
||
lock: true,
|
||
id: 'dg_test34244'
|
||
});
|
||
};
|
||
</script>
|
||
<script type="text/javascript">
|
||
var checkForm = function () {
|
||
var Text_Title = $("#<%=Text_Title.ClientID %>");
|
||
if (Text_Title.val() == "") {
|
||
alert('请输入标题!'); return false;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
window.UMEDITOR_CONFIG.toolbar = [
|
||
// 加入一个 test
|
||
' bold italic underline strikethrough superscript subscript forecolor removeformat ', ' fontfamily fontsize',
|
||
'| justifyleft justifycenter justifyright justifyjustify', 'image', 'upvideo', 'source'
|
||
];
|
||
|
||
UM.registerUI('upvideo',
|
||
function (name) {
|
||
var me = this;
|
||
var $btn = $.eduibutton({
|
||
icon: "video",
|
||
click: function () {
|
||
art.dialog.open("insertvideo.aspx", {
|
||
title: '插入视频',
|
||
width: '600px',
|
||
height: '400px',
|
||
lock: true,
|
||
id: 'dg_test34243'
|
||
});
|
||
},
|
||
title: '插入视频'
|
||
});
|
||
|
||
this.addListener('selectionchange', function () {
|
||
//切换为不可编辑时,把自己变灰
|
||
var state = this.queryCommandState(name);
|
||
$btn.edui().disabled(state == -1).active(state == 1)
|
||
});
|
||
return $btn;
|
||
}
|
||
);
|
||
|
||
function InsertVideo() {
|
||
var video = $("#show_fileurl").val();
|
||
var html = "<div style=\"width:100%;text-align:center;\"><video width=\"500\" height=\"400\" style=\"background-color: #000000;\" controls=\"controls\" autoplay=\"autoplay\" poster=\"\" x5-playsinline=\"\" playsinline=\"\" webkit-playsinline=\"\"><source src=\"" + video + "\" type=\"video/mp4\"></video></div><span style=\"display:none\">用于保存视频不能保存问题</span><br/>";
|
||
insertHtml(html);
|
||
$('#uploadvideosuccessModal').modal('hide');
|
||
|
||
}
|
||
$(document).ready(function () {
|
||
showphoto();
|
||
})
|
||
function showphoto() {
|
||
var strphoto = $("#hiddenphoto").val();
|
||
|
||
var imgurl = "";
|
||
|
||
if (strphoto != "") {
|
||
|
||
var strPhoto = strphoto.split(",");
|
||
var src = (strPhoto[0].indexOf("http") != -1 ? strPhoto[0] : "/GetFiles.ashx?image=" + strPhoto[0] + "&itsize=100x100&itmode=cut");
|
||
|
||
imgurl += "<li id='picli0'><img src='" + src + "' width='100' class='pic' /><a href=javascript:DeletePic('" + strphoto + "',0)>删除</a>";
|
||
|
||
imgurl += "</li>";
|
||
}
|
||
|
||
$("#inputTips2").html(imgurl);
|
||
}
|
||
function DeletePic(delpics, i) {
|
||
if (delpics != "") {
|
||
$.post("/ajax.ashx", { action: "deleteimage", delpics: escape(delpics) }, function (data) {
|
||
if (data.success) {
|
||
$("#hiddenphoto").val("");
|
||
showphoto();
|
||
} else {
|
||
$("#hiddenphoto").val("");
|
||
showphoto();
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<form runat="server">
|
||
<!-- RIBBON -->
|
||
<div id="ribbon">
|
||
|
||
<span class="ribbon-button-alignment"> <span id="refresh" class="btn btn-ribbon" data-title="refresh" rel="tooltip" data-placement="bottom" data-original-title="<i class='text-warning fa fa-warning'></i> 注意!这会重新设置小工具的排位." data-html="true" data-reset-msg="刷新网站?"><i class="fa fa-refresh"></i></span> </span>
|
||
|
||
<!-- breadcrumb -->
|
||
<ol class="breadcrumb">
|
||
<li><a href="/" target="_top">主页</a></li>
|
||
<li><a href="/Member_Index.aspx">会员中心首页</a></li>
|
||
<li><a href="/Admin_Member_config.aspx">后台管理</a></li>
|
||
<li>操作教程</li>
|
||
</ol>
|
||
<!-- end breadcrumb -->
|
||
</div>
|
||
<!-- END RIBBON -->
|
||
<!-- MAIN CONTENT -->
|
||
<div style="opacity: 1;" id="content">
|
||
<div class="frontMain">
|
||
|
||
<h1 class="title01"><span class="semi-bold"><%=strTitle %></span></h1>
|
||
<div class="MainContent">
|
||
<table width="100%" class="data_table2">
|
||
<tr>
|
||
<th width="10%"> 标题:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_Title" Width="500px" runat="server"></asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>分类:</th>
|
||
<td><asp:DropDownList id="DropType" DataTextField="LBName" DataValueField="id" runat="server">
|
||
|
||
</asp:DropDownList></td>
|
||
</tr>
|
||
<!--tr>
|
||
<th width="10%"> 一句话描述:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_content2" Width="500px" runat="server"></asp:TextBox>
|
||
</td>
|
||
</tr-->
|
||
<tr>
|
||
<th width="10%"> 浏览次数:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_Num" Width="100px" runat="server">145</asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th width="10%"> 点赞次数:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_Num2" Width="100px" runat="server">130</asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<th width="10%"> 预览图片:</th>
|
||
<td>
|
||
<div id="inputTips2"></div><br><br><a href="javascript:open('insertimage.aspx')" class="selectpica">插入图片</a> <span id="spanImg">较好的效果长宽比例为:720*720像素</span>
|
||
<input name="hiddenphoto" id="hiddenphoto" type="hidden" value="" runat="server" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th width="10%"> 内容:</th>
|
||
<td>
|
||
<script id="editor" type="text/plain" style="width:90%;height:400px;"><%=strBody %></script>
|
||
<asp:HiddenField ID="Hidd_myEditor" runat="server" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th width="10%"> 显示方式:</th>
|
||
<td>
|
||
<asp:DropDownList id="Drop_ShowType" runat="server">
|
||
<asp:listitem value="0">横屏</asp:listitem>
|
||
<asp:listitem value="1">竖屏</asp:listitem>
|
||
</asp:DropDownList>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th width="15%"></th>
|
||
<td>
|
||
<asp:Button ID="Btn_Insert" runat="server" Cssclass="abtn" Text="添加" OnClientClick="getContent();return checkForm();" />
|
||
<asp:Button ID="Btn_Update" runat="server" Cssclass="abtn" Text="更新" OnClientClick="getContent();return checkForm();" />
|
||
<input id="btn_back" type="reset" value="返回" onclick="history.go(-1)" class="abtn" />
|
||
<asp:HiddenField ID="Hidd_Url" runat="server" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<!-- 上传视频(Modal) -->
|
||
<div class="modal fade" id="uploadvideosuccessModal" tabindex="-1" role="dialog" aria-labelledby="successLab" aria-hidden="true">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title"><span id="uploadvideomodal-title">上传视频</span><span class="close" onclick="$('#uploadvideosuccessModal').modal('hide');">x</span></h5>
|
||
|
||
</div>
|
||
<div class="modal-body0">
|
||
<div class="uploadvideobox">
|
||
<div class="processbox">
|
||
<div class="child" style="width:0%">
|
||
<p class="process-animate"></p>
|
||
</div>
|
||
</div>
|
||
<div class="uploadvideobtnbox"><span>上传</span><input type="file" id="videofile" value="" onchange="videoUploading()" accept="video/*" /></div>
|
||
|
||
</div>
|
||
<div class="uploadvideo_msgbox">仅支持mp4格式文件,上传其它文件无法播放。</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default text-right" onclick="$('#uploadvideosuccessModal').modal('hide');" id="uploadvideobtn-qx">取消</button>
|
||
<button type="button" class="btn btn-success" id="uploadvideobtn-continue" onclick="InsertVideo()">确认</button>
|
||
<input id="hidden_file" type="hidden" />
|
||
<input id="file_id" type="hidden" />
|
||
<input id="show_fileurl" type="hidden" />
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<script type="text/javascript">
|
||
|
||
//实例化编辑器
|
||
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UM.getEditor('editor')就能拿到相关的实例
|
||
UM.getEditor('editor');
|
||
|
||
|
||
function isFocus(e) {
|
||
alert(UM.getEditor('editor').isFocus());
|
||
UM.dom.domUtils.preventDefault(e)
|
||
}
|
||
function setblur(e) {
|
||
UM.getEditor('editor').blur();
|
||
UM.dom.domUtils.preventDefault(e)
|
||
}
|
||
function insertHtml(value) {
|
||
UM.getEditor('editor').execCommand('insertHtml', value)
|
||
}
|
||
function createEditor() {
|
||
enableBtn();
|
||
UM.getEditor('editor');
|
||
};
|
||
function getAllHtml() {
|
||
$("#Hidd_myEditor").val(UM.getEditor('editor').getAllHtml());
|
||
}
|
||
function getContent() {
|
||
|
||
$("#Hidd_myEditor").val(UM.getEditor('editor').getContent());
|
||
}
|
||
function getPlainTxt() {
|
||
var arr = [];
|
||
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
|
||
arr.push("内容为:");
|
||
arr.push(UM.getEditor('editor').getPlainTxt());
|
||
alert(arr.join('\n'))
|
||
}
|
||
function setContent(isAppendTo) {
|
||
//var arr = [];
|
||
//arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
|
||
UM.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
|
||
//alert(arr.join("\n"));
|
||
}
|
||
function setDisabled() {
|
||
UM.getEditor('editor').setDisabled('fullscreen');
|
||
disableBtn("enable");
|
||
}
|
||
|
||
function setEnabled() {
|
||
UM.getEditor('editor').setEnabled();
|
||
enableBtn();
|
||
}
|
||
|
||
function getText() {
|
||
//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
|
||
var range = UM.getEditor('editor').selection.getRange();
|
||
range.select();
|
||
var txt = UM.getEditor('editor').selection.getText();
|
||
alert(txt)
|
||
}
|
||
|
||
function getContentTxt() {
|
||
var arr = [];
|
||
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
|
||
arr.push("编辑器的纯文本内容为:");
|
||
arr.push(UM.getEditor('editor').getContentTxt());
|
||
alert(arr.join("\n"));
|
||
}
|
||
function hasContent() {
|
||
var arr = [];
|
||
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
|
||
arr.push("判断结果为:");
|
||
arr.push(UM.getEditor('editor').hasContents());
|
||
alert(arr.join("\n"));
|
||
}
|
||
function setFocus() {
|
||
UM.getEditor('editor').focus();
|
||
}
|
||
function deleteEditor() {
|
||
disableBtn();
|
||
UM.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(UM.getEditor('editor').execCommand("getlocaldata"));
|
||
}
|
||
|
||
function clearLocalData() {
|
||
UM.getEditor('editor').execCommand("clearlocaldata");
|
||
alert("已清空草稿箱")
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|