canying.html
4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
filterMode: false,//是否开启过滤模式
items : [
'source','|','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist'],
afterBlur: function(){
this.sync();//假如没有这一句,获取到的id为content的值空白
}
});
prettyPrint();
});
</script>
<style>
input{color:#000!important;}
.pp_emails p{display:inline-block;padding:0px; margin:0px; padding-right:20px; line-height:28px;}
.pp_emails div button{color:#000;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b><{$webtitle}></b>
</div>
<div style="float:right">
[<a href="<{$back_url}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right; width:200px;"><font color="red">姓名:</font></td>
<td class="bline"><{$info.name}></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">Email:</font></td>
<td class="bline"><{$info.email}></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">请选择Email模板:</font></td>
<td class="bline pp_emails">
<div><button type="button" onclick='location.href="<{:U('Email/index')}>";'>Email模板管理</button></div>
<volist name="emails" id="v" key="k">
<p><input type="radio" name="pp_type" value="<{$v.id}>" /><{$v.title}></p>
</volist>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">标题:</font></td>
<td class="bline"><input name="title" type="text" style="width:80%"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">内容:</font></td>
<td class="bline"><textarea name="content" style="width:80%;" rows="2" id="content"></textarea></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="sumid" value="<{$sumid}>" />
<input type="hidden" name="p" value="<{$p}>" />
<input type="hidden" name="id" value="<{$info.id}>" />
<if condition="I('doagin') eq 'yes'"><input type="hidden" name="doagin" value="yes" /></if>
</form>
</div>
</body>
<script>
$(function(){
getTmp();
$('.pp_emails p :input').click(function(){
getTmp();
});
});
function getTmp(){
var $a = $('.pp_emails p :input:checked');
if(typeof($a.val()) != 'undefined'){
var vali={
'id' : $a.val(),
};
$.post('<{:U('Email/getTmpInfo')}>',vali,function(data){
if(typeof(data['suc']) != 'undefined'){
if(data['suc']){
$(':input[name="title"]').val(data['msg']['title']);
$(document.getElementsByTagName('iframe')[0].contentWindow.document.body).html(data['msg']['content']);
}else{
alert(data['msg']);
}
}
},'json');
}
}
</script>
</html>