1<?php
2/**
3 * @package tikiwiki
4 */
5// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
6//
7// All Rights Reserved. See copyright.txt for details and a complete list of authors.
8// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
9// $Id$
10
11$section = 'cms';
12require_once('tiki-setup.php');
13$artlib = TikiLib::lib('art');
14
15if ($prefs['feature_freetags'] == 'y') {
16	$freetaglib = TikiLib::lib('freetag');
17}
18
19$access->check_feature('feature_submissions');
20$access->check_permission('tiki_p_submit_article');
21$errors = false;
22
23$auto_query_args = ['subId'];
24
25if ($tiki_p_admin != 'y') {
26	if ($tiki_p_use_HTML != 'y') {
27		$_REQUEST['allowhtml'] = 'off';
28	}
29}
30
31if (isset($_REQUEST['subId'])) {
32	$subId = $_REQUEST['subId'];
33} else {
34	$subId = 0;
35}
36
37if (! empty($_REQUEST['topicId'])) {
38	$topicId = $_REQUEST['topicId'];
39} else {
40	$topicId = '';
41}
42
43if (! empty($_REQUEST['type'])) {
44	$type = $_REQUEST['type'];
45} else {
46	$type = '';
47}
48
49// We need separate numbering of previews, since we access preview images by this number
50if (isset($_REQUEST['previewId'])) {
51	$previewId = $_REQUEST['previewId'];
52} else {
53	$previewId = mt_rand();
54}
55
56$smarty->assign('subId', $subId);
57$smarty->assign('articleId', $subId);
58$smarty->assign('previewId', $previewId);
59$smarty->assign(
60	'imageIsChanged',
61	(isset($_REQUEST['imageIsChanged']) && $_REQUEST['imageIsChanged'] == 'y') ? 'y' : 'n'
62);
63
64$templateslib = TikiLib::lib('template');
65
66if (isset($_REQUEST['templateId']) && $_REQUEST['templateId'] > 0) {
67	$template_data = $templateslib->get_template($_REQUEST['templateId'], $prefs['language']);
68	$_REQUEST['preview'] = 1;
69	$_REQUEST['body'] = $template_data['content'];
70	if ($templateslib->template_is_in_section($_REQUEST['templateId'], 'wiki_html')) {
71		$_REQUEST['allowhtml'] = 'on';
72	}
73}
74
75$publishDate = $tikilib->now;
76$expireDate = $tikilib->make_time(0, 0, 0, $tikilib->date_format("%m"), $tikilib->date_format("%d"), $tikilib->date_format("%Y") + 1);
77
78//Use 12- or 24-hour clock for $publishDate time selector based on admin and user preferences
79$userprefslib = TikiLib::lib('userprefs');
80$smarty->assign('use_24hr_clock', $userprefslib->get_user_clock_pref($user));
81
82$smarty->assign('arttitle', '');
83$smarty->assign('topline', '');
84$smarty->assign('subtitle', '');
85$smarty->assign('linkto', '');
86$smarty->assign('image_caption', '');
87$smarty->assign('lang', $prefs['language']);
88$authorName = $tikilib->get_user_preference($user, 'realName', $user);
89$smarty->assign('authorName', $authorName);
90$smarty->assign('topicId', $topicId);
91$smarty->assign('type', $type);
92$smarty->assign('useImage', 'n');
93$smarty->assign('isfloat', 'n');
94$hasImage = 'n';
95$smarty->assign('hasImage', 'n');
96$smarty->assign('image_name', '');
97$smarty->assign('image_type', '');
98$smarty->assign('image_size', '');
99$smarty->assign('image_data', '');
100$smarty->assign('image_x', $prefs['article_image_size_x']);
101$smarty->assign('image_y', $prefs['article_image_size_y']);
102$smarty->assign('heading', '');
103$smarty->assign('body', '');
104$smarty->assign('type', $type);
105$smarty->assign('rating', 7);
106$smarty->assign('edit_data', 'n');
107
108if (isset($_REQUEST['templateId']) && $_REQUEST['templateId'] > 0) {
109	$template_data = $templateslib->get_template($_REQUEST['templateId'], $prefs['language']);
110	$_REQUEST['preview'] = 1;
111	$_REQUEST['body'] = $template_data['content'];
112}
113
114// If the submissionId is passed then get the submission data
115$parserlib = TikiLib::lib('parser');
116if (isset($_REQUEST['subId'])) {
117	$article_data = $artlib->get_submission($_REQUEST['subId']);
118
119	$publishDate = $article_data['publishDate'];
120	$expireDate = $article_data['expireDate'];
121	$smarty->assign('arttitle', $article_data['title']);
122	$smarty->assign('topline', $article_data['topline']);
123	$smarty->assign('subtitle', $article_data['subtitle']);
124	$smarty->assign('linkto', $article_data['linkto']);
125	$smarty->assign('image_caption', $article_data['image_caption']);
126	$smarty->assign('lang', $article_data['lang']);
127	$smarty->assign('authorName', $article_data['authorName']);
128	$smarty->assign('topicId', $article_data['topicId']);
129	$smarty->assign('useImage', $article_data['useImage']);
130	$smarty->assign('isfloat', $article_data['isfloat']);
131	$smarty->assign('image_name', $article_data['image_name']);
132	$smarty->assign('image_type', $article_data['image_type']);
133	$smarty->assign('image_size', $article_data['image_size']);
134	$smarty->assign('image_data', urlencode($article_data['image_data']));
135	$smarty->assign('reads', $article_data['nbreads']);
136	$smarty->assign('image_x', $article_data['image_x']);
137	$smarty->assign('image_y', $article_data['image_y']);
138	$smarty->assign('type', $article_data['type']);
139	$smarty->assign('rating', $article_data['rating']);
140
141	if (strlen($article_data['image_data']) > 0) {
142		$smarty->assign('hasImage', 'y');
143
144		$hasImage = 'y';
145	}
146
147	$smarty->assign('heading', $article_data['heading']);
148	$smarty->assign('body', $article_data['body']);
149	$smarty->assign('edit_data', 'y');
150
151	$data = $article_data['image_data'];
152	$imgname = $article_data['image_name'];
153
154	$body = $article_data['body'];
155	$heading = $article_data['heading'];
156	$smarty->assign('parsed_body', $parserlib->parse_data($body, ['is_html' => 'y']));
157	$smarty->assign('parsed_heading', $parserlib->parse_data($heading), ['is_html' => 'y']);
158}
159if (! empty($_REQUEST['translationOf'])) {
160	$translationOf = $_REQUEST['translationOf'];
161	$smarty->assign('translationOf', $translationOf);
162}
163
164if (isset($_REQUEST['subId'])) {
165	if ($_REQUEST['subId'] > 0) {
166		if (($tiki_p_edit_submission != 'y' and $article_data['author'] != $user) or $user == '') {
167			$smarty->assign('errortype', 401);
168			$smarty->assign('msg', tra('You do not have permission to edit submissions'));
169			$smarty->display('error.tpl');
170			die;
171		}
172	}
173}
174
175if (isset($_REQUEST['allowhtml'])) {
176	if ($_REQUEST['allowhtml'] == 'on') {
177		$smarty->assign('allowhtml', 'y');
178	} else {
179		$smarty->assign('allowhtml', 'n');
180	}
181} else {
182	$smarty->assign('allowhtml', ($_SESSION['wysiwyg'] === 'y' && $prefs['wysiwyg_htmltowiki'] !== 'y') ? 'y' : 'n');
183}
184
185if ((isset($_REQUEST["save"]) || isset($_REQUEST["submitarticle"]))
186			&& empty($user)
187			&& $prefs['feature_antibot'] == 'y'
188			&& ! $captchalib->validate()
189) {
190	Feedback::error(['mes' => $captchalib->getErrors()]);
191	$errors = true;
192}
193
194$topics = $artlib->list_topics();
195$smarty->assign_by_ref('topics', $topics);
196
197$smarty->assign('preview', 0);
198
199// If we are in preview mode then preview it!
200if (isset($_REQUEST['preview']) || ! empty($errors)) {
201	check_ticket('edit-submission');
202# convert from the displayed 'site' time to 'server' time
203
204	//Convert 12-hour clock hours to 24-hour scale to compute time
205	if (! empty($_REQUEST['publish_Meridian'])) {
206		$_REQUEST['publish_Hour'] = date('H', strtotime($_REQUEST['publish_Hour'] . ':00 ' . $_REQUEST['publish_Meridian']));
207	}
208	if (! empty($_REQUEST['expire_Meridian'])) {
209		$_REQUEST['expire_Hour'] = date('H', strtotime($_REQUEST['expire_Hour'] . ':00 ' . $_REQUEST['expire_Meridian']));
210	}
211
212	$publishDate = $tikilib->make_time(
213		$_REQUEST['publish_Hour'],
214		$_REQUEST['publish_Minute'],
215		0,
216		$_REQUEST['publish_Month'],
217		$_REQUEST['publish_Day'],
218		$_REQUEST['publish_Year']
219	);
220
221	$expireDate = $tikilib->make_time(
222		$_REQUEST['expire_Hour'],
223		$_REQUEST['expire_Minute'],
224		0,
225		$_REQUEST['expire_Month'],
226		$_REQUEST['expire_Day'],
227		$_REQUEST['expire_Year']
228	);
229
230	$smarty->assign('reads', '0');
231	if (isset($_REQUEST['preview'])) {
232		$smarty->assign('preview', 1);
233	}
234	$smarty->assign('edit_data', 'y');
235	$smarty->assign('arttitle', $_REQUEST['title']);
236	$smarty->assign('authorName', $_REQUEST['authorName']);
237	$smarty->assign('topicId', $_REQUEST['topicId']);
238	$smarty->assign('topicName', $topics[$_REQUEST['topicId']]['name']);
239
240	if (isset($_REQUEST['useImage']) && $_REQUEST['useImage'] == 'on') {
241		$useImage = 'y';
242	} else {
243		$useImage = 'n';
244	}
245
246	if (isset($_REQUEST['isfloat']) && $_REQUEST['isfloat'] == 'on') {
247		$isfloat = 'y';
248	} else {
249		$isfloat = 'n';
250	}
251
252	$smarty->assign('image_data', $_REQUEST['image_data']);
253
254	if (strlen($_REQUEST['image_data']) > 0) {
255		$smarty->assign('hasImage', 'y');
256
257		$hasImage = 'y';
258	}
259
260
261	$type = $artlib->get_type($_REQUEST['type']);
262
263	$smarty->assign('show_topline', $type["show_topline"]);
264	$smarty->assign('show_subtitle', $type["show_subtitle"]);
265	$smarty->assign('show_image_caption', $type["show_image_caption"]);
266	$smarty->assign('show_author', $type["show_author"]);
267	$smarty->assign('show_reads', $type["show_reads"]);
268	$smarty->assign('show_pubdate', $type["show_pubdate"]);
269	$smarty->assign('show_expdate', $type["show_expdate"]);
270	$smarty->assign('show_linkto', $type["show_linkto"]);
271	$smarty->assign('use_ratings', $type["use_ratings"]);
272
273	if (! isset($_REQUEST['topline'])) {
274		$_REQUEST['topline'] = '';
275	}
276	if (! isset($_REQUEST['subtitle'])) {
277		$_REQUEST['subtitle'] = '';
278	}
279	if (! isset($_REQUEST['linkto'])) {
280		$_REQUEST['linkto'] = '';
281	}
282	if (! isset($_REQUEST['image_caption'])) {
283		$_REQUEST['image_caption'] = '';
284	}
285	if (! isset($_REQUEST['lang'])) {
286		$_REQUEST['lang'] = '';
287	}
288
289	$smarty->assign('topline', $_REQUEST['topline']);
290	$smarty->assign('subtitle', $_REQUEST['subtitle']);
291	$smarty->assign('linkto', $_REQUEST['linkto']);
292	$smarty->assign('image_caption', $_REQUEST['image_caption']);
293	$smarty->assign('lang', $_REQUEST['lang']);
294	$smarty->assign('image_name', $_REQUEST['image_name']);
295	$smarty->assign('image_type', $_REQUEST['image_type']);
296	$smarty->assign('image_size', $_REQUEST['image_size']);
297	$smarty->assign('image_x', $_REQUEST['image_x']);
298	$smarty->assign('image_y', $_REQUEST['image_y']);
299	$smarty->assign('useImage', $useImage);
300	$smarty->assign('isfloat', $isfloat);
301	$smarty->assign('type', $_REQUEST['type']);
302	$smarty->assign('rating', $_REQUEST['rating']);
303	$smarty->assign('entrating', floor($_REQUEST['rating']));
304	$imgname = $_REQUEST['image_name'];
305	$data = urldecode($_REQUEST['image_data']);
306
307	// Parse the information of an uploaded file and use it for the preview
308	if (isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
309		$filegallib = TikiLib::lib('filegal');
310		try {
311			$filegallib->assertUploadedFileIsSafe($_FILES['userfile1']['tmp_name'], $_FILES['userfile1']['name']);
312		} catch (Exception $e) {
313			$smarty->assign('errortype', 403);
314			$smarty->assign('msg', $e->getMessage());
315			$smarty->display("error.tpl");
316			die;
317		}
318		$file_name = $_FILES['userfile1']['name'];
319		// Simple check if it's an image file
320		if (preg_match('/\.(gif|png|jpe?g)$/i', $file_name)) {
321			$fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
322			$data = fread($fp, filesize($_FILES['userfile1']['tmp_name']));
323			fclose($fp);
324
325			$imgtype = $_FILES['userfile1']['type'];
326			$imgsize = $_FILES['userfile1']['size'];
327			$imgname = $_FILES['userfile1']['name'];
328			$smarty->assign('image_data', urlencode($data));
329			$smarty->assign('image_name', $imgname);
330			$smarty->assign('image_type', $imgtype);
331			$smarty->assign('image_size', $imgsize);
332			$hasImage = 'y';
333			$smarty->assign('hasImage', 'y');
334
335			// Create preview cache image, for display afterwards
336			$cachefile = $prefs['tmpDir'];
337
338			if ($tikidomain) {
339				$cachefile .= "/$tikidomain";
340			}
341
342			$cachefile .= '/article_preview.' . $previewId;
343
344			if (move_uploaded_file($_FILES['userfile1']['tmp_name'], $cachefile)) {
345				$smarty->assign('imageIsChanged', 'y');
346			}
347		}
348	}
349
350
351	$smarty->assign('heading', $_REQUEST['heading']);
352	$smarty->assign('edit_data', 'y');
353
354	if (isset($_REQUEST['allowhtml']) && $_REQUEST['allowhtml'] == 'on') {
355		$body = $_REQUEST['body'];
356
357		$heading = $_REQUEST['heading'];
358	} else {
359		$body = strip_tags($_REQUEST['body'], '<a><pre><p><img><hr><b><i>');
360
361		$heading = strip_tags($_REQUEST['heading'], '<a><pre><p><img><hr><b><i>');
362	}
363
364	$smarty->assign('size', strlen($body));
365
366	$parsed_body = $parserlib->parse_data($body, ['is_html' => 'y']);
367	$parsed_heading = $parserlib->parse_data($heading, ['is_html' => 'y']);
368
369	$smarty->assign('parsed_body', $parsed_body);
370	$smarty->assign('parsed_heading', $parsed_heading);
371
372	$smarty->assign('body', $body);
373	$smarty->assign('heading', $heading);
374}
375
376// Pro
377if ((isset($_REQUEST['save']) || isset($_REQUEST['submitarticle'])) && empty($errors)) {
378	check_ticket('edit-submission');
379	$imagegallib = TikiLib::lib('imagegal');
380
381	# convert from the displayed 'site' time to UTC time
382	//Convert 12-hour clock hours to 24-hour scale to compute time
383	if (! empty($_REQUEST['publish_Meridian'])) {
384		$_REQUEST['publish_Hour'] = date('H', strtotime($_REQUEST['publish_Hour'] . ':00 ' . $_REQUEST['publish_Meridian']));
385	}
386
387	if (! empty($_REQUEST['expire_Meridian'])) {
388		$_REQUEST['expire_Hour'] = date('H', strtotime($_REQUEST['expire_Hour'] . ':00 ' . $_REQUEST['expire_Meridian']));
389	}
390
391	$publishDate = $tikilib->make_time(
392		$_REQUEST['publish_Hour'],
393		$_REQUEST['publish_Minute'],
394		0,
395		$_REQUEST['publish_Month'],
396		$_REQUEST['publish_Day'],
397		$_REQUEST['publish_Year']
398	);
399
400	$expireDate = $tikilib->make_time(
401		$_REQUEST['expire_Hour'],
402		$_REQUEST['expire_Minute'],
403		0,
404		$_REQUEST['expire_Month'],
405		$_REQUEST['expire_Day'],
406		$_REQUEST['expire_Year']
407	);
408
409	if (isset($_REQUEST['allowhtml']) && $_REQUEST['allowhtml'] == 'on' || $_SESSION['wysiwyg'] == 'y') {
410		$body = $_REQUEST['body'];
411
412		$heading = $_REQUEST['heading'];
413	} else {
414		$body = strip_tags($_REQUEST['body'], '<a><pre><p><img><hr><b><i>');
415
416		$heading = strip_tags($_REQUEST['heading'], '<a><pre><p><img><hr><b><i>');
417	}
418
419	if (isset($_REQUEST['useImage']) && $_REQUEST['useImage'] == 'on') {
420		$useImage = 'y';
421	} else {
422		$useImage = 'n';
423	}
424
425	if (isset($_REQUEST['isfloat']) && $_REQUEST['isfloat'] == 'on') {
426		$isfloat = 'y';
427	} else {
428		$isfloat = 'n';
429	}
430
431	$imgdata = urldecode($_REQUEST['image_data']);
432
433	if (strlen($imgdata) > 0) {
434		$hasImage = 'y';
435	}
436
437	$imgname = $_REQUEST['image_name'];
438	$imgtype = $_REQUEST['image_type'];
439	$imgsize = $_REQUEST['image_size'];
440
441	if (isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
442		$filegallib = TikiLib::lib('filegal');
443		try {
444			$filegallib->assertUploadedFileIsSafe($_FILES['userfile1']['tmp_name'], $_FILES['userfile1']['name']);
445		} catch (Exception $e) {
446			$smarty->assign('errortype', 403);
447			$smarty->assign('msg', $e->getMessage());
448			$smarty->display("error.tpl");
449			die;
450		}
451		$fp = fopen($_FILES['userfile1']['tmp_name'], 'rb');
452
453		$imgdata = fread($fp, filesize($_FILES['userfile1']['tmp_name']));
454		fclose($fp);
455		$imgtype = $_FILES['userfile1']['type'];
456		$imgsize = $_FILES['userfile1']['size'];
457		$imgname = $_FILES['userfile1']['name'];
458	}
459
460	// Parse $edit and eliminate image references to external URIs (make them internal)
461	$body = $imagegallib->capture_images($body);
462	$heading = $imagegallib->capture_images($heading);
463
464	// If page exists
465	if (! isset($_REQUEST['topicId'])) {
466		$smarty->assign('msg', tra('You have to create a topic first'));
467
468		$smarty->display('error.tpl');
469		die;
470	}
471	if (! isset($_REQUEST['topline'])) {
472		$_REQUEST['topline'] = '';
473	}
474	if (! isset($_REQUEST['subtitle'])) {
475		$_REQUEST['subtitle'] = '';
476	}
477	if (! isset($_REQUEST['linkto'])) {
478		$_REQUEST['linkto'] = '';
479	}
480	if (! isset($_REQUEST['image_caption'])) {
481		$_REQUEST['image_caption'] = '';
482	}
483	if (! isset($_REQUEST['lang'])) {
484		$_REQUEST['lang'] = '';
485	}
486
487	$subid = $artlib->replace_submission(
488		strip_tags($_REQUEST['title'], '<a><pre><p><img><hr><b><i>'),
489		$_REQUEST['authorName'],
490		$_REQUEST['topicId'],
491		$useImage,
492		$imgname,
493		$imgsize,
494		$imgtype,
495		$imgdata,
496		$heading,
497		$body,
498		$publishDate,
499		$expireDate,
500		$user,
501		$subId,
502		$_REQUEST['image_x'],
503		$_REQUEST['image_y'],
504		$_REQUEST['type'],
505		$_REQUEST['topline'],
506		$_REQUEST['subtitle'],
507		$_REQUEST['linkto'],
508		$_REQUEST['image_caption'],
509		$_REQUEST['lang'],
510		$_REQUEST['rating'],
511		$isfloat
512	);
513
514	$cat_type = 'submission';
515	$cat_objid = $subid;
516	$cat_desc = substr($_REQUEST['heading'], 0, 200);
517	$cat_name = $_REQUEST['title'];
518	$cat_href = 'tiki-edit_submission.php?subId=' . $cat_objid;
519
520	include_once('categorize.php');
521	include_once('freetag_apply.php');
522
523	// Add attributes
524	if ($prefs['article_custom_attributes'] == 'y') {
525		$valid_att = $artlib->get_article_type_attributes($_REQUEST['type']);
526		$attributeArray = [];
527		foreach ($valid_att as $att) {
528			// need to convert . to _ for matching
529			$toMatch = str_replace('.', '_', $att['itemId']);
530			if (isset($_REQUEST[$toMatch])) {
531				$attributeArray[$att['itemId']] = $_REQUEST[$toMatch];
532			}
533		}
534		$artlib->set_article_attributes($subid, $attributeArray, true);
535	}
536	// Remove image cache because image may have changed, and we
537	// don't want to show the old image
538	@$artlib->delete_image_cache('submission', $subId);
539	// Remove preview cache because it won't be used any more
540	@$artlib->delete_image_cache('preview', $previewId);
541
542	if (isset($_REQUEST['save']) && $tiki_p_autoapprove_submission == 'y') {
543		$artlib->approve_submission($subid);
544		header('location: tiki-view_articles.php');
545		die;
546	}
547
548	header('location: tiki-list_submissions.php');
549	die;
550}
551
552// Set date to today before it's too late
553$_SESSION['thedate'] = $tikilib->now;
554
555// get list of valid types
556$types = $artlib->list_types_byname();
557
558if (empty($article_data) && empty($_REQUEST['type'])) {
559	// Select the first type as default selection
560	if (empty($types)) {
561		$type = '';
562	} else {
563		$type = key($types);
564	}
565	$smarty->assign('type', $type);
566}
567
568if ($prefs['article_custom_attributes'] == 'y') {
569	$article_attributes = $artlib->get_article_attributes($subId, true);
570	$smarty->assign('article_attributes', $article_attributes);
571	$all_attributes = [];
572	$js_string = '';
573
574	foreach ($types as &$t) {
575		// javascript needs htmlid to show/hide to be properties of basic array
576		$type_attributes = $artlib->get_article_type_attributes($t['type'], 'relationId ASC');
577		$all_attributes = array_merge($all_attributes, $type_attributes);
578		foreach ($type_attributes as $att) {
579			$htmlid = str_replace('.', '_', $att['itemId']);
580			$t[$htmlid] = 'y';
581			$js_string .= "'$htmlid', 'y', ";
582		}
583	}
584	$smarty->assign('all_attributes', $all_attributes);
585	$headerlib->add_js("articleCustomAttributes = new Array(); articleCustomAttributes = [$js_string];");
586}
587$smarty->assign_by_ref('types', $types);
588
589if ($prefs['feature_cms_templates'] == 'y') {
590	$templates = $templateslib->list_templates('cms', 0, -1, 'name_asc', '');
591}
592
593$smarty->assign_by_ref('templates', $templates['data']);
594
595if ($prefs['feature_multilingual'] == 'y') {
596	$languages = [];
597	$langLib = TikiLib::lib('language');
598	$languages = $langLib->list_languages();
599	$smarty->assign_by_ref('languages', $languages);
600}
601
602$cat_type = 'submission';
603$cat_objid = $subId;
604include_once('categorize_list.php');
605
606if ($prefs['feature_freetags'] == 'y') {
607	include_once('freetag_list.php');
608	if (isset($_REQUEST['preview'])) {
609		$smarty->assign('taglist', $_REQUEST['freetag_string']);
610	}
611}
612
613$smarty->assign('publishDate', $publishDate);
614$smarty->assign('expireDate', $expireDate);
615$smarty->assign('siteTimeZone', $prefs['display_timezone']);
616
617$wikilib = TikiLib::lib('wiki');
618$plugins = $wikilib->list_plugins(true, 'body');
619$smarty->assign_by_ref('plugins', $plugins);
620
621$smarty->assign('showtags', 'n');
622$smarty->assign('qtcycle', '');
623ask_ticket('edit-submission');
624
625$smarty->assign('section', $section);
626include_once('tiki-section_options.php');
627
628// disallow robots to index page:
629$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');
630
631// Display the Index Template
632$smarty->assign('mid', 'tiki-edit_submission.tpl');
633$smarty->display('tiki.tpl');
634