Example #1
0
 * @license   http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1
 * @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