echo "<h2>".__('KB data product access management')."</h2>"; echo "<h4>".__('Create a new product access')."</h4>"; echo '<div class="divform">'; echo "<form name=catman method='post' action='index.php?sec=kb& sec2=operation/kb/manage_perms&create2'>"; echo '<table width="100%" class="search-table">'; echo "<tr>"; echo "<td class=datos>"; echo "<b>" . __('Product') . "</b>"; if(!isset($id_product)){ $id_product = ''; } combo_kb_products ($id_product, 0); echo "<tr>"; echo "<td class=datos2>"; echo "<b>" . __('Group') . "</b>"; combo_groups_visible_for_me ($config["id_user"], 'id_group', 1, 'KR', $id_group, false, 0 ); echo "<tr><td>" . print_submit_button (__('Create'), 'crt_btn', false, 'class="sub create"', true) . "</td></tr>"; echo "</table>"; echo "</form>"; echo "</div>"; // Show list of categories // ======================= if ((!isset($_GET["update"])) AND (!isset($_GET["create"]))){
//~ $table_advanced->style[0] = 'font-weight: bold;'; //~ $table_advanced->data = array (); //~ $table_advanced->width = "99%"; //~ $table_advanced->colspan = array(); //~ $table_advanced->colspan[1][1] = 2; $table_advanced = '<tr>'; $params = array(); $params['input_id'] = 'id_company_search'; $params['input_name'] = 'id_company_search'; $params['input_value'] = $id_company; $params['title'] = __('Managed by'); $params['return'] = true; $table_advanced .= '<td>'; $table_advanced .= print_company_autocomplete_input($params); $table_advanced .= '</td><td>'; $table_advanced .= combo_kb_products ($id_category, true, 'Product type', true); $table_advanced .= '</td>'; $table_advanced .= "<td rowspan=2 valign=top>".get_last_date_control ($last_date, 'last_date_search', __('Date'), $start_date, 'start_date_search', __('Start date'), $end_date, 'end_date_search', __('End date')); $table_advanced .= '</td>'; $table_advanced .= '<tr><td>'; $progress_values = lead_progress_array (); $table_advanced .= print_select ($progress_values, 'progress_search', $progress, '', __('Any'), 0, true, 0, false, __('Lead progress') ); $table_advanced .= '</td><td>'; $table_advanced .= print_select_from_sql ('SELECT id_language, name FROM tlanguage ORDER BY name', 'id_language', $id_language, '', __('Any'), '', true, false, false, __('Language')); $table_advanced .= '<tr>'; $table->data['advanced'][2] = print_container('lead_search_advanced', __('Advanced search'), $table_advanced, 'closed', true, false,'','no_border',3); $table->colspan['advanced'][2] = 4; // Delete new lines from the string $where_clause = str_replace(array("\r", "\n"), '', $where_clause);
echo "<input type=text size=60 name='title' value='{$title}'>"; echo "<tr>"; echo "<td>"; echo __('Language'); echo "<td>"; echo print_select_from_sql('SELECT id_language, name FROM tlanguage', 'id_language', $id_language, '', __("Any"), '', true, false, false, ''); 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); 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>";
$table->data['tags'][0] .= html_render_tags_editor($tag_editor_props, true); $table_advanced->class = 'search-table'; $table_advanced->style = array(); $table_advanced->style[0] = 'font-weight: bold;'; $table_advanced->data = array(); $table_advanced->width = "99%"; $table_advanced->colspan = array(); $table_advanced->colspan[1][1] = 2; $params = array(); $params['input_id'] = 'id_company_search'; $params['input_name'] = 'id_company_search'; $params['input_value'] = $id_company; $params['title'] = __('Managed by'); $params['return'] = true; $table_advanced->data[0][0] = print_company_autocomplete_input($params); $table_advanced->data[0][1] = combo_kb_products($id_category, true, 'Product type', true); $table_advanced->data[0][2] = print_select_from_sql('SELECT id_language, name FROM tlanguage ORDER BY name', 'id_language', $id_language, '', __('Any'), '', true, false, false, __('Language')); $progress_values = lead_progress_array(); $table_advanced->data[1][0] = print_select($progress_values, 'progress_search', $progress, '', __('Any'), 0, true, 0, false, __('Lead progress')); $table_advanced->data[1][1] = get_last_date_control($last_date, 'last_date_search', __('Date'), $start_date, 'start_date_search', __('Start date'), $end_date, 'end_date_search', __('End date')); $table->data['advanced'][2] = print_container('lead_search_advanced', __('Advanced search'), print_table($table_advanced, true), 'closed', true, false); $table->colspan['advanced'][2] = 4; // Delete new lines from the string $where_clause = str_replace(array("\r", "\n"), '', $where_clause); $table->data[3][0] = print_button(__('Export to CSV'), '', false, 'window.open(\'include/export_csv.php?export_csv_leads=1&where_clause=' . str_replace('"', "\\'", $where_clause) . '\')', 'class="sub csv" style="float:right;"', true); $table->data[3][0] .= print_submit_button(__('Search'), "search_btn", false, 'class="sub search" style="float:right;"', true); $table->align[3] = "right"; $table->align[3][0] = "right"; $table->colspan[3][0] = "3"; $table->size[3][0] = "100%"; print_table($table);