// ################## category Functions ################## // ######################################################## if ($_GET['do'] == 'category') { print_cp_header('Manage Download Categories'); print_form_header('download2newthreadadmin', 'editcat'); print_table_header('Edit a Download category'); print_select_row('Edit category<dfn>Select the category you wish to edit.</dfn>', 'edit', $categories); print_submit_row('Edit category', 0); print_cp_footer(); } // ######################################################## // ################### Do Edit Cat Form ################### // ######################################################## if ($_POST['do'] == 'editcat') { $cat = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "dl_cats WHERE `id`=" . $db->sql_prepare($_POST['edit'])); $dl->unset_subcats($cat['id']); print_cp_header('Manage Download Categories'); print_form_header('download2newthreadadmin', 'doeditcat'); print_table_header('Edit ' . $cat['name'] . '’s Thread Creation Information'); print_label_row('<input type="hidden" name="cid" value="' . $cat['id'] . '" />'); print_input_row('Thread UserId<dfn>Set to the userid that should be used to create threads. LEAVE at -1 if you want the uploader\'s userid used. <strong>NOTE: You must also allow the usergroup to create new threads for the user uploading the file!!</strong></dfn>', 'dl_userid_cat', $cat['dl_userid_cat']); //print_input_row('Forum ID<dfn>Set to the forum id where the thread will be created. LEAVE at -1 to use the global forum id.</dfn>', 'dl_forumid_cat', $cat['dl_forumid_cat']); print_forum_chooser('Forum<dfn>Set to the forum where the thread will be created. LEAVE at \'Select Forum\' to use the global forum.</dfn>', 'dl_forumid_cat', $cat['dl_forumid_cat'], null, true, false, '[%s]'); print_yes_no_row('Prevent thread creation?<dfn>If you want this category to NEVER have threads created, click "Yes".</dfn>', 'dl_no_threads', $cat['dl_no_threads']); print_submit_row('Edit category', 0); print_cp_footer(); } // ######################################################## // ################### Do Edit category ################### // ######################################################## if ($_POST['do'] == 'doeditcat') {