/
articlecontent.edit.tmpl.php
615 lines (470 loc) · 24.5 KB
/
articlecontent.edit.tmpl.php
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
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
<?php
/**
* phpwcms content management system
*
* @author Oliver Georgi <oliver@phpwcms.de>
* @copyright Copyright (c) 2002-2014, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// OK check article and category information
$sql = 'SELECT DISTINCT * FROM '.DB_PREPEND.'phpwcms_article ar LEFT JOIN '.DB_PREPEND.'phpwcms_articlecat ac ON ';
$sql .= "ar.article_cid=ac.acat_id WHERE ar.article_id='".$content["aid"]."' LIMIT 1";
$content['article'] = _dbQuery($sql);
$content['article'] = isset($content['article'][0]) ? $content['article'][0] : array('article_title' => '', 'acat_name' => '', 'acat_template'=>0);
$content['cp_setting_mode'] = false;
if(empty($content['article']['acat_id'])) { // Root structure
$content['article']['acat_name'] = $indexpage['acat_name'];
$content['article']['acat_id'] = 0;
$content['article']['acat_template'] = $indexpage['acat_template'];
}
?>
<form action="phpwcms.php?do=articles&p=2&s=1&aktion=2&id=<?php echo $content["aid"]."&acid=".$content["id"] ?>" method="post" name="articlecontent" id="articlecontent" <?php
// Some javascript actions neccessary on submit
switch($content["type"]) {
case 2:
case 29:
case 16:
case 50:
case 89:
echo 'onsubmit="selectAllOptions(this.cimage_list);"';
break;
//case 25:
case 7:
echo 'onsubmit="selectAllOptions(this.cfile_list);"';
break;
case 8:
echo 'onsubmit="selectAllOptions(this.calink);"';
break;
case 53:
echo 'onsubmit="selectAllOptions(this.cforum_selection);"';
break;
default:
echo 'onsubmit="var ct=document.getElementById(\'target_ctype\');if(ct.disabled){ct.disabled=false;}"';
}
if(empty($content["id"]) && empty($content['block'])) {
$sendbutton = $BL['be_article_cnt_button2'];
$content["block"] = 'CONTENT';
$content["before"] = '';
$content["after"] = '';
$content["title"] = '';
$content["subtitle"] = '';
$content["top"] = 0;
$content["visible"] = 0;
$content["anchor"] = 0;
$content['comment'] = '';
$content['paginate_title'] = '';
$content['paginate_page'] = '';
$content["granted"] = 0;
} else {
$sendbutton = $BL['be_article_cnt_button1'];
}
?>>
<input type="hidden" name="ctype_module" value="<?php echo html_specialchars($content["module"]) ?>" />
<table summary="" width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom:13px;">
<tr><td colspan="2" class="title"><?php
echo $BL['be_article_cnt_title'].' — <span style="text-transform: uppercase;">';
echo $wcs_content_type[$content["type"]];
if(!empty($content["module"])) {
echo ': '.$BL['modules'][$content["module"]]['listing_title'];
// check if Module is in setting mode
if(!empty($phpwcms['modules'][$content["module"]]['setting'])) {
$content['cp_setting_mode'] = true;
}
}
echo '</span>';
?></td></tr>
<tr><td colspan="2" class="rowspacer5x0"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr bgcolor="#D9DEE3"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>
<tr bgcolor="#D9DEE3">
<td align="right" class="chatlist" nowrap="nowrap"><a href="phpwcms.php?do=admin&p=6&struct=<?php
if(empty($content['article']['acat_id'])) {
echo 'index';
} else {
echo $content['article']['acat_struct'], '&cat=', $content['article']['acat_id'];
}
?>" onclick="return confirm('<?php echo $BL['be_dialog_warn_nosave'];
?>');"><?php echo $BL['be_article_cat'];
?><img src="img/symbole/redirect.gif" alt="" border="0" style="margin:0 0 0 2px;position:relative;top:1px;" /></a>: </td>
<td><strong><?php echo html_specialchars($content["article"]['acat_name']).' [ID:'.$content['article']['acat_id'].']' ?></strong></td>
</tr>
<tr bgcolor="#D9DEE3"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td>
</tr>
<tr bgcolor="#D9DEE3">
<td align="right" class="chatlist" nowrap="nowrap"><a href="phpwcms.php?do=articles&p=2&s=1&aktion=1&id=<?php
echo $content["aid"];
?>" onclick="return confirm('<?php echo $BL['be_dialog_warn_nosave'];
?>');"><?php echo $BL['be_article_atitle'];
?><img src="img/symbole/redirect.gif" alt="" border="0" style="margin:0 0 0 2px;position:relative;top:1px;" /></a>: </td>
<td onclick="showEditArticleID(this);" onmouseover="this.ttOffsetY=0;Tip('<?php echo $BL['be_change_articleID'].'<br />'.$BL['be_cnt_default'].': '.$content["aid"] ?>')" class="linkcursor"><strong><?php echo html_specialchars($content["article"]['article_title']) ?></strong></td>
</tr>
<tr bgcolor="#D9DEE3"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /><script type="text/javascript">
var istuff_done = false;
function showEditArticleID(istuff) {
if(istuff_done) return false;
istuff.innerHTML += ' <'+'span class="chatlist"'+'><?php echo $BL['be_func_struct_articleID'] ?>: <'+'/span><'+'input type="text" name="ctype_change_aid" value="<?php echo $content["aid"] ?>" class="v11 width35" /'+'>';
istuff_done = true;
}
</script></td></tr>
<tr><td colspan="2" class="rowspacer"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
<tr bgcolor="#F3F5F8">
<td align="right" class="chatlist"><?php
echo $BL['be_article_cnt_type'];
$enable_disable = '';
?>: </td>
<td><table summary="" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><select name="target_ctype" id="target_ctype" onchange="if(confirm('<?php
// echo Message for JS dialog
echo $BL['be_func_switch_contentpart'];
// Menü mit Content Typen erstellen
// build select box options and remember the "old" value for javascript
$temp_select = '';
$temp_count = 0;
$contentpart_temp_selected = 0;
$user_selected_cp = isset($_SESSION["wcs_user_cp"]) && count($_SESSION["wcs_user_cp"]) ? true : false;
if(is_array($article["article_cntpart"]) && count($article["article_cntpart"])) {
if(!in_array($content['type'], $article["article_cntpart"])) {
$article["article_cntpart"][] = $content['type'];
}
// list all content parts usable for this article category
foreach($article["article_cntpart"] as $value) {
if($user_selected_cp && !isset($_SESSION["wcs_user_cp"][$value]) && $value != $content['type']) {
continue;
}
if(isset($wcs_content_type[$value])) {
$temp_select .= getContentPartOptionTag($value, $wcs_content_type[$value], $content['type'], $content['module']);
$temp_count++;
}
$value1 = $value * (-1);
if(isset($BL['be_admin_optgroup_label'][$value1]) && $value) {
$temp_select .= '<optgroup label="[ '.$BL['be_admin_optgroup_label'][$value1].' ]" class="cntOptGroup"></optgroup>'."\n";
}
}
}
if(!$temp_count) {
//list all available content parts
foreach($wcs_content_type as $key => $value) {
if($user_selected_cp && !isset($_SESSION["wcs_user_cp"][$key]) && $key != $content['type']) {
continue;
}
$temp_select .= getContentPartOptionTag($key, $value, $content['type'], $content['module']);
$temp_count++;
}
}
?>')){ this.form.submit(); } else { this.form.target_ctype.selectedIndex = <?php echo $contentpart_temp_selected; ?>; return false; }">
<?php
//Menü mit Content Typen erstellen
echo $temp_select
?>
</select>
</td>
<?php echo $enable_disable; ?>
</tr>
</table></td>
</tr>
<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /><?php
// Content Part Setting Mode — hide all settings related to article and content part rendering
if($content['cp_setting_mode']):
// some hidden fields with default content
?>
<input type="hidden" name="cblock" value="CPSET" />
<input type="hidden" name="csorting" value="0" />
<input type="hidden" name="cbefore" value="" />
<input type="hidden" name="ctab_title" value="" />
<input type="hidden" name="ctab_number" value="" />
<input type="hidden" name="ctitle" value="" />
<input type="hidden" name="csubtitle" value="" />
<input type="hidden" name="cpaginate_title" value="" />
<input type="hidden" name="cpaginate_page" value="" />
<?php
// normal contentpart edit mode
else:
// Detect Template
if(!empty($content['article']['acat_template'])) {
$content['current_template'] = _dbGet('phpwcms_template', '*', 'template_trash=0 AND template_id='._dbEscape($content['article']['acat_template']), '', '', 1);
}
if(!isset($content['current_template'][0])) {
$content['current_template'] = _dbGet('phpwcms_template', '*', 'template_trash=0 AND template_default=1', '', '', 1);
}
if(!isset($content['current_template'][0])) {
$content['current_template'] = _dbGet('phpwcms_template', '*', 'template_trash=0', '', 'template_default DESC', 1);
}
$content['blocks'] = '';
if(isset($content['current_template'][0]['template_var'])) {
$content['template_name'] = html_specialchars($content['current_template'][0]['template_name']);
if($content['current_template'][0]['template_default']) {
$content['template_name'] .= ' ('.$BL['be_admin_tmpl_default'].')';
}
$content['current_template'] = unserialize($content['current_template'][0]['template_var']);
if(!empty($content['current_template']['customblock'])) {
$content['current_template'] = explode(',', $content['current_template']['customblock']);
if(count($content['current_template'])) {
$content['blocks'] .= '<optgroup label="'.$BL['be_admin_page_blocks'].', '.$BL['be_admin_page_customblocks'].'">';
foreach($content['current_template'] as $value) {
$value = trim($value);
if($value !== '') {
$valhtml = html_specialchars($value);
$content['blocks'] .= '<option value="'.$valhtml.'"'.is_selected($value, $content["block"], 0, 0).'>'.$valhtml.'</option>';
}
}
$content['blocks'] .= '</optgroup>';
}
}
} else {
$content['template_name'] = $BL['be_admin_tmpl_default'];
}
?></td></tr>
<tr><td colspan="2" class="rowspacer0x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_show_content'] ?>: </td>
<td><table summary="" border="0" cellspacing="0" cellpadding="0" width="440">
<tr>
<td width="75%"><select name="cblock" id="cblock"<?php if($content['article']['article_paginate']) echo ' onchange="checkCntBlockPaginate(this);"' ?>>
<optgroup label="<?php echo $BL['be_admin_struct_template'].': '.$content['template_name'] ?>">
<option value="CONTENT"<?php echo is_selected('CONTENT', $content["block"]) ?>><?php echo $BL['be_main_content'] ?> (CONTENT)</option>
<option value="LEFT"<?php echo is_selected('LEFT', $content["block"]) ?>><?php echo $BL['be_cnt_left'] ?> (LEFT)</option>
<option value="RIGHT"<?php echo is_selected('RIGHT', $content["block"]) ?>><?php echo $BL['be_cnt_right'] ?> (RIGHT)</option>
<option value="HEADER"<?php echo is_selected('HEADER', $content["block"]) ?>><?php echo $BL['be_admin_page_header'] ?> (HEADER)</option>
<option value="FOOTER"<?php echo is_selected('FOOTER', $content["block"]) ?>><?php echo $BL['be_admin_page_footer'] ?> (FOOTER)</option>
</optgroup>
<?php echo $content['blocks'] ?>
</select></td>
<td class="chatlist" width="100" align="right"> <?php echo $BL['be_cnt_sortvalue'] ?>: </td>
<td><input name="csorting" type="text" id="csorting" value="<?php echo $content["sorting"] ?>" class="width30" maxlength="10" onkeyup="if(!parseInt(this.value))this.value='0';" /></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_cnt_space'] ?>: </td>
<td><table summary="" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="v10" bgcolor="#E7E8EB"><label for="ccb"> <?php echo $BL['be_article_cnt_before'] ?></label></td>
<td bgcolor="#E7E8EB"><input name="ccb" type="checkbox" id="ccb" value="1" <?php if(intval($content["before"])) echo "checked"; ?> onclick="if(!this.checked){this.form.cbefore.value='';}else{ if(this.form.cbefore.value=='') this.checked=false;}" /></td>
<td bgcolor="#E7E8EB"><input name="cbefore" type="text" id="cbefore" class="width20" value="<?php echo $content["before"] ?>" size="2" maxlength="4" onkeyup="if(parseInt(this.value)){this.form.ccb.checked=true;}else{this.form.ccb.checked=false;this.value=''}" /></td>
<td class="v10" bgcolor="#E7E8EB"><label for="cca"> <?php echo $BL['be_article_cnt_after'] ?></label></td>
<td bgcolor="#E7E8EB"><input name="cca" type="checkbox" id="cca" value="1" <?php if(intval($content["after"])) echo "checked"; ?> onclick="if(!this.checked){this.form.cafter.value='';}else{ if(this.form.cafter.value=='') this.checked=false;}" /></td>
<td style="padding:1px 1px 1px 0" bgcolor="#E7E8EB"><input name="cafter" type="text" id="cafter" class="width20" value="<?php echo $content["after"] ?>" size="2" maxlength="4" onkeyup="if(parseInt(this.value)){this.form.cca.checked=true;}else{this.form.cca.checked=false;this.value=''}" /></td>
<td class="chatlist"><label for="ctop"> <?php echo $BL['be_article_cnt_toplink'] ?>:</label></td>
<td><input name="ctop" type="checkbox" id="ctop" value="1"<?php is_checked(1, $content["top"]); ?> /></td>
<?php
$anchor_title = empty($content["id"]) ? '' : ' title="cpid'.$content["id"].'"';
// handle tab settings
$content["tab_style"] = ' style="display:none"';
if(empty($content["tab"])) {
$content["tab"] = '';
$content["tab_number"] = '';
$content["tab_title"] = '';
$content["tab_type"] = 0;
} else {
$content["tab"] = explode('_', $content["tab"], 2);
$content["tab_title"] = empty($content["tab"][1]) ? '' : $content["tab"][1];
$content["tab_number"] = explode('|', $content["tab"][0]);
$content["tab_type"] = empty($content["tab_number"][1]) ? 1 : intval($content["tab_number"][1]);
$content["tab_number"] = intval($content["tab_number"][0]);
if($content["tab_number"].$content["tab_title"]) {
$content["tab"] = 1;
$content["tab_style"] = '';
}
}
?>
<td class="chatlist"><label for="canchor"<?php echo $anchor_title ?>> <?php echo $BL['be_article_cnt_anchor'] ?>:</label></td>
<td><input name="canchor" type="checkbox" id="canchor" value="1"<?php is_checked(1, $content["anchor"]); ?><?php echo $anchor_title ?> /></td>
<td class="chatlist"> <?php echo $BL['be_cnt_paginate_subsection']; ?>: </td>
<td><select name="ctab" id="ctab" class="v11 width100" onchange="checkTabStatus(this);">
<option value="0"<?php is_selected(0, $content["tab_type"]); ?>><?php echo $BL['be_off'] ?></option>
<option value="1"<?php is_selected(1, $content["tab_type"]); ?>><?php echo $BL['be_ctype_tabs'] ?></option>
<option value="2"<?php is_selected(2, $content["tab_type"]); ?>><?php echo $BL['be_ctype_accordion'] ?></option>
</select></td>
</tr>
</table><script type="text/javascript">
var cTabStatus = <?php echo $content["tab_type"] ? 'true' : 'false' ?>;
function checkTabStatus(tabVal) {
var tabValue = parseInt(tabVal.options[tabVal.selectedIndex].value, 10);
cTabStatus = tabValue > 0 ? true : false;
if(cTabStatus == false) {
$('ctab1').setStyle('display', 'none');
$('ctab2').setStyle('display', 'none');
$('ctab3').setStyle('display', 'none');
} else {
$('ctab1').setStyle('display', '');
$('ctab2').setStyle('display', '');
$('ctab3').setStyle('display', '');
}
tabVal.blur();
}
</script></td>
</tr>
<!-- ctab section -->
<tr id="ctab1"<?php echo $content["tab_style"] ?>><td colspan="2" class="rowspacer7x0"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr id="ctab2"<?php echo $content["tab_style"] ?>><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
<tr id="ctab3"<?php echo $content["tab_style"] ?>>
<td align="right" class="chatlist"><?php echo $BL['be_cnt_paginate_subsection'] ?>: </td>
<td><table summary="" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="ctab_title" type="text" id="ctab_title" class="f11b width225" value="<?php echo html_specialchars($content["tab_title"]) ?>" size="40" maxlength="100" /></td>
<td class="chatlist"> <?php echo $BL['be_ctype_number'] ?>: </td>
<td><input name="ctab_number" type="text" id="ctab_number" class="v11 width25" value="<?php echo $content["tab_number"] ?>" size="3" maxlength="4" onkeyup="if(!parseInt(this.value))this.value='';" /></td>
</tr>
</table></td>
</tr>
<!-- ctab section end -->
<tr><td colspan="2" class="rowspacer7x0"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
<?php
if(isset($content["error"])) {
?>
<tr bgcolor="#F3F5F8">
<td align="right" valign="top" bgcolor="#FFE9D2"><strong style="color:#FF6600"><?php echo $BL['be_admin_usr_err'] ?>: </strong></td>
<td valign="top" bgcolor="#FFE9D2"><strong style="color:#FF6600"><?php
//Fehlerdarstellung
$content["error_result"]="";
foreach($content["error"] as $value) {
$content["error_result"] .= "> ".$value."\n";
}
echo nl2br(html_specialchars(chop($content["error_result"])));
unset($content["error_result"]);
?></strong></td>
</tr>
<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
<?php
}
?>
<tr bgcolor="#F3F5F8">
<td align="right" class="chatlist"><?php echo $BL['be_article_cnt_ctitle'] ?>: </td>
<td><input name="ctitle" type="text" id="ctitle" class="width440p5" value="<?php echo html_specialchars($content["title"]) ?>" size="40" maxlength="250" /></td>
</tr>
<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr>
<tr bgcolor="#F3F5F8">
<td align="right" class="chatlist"><?php echo $BL['be_article_asubtitle'] ?>: </td>
<td><input name="csubtitle" type="text" id="csubtitle" class="width440p5" value="<?php echo html_specialchars($content["subtitle"]) ?>" size="40" maxlength="250" /></td>
</tr>
<?php
// check if it is necessary to display paginate stuff
// in case no content part pagination isset for current article
$content["paginate_page"] = empty($content["paginate_page"]) ? 0 : intval($content["paginate_page"]);
if(empty($content['article']['article_paginate'])) {
echo '<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="7" />';
echo '<input name="cpaginate_title" type="hidden" id="cpaginate_title" value="'.html_specialchars($content["paginate_title"]).'" />';
echo '<input name="cpaginate_page" type="hidden" id="cpaginate_page" value="'.$content["paginate_page"].'" />';
echo '</td></tr>';
} else {
?>
<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
<tr><td colspan="2" class="rowspacer0x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_cnt_paginate_subsection'] ?>: </td>
<td><table summary="" border="0" cellspacing="0" cellpadding="0" width="444">
<tr>
<td><input name="cpaginate_page" type="text" id="cpaginate_page" class="v11 width25" value="<?php echo $content["paginate_page"] ?>" size="3" maxlength="3" onkeyup="if(!parseInt(this.value))this.value='0';" /></td>
<td align="right" class="chatlist"> <?php echo $BL['be_cnt_subsection_tite'].' ('.$BL['be_pagination'].')' ?>: </td>
<td width="200"><input name="cpaginate_title" type="text" id="cpaginate_title" class="f11b width225" value="<?php echo html_specialchars($content["paginate_title"]) ?>" size="40" maxlength="200" /></td>
</tr>
</table><script type="text/javascript">
var loadblock = true;
checkCntBlockPaginate(getObjectById("cblock"));
loadblock = false;
function checkCntBlockPaginate(obj) {
var paginate = getObjectById("cpaginate_page");
if(obj.options[obj.selectedIndex].value != "CONTENT") {
if(paginate.value != "0" && loadblock == false) {
if(!confirm("<?php echo $BL['be_cnt_subsection_warning'] ?>")) {
getObjectById("cblock").selectedIndex = 0;
return false;
}
}
paginate.disabled = true;
} else {
paginate.disabled = false;
}
}
</script></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="7" /></td></tr>
<?php
}
// end paginate check
// end non content part setting mode
endif;
?>
<tr><td colspan="2" class="rowspacer"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr bgcolor="#F3F5F8">
<td> </td>
<td style="padding:7px 0 7px 0;">
<?php
// render buttons only once and save the buffer
if(!empty($content["id"])) {
$buttonActionLink = rel_url(array('phpwcms-preview'=>1), array(), empty($content['article']["article_alias"]) ? (empty($content["aid"]) ? 'id='.$content["id"] : 'aid='.$content["aid"]) : $content['article']["article_alias"]);
$buttonAction = ' <div style="float:right;margin-right:5px;padding:0;">';
$buttonAction .= ' <button type="button" value="'.$BL['be_func_struct_preview'].'" class="button10" title="'.$BL['be_func_struct_preview'].'" ';
$buttonAction .= 'onclick="window.open(\''.$buttonActionLink."', 'articlePreviewWindows');return false;\">";
$buttonAction .= $BL['be_func_struct_preview']."</button></div>" . LF;
} else {
$buttonAction = '';
}
ob_start();
?>
<div>
<?php echo $buttonAction; ?>
<div style="float:left;padding:0;">
<input name="Submit" type="submit" class="button10" value="<?php echo $sendbutton ?>" />
<input name="SubmitClose" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
<input name="donotsubmit" type="button" class="button10" value="<?php echo $BL['be_newsletter_button_cancel'] ?>" onclick="location.href='phpwcms.php?do=articles&p=2&s=1&id=<?php echo $content["aid"] ?>'" />
</div>
</div>
<?php
$_save_close_buttons = ob_get_clean();
echo $_save_close_buttons;
?>
</td>
</tr>
<?php
// show content part specific form elements
if($content['type'] != 30 && file_exists(PHPWCMS_ROOT.'/include/inc_tmpl/content/cnt'.$content['type'].'.inc.php')) {
include_once(PHPWCMS_ROOT.'/include/inc_tmpl/content/cnt'.$content['type'].'.inc.php');
} elseif($content['type'] == 30 && file_exists($phpwcms['modules'][$content["module"]]['path'].'inc/cnt.form.php')) {
include_once($phpwcms['modules'][$content["module"]]['path'].'inc/cnt.form.php');
} else {
include_once(PHPWCMS_ROOT.'/include/inc_tmpl/content/cnt0.inc.php');
}
?>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>: </td>
<td><table summary="" border="0" cellpadding="1" cellspacing="0" bgcolor="#E7E8EB">
<tr>
<td><input name="cvisible" type="checkbox" id="cvisible" value="1"<?php is_checked(1, $content["visible"]); ?> /></td>
<td><label for="cvisible"><?php echo $BL['be_admin_struct_visible'] ?> </label></td>
<td bgcolor="#FFFFFF"> </td>
<td><input name="cgranted" type="checkbox" id="cgranted" value="1"<?php is_checked(1, $content["granted"]); ?> /></td>
<td><label for="cgranted"><?php echo $BL['be_granted_feuser'] ?> </label></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td style="padding: 12px 0 12px 0;">
<input name="caktion" type="hidden" id="caktion" value="1" />
<input name="caid" type="hidden" id="caid" value="<?php echo $article["article_id"] ?>" />
<input name="cid" type="hidden" id="cid" value="<?php echo $content["id"] ?>" />
<input name="ctype" type="hidden" id="ctype" value="<?php echo $content["type"] ?>" />
<?php echo $_save_close_buttons ?>
</td>
</tr>
<tr><td colspan="2" class="rowspacer0x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr>
<td align="right" class="chatlist tdtop3"><?php echo $BL['be_profile_label_notes'] ?>: </td>
<td><textarea name="ccomment" id="ccomment" class="v11 width440" rows="5"><?php echo html_specialchars($content["comment"]) ?></textarea></td>
</tr>
</table>
</form>