space_album_pic.htm
18.1 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
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
<!--{eval $_G['home_tpl_titles'] = array(getstr($pic['title'], 60, 0, 0, 0, -1), $album['albumname'], '{lang album}');}-->
<!--{eval $friendsname = array(1 => '{lang friendname_1}',2 => '{lang friendname_2}',3 => '{lang friendname_3}',4 => '{lang friendname_4}');}-->
<!--{if $_G[setting][homepagestyle]}-->
<!--{subtemplate home/space_header}-->
<div id="ct" class="ct2 wp cl">
<div class="mn">
<div class="bm">
<div class="bm_h">
<!--{if $space[self] && helper_access::check_module('album')}--><span class="xi2 y"><a href="home.php?mod=spacecp&ac=upload" class="addnew">{lang upload_pic}</a></span><!--{/if}-->
<h1 class="mt">{lang album}</h1>
</div>
<div class="bm_c">
<!--{else}-->
<!--{template common/header}-->
<div id="pt" class="bm cl">
<div class="z">
<a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>›</em>
<a href="home.php?mod=space&uid=$space[uid]">{$space[username]}</a> <em>›</em>
<a href="home.php?mod=space&uid=$space[uid]&do=album&view=me&from=space">{lang album}</a>
</div>
</div>
<style id="diy_style" type="text/css"></style>
<div class="wp">
<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>
<!--{template home/space_menu}-->
<div id="ct" class="ct1 wp cl">
<div class="mn">
<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
<div class="bm bw0">
<div class="bm_c">
<!--{/if}-->
<div class="tbmu" id="pic_block">
<div class="y">
<a href="javascript:;" onclick="imageRotate('pic', 1)"><img class="vm" src="{STATICURL}image/common/rleft.gif" /></a>
<a href="javascript:;" onclick="imageRotate('pic', 2)"><img class="vm" src="{STATICURL}image/common/rright.gif" /></a><span class="pipe">|</span>
<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$upid&goto=up#pic_block">{lang previous_pic}</a><span class="pipe">|</span>
<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block" id="nextlink">{lang next_pic}</a><span class="pipe">|</span>
<!--{if $_GET['play']}-->
<a href="javascript:;" id="playid" class="osld" onclick="playNextPic(false);">{lang stop_playing}</a>
<!--{else}-->
<a href="javascript:;" id="playid" class="osld" onclick="playNextPic(true);">{lang start_playing}</a>
<!--{/if}--><span id="displayNum"></span>
</div>
<a href="home.php?mod=space&uid=$space[uid]&do=album&id=$pic[albumid]">« {lang return_pic_list}</a>
<!--{if $album[picnum]}--><span class="pipe">|</span>{lang current_pic}<!--{/if}-->
<!--{if $album['friend']}-->
<span class="xg1"> {$friendsname[$value[friend]]}</span>
<!--{/if}-->
<!--{hook/space_album_pic_top}-->
</div>
<div class="vw pic">
<div id="photo_pic" class="c{if $pic[magicframe]} magicframe magicframe$pic[magicframe]{/if}">
<!--{if $pic[magicframe]}-->
<div class="pic_lb1">
<table cellpadding="0" cellspacing="0" class="">
<tr>
<td class="frame_jiao frame_top_left"></td>
<td class="frame_x frame_top_middle"></td>
<td class="frame_jiao frame_top_right"></td>
</tr>
<tr>
<td class="frame_y frame_middle_left"></td>
<td class="frame_middle_middle">
<!--{/if}--><a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block"><img src="$pic[pic]" id="pic" alt="" /></a>
<script type="text/javascript">
function createElem(e){
var obj = document.createElement(e);
obj.style.position = 'absolute';
obj.style.zIndex = '1';
obj.style.cursor = 'pointer';
obj.onmouseout = function(){ this.style.background = 'none';}
return obj;
}
function viewPhoto(){
var pager = createElem('div');
var pre = createElem('div');
var next = createElem('div');
var cont = $('photo_pic');
var tar = $('pic');
var space = 0;
var w = tar.width/2;
if(!!window.ActiveXObject && !window.XMLHttpRequest){
space = -(cont.offsetWidth - tar.width)/2;
}
var objpos = fetchOffset(tar);
pager.style.position = 'absolute';
pager.style.top = '0';
pager.style.left = objpos['left'] + 'px';
pager.style.top = objpos['top'] + 'px';
pager.style.width = tar.width + 'px';
pager.style.height = tar.height + 'px';
pre.style.left = 0;
next.style.right = 0;
pre.style.width = next.style.width = w + 'px';
pre.style.height = next.style.height = tar.height + 'px';
pre.innerHTML = next.innerHTML = '<img src="{IMGDIR}/emp.gif" width="' + w + '" height="' + tar.height + '" />';
pre.onmouseover = function(){ this.style.background = 'url({IMGDIR}/pic-prev.png) no-repeat 0 100px'; }
pre.onclick = function(){ window.location = 'home.php?mod=space&uid=$pic[uid]&do=$do&picid=$upid&goto=up#pic_block'; }
next.onmouseover = function(){ this.style.background = 'url({IMGDIR}/pic-next.png) no-repeat 100% 100px'; }
next.onclick = function(){ window.location = 'home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block'; }
//cont.style.position = 'relative';
cont.appendChild(pager);
pager.appendChild(pre);
pager.appendChild(next);
}
$('pic').onload = function(){
viewPhoto();
}
</script>
<!--{if $pic[magicframe]}-->
</td>
<td class="frame_y frame_middle_right"></td>
</tr>
<tr>
<td class="frame_jiao frame_bottom_left"></td>
<td class="frame_x frame_bottom_middle"></td>
<td class="frame_jiao frame_bottom_right"></td>
</tr>
</table>
</div>
<!--{/if}-->
</div>
<div class="pns mlnv vm mtm cl">
<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$upid&goto=up#pic_block" class="btn" title="{lang previous_pic}"><img src="{STATICURL}image/common/pic_nv_prev.gif" alt="{lang previous_pic}"/></a><!--{loop $piclist $value}--><a href="home.php?mod=space&uid=$value[uid]&do=album&picid=$value[picid]#pic_block"><img alt="" src="$value[pic]"{if $value[picid]==$picid} class="a"{/if} /></a><!--{/loop}--><a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block" class="btn" title="{lang next_pic}"><img src="{STATICURL}image/common/pic_nv_next.gif" alt="{lang next_pic}"/></a>
</div>
<div class="d bbs">
<p id="a_set_title" class="albim_pic_title"><!--{if $pic[title]}-->$pic[title]<!--{else}--><!--{eval echo substr($pic['filename'], 0, strrpos($pic['filename'], '.'));}--><!--{/if}--><!--{if $pic[status] == 1}--><b>({lang moderate_need})</b><!--{/if}--></p>
<p class="xg1 xs1">
<!--{if $pic[hot]}--><span class="hot">{lang hot} <em>$pic[hot]</em></span><!--{/if}-->
<!--{if $do=='event'}--><a href="home.php?mod=space&uid=$pic[uid]" target="_blank">$pic[username]</a><!--{/if}-->
{lang upload_at} <!--{date($pic[dateline])}--> ($pic[size])
</p>
<!--{if isset($_GET['exif'])}-->
<!--{if $exifs}-->
<!--{loop $exifs $key $value}-->
<!--{if $value}--><p>$key : $value</p><!--{/if}-->
<!--{/loop}-->
<!--{else}-->
<p>{lang no_exif}</p>
<!--{/if}-->
<!--{/if}-->
<div class="o cl bw0 xs1 pbn">
<!--{if helper_access::check_module('share')}-->
<a href="home.php?mod=spacecp&ac=share&type=pic&id=$pic[picid]&handlekey=sharealbumhk_{$pic[picid]}" id="a_share_$pic[picid]" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr">{lang share}</a>
<!--{/if}-->
<!--{hook/space_album_pic_op_extra}-->
<!--{if $pic[uid] == $_G[uid]}-->
<!--{if $_G[magic][frame]}-->
<img src="{STATICURL}image/magic/frame.small.gif" alt="frame" class="vm" />
<!--{if $pic[magicframe]}-->
<a id="a_magic_frame" href="home.php?mod=spacecp&ac=magic&op=cancelframe&idtype=picid&id=$pic[picid]" onclick="ajaxmenu(event,this.id)">{lang cancel_frame}</a>
<!--{else}-->
<a id="a_magic_frame" href="home.php?mod=magic&mid=frame&idtype=picid&id=$pic[picid]" onclick="ajaxmenu(event,this.id, 1)">{lang add_frame}</a>
<!--{/if}-->
<span class="pipe">|</span>
<!--{/if}-->
<!--{/if}-->
<!--{if $_G[uid] == $pic[uid] || checkperm('managealbum')}-->
<a href="home.php?mod=spacecp&ac=album&op=editpic&albumid=$pic[albumid]&picid=$pic[picid]">{lang manage_pic}</a><span class="pipe">|</span>
<a href="home.php?mod=spacecp&ac=album&op=edittitle&albumid=$pic[albumid]&picid=$pic[picid]&handlekey=edittitlehk_{$pic[picid]}" id="a_set_title" onclick="showWindow(this.id, this.href, 'get', 0);">{lang edit_description}</a>
<!--{/if}-->
<!--{if checkperm('managealbum')}-->
<span class="pipe">|</span>IP: $pic[postip]{if $pic[port]}:$pic[port]{/if}
<span class="pipe">|</span><a href="home.php?mod=spacecp&ac=album&picid=$pic[picid]&op=edithot&handlekey=picedithothk_{$pic[picid]}" id="a_hot_$pic[picid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang hot}</a>
<!--{/if}-->
<!--a href="home.php?mod=spacecp&ac=common&op=report&idtype=picid&id=$pic[picid]&handlekey=reportpichk_{$pic[picid]}" id="a_report" onclick="showWindow(this.id, this.href, 'get', 0);">{lang report}</a-->
<span class="z">
<a href="$pic[pic]" target="_blank">{lang look_pic}</a>
<!--{if !isset($_GET['exif'])}-->
<span class="pipe">|</span><a href="$theurl&exif=1">{lang look_exif}</a>
<!--{/if}-->
<!--{if $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 5)}-->
<span class="pipe">|</span><a href="portal.php?mod=portalcp&ac=portalblock&op=recommend&idtype=picid&id=$pic[picid]" onclick="showWindow('recommend', this.href, 'get', 0)">{lang blockdata_recommend}</a>
<!--{/if}-->
<!--{if $pic[uid] != $_G['uid']}-->
<span class="pipe">|</span><a href="javascript:;" onclick="showWindow('miscreport$pic[picid]', 'misc.php?mod=report&rtype=pic&uid=$pic[uid]&rid=$pic[picid]', 'get', -1);return false;">{lang report}</a>
<!--{/if}-->
<!--{hook/space_album_pic_bottom}-->
</span>
</div>
</div>
</div>
<!--[diy=diyclicktop]--><div id="diyclicktop" class="area"></div><!--[/diy]-->
<!--{if $album[friend] != 3}-->
<div id="click_div">
<!--{template home/space_click}-->
</div>
<!--{/if}-->
<!--[diy=diycommenttop]--><div id="diycommenttop" class="area"></div><!--[/diy]-->
<div id="pic_comment" class="bm bw0 mtm mbm">
<h3 class="pbn bbs">
<!--{if !empty($list)}-->
<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$pic[picid]#quickcommentform_{$picid}" onclick="if($('comment_message')){$('comment_message').focus();return false;}" class="y xi2 xw0">{lang publish_comment}</a>
<!--{/if}-->
{lang comment}
</h3>
<div id="comment">
<!--{if $cid}-->
<div class="i">
{lang current_comment}
</div>
<!--{/if}-->
<div id="comment_ul" class="xld xlda">
<!--{loop $list $k $value}-->
<!--{template home/space_comment_li}-->
<!--{/loop}-->
</div>
</div>
<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->
</div>
<!--{if helper_access::check_module('album')}-->
<form id="quickcommentform_{$picid}" name="quickcommentform_{$picid}" action="home.php?mod=spacecp&ac=comment&handlekey=qcpic_{$picid}" method="post" autocomplete="off" onsubmit="ajaxpost('quickcommentform_{$picid}', 'return_qcpic_{$picid}');doane(event);" class="bm bw0" style="width: 600px;">
<!--{if $_G['uid']}-->
<p>
<span id="comment_face" onclick="showFace(this.id, 'comment_message');return false;" class="cur1"><img src="{IMGDIR}/facelist.gif" alt="facelist" class="vm" /></span>
<!--{hook/space_album_pic_face_extra}-->
<!--{if $_G['setting']['magicstatus'] && !empty($_G['setting']['magics']['doodle'])}-->
<a id="a_magic_doodle" href="home.php?mod=magic&mid=doodle&showid=comment_doodle&target=comment_message" onclick="showWindow(this.id, this.href, 'get', 0)"><img src="{STATICURL}image/magic/doodle.small.gif" alt="doodle" class="vm" /> $_G['setting']['magics']['doodle']</a>
<!--{/if}-->
</p>
<!--{/if}-->
<div class="tedt mtn mbn">
<div class="area">
<!--{if $_G['uid'] || $_G['group']['allowcomment']}-->
<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="3" class="pt"></textarea>
<!--{else}-->
<div class="pt hm">{lang login_to_comment} <a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)" class="xi2">{lang login}</a> | <a href="member.php?mod={$_G[setting][regname]}" class="xi2">$_G['setting']['reglinkname']</a></div>
<!--{/if}-->
</div>
</div>
<!--{if $secqaacheck || $seccodecheck}-->
<!--{block sectpl}--><sec> <span id="sec<hash>" onclick="showMenu(this.id);"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div><!--{/block}-->
<div class="mtm mbm sec"><!--{subtemplate common/seccheck}--></div>
<!--{/if}-->
<p class="pns">
<input type="hidden" name="refer" value="$theurl" />
<input type="hidden" name="id" value="$picid" />
<input type="hidden" name="idtype" value="picid" />
<input type="hidden" name="commentsubmit" value="true" />
<input type="hidden" name="quickcomment" value="true" />
<button type="submit" name="commentsubmit_btn" value="true" id="commentsubmit_btn" class="pn"{if !$_G[uid]&&!$_G['group']['allowcomment']} onclick="showWindow(this.id, this.form.action);return false;"{/if}><strong>{lang comment}</strong></button>
<span id="__quickcommentform_{$picid}"></span>
<span id="return_qcpic_{$picid}"></span>
<input type="hidden" name="formhash" value="{FORMHASH}" />
</p>
</form>
<!--{/if}-->
</div>
<script type="text/javascript">
function succeedhandle_qcpic_{$picid}(url, msg, values) {
if(values['cid']) {
comment_add(values['cid']);
} else {
$('return_qcpic_{$picid}').innerHTML = msg;
}
<!--{if $sechash}-->
<!--{if $secqaacheck}-->
updatesecqaa('$sechash');
<!--{/if}-->
<!--{if $seccodecheck}-->
updateseccode('$sechash');
<!--{/if}-->
<!--{/if}-->
}
</script>
<script type="text/javascript">
var interval = 5000;
var timerId = -1;
var derId = -1;
var replay = false;
var num = 0;
var endPlay = false;
function forward() {
window.location.href = 'home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down&play=1#pic_block';
}
function derivativeNum() {
num++;
$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
}
function playNextPic(stat) {
if(stat || replay) {
derId = window.setInterval('derivativeNum();', 1000);
$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
$('playid').onclick = function (){replay = false;playNextPic(false);};
$('playid').innerHTML = '{lang stop_playing}';
timerId = window.setInterval('forward();', interval);
} else {
replay = true;
num = 0;
if(endPlay) {
$('playid').innerHTML = '{lang restart}';
} else {
$('playid').innerHTML = '{lang start_playing}';
}
$('playid').onclick = function (){playNextPic(true);};
$('displayNum').innerHTML = '';
window.clearInterval(timerId);
window.clearInterval(derId);
}
}
<!--{if $_GET['play']}-->
<!--{if $sequence && $album['picnum']}-->
if($sequence == $album[picnum]) {
endPlay = true;
playNextPic(false);
} else {
playNextPic(true);
}
<!--{else}-->
playNextPic(true);
<!--{/if}-->
<!--{/if}-->
function update_title() {
$('title_form').style.display='';
}
var elems = selector('dd[class~=magicflicker]');
for(var i=0; i<elems.length; i++){
magicColor(elems[i]);
}
</script>
<!--end bm-->
<!--{if !$_G[setting][homepagestyle]}--><!--[diy=diycontentbottom]--><div id="diycontentbottom" class="area"></div><!--[/diy]--><!--{/if}-->
</div>
</div>
<!--{if $_G[setting][homepagestyle]}-->
<div class="sd">
<!--{subtemplate home/space_userabout}-->
<!--{/if}-->
</div>
</div>
<!--{if !$_G[setting][homepagestyle]}-->
<div class="wp mtn">
<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>
<!--{/if}-->
<!--{template common/footer}-->