当前位置: 首页>>代码示例>>PHP>>正文


PHP PMF_Category::buildTree方法代码示例

本文整理汇总了PHP中PMF_Category::buildTree方法的典型用法代码示例。如果您正苦于以下问题:PHP PMF_Category::buildTree方法的具体用法?PHP PMF_Category::buildTree怎么用?PHP PMF_Category::buildTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMF_Category的用法示例。


在下文中一共展示了PMF_Category::buildTree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

 * @link      http://www.phpmyfaq.de
 * @since     2004-04-29
 */
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
if ($permission["editcateg"]) {
    $id = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT);
    $parent_id = PMF_Filter::filterInput(INPUT_GET, 'parent_id', FILTER_VALIDATE_INT);
    $category = new PMF_Category($current_admin_user, $current_admin_groups, false);
    $categories = $category->getAllCategories();
    $category->categories = null;
    unset($category->categories);
    $category->getCategories($parent_id, false);
    $category->buildTree($parent_id);
    $header = sprintf('%s: <em>%s</em>', $PMF_LANG['ad_categ_move'], $category->categories[$id]['name']);
    ?>
        <header>
            <h2><?php 
    print $header;
    ?>
</h2>
        </header>
        <form action="?action=changecategory" method="post">
            <input type="hidden" name="cat" value="<?php 
    print $id;
    ?>
" />
            <input type="hidden" name="csrf" value="<?php 
    print $user->getCsrfTokenFromSession();
开发者ID:atlcurling,项目名称:tkt,代码行数:31,代码来源:category.move.php

示例2: header

    $protocol = 'http';
    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
        $protocol = 'https';
    }
    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
//
// GET Parameters Syntax:
//   export.file.php?
//          type={pdf|xhtml|xml}
//      [&dispos={inline|attachment}], default: attachment
//       [&catid=NN[&downwards=1]], default: all, downwards
//
$categoryId = PMF_Filter::filterInput(INPUT_POST, 'catid', FILTER_VALIDATE_INT);
$downwards = PMF_Filter::filterInput(INPUT_POST, 'downwards', FILTER_VALIDATE_BOOLEAN, false);
$inlineDisposition = PMF_Filter::filterInput(INPUT_POST, 'dispos', FILTER_SANITIZE_STRING);
$type = PMF_Filter::filterInput(INPUT_POST, 'type', FILTER_SANITIZE_STRING, 'none');
$faq = new PMF_Faq($faqConfig);
$category = new PMF_Category($faqConfig);
$category->buildTree();
$tags = new PMF_Tags($faqConfig);
$export = PMF_Export::create($faq, $category, $faqConfig, $type);
$content = $export->generate($categoryId, $downwards);
// Stream the file content
$oHttpStreamer = new PMF_HttpStreamer(Response::create(), $type, $content);
if ('inline' == $inlineDisposition) {
    $oHttpStreamer->send(PMF_HttpStreamer::HTTP_CONTENT_DISPOSITION_INLINE);
} else {
    $oHttpStreamer->send(PMF_HttpStreamer::HTTP_CONTENT_DISPOSITION_ATTACHMENT);
}
开发者ID:ae120,项目名称:phpMyFAQ,代码行数:31,代码来源:export.file.php


注:本文中的PMF_Category::buildTree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。