function get_feeds_list() { require_once PATH_TO_ROOT . '/download/download_cats.class.php'; $dl_cats = new DownloadCats(); return $dl_cats->get_feeds_list(); }
<?php require_once '../kernel/begin.php'; load_module_lang('download'); $Cache->load('download'); include_once 'download_auth.php'; import('util/date'); import('util/mini_calendar'); include_once 'download_cats.class.php'; $download_categories = new DownloadCats(); $edit_file_id = retrieve(GET, 'edit', 0); $add_file = retrieve(GET, 'new', false); $preview = retrieve(POST, 'preview', false); $submit = retrieve(POST, 'submit', false); $selected_cat = retrieve(GET, 'idcat', 0); $delete_file = retrieve(GET, 'del', 0); if ($delete_file || $submit && ($add_file || $edit_file_id > 0)) { $Session->csrf_get_protect(); } $file_title = retrieve(POST, 'title', ''); $file_image = retrieve(POST, 'image', ''); $file_contents = retrieve(POST, 'contents', '', TSTRING_AS_RECEIVED); $file_short_contents = retrieve(POST, 'short_contents', '', TSTRING_AS_RECEIVED); $file_url = retrieve(POST, 'url', ''); $file_timestamp = retrieve(POST, 'timestamp', 0); $file_size = retrieve(POST, 'size', 0.0, TUNSIGNED_FLOAT); $file_hits = retrieve(POST, 'count', 0, TUNSIGNED_INT); $file_cat_id = retrieve(REQUEST, 'idcat', 0); $file_visibility = retrieve(POST, 'visibility', 0); $file_approved = retrieve(POST, 'approved', false); $ignore_release_date = retrieve(POST, 'ignore_release_date', false);
<?php define('NO_SESSION_LOCATION', true); require_once '../kernel/begin.php'; require_once '../kernel/header_no_display.php'; if ($User->check_level(ADMIN_LEVEL)) { include_once 'download_cats.class.php'; $download_categories = new DownloadCats(); $id_up = retrieve(GET, 'id_up', 0); $id_down = retrieve(GET, 'id_down', 0); $id_show = retrieve(GET, 'show', 0); $id_hide = retrieve(GET, 'hide', 0); $cat_to_del = retrieve(GET, 'del', 0); $result = false; if ($id_up > 0) { $result = $download_categories->move($id_up, MOVE_CATEGORY_UP); } elseif ($id_down > 0) { $result = $download_categories->move($id_down, MOVE_CATEGORY_DOWN); } elseif ($id_show > 0) { $result = $download_categories->change_visibility($id_show, CAT_VISIBLE, LOAD_CACHE); } elseif ($id_hide > 0) { $result = $download_categories->change_visibility($id_hide, CAT_UNVISIBLE, LOAD_CACHE); } if ($result) { $cat_config = array('xmlhttprequest_file' => 'xmlhttprequest_cats.php', 'administration_file_name' => 'admin_download_cat.php', 'url' => array('unrewrited' => 'download.php?id=%d', 'rewrited' => 'category-%d+%s.php')); $download_categories->set_display_config($cat_config); $Cache->load('download', RELOAD_CACHE); echo $download_categories->build_administration_interface(AJAX_MODE); } } include_once '../kernel/footer_no_display.php';
<?php require_once '../admin/admin_begin.php'; load_module_lang('download'); define('TITLE', $LANG['administration']); require_once '../admin/admin_header.php'; include_once 'download_auth.php'; $Cache->load('download'); include_once 'download_cats.class.php'; $download_categories = new DownloadCats(); $id_up = retrieve(GET, 'id_up', 0); $id_down = retrieve(GET, 'id_down', 0); $cat_to_del = retrieve(GET, 'del', 0); $cat_to_del_post = retrieve(POST, 'cat_to_del', 0); $id_edit = retrieve(GET, 'edit', 0); $new_cat = !empty($_GET['new']) ? true : false; $error = retrieve(GET, 'error', ''); if ($id_up > 0) { $download_categories->move($id_up, MOVE_CATEGORY_UP); import('content/syndication/feed'); Feed::clear_cache('download'); redirect(url('admin_download_cat.php')); } elseif ($id_down > 0) { $download_categories->move($id_down, MOVE_CATEGORY_DOWN); import('content/syndication/feed'); Feed::clear_cache('download'); redirect(url('admin_download_cat.php')); } elseif ($cat_to_del > 0) { $Template->set_filenames(array('admin_download_cat_remove' => 'download/admin_download_cat_remove.tpl')); $Template->assign_vars(array('CATEGORY_TREE' => $download_categories->build_select_form(0, 'id_parent', 'id_parent', $cat_to_del), 'IDCAT' => $cat_to_del, 'L_REMOVING_CATEGORY' => $DOWNLOAD_LANG['removing_category'], 'L_EXPLAIN_REMOVING' => $DOWNLOAD_LANG['explain_removing_category'], 'L_DELETE_CATEGORY_AND_CONTENT' => $DOWNLOAD_LANG['delete_category_and_its_content'], 'L_MOVE_CONTENT' => $DOWNLOAD_LANG['move_category_content'], 'L_SUBMIT' => $LANG['delete'], 'U_FORM_TARGET' => HOST . DIR . url('/download/admin_download_cat.php?token=' . $Session->get_token()))); include_once 'admin_download_menu.php';