コード例 #1
0
ファイル: category.translate.php プロジェクト: atlcurling/tkt
 * @category  phpMyFAQ
 * @package   Administration
 * @author    Thorsten Rinne <*****@*****.**>
 * @author    Rudi Ferrari <*****@*****.**>
 * @copyright 2006-2011 phpMyFAQ Team
 * @license   http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1
 * @link      http://www.phpmyfaq.de
 * @since     2006-09-10
 */
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
if ($permission["editcateg"]) {
    $category = new PMF_Category($current_admin_user, $current_admin_groups, false);
    $category->getMissingCategories();
    $id = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT);
    $header = sprintf('%s %s: <em>%s</em>', $PMF_LANG['ad_categ_trans_1'], $PMF_LANG['ad_categ_trans_2'], $category->categoryName[$id]['name']);
    $selected_lang = PMF_Filter::filterInput(INPUT_POST, 'trlang', FILTER_SANITIZE_STRING, $LANGCODE);
    if ($selected_lang != $LANGCODE) {
        $action = "showcategory";
        $showcat = "yes";
    } else {
        $action = "updatecategory";
        $showcat = "no";
    }
    $user_permission = $category->getPermissions('user', array($id));
    $group_permission = $category->getPermissions('group', array($id));
    ?>
        <header>
            <h2><?php