link.html
5.43 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!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="shortcut icon" href="__ROOT__/favicon.ico" media="screen">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<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>
<style>
#upid {
font-family: "宋体";
}
</style>
<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>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
//K('#picida').src(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
K('#uploadfid').click(function(){
editor1.loadPlugin('insertfile', function(){
editor1.plugin.fileDialog({
fileUrl : K('#fileid').val(),
clickFn : function(url, title) {
K('#fileid').val(url);
editor1.hideDialog();
}
});
});
});
K('#J_selectImage').click(function() {
editor1.loadPlugin('multiimage', function() {
editor1.plugin.multiImageDialog({
clickFn : function(urlList) {
var div = K('#img');
// div.html('');
K.each(urlList, function(i, data) {
div.append('<p><img src="' + data.url + '" /><input type="hidden" name="img[]" value="' + data.url + '" /></p>');
});
editor1.hideDialog();
}
});
});
});
});
$(function(){
//删除图片
$("#img").delegate("p","click",function(){
if(window.confirm('你确定要删除此图片吗?')){
var p=$(this);
var f=p.children('img').attr('src');
var validate={
file:f
};
$.get("<{:U('delFile')}>", validate, function(data){
if(data == 'yes')
{
p.remove();
}
else
{
alert('删除失败');
}
});
}
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form1" action="" method="post">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody>
<tr>
<td colspan="3" style="padding-left:10px;"><div style="float:left"><b>编辑-><{$data.catname}></b></div></td>
</tr>
<tr>
<td height="26" width="90" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">栏目名称:</font></td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"<else /> width="350"</if>><input name="catname" type="text" id="catname" size="30" class="iptxt" value="<{$data.catname}>"></td>
<if condition="strstr($picnum,'1')">
<td rowspan="4"><img src="<{$data.thumb|Thumb}>" id="picida" style=" max-height:150px; max-width:550px;"></td>
</if>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">英文名称:</font></td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"</if>><input name="catename" type="text" id="catename" size="30" class="iptxt" value="<{$data.catename}>"></td>
</tr>
<if condition="strstr($picnum,'1')">
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">图片:</td>
<td><input name="thumb" type="text" id="picid" value="<{$data.thumb}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"></td>
</tr>
</if>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"> 排列顺序: </td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"</if>><input name="sort" size="6" type="text" value="<{$data.sort}>" class="pubinputs" style="width:60px"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10">链接地址:</td>
<td><input name="linkurl" type="text" id="linkurl" class="width_220" value="<{$data.linkurl}>"><span class="note">(例如:http://www.baidu.com)</span></td>
</tr>
<tr>
<td colspan="3" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>" />
<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>
</form>
</div>
</body>
</html>