spacecp_blog.htm
11.6 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
<!--{template common/header}-->
<!--{if $_GET[op] == 'delete'}-->
<h3 class="flb">
<em>{lang delete_blog}</em>
<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_GET[handlekey]');return false;" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
</h3>
<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=blog&op=delete&blogid=$blogid">
<input type="hidden" name="referer" value="{echo dreferer()}" />
<input type="hidden" name="deletesubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="c">{lang sure_delete_blog}?</div>
<p class="o pns">
<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>{lang determine}</strong></button>
</p>
</form>
<!--{elseif $_GET[op] == 'stick'}-->
<h3 class="flb">
<em><!--{if $stickflag}-->{lang stick_blog}<!--{else}-->{lang cancel_stick_blog}<!--{/if}--></em>
<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_GET[handlekey]');return false;" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
</h3>
<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=blog&op=stick&blogid=$blogid">
<input type="hidden" name="referer" value="{echo dreferer()}" />
<input type="hidden" name="sticksubmit" value="true" />
<input type="hidden" name="stickflag" value="$stickflag" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="c"><!--{if $stickflag}-->{lang sure_stick_blog}<!--{else}-->{lang sure_cancel_stick_blog}<!--{/if}-->?</div>
<p class="o pns">
<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>{lang determine}</strong></button>
</p>
</form>
<!--{elseif $_GET[op] == 'addoption'}-->
<h3 class="flb">
<em>{lang create_category}</em>
<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="blogCancelAddOption('$_GET[oid]');hideWindow('$_GET[handlekey]');return false;" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
</h3>
<div class="c">
<p class="mtm mbm"><label for="newsort">{lang name}: <input type="text" name="newsort" id="newsort" class="px" size="30" /></label></p>
</div>
<p class="o pns">
<button type="button" name="btnsubmit" value="true" class="pn pnc" onclick="if(blogAddOption('newsort', '$_GET[oid]'))hideWindow('$_GET[handlekey]');"><strong>{lang create}</strong></button>
</p>
<script type="text/javascript">
$('newsort').focus();
</script>
<!--{elseif $_GET[op] == 'edithot'}-->
<h3 class="flb">
<em>{lang adjust_hot}</em>
<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_GET[handlekey]');return false;" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
</h3>
<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=blog&op=edithot&blogid=$blogid">
<input type="hidden" name="referer" value="{echo dreferer()}" />
<input type="hidden" name="hotsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="c">
{lang new_hot}:<input type="text" name="hot" value="$blog[hot]" size="10" class="px" />
</div>
<p class="o pns">
<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>{lang determine}</strong></button>
</p>
</form>
<!--{else}-->
<div id="pt" class="bm cl">
<div class="z">
<a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>›</em>
<!--{if $space[self]}-->
<a href="home.php?mod=space&do=blog">{lang blog}</a>
<!--{else}-->
<a href="home.php?mod=space&uid=$space[uid]">$space[username] {lang somebody_space}</a> <em>›</em>
<a href="home.php?mod=space&uid=$space[uid]&do=blog&view=we">{lang blog}</a>
<!--{/if}-->
<em>›</em>
<!--{if $blog[blogid]}-->
<a href="home.php?mod=space&uid=$blog[uid]&do=blog&id=$blog[blogid]">$blog[subject]</a> <em>›</em> {lang edit_blog}
<!--{else}-->
{lang memcp_blog}
<!--{/if}-->
</div>
</div>
<div id="ct" class="wp cl">
<div class="mn">
<div class="bm cl">
<div class="bm_h">
<h1>
<span class="y xs1 xw0"><a href="javascript:history.go(-1);">{lang previous_page}</a></span>
<!--{if $blog[blogid]}-->{lang edit_blog}<!--{else}-->{lang memcp_blog}<!--{/if}-->
</h1>
</div>
<div class="bm_c">
<script type="text/javascript" src="{STATICURL}image/editor/editor_function.js?{VERHASH}"></script>
<script type="text/javascript" src="{$_G[setting][jspath]}home_blog.js?{VERHASH}"></script>
<form id="ttHtmlEditor" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=blog&blogid=$blog[blogid]{if $_GET[modblogkey]}&modblogkey=$_GET[modblogkey]{/if}" onsubmit="validate(this);" enctype="multipart/form-data">
<!--{hook/spacecp_blog_top}-->
<table cellspacing="0" cellpadding="0" class="tfm">
<tr>
<td><input type="text" id="subject" name="subject" value="$blog[subject]" size="60" {if $_GET[op] != 'edit'}onblur="relatekw();"{/if} class="px" style="width: 63%;" /></td>
</tr>
<tr>
<td>
<!--{subtemplate home/editor_image_menu}-->
<textarea class="pt" name="message" id="uchome-ttHtmlEditor" style="height:100%;width:100%;display:none;border:0">$blog[message]</textarea>
<div style="border:1px solid #C5C5C5;height:400px;"><iframe src='home.php?mod=editor&charset={CHARSET}&allowhtml=$allowhtml&doodle={if $_G['setting']['magicstatus'] && !empty($_G['setting']['magics']['doodle'])}1{/if}' name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:100%;height:100%;position:relative;"></iframe></div>
</td>
</tr>
</table>
<!--{hook/spacecp_blog_middle}-->
<table cellspacing="0" cellpadding="0" width="100%" class="tfm">
<!--{if $_G['setting']['blogcategorystat'] && $categoryselect}-->
<tr>
<th>{lang site_categories}</th>
<td>
$categoryselect
({lang select_site_blog_categories})
</td>
</tr>
<!--{/if}-->
<tr>
<th>{lang personal_category}</th>
<td>
<select name="classid" id="classid" onchange="addSort(this)" >
<option value="0">------</option>
<!--{loop $classarr $value}-->
<!--{if $value['classid'] == $blog['classid']}-->
<option value="$value[classid]" selected>$value[classname]</option>
<!--{else}-->
<option value="$value[classid]">$value[classname]</option>
<!--{/if}-->
<!--{/loop}-->
<!--{if !$blog['uid'] || $blog['uid']==$_G['uid']}--><option value="addoption" style="color:red;">+{lang create_new_categories}</option><!--{/if}-->
</select>
</td>
</tr>
<tr>
<th>{lang label}</th>
<td class="pns"><input type="text" class="px vm" size="40" id="tag" name="tag" value="$blog[tag]" /> <button type="button" name="clickbutton[]" onclick="relatekw();" class="pn vm"><em>{lang auto_keyword}</em></button></td>
</tr>
<!--{if $blog['uid'] && $blog['uid']!=$_G['uid']}-->
<!--{eval $selectgroupstyle='display:none';}-->
</table>
<table style="display:none;">
<!--{/if}-->
<tr>
<th>{lang privacy_settings}</th>
<td>
<select name="friend" onchange="passwordShow(this.value);" class="ps">
<option value="0"$friendarr[0]>{lang friendname_0}</option>
<option value="1"$friendarr[1]>{lang friendname_1}</option>
<option value="2"$friendarr[2]>{lang friendname_2}</option>
<option value="3"$friendarr[3]>{lang friendname_3}</option>
<option value="4"$friendarr[4]>{lang friendname_4}</option>
</select>
<label><input type="checkbox" name="noreply" value="1" class="pc"{if $blog[noreply]} checked="checked"{/if}> {lang comments_not_allowed}</label>
</td>
</tr>
<tbody id="span_password" style="$passwordstyle">
<tr>
<th>{lang password}</th>
<td class="pns"><input type="text" name="password" value="$blog[password]" size="10" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" class="px" /></td>
</tr>
</tbody>
<!--{if $blog['uid'] && $blog['uid']!=$_G['uid']}-->
</table>
<table cellspacing="0" cellpadding="0" width="100%" class="tfm">
<!--{/if}-->
<tbody id="tb_selectgroup" style="$selectgroupstyle">
<tr>
<th>{lang specified_friends}</th>
<td>
<select name="selectgroup" onchange="getgroup(this.value);" class="ps">
<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" rows="3" class="pt">$blog[target_names]</textarea>
<p class="d">{lang friend_name_space}</p>
</td>
</tr>
</tbody>
<!--{if checkperm('manageblog')}-->
<tr>
<th>{lang hot}</th>
<td>
<input type="text" class="px" name="hot" id="hot" value="$blog[hot]" size="5" />
</td>
</tr>
<!--{/if}-->
<!--{if helper_access::check_module('feed')}-->
<tr>
<th>{lang feed_option}</th>
<td>
<label for="makefeed"><input type="checkbox" name="makefeed" id="makefeed" value="1" class="pc"{if ckprivacy('blog', 'feed')} checked="checked"{/if}>{lang make_feed} (<a href="home.php?mod=spacecp&ac=privacy&op=feed" target="_blank">{lang change_default_settings}</a>)</label>
</td>
</tr>
<!--{/if}-->
<!--{if $secqaacheck || $seccodecheck}-->
</table>
<!--{eval $sectpl = '<table cellspacing="0" cellpadding="0" width="100%" class="tfm"><tr><th><sec></th><td class="pns"><sec><div class="d"><sec></div></td></tr></table>';}-->
<!--{subtemplate common/seccheck}-->
<table cellspacing="0" cellpadding="0" width="100%" class="tfm">
<!--{/if}-->
<tr>
<th> </th>
<td>
<button type="submit" id="issuance" class="pn pnc"><strong>{lang save_publish}</strong></button>
</td>
</tr>
</table>
<input type="hidden" name="blogsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
</form>
<script type="text/javascript">
function validate(obj) {
<!--{if $_G['setting']['blogcategorystat'] && $_G['setting']['blogcategoryrequired']}-->
var catObj = $("catid");
if(catObj) {
if (catObj.value < 1) {
alert("{lang select_system_cat}");
catObj.focus();
return false;
}
}
<!--{/if}-->
var makefeed = $('makefeed');
if(makefeed) {
if(makefeed.checked == false) {
if(!confirm("{lang no_feed_notice}")) {
return false;
}
}
}
if($('seccode')) {
var code = $('seccode').value;
var x = new Ajax();
x.get('home.php?mod=spacecp&ac=common&op=seccode&inajax=1&code=' + code, function(s){
s = trim(s);
if(s.indexOf('succeed') == -1) {
alert(s);
$('seccode').focus();
return false;
} else {
edit_save();
return true;
}
});
} else {
edit_save();
return true;
}
}
</script>
<!--{hook/spacecp_blog_bottom}-->
</div>
</div>
</div>
</div>
<script type="text/javascript">
if($('subject')) {
$('subject').focus();
}
</script>
<!--{/if}-->
<!--{template common/footer}-->