Beispiel #1
0
    $table->data[0][1] = print_select($files, 'icon', $icon, '', '', "", true, 0, false, __('Icon'));
    $table->data[1][0] = print_textarea("description", 5, 40, $description, '', true, __('Description'));
    if ($id > 0) {
        $table->data[2][0] = print_submit_button(__('Update'), 'upd_btn', false, 'class="sub upd"', true);
        $table->data[2][0] .= print_input_hidden('id', $id, true);
        $table->data[2][0] .= print_input_hidden('op', 'update', true);
    } else {
        $table->data[2][0] = print_submit_button(__('Create'), 'crt_btn', false, 'class="sub create"', true);
        $table->data[2][0] .= print_input_hidden('op', 'insert', true);
    }
    echo "<form id='form-file_type' method='post' action='index.php?sec=download&sec2=operation/download/manage_types'>";
    echo print_table($table, true);
    echo "</form>";
} else {
    echo "<h1>" . __('File release type management') . " &raquo; " . __('Defined types') . "</h1>";
    $types = get_file_types(false, true);
    if (!$types) {
        $types = array();
        echo "<h3 class='error'>" . __('No types found') . "</h3>";
    } else {
        $table = new stdClass();
        $table->width = '99%';
        $table->class = 'listing';
        $table->head = array();
        $table->data = array();
        $table->colspan = array();
        $table->head[0] = __('Name');
        $table->head[1] = __('Icon');
        $table->head[2] = __('Items');
        $table->head[3] = __('Delete');
        foreach ($types as $type) {
Beispiel #2
0
 // ==================================================================
 echo "<h1>" . __('Downloads') . " &raquo; " . __('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} ";
 }
 if ($id_type > 0) {