$table->data = array(); $table->colspan[7][0] = 2; /* First row */ $table->data[0][0] = print_input_text('name', $name, '', 20, 0, true, __('Name')); if ($config['enteprise'] == 1) { $table->data[0][1] = print_checkbox('forced_email', 1, $forced_email, true, __('Forced email')); } else { $table->data[0][1] = print_checkbox('enforce_soft_limit', 1, $enforce_soft_limit, true, __('Enforce soft limit')); } /* Banner preview image is a bit bigger */ $table->data[0][2] = '<span id="banner_preview">'; if ($id && $banner != '') { $table->data[0][2] .= ' <img src="images/group_banners/' . $banner . '" />'; } $table->data[0][2] .= '</span>'; $table->data[2][0] = print_select_from_sql('SELECT id_grupo, nombre FROM tgrupo ORDER BY nombre', 'parent', $parent, '', 'None', '', true, false, false, __('Parent')); //$table->data[2][1] = combo_user_visible_for_me ($id_user_default, "id_user_default", 0, "IR", true, __('Default user')); $params_creator['input_id'] = 'text-id_user'; $params_creator['input_name'] = 'id_user'; $params_creator['input_value'] = $id_user; $params_creator['title'] = __('Default user'); $params_creator['return'] = true; $params_creator['return_help'] = true; $table->data[2][1] = user_print_autocomplete_input($params_creator); /*$table->data[2][1] = print_input_text_extended ('id_user', $id_user, 'text-id_user', '', 15, 30, false, '', array('style' => 'background: url(' . $src_code . ') no-repeat right;'), true, '', __('Default user')) . print_help_tip (__("Type at least two characters to search"), true);*/ $icons = list_files('images/groups_small/', 'png', 0, true, ''); $table->data[3][0] = print_select($icons, 'icon', $icon, '', 'None', '', true, false, false, __('Icon')); $table->data[3][0] .= ' <span id="icon_preview">'; if ($id && $icon != '') {
} echo "<h3 class='suc'>" . __('Disabled bad addresses') . "</h3>"; $id = 0; } echo '<br>'; echo '<div id="loading" style="display:none; width: 90%; margin-left: 0;">'; echo print_image("images/wait.gif", true, array("border" => '0')) . '<br />'; echo '<strong>' . __('Please wait...') . '</strong>'; echo '</div>'; // General issue listing echo "<h2>" . __('Newsletter queue management') . "</h2>"; if ($manager) { echo '<form method="post" action="index.php?sec=customers&sec2=operation/newsletter/queue_manager&create=1">'; echo "<table width=90% class=databox>"; echo "<tr><td>"; echo print_select_from_sql('SELECT id, email_subject FROM tnewsletter_content ORDER BY email_subject', 'id_newsletter_content', 0, '', '', '', true, false, false, ""); echo "<td>"; print_submit_button(__('Create'), 'new_btn', false, 'class="sub next"'); echo "</tr></table>"; echo '</form>'; } $sql = "SELECT * FROM tnewsletter_queue ORDER BY datetime DESC"; $queue = get_db_all_rows_sql($sql); if ($queue !== false) { $table->width = "90%"; $table->class = "listing"; $table->data = array(); $table->style = array(); $table->style[0] = 'font-weight: bold'; $table->style[2] = 'font-size: 9px'; $table->style[1] = 'font-size: 10px';
} print_table ($table); $table->data = array (); echo '<a href="javascript:;" onclick="$(\'#advanced_div\').slideToggle (); return false">'; echo __('Advanced search >>'); echo '</a>'; echo '<div id="advanced_div" style="padding: 0px; margin: 0px; display: none;">'; $table->data[0][0] = print_select_from_sql ('SELECT id, name FROM two_category ORDER BY name', 'id_category', $id_category, '', __("Any"), 0, true, false, false, __('Category')); $table->data[0][1] = print_select_from_sql (get_projects_query($config['id_user']), 'id_project', $id_project, '', __("Any"), 0, true, false, false, __('Project')); $table->data[0][2] = print_checkbox ("need_validation", 1, $need_validation, true, __("Require validation")); print_table ($table); echo "</div>"; echo '</form>'; if ($owner == $config['id_user'] && $creator == "") { $order_by = "ORDER BY created_by_user, priority, last_update DESC"; } elseif ($creator == $config['id_user'] && $owner == "") { $order_by = "ORDER BY assigned_user, priority, last_update DESC"; } else { $order_by = "ORDER BY priority, last_update DESC"; }
} else { echo "<h3>" . __('Update existing KB item') . "</a></h3>"; echo "<form id='form-kb_item' enctype='multipart/form-data' name=prodman2 method='post' action='index.php?sec=kb&sec2=operation/kb/manage_data&update2'>"; echo "<input id='id_kb_item' type=hidden name=id value='{$id}'>"; } echo '<table width="90%" class="databox">'; echo "<tr>"; echo "<td class=datos>"; echo __('Title'); echo "<td class=datos>"; echo "<input id='text-name' 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); combo_product_types($product, 0); echo "<tr>"; echo "<td class=datos>"; echo __('Category'); echo "<td class=datos>";
$id_sla_type = $sla["id_sla_type"]; } $table = new StdClass(); $table->width = "100%"; $table->class = "search-table-button"; $table->data = array (); $table->colspan = array (); $table->align = array (); $table->colspan[3][0] = 4; $table->data[0][0] = print_input_text ("name", $name, "", 30, 100, true, __('SLA name')); $table->data[0][1] = print_checkbox ('enforced', 1 ,$enforced, true, __('Enforced')); $table->data[0][2] = print_select_from_sql ('SELECT id, name FROM tsla ORDER BY name', 'id_sla_base', $id_sla_base, '', __('None'), 0, true, false, false, __('SLA Base')); $id_sla_type_arr[0] = __("Normal SLA"); $id_sla_type_arr[1] = __("Third party SLA"); $id_sla_type_arr[2] = __("Both"); $table->data[0][3] = print_select ($id_sla_type_arr, 'id_sla_type', $id_sla_type,'', '', '0', true, 0, false, __('SLA Type')); $table->data[1][0] = print_label(__('Max. response time (in hours)'), '', 'text', true); $table->data[1][0] .= "<input type='text' name='min_response' id='text-min_response' value='$min_response' size='5' maxlenght='100' onChange='hours_to_dms(\"min\")'>"; $min_response_time = incidents_hours_to_dayminseg ($min_response); $table->data[1][0] .= print_input_text ('min_response_time', $min_response_time, '', 7, 100, true, '', true); $table->data[1][1] = print_label(__('Max. resolution time (in hours)'), '', 'text', true);
echo '</tr>'; // Owner $id_owner = get_db_value ( 'id_owner', 'tproject', 'id', $id_project); echo '<tr>'; echo "<td colspan=2><b>".__('Manager')." </b></td>"; echo "</tr><tr>"; echo "<td colspan=2>" . print_input_text_extended ('id_owner', $owner, 'text-id_owner', '', 25, 20, false, '', '', true, '',''). "</td>" ; echo "</tr>"; // Project group echo "<tr>"; echo "<td colspan=2><b>". __('Project group')."</b><br>"; echo "</tr><tr>"; if (!$clean_output) { echo "<td colspan=2>". print_select_from_sql ("SELECT * from tproject_group ORDER BY name", "id_project_group", $id_project_group, "", __('None'), '0', true, false, true, false) ."</td>"; } else { echo "<td colspan=2>". get_db_value ("name", "tproject_group", "id", $id_project_group) ."</td>"; } echo "</tr>"; // CC echo '<tr>'; echo '<td colspan=2><b>'.__('CC').print_help_tip (__("Email to notify changes in workunits"), true).' </b></td>'; echo '</tr><tr>'; echo '<td colspan=2><input type="text" name="cc" size=25 value="'.$cc.'"></td>'; echo '</tr>'; // start and end date echo '<tr>'; echo '<td><b>'.__('Start').' </b>';
} $activity_order_image = " <a href='javascript:changeActivityOrder(\"DESC\")'><img src='images/block_orange.png'></a>"; $company_order_image = " <a href='javascript:changeCompanyOrder(\"ASC\")'><img src='images/block_orange.png'></a>"; } else { $order_by .= "tcompany.last_update DESC"; $activity_order_image = " <a href='javascript:changeActivityOrder(\"ASC\")'><img src='images/arrow_up_orange.png'></a>"; $company_order_image = " <a href='javascript:changeCompanyOrder(\"ASC\")'><img src='images/block_orange.png'></a>"; $billing_order_image = " <a href='javascript:changeBillingOrder(\"ASC\")'><img src='images/block_orange.png'></a>"; } $search_params = "&search_manager={$search_manager}&search_text={$search_text}&search_role={$search_role}&search_country={$search_country}&search_parent={$search_parent}&search_date_begin={$search_date_begin}&search_date_end={$search_date_end}&search_min_billing={$search_min_billing}&order_by_activity={$order_by_activity}&order_by_company={$order_by_company}&order_by_billing={$order_by_billing}"; $table->width = '99%'; $table->class = 'search-table-button'; $table->style = array(); $table->data = array(); $table->data[0][0] = print_input_text("search_text", $search_text, "", 15, 100, true, __('Search')); $table->data[0][1] = print_select_from_sql('SELECT id, name FROM tcompany_role ORDER BY name', 'search_role', $search_role, '', __('Select'), 0, true, false, false, __('Company Role')); $table->data[0][2] = print_input_text("search_country", $search_country, "", 10, 100, true, __('Country')); $table->data[0][3] = print_input_text_extended('search_manager', $search_manager, 'text-user', '', 15, 30, false, '', array(), true, '', __('Manager')) . print_help_tip(__("Type at least two characters to search"), true); // $companies_name = crm_get_companies_list("", false, "ORDER BY name", true); // $table->data[1][0] = print_select ($companies_name, 'search_parent', $search_parent, '', __('Any'), 0, true, false, false, __('Parent')); $params = array(); $params['input_id'] = 'search_parent'; $params['input_name'] = 'search_parent'; $params['input_value'] = $search_parent; $params['title'] = __('Parent'); $params['return'] = true; $table->data[1][0] = print_company_autocomplete_input($params); $table->data[1][1] = print_input_text('search_date_begin', $search_date_begin, '', 15, 20, true, __('Date from')); $table->data[1][2] = print_input_text('search_date_end', $search_date_end, '', 15, 20, true, __('Date to')); $table->data[1][3] = print_input_text('search_min_billing', $search_min_billing, '', 15, 20, true, __('Min. billing')); $buttons = print_submit_button(__('Search'), "search_btn", false, 'class="sub search"', true);
$search_parent = get_parameter("search_parent"); $search_date_begin = (string) get_parameter('search_date_begin'); $search_date_end = (string) get_parameter('search_date_end'); $date = false; if ($search_date_end == 'undefined') { $search_date_end = ''; } $table->width = '99%'; $table->class = 'search-table-button'; $table->style = array(); $table->data = array(); $table->data[0][0] = print_input_text("search_text", $search_text, "", 15, 100, true, __('Search')); $table->data[0][1] = print_select_from_sql('SELECT id, name FROM tcompany_role ORDER BY name', 'search_role', $search_role, '', __('Select'), 0, true, false, false, __('Company Role')); $table->data[0][2] = print_input_text("search_country", $search_country, "", 10, 100, true, __('Country')); $table->data[0][3] = print_input_text_extended('search_manager', $search_manager, 'text-search_user', '', 15, 30, false, '', array(), true, '', __('Manager')) . print_help_tip(__("Type at least two characters to search"), true); $table->data[1][0] = print_select_from_sql('SELECT id, name FROM tcompany ORDER BY name', 'search_parent', $search_parent, '', __('Select'), 0, true, false, false, __('Parent')); $table->colspan[1][0] = 2; $table->data[1][2] = print_input_text('search_date_begin', $search_date_begin, '', 15, 20, true, __('Date from')); $table->data[1][3] = print_input_text('search_date_end', $search_date_end, '', 15, 20, true, __('Date to')); $table->data['button'][0] = "<input type='button' class='sub search' onClick='javascript: loadParamsCompany(\".{$search_text}.\");' value='" . __("Search") . "''>"; $table->colspan['button'][0] = 4; echo '<form id="form-company_search" method="post" action="index.php?sec=customers&sec2=operation/companies/company_detail">'; print_table($table); echo '</form>'; $where_clause = ''; if ($search) { if ($search_text != "") { $where_clause .= sprintf(' AND ( name LIKE "%%%s%%" OR country LIKE "%%%s%%") ', $search_text, $search_text); } if ($search_role != 0) { $where_clause .= sprintf(' AND id_company_role = %d', $search_role);
$comments = $manufacturer["comments"]; $address = $manufacturer["address"]; $id_sla = $manufacturer["id_sla"]; $id_company_role = $manufacturer["id_company_role"]; } $table = new StdClass(); $table->width = "100%"; $table->class = "search-table-button"; $table->data = array (); $table->colspan = array (); $table->colspan[1][0] = 2; $table->colspan[2][0] = 2; $table->data[0][0] = print_input_text ("name", $name, "", 60, 100, true, __('Name')); $table->data[0][1] = print_select_from_sql ('SELECT id, name FROM tcompany_role ORDER BY name', 'id_company_role', $id_company_role, '', __('Select'), '0', true, false, false, __('Company role')); /*$table->data[1][1] = print_select_from_sql ('SELECT id, name FROM tsla ORDER BY name', 'id_sla', $id_sla, '', __('Select'), '0', true, false, false, __('Base SLA'));*/ $table->data[1][0] = print_textarea ("address", 4, 1, $address, '', true, __('Address')); $table->data[2][0] = print_textarea ("comments", 10, 1, $comments, '', true, __('Comments')); echo '<form id="form-manufacturer_detail" method="post" action="index.php?sec=inventory&sec2=operation/manufacturers/manufacturer_detail">'; print_table ($table); echo '<div style="width:100%;">'; unset($table->data); $table->width = '100%'; $table->class = "button-form"; if ($id) { $button = print_submit_button (__('Update'), "update_btn", false, 'class="sub upd"', true);
} else { if (!$manager) { include "general/noaccess.php"; exit; } } require_once 'include/functions_crm.php'; $merge = get_parameter('merge', 0); if ($merge) { $id_newsletter_source = get_parameter('id_newsletter_source'); $id_newsletter_destination = get_parameter('id_newsletter_destination'); if ($id_newsletter_source == $id_newsletter_destination) { echo '<h3 class="error">' . __('Source and destination must be different') . '</h3>'; } else { echo crm_merge_newsletter_address($id_newsletter_source, $id_newsletter_destination); } } echo "<h2>" . __('Newsletter address merge') . "</h2>"; $table->width = '98%'; $table->class = 'databox'; $table->colspan = array(); $table->data = array(); $table->data[0][0] = print_select_from_sql('SELECT id, name FROM tnewsletter ORDER BY name', 'id_newsletter_source', $id_newsletter_source, '', '', '', true, false, false, __('Source')); $table->data[0][1] = print_select_from_sql('SELECT id, name FROM tnewsletter ORDER BY name', 'id_newsletter_destination', $id_newsletter_destination, '', '', '', true, false, false, __('Destination')); echo '<form method="post" action="index.php?sec=customers&sec2=operation/newsletter/manage_address">'; print_table($table); echo '<div class="button" style="width: ' . $table->width . '">'; print_submit_button(__('Merge'), 'merge_btn', false, 'class="sub next"'); print_input_hidden('merge', 1); echo '</div>'; echo '</form>';
echo __('Standard user') . ' <input type="radio" class="chk" name="nivel" value="0" checked>'; echo " "; echo __('External user') . ' <input type="radio" class="chk" name="nivel" value="-1">'; } else { echo __('Administrator') . ' <input type="radio" class="chk" name="nivel" value="1">'; echo " "; echo __('Standard user') . ' <input type="radio" class="chk" name="nivel" value="0">'; echo " "; echo __('External user') . ' <input type="radio" class="chk" name="nivel" value="-1" checked>'; } print_help_tip(__("External users cannot work inside a group, will show only it's own data. Standard users works with the ACL system, and administrators have full access to everything", false)); echo "<tr>"; echo "<td>"; echo __('Language'); echo "<td>"; print_select_from_sql("SELECT * FROM tlanguage", "lang", $lang, '', __('Default'), '', false, false, true, false); //Print user custom fields //Clean cache to avoid strange behaviour clean_cache_db(); foreach ($user_fields as $u) { echo "<tr>"; echo "<td>"; echo $u["label"]; echo "</td>"; $sql_data = sprintf('SELECT data FROM tuser_field_data WHERE id_user = "******" AND id_user_field = %d', $update_user, $u["id"]); $result = process_sql($sql_data); $data = ""; if ($result) { $data = safe_output($result[0]["data"]); } switch ($u["type"]) {
$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); $form .= "<div class='divresult_left'>"; $form .= print_table ($table,true); $form .= '</div>'; $table->data = array (); $form .= "<div class='divform_right'>"; $form .= "<div class='button-form'><ul>"; $form .= '<li>' . print_button(__('Export to CSV'), '', false,
echo '<td>' . $user['id_usuario'] . '</td>'; echo '<td>' . $user['nombre_real'] . '</td>'; echo '<td>' . $user['comentarios'] . '</td>'; echo '</tr>'; $total_users++; } if ($total_users == 0) { echo '<tr colspan="4">' . __('No users found') . '</tr>'; } if (defined('AJAX')) { return; } } $table->data = array(); $table->width = '90%'; $table->data[0][0] = print_select_from_sql('SELECT id,name FROM trole ORDER BY 2', 'user_profile_search', $id_profile, '', __('Any'), 0, true, false, false, __('Role')); $table->data[0][1] = print_select(get_user_groups(), 'user_group_search', $id_group, '', __('Any'), -1, true, false, false, __('Group')); $table->data[2][0] = print_input_text('search_string', '', '', 20, 255, true, __('Name')); $table->data[2][1] = print_submit_button(__('Search'), 'search_button', false, 'class="sub search"', true); echo '<form id="user_search_form" method="post">'; print_table($table); print_input_hidden('search', 1); echo '</form>'; unset($table); $table->class = 'hide result_table listing'; $table->width = '90%'; $table->id = 'user_search_result_table'; $table->head = array(); $table->head[0] = __('Username'); $table->head[1] = __('Real name'); $table->head[2] = __('Comments');
$mail = str_replace ("_DEST_NAME_", $lead["fullname"], $mail); $mail = str_replace ("_DEST_EMAIL_", $lead["email"], $mail); $mail = str_replace ("_SRC_NAME_", $user["nombre_real"], $mail); $mail = str_replace ("_SRC_EMAIL_", $user["direccion"], $mail); $sql = "SELECT id, name FROM tcrm_template WHERE id_language = '". $lead["id_language"]. "' ORDER BY name DESC"; $id_template = (int) get_parameter ("id_template"); echo "<div class='divform'>"; // Show form with available templates for this useraco echo '<form method="post" id="lead_mail_filter">'; echo "<table width=100% class='search-table'>"; echo "<tr><td>"; echo print_select_from_sql ($sql, 'id_template', $id_template, '', __("None"), 0, true, false, true, __("CRM Template to use")); echo "</td></tr><tr><td>"; print_submit_button (__('Apply'), 'apply_btn', false, 'class="sub upd"', false); print_input_hidden ('id', $id); echo "</td></tr></table>"; echo "</form>"; echo "</div>"; $sql = "SELECT `description` FROM tlead_activity WHERE id_lead = $id ORDER BY creation DESC LIMIT 1"; $result = process_sql ($sql); if ($result !== false) { $last_email = $result[0]['description'];
$name = $template["name"]; $description = $template["description"]; $id_language = $template["id_language"]; $id_company = $template["id_company"]; $subject = $template["subject"]; } $table->width = '99%'; $table->class = 'search-table-button'; $table->colspan = array(); $table->colspan[3][0] = 2; $table->data = array(); $table->data[1][0] = print_input_text('name', $name, '', 50, 100, true, __('Name')); $table->data[1][1] = print_select_from_sql('SELECT id_language, name FROM tlanguage ORDER BY name', 'id_language', $id_language, '', '', '', true, false, false, __('Language')); $sql2 = "SELECT id, name FROM tcompany ORDER by name"; $table->data[2][0] = print_input_text('subject', $subject, '', 70, 200, true, __('Subject')); $table->data[2][1] = print_select_from_sql($sql2, 'id_company', $id_company, '', __("None"), 0, true, false, true, __("Managed by")); $table->data[3][0] = print_textarea('description', 20, 60, $description, '', true, __('Contents')); if ($operation == "create") { $button = print_submit_button(__('Create'), 'crt', false, 'class="sub create"', true); $button .= print_input_hidden('operation', 'insert', true); } else { $button = print_submit_button(__('Update'), 'crt', false, 'class="sub upd"', true); $button .= print_input_hidden('operation', 'update', true); $button .= print_input_hidden('id', $id, true); } $table->data['button'][0] = $button; $table->colspan['button'][0] = 2; echo '<form id="form-template_manager" method="post" action="index.php?sec=leads&sec2=operation/leads/template_manager">'; print_table($table); echo '</form>'; }
} $project_info .= "</td>"; $project_info .= "</tr>"; // start and end date $project_info .= '<tr><td width="25%"><b>' . __('Start') . ' </b><br>'; $project_info .= print_input_text('start_date', $start_date, '', 10, 20, true); $project_info .= '<td width="25%"><b>' . __('End') . ' </b><br>'; $project_info .= print_input_text('end_date', $end_date, '', 10, 20, true); $id_owner = get_db_value('id_owner', 'tproject', 'id', $id_project); $project_info .= '<td width="25%">'; $project_info .= "<b>" . __('Project manager') . " </b><br>"; $project_info .= print_input_text_extended('id_owner', $owner, 'text-id_owner', '', 10, 20, false, '', '', true, '', ''); $project_info .= '<td width="25%"><b>'; $project_info .= __('Project group') . "</b><br>"; if (!$clean_output) { $project_info .= print_select_from_sql("SELECT * from tproject_group ORDER BY name", "id_project_group", $id_project_group, "", __('None'), '0', true, false, true, false); } else { $project_info .= get_db_value("name", "tproject_group", "id", $id_project_group); } // CC $project_info .= '<tr><td class="datos" colspan=3><b>' . __('CC') . print_help_tip(__("Email to notify changes in workunits"), true) . ' </b><br>'; $project_info .= '<input type="text" name="cc" size=70 value="' . $cc . '">'; // Description $project_info .= "<tr><td colspan=4><b>" . __("Description") . "</b><br>"; $project_info .= '<textarea name="description" style="height: 40px;">'; $project_info .= $description; $project_info .= "</textarea></td></tr>"; if (!$clean_output) { $project_info .= "<tr><td colspan=4>"; $project_info .= '<div style="width:100%; text-align: right;">'; if ($id_project && $project_access['manage']) {
// http://www.artica.es <*****@*****.**> // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. global $config; check_login(); if (!give_acl($config["id_user"], 0, "CN")) { audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access newsletter management"); require "general/noaccess.php"; exit; } $id_newsletter = 0; $data = ""; echo "<h2>" . __("Addresses bulk creation") . "</h2>"; $table->width = '90%'; $table->class = 'databox'; $table->colspan = array(); $table->data = array(); $table->data[1][0] = print_select_from_sql('SELECT id, name FROM tnewsletter ORDER BY name', 'id_newsletter', $id_newsletter, '', '', '', true, false, false, __('Newsletter')); $table->data[2][0] = print_textarea("data", 15, 1, $data, 'data', true, "<br>" . __('Enter data: email, name, one per file')); echo '<form method="post" action="index.php?sec=customers&sec2=operation/newsletter/address_definition">'; print_table($table); echo '<div class="button" style="width: ' . $table->width . '">'; print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"'); print_input_hidden('create', 1); echo "</div>"; echo "</form>";
$company_name = '<i>-'.__('None').'-</i>'; $table->data[1][0] = "<b>".__('Company')."</b><br>$company_name"; } else { $table->data[1][0] = "<b>".__('Company')."</b><br>$company_name"; $table->data[1][0] .= " <a href='index.php?sec=customers&sec2=operation/companies/company_detail&id=$id_company'>"; $table->data[1][0] .= "<img src='images/company.png'></a>"; } $table->data[1][1] = print_input_text ('location', $location, '', 20, 250, true, __('Location')); if ($has_permission) { $table->data[2][0] = print_input_text ('email', $email, '', 20, 60, true, __('Email')); $table->data[2][0] .= print_help_tip (__('You can add several email addresses, separated by commas.'), true); $table->data[2][1] = print_input_text ('phone', $phone, '', 20, 40, true, __('Telephone')); $table->data[4][0] = print_select_from_sql ("SELECT id_language, name FROM tlanguage ORDER BY name", 'language_code', $lang, '', __('Default'), '', true, false, false, __('Language')); $table->data[4][1] = "<b>".__('Total tickets opened'). "</b><br><input type=text readonly size=5 value='". get_db_sql ("SELECT COUNT(*) FROM tincidencia WHERE id_creator = '".$id_user."'"). "'>"; $table->data[5][0] = print_textarea ('comments', 8, 55, $comments, '', true, __('Comments')); } else { $email = ($email != '') ? $email : __('Not provided'); $phone = ($phone != '') ? $phone : __('Not provided'); $table->data[2][0] = print_label (__('Email'), '', '', true, $email); $table->data[2][1] = print_label (__('Telephone'), '', '', true, $phone); if ($user['comentarios'] != '') $table->data[3][0] = print_label (__('Comments'), '', '', true, $comments); } if ($has_permission) {
echo "<h1>" . __('Ticket reports') . "</h1>"; echo "</div>"; $table_search = new stdClass(); $table_search->width = '99%'; $table_search->class = 'search-table-button'; $table_search->size = array(); $table_search->style = array(); $table_search->colspan = array(); $table_search->rowspan = array(); $table_search->colspan[4][0] = 4; $table_search->data = array(); $sql = sprintf('SELECT id, name FROM tcustom_search WHERE id_user = "******" AND section = "incidents" ORDER BY name', $config['id_user']); $table_search->data[0][0] = print_select_from_sql($sql, 'saved_searches', $id_search, '', __('Select'), 0, true, false, true, __('Custom searches')); $table_search->data[1][0] = print_checkbox_extended('show_list', 1, $show_list, false, '', '', true, __('Show list')); $table_search->data[2][0] = print_checkbox_extended('show_stats', 1, $show_stats, false, '', '', true, __('Show stats')); $table_search->data[4][0] = print_submit_button(__('Search'), 'search', false, 'class="sub search"', true); $table_search->colspan[4][0] = 4; echo '<form method="post">'; print_table($table_search); echo '</form>'; if (isset($search)) { echo "<div id='incident-search-content'>"; echo "<h1>" . __('Report results'); echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li>"; echo '<a href="index.php?sec=reporting&sec2=operation/reporting/incidents_html &custom_search=' . $id_search . '&show_stats=' . $show_stats . '&show_list=' . $show_list . '&clean_output=1&pdf_output=1">
print_table($table); print_table_pager(); unset($table); $table->class = 'result_table listing'; $table->width = '99%'; $table->id = 'incident_massive'; $table->style = array(); $table->head[0] = print_label(__('Status'), '', '', true); $table->head[1] = print_label(__('Priority'), '', '', true); $table->head[2] = print_label(__('Resolution'), '', '', true); $table->head[3] = print_label(__('Assigned user'), '', '', true); echo '<br><h2> ' . print_image('images/arrow_ele_blue.png', true) . ' ' . __('Massive operations over selected items') . '</h2>'; $table->data[0][0] = combo_incident_status(-1, 0, 0, true, true); $table->data[0][1] = print_select(get_priorities(), 'mass_priority', -1, '', __('Select'), -1, true); $table->data[0][2] = combo_incident_resolution($resolution, $disabled, true, true); $table->data[0][3] = print_select_from_sql('SELECT id_usuario, nombre_real FROM tusuario;', 'mass_assigned_user', '0', '', __('Select'), -1, true); print_table($table); echo "<div style='width:" . $table->width . "'>"; print_submit_button(__('Update selected items'), 'massive_update', false, 'class="sub next" style="float:right;'); echo "</div>"; /* End of first tab container */ echo '</div>'; echo '<div id="incident-stats" style="display">TODO STATS</div>'; } ////// echo '</div>'; /* End of tabs code */ ?> <script type="text/javascript" src="include/js/jquery.ui.datepicker.js"></script> <script type="text/javascript" src="include/languages/date_<?php
if ($view_disabled) { echo '<h2>'.__('Projects').'</h2>'; echo '<h4>'.__('Archived projects'); echo integria_help ("archieved_projects", true); echo '</h4>'; } $table = new stdClass; $table->class = 'search-table'; $table->style = array (); $table->data = array (); $table->data[0][0] = '<b>'.__('Search').'</b>'; $table->data[1][0] = print_input_text ("search_text", $search_text, "", 25, 100, true); $table->data[2][0] = '<b>'.__('Group').'</b>'; $table->data[3][0] = print_select_from_sql ("SELECT * FROM tproject_group", "search_id_project_group", $search_id_project_group, '', __("Any"), '0', true, false, true, false); $table->data[4][0] = print_submit_button (__('Search'), "search_btn", false, '', true); $table->data[4][0] .= print_input_hidden ('delete_project', 1); echo '<div class="divform">'; echo '<form method="post" action="index.php?sec=projects&sec2=operation/projects/project&view_disabled=1">'; print_table ($table); echo '</form>'; echo '</div>'; unset ($table); $table = new stdClass; $table->width = '99%'; $table->class = 'listing'; $table->head = array (); $table->head[0] = __('Name');
$table = new StdClass(); $table->class = 'search-table-button'; $table->width = '100%'; $table->id = 'incident_massive'; $table->data = array(); $table->style = array (); $table->data[0][0] = combo_incident_status (-1, 0, 0, true, true); $table->data[0][1] = print_select (get_priorities (),'mass_priority', -1, '', __('Select'), -1, true, 0, true, __('Priority'), false, 'min-width: 70px;'); $table->data[0][2] = combo_incident_resolution ($resolution, false, true, true); $table->data[0][3] = print_select_from_sql('SELECT id_usuario, nombre_real FROM tusuario;', 'mass_assigned_user', '0', '', __('Select'), -1, true, false, true, __('Owner')); //Task $table->data[1][0] = combo_task_user (0, $config["id_user"], 0, 0, true); //Groups $table->data[1][1] = print_select_from_sql('SELECT id_grupo, nombre FROM tgrupo;', 'mass_groups', '0', '', __('Select'), -1, true, false, true, __('Groups')); if ($has_im) { //Parent ticket $table->data[1][2] = print_input_text ('search_parent', $parent_name, '', 10, 100, true, __('Parent ticket')); $table->data[1][2] .= print_input_hidden ('id_parent', $id_parent, true); $table->data[1][2] .= print_image("images/cross.png", true, array("onclick" => "clean_parent_field()", "style" => "cursor: pointer")); //Delete tickets $table->data[1][3] = "<b>" . __("Delete all tickets") . "</b>"; $table->data[1][3] .= print_image("images/cross.png", true, array("onclick" => "delete_massive_tickets()", "style" => "cursor: pointer")); } $table->data[2][0] = "<div class='button-form'>" . print_submit_button (__('Update'), 'massive_update', false, 'class="sub next"', true) . "</div>"; $table->colspan[2][0] = 4; $massive_oper_incidents = print_table ($table, true);
function combo_roles($include_na = false, $name = 'role', $label = '', $return = false, $manager = true, $selected = '', $no_change = false) { global $config; $output = ''; $nothing = ''; $nothing_value = ''; if ($include_na) { $nothing = __('N/A'); $nothing_value = 0; } if ($no_change) { $nothing = __('No change'); $nothing_value = -1; } if ($manager) { $output .= print_select_from_sql('SELECT id, name FROM trole', $name, $selected, '', $nothing, $nothing_value, true, false, false, $label); } else { $output .= print_select_from_sql('SELECT id, name FROM trole WHERE id<>1', $name, $selected, '', $nothing, $nothing_value, true, false, false, $label); } if ($return) { return $output; } echo $output; }
if ($clean_output == 0){ $form = '<form method="post">'; $table = new stdClass(); $table->id = 'invoices_table'; $table->width = '100%'; $table->class = 'search-table-button'; $table->rowspan[0][1] = 2; $table->rowspan[0][2] = 2; $table->data = array(); $table->data[0][0] = print_input_text ("search_text", $search_text, "", 30, 100, true, __('Search')); $sql = 'SELECT id, name FROM tcompany_role ORDER BY name'; $table->data[1][0] = print_select_from_sql ($sql, 'search_company_role', $search_company_role, '', __('Any'), 0, true, false, false, __('Company Role')); $table->data[0][1] = get_last_date_control_div ($search_last_date, 'search_last_date', __('Date Creation'), $search_date_begin, 'search_date_begin', __('From'), $search_date_end, 'search_date_end', __('To'), 'last_div'); $table->data[0][2] = get_last_date_control_div ($search_exp_date, 'search_exp_date', __('Date Expiration'), $search_exp_begin, 'search_exp_begin', __('From'), $search_exp_end, 'search_exp_end', __('To'), 'expiration_div'); $invoice_types = array("All"=>__('All'), "Submitted"=>__('Submitted'), "Received"=>__('Received')); $table->data[0][3] = print_select ($invoice_types, 'search_invoice_type', $search_invoice_type, '','', 0, true, 0, false, __('Invoice type'), false, 'width:150px;'); $table->data[1][3] = print_input_text_extended ('search_company_manager', $search_company_manager, 'text-search_company_manager', '', 20, 50, false, '', array(), true, '', __("Manager") . print_help_tip (__("Type at least two characters to search"), true), true); $table->data[1][4] = print_input_text ("search_contract_number", $search_contract_number, "", 20, 100, true, __('Contract number')); $invoice_status_ar = array(); $invoice_status_ar['active'] = __("Active"); $invoice_status_ar['pending'] = __("Pending"); $invoice_status_ar['paid'] = __("Paid");
update_config_token("first_login", $config["first_login"]); update_config_token("mins_fail_pass", $config["mins_fail_pass"]); update_config_token("number_attempts", $config["number_attempts"]); } echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true); } // Render SYSTEM language code, not current language. $table = new StdClass(); $table->width = '100%'; $table->class = 'search-table-button'; $table->colspan = array(); $table->data = array(); $incident_reporter_options[0] = __('Disabled'); $incident_reporter_options[1] = __('Enabled'); $language_config = get_db_value('value', 'tconfig', 'token', 'language_code'); $table->data[0][0] = print_select_from_sql('SELECT id_language, name FROM tlanguage ORDER BY name', 'language_code', $language_config, '', '', '', true, false, false, __('Language')); $table->data[0][1] = print_input_text("sitename", $config["sitename"], '', 30, 50, true, __('Sitename')); $error_log_options[0] = __('Disabled'); $error_log_options[1] = __('Enabled'); $table->data[1][0] = print_checkbox("error_log", $error_log_options, $config["error_log"], true, __('Enable error log') . print_help_tip(__("This errorlog is on /integria.log"), true)); $table->data[1][1] = print_input_text("timezone", $config["timezone"], '', 15, 30, true, __('Timezone for integria')); $table->data[2][0] = print_textarea("api_acl", 2, 1, $config["api_acl"], 'style="max-width: 280px;"', true, __('List of IP with access to API') . print_help_tip(__("List of IP (separated with commas which can access to the integria API. Use * for any address (INSECURE!)"), true), false); $table->data[2][1] = print_input_password("api_password", $config["api_password"], '', 30, 255, true, __('API password')); $days_of_week = get_days_of_week(); $table->data[4][0] = print_select($days_of_week, "first_day_week", $config["first_day_week"], '', '', '', true, 0, false, __('First day of the week')); $table->data[4][1] = print_input_text("url_updatemanager", $config["url_updatemanager"], '', 35, 255, true, __('URL update manager')); $table->data[5][0] = print_input_text("loginhash_pwd", $config["loginhash_pwd"], '', 30, 255, true, __('Loginhash password')); $table->data[5][1] = print_checkbox("access_protocol", 1, $config["access_protocol"], true, __('Enable HTTPS access')); $table->data[6][0] = print_input_text("access_port", $config["access_port"], '', 10, 255, true, __('Access port') . print_help_tip(__("Leave blank to use default port (80)"), true)); $table->data[6][1] = print_input_text("access_public", $config["access_public"], '', 30, 50, true, __('Public access to server') . print_help_tip(__("Public IP or name for the server, for example (23.45.67.3 or mydomain.com)"), true)); $csv_standard_encoding = !isset($config['csv_standard_encoding']) ? false : (bool) $config['csv_standard_encoding'];
$table->data[1][1] = print_select ($invoice_status_ar, 'invoice_status', $invoice_status, '','', 0, true, false, false, __('Invoice status')); $table->data[1][2] = print_input_text ('invoice_create_date', $invoice_create_date, '', 15, 50, true, __('Invoice creation date')); $table->data[1][3] = print_checkbox_extended ('calendar_event', 1, '', false, '', '', true, __('Create calendar event')); if ($id_invoice != -1) { $disabled = true; } else { $disabled = false; } $table->data[2][0] = print_input_text ('invoice_expiration_date', $invoice_expiration_date, '', 15, 50, true,__('Invoice expiration date')); $table->data[2][1] = print_input_text ('invoice_payment_date', $invoice_payment_date, '', 15, 50, true,__('Invoice effective payment date')); $table->data[2][2] = print_select_from_sql ('SELECT id_language, name FROM tlanguage ORDER BY name', 'id_language', $language, '', '', '', true, false, false, __('Language')); $table->data[2][3] = print_input_text ('invoice_contract_number', $invoice_contract_number, '', 15, 50, true,__('Contract number')); $table->data[3][0] = print_input_text ('currency', $currency, '', 5, 30, true, __('Currency')); $table->data[3][1] = print_input_text_extended ('currency_change', $currency_change, 'text-currency_change', false, 5, 30, false, '', "oninput='change_currency_title()'", true, false, __('Equivalent currency')); $table->data[3][2] = print_input_text_extended ('rates', $rates, 'text-rates', false, 5, 30, false, '', "oninput='calculate_rate_all()'",true, false, __('Rates')); $table->colspan[4][0] = 2; $table->data[4][0] = "<br/><h4>".__('Concept')."</h4>"; $table->data[4][2] = "<br/><h4>".__('Amount')."</h4>"; $table->data[4][3] = "<br/><h4 id='currency_change_title' >". $currency_change ."</h4>"; $table->colspan[5][0] = 2; if(!isset($amount[0])){ $amount[0] = '';