spacecp_upload.htm
9.92 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
<!--{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&do=album">{lang album}</a> <em>›</em> {lang upload_pic}</div>
</div>
<div id="ct" class="wp cl">
<div class="mn">
<div class="bm">
<div class="bm_h"><h1>{lang upload_pic}</h1></div>
<div class="bm_c">
<ul class="tb cl">
<!--{if $albumid}-->
<li><a href="home.php?mod=spacecp&ac=album&op=edit&albumid=$albumid">{lang edit_album_information}</a></li>
<li><a href="home.php?mod=spacecp&ac=album&op=editpic&albumid=$albumid">{lang edit_pic}</a></li>
<!--{/if}-->
<li$actives[js]><a href="home.php?mod=spacecp&ac=upload&albumid=$albumid">{lang common_upload}</a></li>
<li$actives[cam]><a href="home.php?mod=spacecp&ac=upload&op=cam&albumid=$albumid">{lang camera_pic}</a></li>
<li class="y"><a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">« {lang back_to_my_album}</a></li>
<!--{if $_G['setting']['magicstatus'] && $_G['setting']['magics']['doodle']}-->
<li class="y doodle"><a id="a_doodle" class="y" href="home.php?mod=magic&mid=doodle&showid=album_doodle&target=album_message&from=album" onclick="showWindow(this.id, this.href, 'get', '0')">{$_G[setting][magics][doodle]}</a></li>
<!--{/if}-->
</ul>
<!--{if $haveattachsize}-->
<div class="tbmu">
{lang hava_attach_size} <strong>$haveattachsize</strong> (<a href="home.php?mod=spacecp&ac=upload&op=recount">{lang recount}</a>)
<!--{if $_G['setting']['magicstatus'] && $_G[setting][magics][attachsize]}-->
<br />
<img src="{STATICURL}image/magic/attachsize.small.gif" alt="attachsize" class="vm" />
<a id="a_magic_attachsize" href="home.php?mod=magic&mid=attachsize" onclick="showWindow('magics', this.href, 'get', 0)">{lang i_want_more_space}</a>
({lang you_can_buy_magictools})
<!--{/if}-->
</div>
<!--{/if}-->
<!--{if empty($_GET['op'])}-->
<form method="post" autocomplete="off" id="albumform" action="home.php?mod=spacecp&ac=upload" onsubmit="return validate(this);">
<h2 class="mtw xs2">1. {lang select_pic}</h2>
<div class="xg1">{lang upload_pic_tips}</div>
<div class="uploadform mtn ptm pbw">
<table cellspacing="0" cellpadding="0" class="tfm up_row mbm">
<tbody id="attachbody"></tbody>
</table>
<div class="fieldset flash" id="imgUploadProgress"></div>
<div class="hm"><span id="imgSpanButtonPlaceholder"></span></div>
<!--{if empty($_G['setting']['pluginhooks']['spacecp_upload_extend'])}-->
<!--{subtemplate common/upload}-->
<script type="text/javascript">
var upload = new SWFUpload({
// Backend Settings
upload_url: "{$_G[siteurl]}misc.php?mod=swfupload&action=swfupload&operation=album",
post_params: {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
// File Upload Settings
file_size_limit : "$swfconfig[max]", // 100MB
file_types : "$swfconfig[imageexts][ext]",
file_types_description : "$swfconfig[imageexts][depict]",
file_upload_limit : 0,
file_queue_limit : 0,
// Event Handler Settings (all my handlers are in the Handler.js file)
swfupload_preload_handler : preLoad,
swfupload_load_failed_handler : loadFailed,
file_dialog_start_handler : fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "{IMGDIR}/uploadbutton.png",
button_placeholder_id : "imgSpanButtonPlaceholder",
button_width: 100,
button_height: 25,
button_cursor:SWFUpload.CURSOR.HAND,
button_window_mode: "transparent",
custom_settings : {
progressTarget : "imgUploadProgress",
uploadSource: 'home',
uploadType: 'album',
imgBoxObj: $('attachbody')
},
// Debug Settings
debug: false
});
</script>
<!--{else}-->
<!--{hook/spacecp_upload_extend}-->
<!--{/if}-->
</div>
<script type="text/javascript">
var check = false;
no_insert = 1;
function a_addOption() {
var obj = $('uploadalbum');
obj.value = 'addoption';
addOption(obj);
}
function album_op(id) {
$('selectalbum').style.display = 'none';
$('creatalbum').style.display = 'none';
$(id).style.display = '';
check = false;
if(id == 'creatalbum') {
check = true;
$('albumname').select();
}
}
</script>
<h2 class="mtw xs2">2. {lang select_album}</h2>
<div class="uploadform mtn ptw pbw">
<!--{if $albums}-->
<p class="hm pbw xs2 xw1">
<label for="albumop_selectalbum" class="lb"><input type="radio" name="albumop" id="albumop_selectalbum" class="pr" value="selectalbum" checked="checked" onclick="album_op(this.value);" />{lang add_to_existing_album}</label>
<label for="albumop_creatalbum" class="lb"><input type="radio" name="albumop" id="albumop_creatalbum" class="pr" value="creatalbum" onclick="album_op(this.value);" />{lang create_new_album}</label>
</p>
<div id="selectalbum" class="hm">
{lang select_album}
<select name="albumid" id="uploadalbumid">
<!--{loop $albums $value}-->
<!--{if $value['albumid'] == $_GET['albumid']}-->
<option value="$value[albumid]" selected="selected">$value[albumname]</option>
<!--{else}-->
<option value="$value[albumid]">$value[albumname]</option>
<!--{/if}-->
<!--{/loop}-->
</select>
</div>
<div id="creatalbum" style="display:none;">
<!--{else}-->
<p class="hm pbw xs2 xw1">{lang create_new_album}</p>
<input type="hidden" name="albumop" value="creatalbum" />
<div id="creatalbum">
<!--{/if}-->
<table cellspacing="0" cellpadding="0" class="tfm">
<tr>
<th>{lang album_name}</th>
<td><input type="text" name="albumname" id="albumname" class="px" size="20" value="{lang my_album}" /></td>
</tr>
<tr>
<th>{lang album_depict}</th>
<td><textarea name="depict" class="pt" cols="40" rows="3"></textarea></td>
</tr>
<!--{if $_G['setting']['albumcategorystat'] && $categoryselect}-->
<tr>
<th>{lang site_categories}</th>
<td>
$categoryselect
<p class="d">{lang select_site_album_categories}</p>
</td>
</tr>
<!--{/if}-->
<tr>
<th>{lang privacy_settings}</th>
<td>
<select name="friend" id="uploadfriend" onchange="passwordShow(this.value);" class="ps">
<option value="0">{lang friendname_0}</option>
<option value="1">{lang friendname_1}</option>
<option value="2">{lang friendname_2}</option>
<option value="3">{lang friendname_3}</option>
<option value="4">{lang friendname_4}</option>
</select>
</td>
</tr>
<tbody id="span_password" style="display:none;">
<tr>
<th>{lang password}</th>
<td><input type="text" name="password" id="uploadpassword" class="px" value="" size="10" /></td>
</tr>
</tbody>
<tbody id="tb_selectgroup" style="display:none;">
<tr>
<th>{lang specified_friends}</th>
<td>
<select name="selectgroup" class="ps" onchange="getgroup(this.value);">
<option value="">{lang from_friends_group}</option>
<!--{loop $groups $key $value}-->
<option value="$key">$value</option>
<!--{/loop}-->
</select>
<p class="d">{lang choices_following_friends_list}</p>
</td>
</tr>
<tr>
<th> </th>
<td>
<textarea name="target_names" id="target_names" class="pt" rows="3"></textarea>
<p class="d">{lang friend_name_space}</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="mtm hm">
<input type="hidden" name="albumsubmit" id="albumsubmit" value="true" />
<button type="submit" name="albumsubmit_btn" id="albumsubmit_btn" class="pn pnc" value="true"{if $_G['setting']['albumcategoryrequired']} onclick="return validate(this);"{/if}><strong>{lang upload_start}</strong></button>
<input type="hidden" name="formhash" value="{FORMHASH}" />
</div>
</form>
<script type="text/javascript">
<!--{if empty($albums)}-->
if(typeof $('albumname') == 'object') {
$('albumname').select();
}
<!--{/if}-->
function validate(obj) {
if(!$('attachbody').getElementsByTagName('tr').length) {
showDialog('{lang select_upload_pic}', 'notice', '{lang reminder}', null, 0);
return false;
}
<!--{if $_G['setting']['albumcategorystat'] && $_G['setting']['albumcategoryrequired']}-->
var catObj = $("catid");
if(catObj && check) {
if (catObj.value < 1) {
showDialog('{lang select_system_cat}', 'notice', '{lang reminder}', null, 0);
catObj.focus();
return false;
}
}
<!--{/if}-->
return true;
}
</script>
<!--{elseif $_GET['op'] == 'cam'}-->
</div>
<div class="bm">
<script type="text/javascript">
document.write(AC_FL_RunContent(
'width', '100%', 'height', '415',
'src', '{IMGDIR}/cam.swf?config=$config&albumid=$_GET[albumid]',
'quality', 'high', 'wmode', 'transparent'
));
</script>
<!--{/if}-->
</div>
</div>
</div>
</div>
<!--{template common/footer}-->