tiki-page.php 1.4 KB
Newer Older
1
<?php
changi67's avatar
changi67 committed
2 3 4
/**
 * @package tikiwiki
 */
5
// (c) Copyright 2002-2015 by authors of the Tiki Wiki CMS Groupware Project
changi67's avatar
changi67 committed
6
// 
7 8
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
9
// $Id$
changi67's avatar
changi67 committed
10

11 12
require_once ('tiki-setup.php');
include_once ('lib/htmlpages/htmlpageslib.php');
13
$statslib = TikiLib::lib('stats');
14 15
$access->check_feature('feature_html_pages');
$access->check_permission('tiki_p_view_html_pages');
16 17
if (!isset($_REQUEST["pageName"])) {
	$smarty->assign('msg', tra("No page indicated"));
18
	$smarty->display("error.tpl");
19
	die;
20
}
21
$page_data = $htmlpageslib->get_html_page($_REQUEST["pageName"]);
22 23 24
$smarty->assign('type', $page_data["type"]);
$smarty->assign('refresh', $page_data["refresh"]);
$smarty->assign('pageName', $_REQUEST["pageName"]);
25
$smarty->assign('headtitle', $_REQUEST["pageName"]);
26 27 28 29
$parsed = $htmlpageslib->parse_html_page($_REQUEST["pageName"], $page_data["content"]);
$smarty->assign_by_ref('parsed', $parsed);
$section = 'html_pages';
include_once ('tiki-section_options.php');
30
if ($prefs['feature_theme_control'] == 'y') {
31 32 33 34
	$cat_type = 'html page';
	$cat_objid = $_REQUEST['pageName'];
	include ('tiki-tc.php');
}
35
ask_ticket('html-page');
36
//add a hit
changi67's avatar
changi67 committed
37
$statslib->stats_hit($_REQUEST['pageName'], "html_pages");
38
// Display the template
39
$smarty->assign('mid', 'tiki-page.tpl');
40
$smarty->display("tiki.tpl");