echo "<h2>".__('File release category access management')."</h2>"; echo "<h4>".__('Create a new category access')."</h4>"; echo "<form name=catman method='post' action='index.php?sec=download& sec2=operation/download/manage_perms&create2'>"; echo '<table width="100%" class="search-table-button">'; echo "<tr>"; echo "<td class=datos>"; echo __('Category'); echo "<td class=datos>"; if(!isset($id_category)){ $id_category = ''; } combo_download_categories ($id_category, 0); echo "<tr>"; echo "<td class=datos2>"; echo __('Group'); echo "<td class=datos2>"; combo_groups_visible_for_me ($config["id_user"], 'id_group', 1, 'KR', $id_group, false, 0 ); echo "</table>"; echo "<div class='button-form'>"; if ($id == -1) echo print_submit_button (__('Create'), 'crt_btn', false, 'class="sub create"', true); else echo print_submit_button (__('Update'), 'upd_btn', false, 'class="sub upd"', true); echo "</div>"; echo "</form>";
// Show search controls // ================================================================== echo "<h1>" . __('Downloads') . " » " . __('Defined data') . "</h1>"; // Search parameter $free_text = get_parameter("free_text", ""); $category = get_parameter("id_category", 0); $id_type = get_parameter("id_type", 0); // Search filters $table = new stdClass(); $table->width = '99%'; $table->class = 'search-table-button'; $table->data = array(); $table->colspan = array(); $table->colspan[1][0] = 3; $table->data[0][0] = print_input_text('free_text', $free_text, '', 40, 100, true, __('Search')); $table->data[0][1] = combo_download_categories($id_category, true, true, true); $table->data[0][2] = print_select(get_file_types(true), 'id_type', $id_type, '', __('Any'), 0, true, 0, false, __('Type')); $table->data[1][0] = print_submit_button(__('Search'), "search_btn", false, 'class="sub search"', true); echo '<form method="post" action="index.php?sec=download&sec2=operation/download/browse">'; echo print_table($table, true); echo "</form>"; // ================================================================== // Download listings // ================================================================== $sql_filter = ""; if ($free_text != "") { $sql_filter .= " AND name LIKE '%{$free_text}%' OR description LIKE '%{$free_text}%'"; } if ($id_category > 0) { $sql_filter .= " AND id_category = {$id_category} "; }