コード例 #1
0
function smarty_function_wikistructure($params, &$smarty)
{
    global $tikilib, $user, $dbTiki, $structlib;
    extract($params);
    require_once 'lib/structures/structlib.php';
    if (!isset($structlib)) {
        $structlib = new StructLib($dbTiki);
    }
    if (!isset($_REQUEST["page"]) || $_REQUEST["page"] == '') {
        if (isset($_REQUEST["page_ref_id"])) {
            // If a structure page has been requested
            $page_ref_id = $_REQUEST["page_ref_id"];
        }
    } else {
        //Get the structures this page is a member of
        $structs = $structlib->get_page_structures($_REQUEST["page"], $structure);
        //If page is only member of one structure, display if requested
        $single_struct = count($structs) == 1;
        if ($single_struct) {
            $page_ref_id = $structs[0]['req_page_ref_id'];
            $_REQUEST["page_ref_id"] = $page_ref_id;
        }
    }
    if (isset($page_ref_id) && isset($detail)) {
        $channels .= $structlib->get_toc($page_ref_id, 'asc', false, false);
    } else {
        $channels .= $structlib->get_toc($id, 'asc', false, false);
    }
    return $channels;
}
コード例 #2
0
}

if (!isset($bannerlib)) {
	$bannerlib = new BannerLib($dbTiki);
}

if (!isset($rsslib)) {
	$rsslib = new RssLib($dbTiki);
}

if (!isset($polllib)) {
	$polllib = new PollLib($dbTiki);
}

if (!isset($structlib)) {
	$structlib = new StructLib($dbTiki);
}

$smarty->assign('wysiwyg', 'n');
if (isset($_REQUEST['wysiwyg']) && $_REQUEST['wysiwyg'] == 'y') {
	$smarty->assign('wysiwyg', 'y');
}

$access->check_permission(array('tiki_p_admin_modules'));
$auto_query_args = array('show_hidden_modules');

$access->check_feature(array('feature_jquery_ui'));

// Values for the user_module edit/create form
$smarty->assign('um_name', '');
$smarty->assign('um_title', '');