echo "<tr>"; echo "<td class=datos2 valign=top>"; echo __('Data'); echo "<td class=datos2>"; print_textarea("data", 15, 40, $data, '', false, false); echo "<tr>"; echo "<td class=datos2>"; echo __('Product'); echo "<td class=datos2>"; //combo_kb_products ($id_product); combo_product_types($product, 0); echo "<tr>"; echo "<td class=datos>"; echo __('Category'); echo "<td class=datos>"; combo_kb_categories($id_category); if ($id != -1) { echo "<tr>"; echo "<td class=datos>"; echo __('Attach'); echo "<td class=datos>"; if ($id == -1) { echo "<i>" . __('Need to create first') . "</i>"; } else { echo "<input type=file size=60 value='userfile' name='userfile'>"; echo "<tr>"; echo "<td class=datos>"; echo __('Attach description'); echo "<td class=datos>"; echo "<input type=text size=60 name='attach_description' value=''>"; }
$product = get_parameter ("product", 0); $category = get_parameter ("category", 0); $id_language = get_parameter ("id_language", ''); // Search filters echo "<div class='divform'>"; echo '<form method="post" action="?sec=kb&sec2=operation/kb/browse">'; echo '<table width="100%" class="search-table">'; echo "<tr>"; echo "<td>"; echo "<label>" . __('Product types') . "</label>"; combo_product_types($product, 1); echo "<tr>"; echo "<td>"; echo "<label>" . __('Categories') . "</label>"; combo_kb_categories ($category, 1); echo "<tr>"; echo "<td>"; echo "<label>" . __('Search') . "</label>"; echo "<input type=text name='free_text' size=25 value='$free_text'>"; echo "<tr>"; echo "<td>"; echo "<label>" . __('Language') . "</label>"; echo print_select_from_sql ('SELECT id_language, name FROM tlanguage', 'id_language', $id_language, '', __("Any"), '', true, false, false, ''); echo "<tr>"; echo "<td >"; echo "<input type=submit class='sub search' value='".__('Search')."'>"; echo "</td></tr></table></form></div>";
echo "<td class=datos>"; echo "<b>" . __('Icon') . "</b>"; echo "<td class=datos>"; $files = list_files ('images/groups_small/', "png", 1, 0); print_select ($files, 'icon', $icon, '', __('None'), ""); if ($icon) $img = "<img src='images/groups_small/$icon' />"; else $img = ''; echo "<span id='preview_image'>$img</span>"; echo "<tr>"; echo "<td class=datos2>"; echo "<b>" . __('Parent') . "</b>"; echo "<td class=datos2>"; combo_kb_categories ( $parent, true); echo "</table>"; if ($id == -1) echo "<div class='button-form'>" . print_submit_button (__('Create'), 'crt_btn', false, 'class="sub create"', true) . "</div>"; else echo "<div class='button-form'>" . print_submit_button (__('Update'), 'upd_btn', false, 'class="sub upd"', true) . "</div>"; echo "</form>"; } // Show list of categories // ======================= if ((!isset($_GET["update"])) AND (!isset($_GET["create"]))){ echo "<h2>".__('KB Category management')." </h2><h4>".__('Defined categories')."</h4>"; $sql1='SELECT * FROM tkb_category ORDER BY parent, name'; $color =0;
echo "<tr>"; echo "<td class=datos2>"; echo __('Description'); echo "<td class=datos2>"; echo "<input type=text size=50 name=description value='{$description}'>"; echo "<tr>"; echo "<td class=datos>"; echo __('Icon'); echo "<td class=datos>"; $files = list_files('images/groups_small/', "png", 1, 0); print_select($files, 'icon', $icon, '', __('None'), ""); echo "<tr>"; echo "<td class=datos2>"; echo __('Parent'); echo "<td class=datos2>"; combo_kb_categories($parent); if ($id == -1) { echo "<tr><td colspan=2>" . print_submit_button(__('Create'), 'crt_btn', false, 'class="sub create"', true) . "</td></tr>"; } else { echo "<tr><td colspan=2>" . print_submit_button(__('Update'), 'upd_btn', false, 'class="sub upd"', true) . "</td></tr>"; } echo "</table>"; echo "</form>"; } // Show list of categories // ======================= if (!isset($_GET["update"]) and !isset($_GET["create"])) { echo "<h1>" . __('KB Category management') . " » " . __('Defined categories') . "</h1>"; $sql1 = 'SELECT * FROM tkb_category ORDER BY parent, name'; $color = 0; if ($result = mysql_query($sql1)) {