-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphoto_manage.html
executable file
·462 lines (414 loc) · 13.3 KB
/
photo_manage.html
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>微信 房产管理后台</title>
<link rel="stylesheet" href="css/styler.css" type="text/css" />
</head>
<body>
<!-- 头部 【【-->
<div class="header">
<div class="com-cent">
<div class="hd-title">微信 房产管理后台</div>
<div class="hd-log">欢迎你<span>亲爱的<em id="unm"></em>用户</span><a href="logout.php">退出</a></div>
<ul class="hd-link">
<li><a href="index.html">首页</a></li>
<li class="curr"><a href="property_manage.html">管理后台</a></li>
<li><a href="data.html">数据统计</a></li>
</ul>
</div>
</div>
<!-- 头部 】】-->
<!-- 二级菜单【【 -->
<div class="box-menu">
<div class="com-menu">
<ul class="menu">
<li><a href="property_manage.html">楼盘管理</a></li>
<li><a href="house_manage.html">看房团管理</a></li>
<li><a href="#none" onmouseover="mopen('m1')" onmouseout="mclosetime()">楼盘印象管理</a>
<ul class="menu-xia" style="visibility:hidden;" id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
<li><a href="impression_inquiry.html">房友印象查询</a></li>
<li><a href="impression_set.html">房友印象设置</a></li>
<li><a href="review.html">专家点评管理</a></li>
</ul>
</li>
<li><a href="order_li.html" onmouseover="mopen('m2')" onmouseout="mclosetime()">认筹管理</a>
<ul class="menu-xia" style="visibility:hidden;" id="m2" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
<li><a href="order_li.html">认筹列表</a></li>
<li><a href="order.html">认筹订单</a></li>
</ul>
</li>
<li class="curr"><a href="photo_inquiry.html" onmouseover="mopen('m3')" onmouseout="mclosetime()">照片管理</a>
<ul class="menu-xia" style="visibility:hidden;" id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
<li><a href="photo_inquiry.html">照片查询</a></li>
<li><a href="photo_manage.html">照片管理</a></li>
</ul>
</li>
<li><a href="new.html">多页态</a></li>
</ul>
</div>
</div>
<!-- 二级菜单 】】 -->
<div class="cent-auto">
<!-- 照片墙查询【【 -->
<div class="com-min">
<h3>照片墙查询</h3>
<div class="box-table" id="tbl_1">
</div>
</div>
<!-- 照片墙查询 】】-->
<!-- 添加图片【【-->
<div class="com-min hide" id="ed_1">
<h3>编辑图片</h3>
<div class="tipe-lb"><label>图片组名称:</label> <input class="inp-tex inp-300" id="ed_1_v1" type="text" onchange="setName()" /></div>
<!--div class="tipe-lb"><label>图片组布局:</label>
<select size="1" class="li-hd">
<option>六宫格</option>
<option>0:00</option>
</select>
</div-->
<div class="tipe-lb"><label>图片组编辑:</label>
<ul class="six-box">
<li><button class="btn-cha" type="button" onclick="show_1();">编辑标题</button></li>
<li><button class="btn-cha" type="button" onclick="show_2();">编辑图片</button> <br />尺寸建议260*150</li>
<li><button class="btn-cha" type="button" onclick="show_3();">编辑图片</button> <br />尺寸建议120*150</li>
<li><button class="btn-cha" type="button" onclick="show_4();">编辑图片</button> <br />尺寸建议220*150</li>
<li><button class="btn-cha" type="button" onclick="show_5();">编辑简要</button></li>
<li><button class="btn-cha" type="button" onclick="show_6();">编辑图片</button> <br />尺寸建议100*150</li>
</ul>
</div>
</div>
<div class="com-min hide" id="lp_tj">
<h3>提交</h3>
<div class="tipe-lb"><label>.</label> <button class="btn-cha" type="button" onclick="do_commit()";>提交审核</button> </div>
</div>
<!-- 添加图片 】】-->
</div>
<!-- 添加标题 【【-->
<div class="box-layer hide" id="b1">
<div class="title"><h2>添加标题</h2></div>
<a class="close" href="javascript:hide_b1();" title="关闭">关闭</a>
<div class="tip-mian">
<div class="p-shuju">
<div class="layer-lb"><label>主标题:</label> <input class="inp-tex inp-300" id="bt1" type="text" /></div>
<div class="layer-lb"><label>副标题:</label> <input class="inp-tex inp-300" id="bt2" type="text" /></div>
</div>
<div class="but-auto"><a class="an-butn" href="javascript:setTitle();" title="确认">确认</a> <a class="an-butn" href="javascript:hide_b1();" title="取消">取消</a></div>
</div>
</div>
<!-- 添加标题 】】 -->
<!-- 添加简述 【【-->
<div class="box-layer hide" id="b2">
<div class="title"><h2>添加简述</h2></div>
<a class="close" href="javascript:hide_b2();" title="关闭">关闭</a>
<div class="tip-mian">
<div class="p-shuju">
<div class="layer-lb"><label>简述正文:</label> <textarea class="layer-100" id="zw" cols="" rows="">100个字以内</textarea></div>
</div>
<div class="but-auto"><a class="an-butn" href="javascript:setDes();" title="确认">确认</a> <a class="an-butn" href="javascript:hide_b2();" title="取消">取消</a></div>
</div>
</div>
<!-- 添加简述 】】 -->
<!-- 上传图片 【【-->
<div class="box-layer hide" id="b3">
<div class="title"><h2>上传图片</h2></div>
<a class="close" href="javascript:hide_b3();" title="关闭">关闭</a>
<div class="tip-mian">
<div class="p-shuju" id="up1">
</div>
</div>
</div>
<!-- 上传图片 】】 -->
<div class="hide">
<form method="post" id="fm" target="forsubmit" >
<textarea class="layer-100" id="v_31" name="v_31"></textarea>
</form>
<iframe name="forsubmit" id="ifram_sign" src="" height="0" width="0" style="display:none;" ></iframe>
</div>
</body>
</html>
<script language="javascript" src="js/xl.js" charset="utf-8"></script>
<script language="javascript" src="js/jquery-2.0.3.js"></script>
<script language="javascript" src="js/comm.js" charset="utf-8"></script>
<script language="javascript" src="alldata.php" charset="utf-8"></script>
<script language="javascript" src="js/json.js"></script>
<script language="javascript" >
var g_cur_bid = 0;
var g_cur_hcid = 0;
function hide_b1()
{
$("#b1").addClass("hide");
}
function hide_b2()
{
$("#b2").addClass("hide");
}
function hide_b3()
{
$("#b3").addClass("hide");
}
function show_1()
{
move_win( "b1", "ed_1" );
$("#b1").removeClass("hide");
var o = get_hc_json();
for ( var j=0; j<o.d.length; j++ )
{
if ( o.d[j].id == g_cur_hcid )
{
$("#bt1").val( o.d[j].ps1[0].title );
$("#bt2").val( o.d[j].ps1[0].subTitle );
break;
}
}
}
function show_2()
{
move_win( "b3", "ed_1" );
$("#b3").removeClass("hide");
$( "#up1" ).html( str_html_uploadform( getImgUrl(1) ) + '<div class="layer-lb font-12">(请上传JPG格式图片,大小100K以内,尺寸建议120*150,图片名不超过六个字)</div>' );
}
function show_3()
{
move_win( "b3", "ed_1" );
$("#b3").removeClass("hide");
$( "#up1" ).html( str_html_uploadform( getImgUrl(2) ) + '<div class="layer-lb font-12">(请上传JPG格式图片,大小100K以内,尺寸建议120*150,图片名不超过六个字)</div>' );
}
function show_4()
{
move_win( "b3", "ed_1" );
$("#b3").removeClass("hide");
$( "#up1" ).html( str_html_uploadform( getImgUrl(3) ) + '<div class="layer-lb font-12">(请上传JPG格式图片,大小100K以内,尺寸建议120*150,图片名不超过六个字)</div>' );
}
function show_5()
{
move_win( "b2", "ed_1" );
$("#b2").removeClass("hide");
var o = get_hc_json();
for ( var j=0; j<o.d.length; j++ )
{
if ( o.d[j].id == g_cur_hcid )
{
$("#zw").val( o.d[j].ps2[1].content );
break;
}
}
}
function show_6()
{
move_win( "b3", "ed_1" );
$("#b3").removeClass("hide");
$( "#up1" ).html( str_html_uploadform( getImgUrl(5) ) + '<div class="layer-lb font-12">(请上传JPG格式图片,大小100K以内,尺寸建议120*150,图片名不超过六个字)</div>' );
}
function getImgUrl( idx )
{
return "../building/" + g_cur_bid + "/img/hc/" + g_cur_hcid + "_" + idx + ".jpg";
}
function get_hc_json()
{
return $("#v_31").html().parseJSON();
}
function set_hc_json( v )
{
for ( var i=0; i<g_data.length; i++ )
{
if ( g_cur_bid == g_data[i][0] )
{
g_data[i][28] = v.toJSONString();
$("#v_31").html( g_data[i][28] );
}
}
}
function setName()
{
var o = get_hc_json();
for ( var j=0; j<o.d.length; j++ )
{
if ( o.d[j].id == g_cur_hcid )
{
o.d[j].title = $("#ed_1_v1").val();
break;
}
}
set_hc_json( o );
init_hclist(g_cur_bid);
}
function setTitle()
{
var o = get_hc_json();
for ( var j=0; j<o.d.length; j++ )
{
if ( o.d[j].id == g_cur_hcid )
{
o.d[j].ps1[0].title = $("#bt1").val();
o.d[j].ps1[0].subTitle = $("#bt2").val();
break;
}
}
set_hc_json( o );
hide_b1();
}
function setDes()
{
var o = get_hc_json();
for ( var j=0; j<o.d.length; j++ )
{
if ( o.d[j].id == g_cur_hcid )
{
o.d[j].ps2[1].content = $("#zw").val();
break;
}
}
set_hc_json( o );
hide_b2();
}
function init_lplist()
{
var v = { "th":[ "楼盘ID", "楼盘名称", "提交时间", "状态", "操作" ], "td":[] };
for ( var i=0; i<g_data.length; i++ )
{
v.td[i] = [];
v.td[i].push( g_data[i][0] );
v.td[i].push( g_data[i][1] );
v.td[i].push( "2013-09-24" );
v.td[i].push( "待审核" );
v.td[i].push( a_html( "编辑", "javascript:init_hclist('" + g_data[i][0] + "')" ) );
}
$("#tbl_1").html( create_tblbyjson( v ) );
}
function init_hclist( bid )
{
g_cur_bid = bid;
var v = { "th":[ "楼盘名称", "图片组名称", "操作" ], "td":[] };
for ( var i=0; i<g_data.length; i++ )
{
if ( bid == g_data[i][0] )
{
var o = g_data[i][28].parseJSON();
for ( var j=0; j<o.d.length; j++ )
{
v.td[j] = [];
v.td[j].push( g_data[i][1] );
v.td[j].push( o.d[j].title );
v.td[j].push( a_html("编辑","javascript:edit_hc('" + o.d[j].id + "')") + a_html("删除","javascript:del_hc('" + o.d[j].id + "')") );
}
$("#v_31").html( g_data[i][28] );
}
}
$("#tbl_1").html( create_tblbyjson( v )+'<div class="but-righ ma-top"><button class="btn-cha" type="button" onclick="add_hc()">添加新画册</button></div>' );
}
function show_edit( v )
{
$("#ed_1").removeClass( "hide" );
$("#lp_tj").removeClass( "hide" );
$("#ed_1_v1").val( v.title );
}
function edit_hc( id )
{
for ( var i=0; i<g_data.length; i++ )
{
if ( g_cur_bid == g_data[i][0] )
{
var o = g_data[i][28].parseJSON();
for ( var j=0; j<o.d.length; j++ )
{
if ( id == o.d[j].id )
{
g_cur_hcid = id;
show_edit( o.d[j] );
init_hclist( g_cur_bid );
return;
}
}
break;
}
}
alert( "匹配出错,请刷新页面!" );
}
function add_hc()
{
// 八宫格
/*
var v = {"title":"","id":"","ps1":[{"size":[150, 150],"type":"title","title": "","subTitle":""},{"size": [260, 150],"type": "img","name": "","img": ""},{"size": [100, 150],"type": "img","name": "","img": ""},{"size": [200, 150],"type": "img","name": "","img": ""}],"ps2": [{"size": [220, 150],"type": "img","name": "","img": ""},{"size": [170, 150],"type": "text","content": ""},{"size": [200, 150],"type": "img","name": "","img": ""},{"size": [120, 150],"type":"img","name":"","img":""}]};
*/
// 六宫格
var v = {
"title": "",
"ps1": [{
"size": [150, 150],
"type": "title",
"title": "",
"subTitle": ""
},
{
"size": [260, 150],
"type": "img",
"name": "",
"img": ""
},
{
"size": [100, 150],
"type": "img",
"name": "",
"img": ""
}],
"ps2": [{
"size": [220, 150],
"type": "img",
"name": "",
"img": ""
},
{
"size": [170, 150],
"type": "text",
"content": ""
},
{
"size": [120, 150],
"type": "img",
"name": "",
"img": ""
}]
};
for ( var i=0; i<g_data.length; i++ )
{
if ( g_cur_bid == g_data[i][0] )
{
var o = g_data[i][28].parseJSON();
v.id = o.mid++;
v.ps1[1].img = "http://112.124.55.78/building/" + g_cur_bid + "/img/hc/" + v.id + "_1.jpg";
v.ps1[2].img = "http://112.124.55.78/building/" + g_cur_bid + "/img/hc/" + v.id + "_2.jpg";
v.ps2[0].img = "http://112.124.55.78/building/" + g_cur_bid + "/img/hc/" + v.id + "_3.jpg";
v.ps2[2].img = "http://112.124.55.78/building/" + g_cur_bid + "/img/hc/" + v.id + "_5.jpg";
o.d.push(v);
g_data[i][28] = o.toJSONString();
g_cur_hcid = v.id;
show_edit( v );
init_hclist( g_cur_bid );
break;
}
}
}
function del_hc(id)
{
var o = get_hc_json();
for ( var j=0; j<o.d.length; j++ )
{
if ( o.d[j].id == id )
{
o.d.splice(j,1);
break;
}
}
set_hc_json( o );
init_hclist( g_cur_bid );
}
function do_commit()
{
$("#fm").attr( "action", "commit_hc.php?id="+g_cur_bid );
$("#fm").submit();
}
checkLogin();
init_header();
init_lplist();
</script>