Esempio n. 1
0
            $item['file_type'] = stripslashes($item['file_type']);
            $item['file_name'] = stripslashes($item['file_name']);
            $item['file_size'] = $app->toMegaByte($item['file_size']);
            switch ($item['draft']) {
                case '1':
                    $item['draft_status_1'] = ' checked="checked"';
                    $item['draft_status_0'] = '';
                    break;
                default:
                    $item['draft_status_1'] = '';
                    $item['draft_status_0'] = ' checked="checked"';
                    break;
            }
            // Contents
            $item['attachments'] = $app->setAttachments();
            $item['tag_cloud'] = $app->getTagCloudArray('Downloads');
            $smileyButton = new Loggix_View($pathToIndex . '/theme/smiley-button.html');
            $item['smiley_button'] = $smileyButton->render();
            $templateFile = $pathToIndex . LM_Downloads::THEME_PATH . 'admin/edit.html';
            $contentsView = new Loggix_View($templateFile);
            $contentsVars = array('item' => $item, 'lang' => $lang, 'config' => $config);
            $contentsView->assign($contentsVars);
            $item = array('title' => $app->setTitle(array('Downloads', $lang['edit'], $item['title'])), 'contents' => $app->plugin->applyFilters('permalink-view', $contentsView->render()), 'pager' => '', 'result' => '');
            $app->display($item, $sessionState);
        }
    } else {
        header('Location: ../index.php');
    }
} else {
    header('Location: ../index.php');
}