} } echo "<form id=\"form-file_releases\" class=\"fileupload_form\" method=\"post\" enctype=\"multipart/form-data\">"; echo "<div id=\"drop_file\">"; echo "<table width=\"99%\">"; echo "<td width=\"30%\">"; echo __('Drop the file here'); echo "<td>"; echo __('or'); echo "<td width=\"30%\">"; echo "<a id=\"browse_button\">" . __('browse it') . "</a>"; echo "<td>"; echo __('or'); echo "<td width=\"30%\">"; echo print_select($files_not_in, 'location', $location, '', __('Select'), 0, true, 0, false, __('Choose file from repository')); echo " " . integria_help("choose_download", true); echo print_image("images/cross.png", true, array('class' => 'delete', 'style' => 'display: none;')); echo "</table>"; echo "<input name=\"upfile\" type=\"file\" id=\"file-upfile\" class=\"sub file\" />"; echo "</div>"; echo "<ul></ul>"; echo "</form>"; } } else { echo "<h1>" . __('Update existing file release') . "</h1>"; } $table = new stdClass(); $table->width = '99%'; $table->id = 'download_data'; $table->class = 'search-table-button'; $table->data = array();
global $config; check_login(); if (! give_acl ($config["id_user"], 0, "IM")) { audit_db ($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access SLA Management"); require ("general/noaccess.php"); exit; } echo '<h2>'.__('Support').'</h2>'; echo "<h4>".__('SLA Management'); echo integria_help ("sla", true); echo "</h4>"; $id = (int) get_parameter ('id'); $new_sla = (bool) get_parameter ('new_sla'); $create_sla = (bool) get_parameter ('create_sla'); $update_sla = (bool) get_parameter ('update_sla'); $delete_sla = (bool) get_parameter ('delete_sla'); // CREATE if ($create_sla) { $name = (string) get_parameter ('name'); $description = (string) get_parameter ('description'); $min_response = (float) get_parameter ('min_response'); $max_response = (float) get_parameter ('max_response'); $max_incidents = (int) get_parameter ('max_incidents');
update_config_token("smtp_queue_retries", $config["smtp_queue_retries"]); update_config_token("max_pending_mail", $config["max_pending_mail"]); update_config_token("batch_newsletter", $config["batch_newsletter"]); update_config_token("news_batch_newsletter", $config["news_batch_newsletter"]); update_config_token("batch_email_validation", $config["batch_email_validation"]); update_config_token("active_validate", $config["active_validate"]); } $table->width = '99%'; $table->class = 'search-table-button'; $table->colspan = array(); $table->data = array(); $table->data[2][0] = print_input_text("notification_period", $config["notification_period"], '', 7, 7, true, __('Notification period')); $table->data[2][0] .= integria_help("notification_period", true); $table->data[2][1] = print_input_text("mail_from", $config["mail_from"], '', 30, 50, true, __('System mail from address')); $table->colspan[3][0] = 3; $table->data[3][1] = "<h4>" . __("SMTP Parameters") . integria_help("mailsetup", true) . "</h4>"; $table->data[4][0] = print_input_text("smtp_host", $config["smtp_host"], '', 35, 200, true, __('SMTP Host')); $table->data[4][0] .= print_help_tip(__("Left it blank if you want to use your local mail, instead an external SMTP host"), true); $table->data[4][1] = print_input_text("smtp_port", $config["smtp_port"], '', 5, 10, true, __('SMTP Port')); $table->data[5][0] = print_input_text("smtp_user", $config["smtp_user"], '', 25, 200, true, __('SMTP User')); $table->data[5][1] = print_input_text("smtp_pass", $config["smtp_pass"], '', 25, 200, true, __('SMTP Password')); $table->data[6][0] = print_input_text("smtp_queue_retries", $config["smtp_queue_retries"], '', 5, 10, true, __('SMTP Queue retries')); $table->data[6][0] .= print_help_tip(__("This are the number of attempts the mail queue try to send the mail. Should be high (20-30) if your internet connection have frequent downtimes and near zero if its stable"), true); $table->data[6][1] = print_input_text("max_pending_mail", $config["max_pending_mail"], '', 10, 255, true, __('Max pending mail')); $table->data[6][1] .= print_help_tip(__("Maximum number of queued emails. When this number is exceeded, an alert is activated"), true); $table->data[7][0] = print_input_text("batch_newsletter", $config["batch_newsletter"], '', 4, 255, true, __('Max. emails sent per execution')); $table->data[7][0] .= print_help_tip(__("This means, in each execution of the batch external process (integria_cron). If you set your cron to execute each hour in each execution of that process will try to send this ammount of emails. If you set the cron to run each 5 min, will try this number of mails."), true); $table->colspan[8][0] = 3; $table->data[8][1] = "<h4>" . __("POP/IMAP Parameters") . "</h4>"; $table->data[9][0] = print_input_text("pop_host", $config["pop_host"], '', 25, 30, true, __('POP/IMAP Host')); $table->data[9][0] .= print_help_tip(__("Use ssl://host.domain.com if want to use IMAP with SSL"), true);
// Score this incident if ($id){ if (($incident["score"] == 0) AND (($incident["id_creator"] == $config["id_user"]) AND ( ($incident["estado"] == 7)))) { echo incidents_get_score_table ($id); } } } else { if (! defined ('AJAX')) { echo "<h2>".__('Support')."</h2>"; echo "<h4>".__('Create ticket'); echo integria_help ("create_tickets", true); echo "</h4>"; } } echo '<div class="result">'.$result_msg.'</div>'; $table = new stdClass(); $table->width = '100%'; $table->class = 'search-table-button'; $table->id = "incident-editor"; $table->size = array (); $table->size[0] = '430px'; $table->size[1] = ''; $table->size[2] = ''; $table->head = array(); $table->style = array();
$fullname = get_db_value ('fullname', 'tcompany_contact', 'id', $id); $sql = sprintf ('DELETE FROM tcompany_contact WHERE id = %d', $id); process_sql ($sql); if(!isset($REMOTE_ADDR)){ $REMOTE_ADDR = ''; } audit_db ($config['id_user'], $REMOTE_ADDR, "Contact deleted", "Contact named '$fullname' has been deleted"); echo ui_print_success_message (__('Successfully deleted'), '', true, 'h3', true); $id = 0; } // FORM (Update / Create) if ($id || $new_contact) { if ($new_contact) { echo "<h4>".__('New Contact'); echo integria_help ("contact_detail", true); echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li><a href='index.php?sec=customers&sec2=operation/contacts/contact_detail'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back")))."</a></li>"; echo "</ul>"; echo "</div>"; echo "</h4>"; if (!$section_write_permission && !$section_manage_permission) { audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation","Trying to create a contact in a group without access"); require ("general/noaccess.php"); exit; } $id = 0; $fullname = (string) get_parameter ('fullname'); $phone = (string) get_parameter ('phone'); $mobile = (string) get_parameter ('mobile');
$table->data[2][0] .= __('No') . ' ' . print_radio_button_extended('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, 'enable_autocreate_profile();', '', true); if ($config['autocreate_remote_users'] == 0) { $disabled = true; } $profile_list = profile_get_profiles(); if ($profile_list === false) { $profile_list = array(); } $table->data[3][0] = print_select($profile_list, "default_remote_profile", $config['default_remote_profile'], '', '', '', true, 0, true, __('Autocreate profile'), $disabled); $group_list = group_get_groups(); if ($group_list === false) { $group_list = array(); } $table->data[4][0] = print_select($group_list, "default_remote_group", $config['default_remote_group'], '', '', '', true, 0, true, __('Autocreate group'), $disabled); $table->data[5][0] = print_input_text("autocreate_blacklist", $config['autocreate_blacklist'], '', 60, 500, true, __('Autocreate blacklist'), $disabled); $table->data[5][0] .= integria_help("autocreate_blacklist", true); $table->data[6][0] = print_input_text("LDAP_server", $config['ldap_server'], '', 10, 50, true, __('LDAP server')); $table->data[7][0] = print_input_text("LDAP_port", $config['ldap_port'], '', 10, 50, true, __('LDAP port')); $ldap_version = array(1 => 'LDAPv1', 2 => 'LDAPv2', 3 => 'LDAPv3'); $table->data[8][0] = print_select($ldap_version, "ldap_version", $config['ldap_version'], '', '', '', true, 0, true, __('LDAP version')); $table->data[9][0] = '<b>' . __('Start TLS') . '</b>'; $table->data[10][0] = __('Yes') . ' ' . print_radio_button('ldap_start_tls', 1, '', $config['ldap_start_tls'], true, '', '', '') . ' '; $table->data[10][0] .= __('No') . ' ' . print_radio_button('ldap_start_tls', 0, '', $config['ldap_start_tls'], true, '', '', ''); $table->data[11][0] = print_input_text("ldap_base_dn", $config['ldap_base_dn'], '', 60, 50, true, __('Base DN')); $table->data[12][0] = print_input_text("ldap_login_attr", $config['ldap_login_attr'], '', 60, 50, true, __('Login attribute')); // Hide LDAP configuration options /*for ($i = 6; $i <= 11; $i++) { $table->rowstyle[$i] = $config['auth_methods'] == 'ldap' ? '' : 'display: none;'; $table->rowclass[$i] = 'ldap'; }*/ // Add enterprise authentication options
$data[3] = ($objects_type_field['inherit']? __('Yes'):__('No')); $data[4] = ($objects_type_field['show_list']? __('Yes'):__('No')); $data[5] = '<form style="display:inline;" method="post" onsubmit="if (!confirm(\''.__('Are you sure?').'\')) return false;">'; $data[5] .= print_input_hidden ('delete_object_type_field', 1, true); $data[5] .= print_input_hidden ('id', $id_object_type, true); $data[5] .= print_input_hidden ('id_object_type_field', $objects_type_field["id"], true); $data[5] .= print_input_image ('delete', 'images/cross.png', 1, '', true, '',array('title' => __('Delete'))); $data[5] .= '</form>'; array_push ($table->data, $data); } print_table ($table); } else { echo "<h4>".__('No objects types fields'); echo integria_help ("manage_objects", true); echo "</h4>"; } echo'</div>'; echo '<div class="divform">'; echo '<form method="post" action="index.php?sec=inventory&sec2=operation/inventories/manage_objects_types_field">'; echo '<table class="search-table">'; echo '<tr>'; echo '<td>'; print_input_hidden ('action', 'create'); print_input_hidden ('id', $id_object_type); print_submit_button (__('Create'), 'crt_btn', false, 'class="sub next"'); echo '</td>'; echo '</tr>'; echo '</table>';
// INTEGRIA - the ITIL Management System // http://integria.sourceforge.net // ================================================== // Copyright (c) 2008-2012 Ártica Soluciones Tecnológicas // 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. check_login(); require_once 'include/functions_user.php'; echo "<h2>" . __('IMPORT USERS') . "</h2>"; echo "<h4>" . __('FROM CSV') . integria_help("import_from_csv", true) . "</h4>"; $upload_file = (int) get_parameter('upload_file'); $group = (int) get_parameter('group'); $profile = (int) get_parameter('perfil', 1); $nivel = (int) get_parameter('nivel'); $pass_policy = (int) get_parameter('pass_policy'); $avatar_param = get_parameter('avatar'); //only avatar name (without extension) $avatar_param = explode('.', $avatar_param); $avatar = $avatar_param[0]; if ($upload_file) { if ($_FILES["file"]["error"] == 0) { if ($_FILES["file"]["type"] != 'text/csv' && $_FILES["file"]["type"] != 'application/vnd.ms-excel') { echo ui_print_error_message(__('Unsupported file type'), '', true, 'h3', true); } else { load_file($_FILES["file"]["tmp_name"], $group, $profile, $nivel, $pass_policy, $avatar);
// 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 (); include_once('include/functions_inventories.php'); echo "<h2>".__('Inventory')."</h2>"; echo "<h4>".__('Import objects from CSV'); echo integria_help ("inventory_import_objects", true); echo "</h4>"; $upload_file = (int) get_parameter('upload_file'); $id_object_type = get_parameter('id_object_type'); if ($upload_file) { if ($_FILES["file"]["error"] == 0) { if (($_FILES["file"]["type"] != 'text/csv') && ($_FILES["file"]["type"] != 'application/vnd.ms-excel')) { echo ui_print_error_message (__('Unsupported file type'), '', true, 'h3', true); } else { inventories_load_file ($_FILES["file"]["tmp_name"]); } } }
/** * Print the title, subtitle and the menu into a page * * The element will have an id like: "password-$name" * * @param title * @param subtitle * @param sec * @param menu (associative array) * - title: title when hover * - link: sec2 (undef to avoid link and only print image) * - img: image * @param selected_tab * @param bool return or echo flag * * @return echoes the header. */ function print_title_with_menu($title = "", $subtitle = "", $help_tip = false, $sec = 'projects', $menu = false, $selected_tab = false) { echo "<h2>" . $title . "</h2>"; echo "<h4>" . $subtitle; if ($help_tip !== false) { echo integria_help($help_tip, true); } echo "<div id='button-bar-title'>"; echo '<ul>'; if ($menu !== false) { foreach ($menu as $section => $info) { $class = $section == $selected_tab ? 'button-bar-selected' : ''; $anchor = ''; if (isset($info['link'])) { $anchor = '<a href="index.php?sec=' . $sec . '&sec2=' . $info['link'] . '"'; if (isset($info['target'])) { $anchor .= ' target="' . $info['target'] . '"'; } $anchor .= '>'; } echo '<li class="' . $class . '">' . $anchor . '<span><img src="' . $info['img'] . '" title="' . $info['title'] . '"></span></a></li>'; } } echo '</ul>'; echo '</div>'; echo "</h4>"; }
print_table($table); unset($table); echo "</form>"; // Form to give project/task access echo "<form name='form-access' method=post action='index.php?sec=projects&sec2=operation/projects/role_user_global&add=1&id_user={$id_user}'>"; $table->id = "cost_form"; $table->width = "99%"; $table->class = "search-table"; $table->data = array(); $table->data[0][0] = combo_task_user_manager($config['id_user'], 0, true, __('Tasks'), 'tasks[]', '', true); if (dame_admin($config['id_user'])) { $table->data[0][1] = combo_roles(false, "roles", __('Role'), true); } else { $table->data[0][1] = combo_roles(false, "roles", __('Role'), true, false); } $table->data[0][1] .= integria_help("project_roles", true); $table->data[0][2] = print_submit_button(__('Add'), 'sub_btn', false, 'class="create sub"; style="margin-top:25px"', true); print_table($table); echo "</form>"; echo "<table class='listing' width='99%'>"; echo "<th>" . __("Project"); echo "<th>" . __("Task"); echo "<th>" . __("Role"); echo "<th>" . __("WU"); echo "<th>" . __("WU/Tsk"); echo "<th align='center'>" . __("Delete") . "</th>"; $sql = get_projects_query($id_user, "", 0, true); $new = true; $color = 1; while ($project = get_db_all_row_by_steps_sql($new, $result_project, $sql)) { $sql = get_tasks_query($id_user, $project['id'], "", 0, true);
$section_manage_permission = check_crm_acl ('company', 'cm'); if (!$section_manage_permission) { include ("general/noaccess.php"); exit; } $id = (int) get_parameter ('id'); $new_role = (bool) get_parameter ('new_role'); $create_role = (bool) get_parameter ('create_role'); $update_role = (bool) get_parameter ('update_role'); $delete_role = (bool) get_parameter ('delete_role'); echo "<h2>".__('Customers')."</h2>"; echo "<h4>".__('Company role management'); echo integria_help ("company_detail", true); if ($id || $new_role) { echo "<div id='button-bar-title'><ul>"; echo "<li><a href='index.php?sec=customers&sec2=operation/companies/company_role'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back")))."</a></li>"; echo "</ul></div>"; } echo "</h4>"; // CREATE if ($create_role) { $name = (string) get_parameter ("name"); $description = (string) get_parameter ("description"); $sql = sprintf ('INSERT INTO tcompany_role (name, description) VALUE ("%s", "%s")', $name, $description); $id = process_sql ($sql, 'insert_id'); if ($id === false) {
$config["pwu_defaultime"] = get_parameter("pwu_defaultime", 4); $config["currency"] = (string) get_parameter("currency", "€"); /* process_sql ("DELETE FROM tconfig WHERE token = 'no_wu_completion'"); process_sql ("INSERT INTO tconfig (token, value) VALUES ('no_wu_completion', '".$config["no_wu_completion"]."')"); */ update_config_token("no_wu_completion", $config["no_wu_completion"]); update_config_token("hours_perday", $config["hours_perday"]); update_config_token("autowu_completion", $config["autowu_completion"]); update_config_token("pwu_defaultime", $config["pwu_defaultime"]); update_config_token("currency", $config["currency"]); } $table->width = '99%'; $table->class = 'search-table-button'; $table->colspan = array(); $table->data = array(); $table->data[0][0] = print_input_text("no_wu_completion", $config["no_wu_completion"], '', 20, 500, true, __('No WU completion users')); $table->data[0][0] .= integria_help("no_wu_completion", true); $table->data[0][1] = print_input_text("hours_perday", $config["hours_perday"], '', 5, 5, true, __('Work hours per day')); $table->data[0][1] .= integria_help("hours_perday", true); $table->data[1][0] = print_input_text("autowu_completion", $config["autowu_completion"], '', 7, 7, true, __('Auto WU Completion (days)')); $table->data[1][0] .= integria_help("autowu_completion", true); $table->data[1][1] = print_input_text("pwu_defaultime", $config["pwu_defaultime"], '', 5, 5, true, __('Project WU Default time')); $table->data[2][0] = print_input_text("currency", $config["currency"], '', 3, 3, true, __('Currency')); $button = print_input_hidden('update', 1, true); $button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true); $table->data['button'][0] = $button; $table->colspan['button'][0] = 2; echo "<form name='setup_project' method='post'>"; print_table($table); echo '</form>';
// Linked values $sql = "SELECT id, label FROM tcontract_field WHERE type = 'linked'"; $parents_result = get_db_all_rows_sql($sql); if ($parents_result == false) { $parents_result = array(); } $parents = array(); foreach ($parents_result as $result) { $parents[$result['id']] = $result['label']; } $table->data['id_parent_value'][0] = print_select ($parents, 'parent', $parent, '', __('Select parent'), '0', true, 0, true, __("Parent")); $table->data['id_linked_value'][0] = print_textarea ('linked_value', 15, 1, $linked_value, '', true, __('Linked value').integria_help ("linked_values", true)); if (!$id_field) { $button = print_input_hidden('add_field', 1, true); $button .= print_submit_button (__('Create'), 'create_btn', false, 'class="sub next"', true); } else { $button = print_input_hidden('update_field', 1, true); $button .= print_input_hidden('add_field', 0, true); $button .= print_input_hidden('id_field', $id_field, true); $button .= print_submit_button (__('Update'), 'update_btn', false, 'class="sub upd"', true); } $table->data['button'][0] = $button; $table->colspan['button'][0] = 3; echo "<div class='divform'>";
AND ttask.id_project = %d '. $sql_filter .' AND id_user = "******"id_user"].'" AND tworkunit_task.id_workunit = tworkunit.id ORDER BY tworkunit.timestamp DESC', $id_project); } if (!$pure) { $section_title = __('Workunit resume'); $section_subtitle = $project_name.' - ' . __('All tasks'); $p_menu = print_project_tabs('workunits'); print_title_with_menu ($section_title, $section_subtitle, "task_workunit", 'projects', $p_menu, 'workunits'); } else { echo '<h2>'.__('Workunit resume') . "</h2>"; echo '<h4>' . $project_name.' - ' . __('All tasks'); echo integria_help ("task_workunit", true); echo '<ul class="ui-tabs-nav"><li class="ui-tabs">'; echo "<a href='index.php?sec=projects&sec2=operation/projects/task_workunit&id_project=$id_project&pure=0' title='".__("Back to view")."'><img src='images/go-previous.png'></a>"; echo '</li>'; echo '</ul>'; echo '</h4>'; } } $workunits = get_db_all_rows_sql ($sql); if ($workunits) { foreach ($workunits as $workunit) { show_workunit_user ($workunit['id']); } }
function print_inventory_tabs($selected_tab, $id, $inventory_name, $manage_permission = false) { $details_class = $tracking_class = $contacts_class = $incidents_class = $relationship_class = "ui-tabs"; switch ($selected_tab) { case 'details': $details_class = 'ui-tabs-selected'; $title = strtoupper(__('Inventory object details')); $help = integria_help("inventory_detail", true); break; case 'tracking': $tracking_class = 'ui-tabs-selected'; $title = strtoupper(__('Tracking')); $help = integria_help("inventory_tracking", true); break; case 'contacts': $contacts_class = 'ui-tabs-selected'; $title = strtoupper(__('Contacts')); $help = integria_help("inventory_contacts", true); break; case 'incidents': $incidents_class = 'ui-tabs-selected'; $title = strtoupper(__('Tickets')); $help = integria_help("inventory_incidents", true); break; case 'relationships': $relationship_class = 'ui-tabs-selected'; $title = strtoupper(__('Relationships')); $help = integria_help("inventory_relationship", true); break; } $title2 = sprintf(__('Inventory object #%s: %s'), $id, $inventory_name); echo '<h2>' . $title . '</h2><h4>' . $title2 . $help; if ($manage_permission) { echo '<form id="delete_inventory_form" name="delete_inventory_form" class="delete action" method="post" action="index.php?sec=inventory&sec2=operation/inventories/inventory_detail">'; print_input_hidden('quick_delete', $id); echo "<a href='#' id='detele_inventory_submit_form'>" . print_image("images/cross.png", true, array("title" => __("Delete inventory object"))) . "</a>"; echo '</form>'; } echo '<ul class="ui-tabs-nav">'; echo '<li class="' . $tracking_class . '"><a href="index.php?sec=inventory&sec2=operation/inventories/inventory_tracking&id=' . $id . '" title=' . __('Tracking') . '><img src="images/list_view.png"/></a></li>'; echo '<li class="' . $contacts_class . '"><a href="index.php?sec=inventory&sec2=operation/inventories/inventory_contacts&id=' . $id . '" title=' . __('Contacts') . '><img src="images/groups_small/system-users.png"/></a></li>'; echo '<li class="' . $incidents_class . '"><a href="index.php?sec=inventory&sec2=operation/inventories/inventory_incidents&id=' . $id . '" title=' . __('Tickets') . '><img src="images/tickets_tab.png"/></a></li>'; echo '<li class="' . $relationship_class . '"><a href="index.php?sec=inventory&sec2=operation/inventories/inventory_relationship&id=' . $id . '" title=' . __('Relationships') . '><img src="images/groups_small/chart_organisation.png"/></a></li>'; echo '<li class="' . $details_class . '"><a href="index.php?sec=inventory&sec2=operation/inventories/inventory_detail&id=' . $id . '" title=' . __('Details') . '><img src="images/eye.png"/></a></li>'; echo '<li><a href="index.php?sec=inventory&sec2=operation/inventories/inventory" title=' . __('Back to list') . '><img src="images/volver_listado.png"/></a></li>'; echo '</ul>'; echo '</h4>'; }
echo "<div id='incident-search-content'>"; echo "<h2>" . __("Support") . "</h2>"; if (get_parameter ('id_myticket') == 1){ echo "<h4>" .__('My Tickets'); } else { echo "<h4>" .__('Ticket search'); } echo integria_help ("incident_search", true); echo "<div id='button-bar-title' style='margin-right: 12px;'>"; echo "<ul>"; print_autorefresh_button_ticket(); echo "<li style=''>"; echo "<a href='javascript:' onclick='toggleDiv (\"custom_search\")'>".__('Custom filter')." ".integria_help ("custom_search", true)."</a>"; echo "</li>"; echo "</ul>"; echo "</div>"; echo "</h4>"; $search_form = (bool) get_parameter ('search_form'); $create_custom_search = (bool) get_parameter ('save-search'); $delete_custom_search = (bool) get_parameter ('delete_custom_search'); $id_search = get_parameter ('saved_searches'); $serialized_filter = get_parameter("serialized_filter"); //If serialize filter use the filter stored in a file in tmp dir if ($serialized_filter) { $filter = unserialize_in_temp($config["id_user"]); }
// GNU General Public License for more details. global $config; check_login (); // Get start date of first incident to use it on filters $first_start = get_db_value_sql ("SELECT UNIX_TIMESTAMP(inicio) FROM tincidencia ORDER BY inicio ASC"); if (!empty($first_start)) { $first_start = date ("Y-m-d", $first_start); } echo "<h2>" . __("Support") . "</h2>"; echo "<h4>" . __("Tickets overview"); echo integria_help ("incident_dashboard", true); echo "</h4>"; /* Users affected by the incident */ $table = new StdClass(); $table->width = '100%'; $table->class = "overview_tiquets"; $table->size = array (); $table->size[0] = '50%'; $table->size[1] = '50%'; $table->style = array(); $table->data = array (); $table->style [0] = "vertical-align: top;"; $table->style [1] = "vertical-align: top"; $custom = '';
if ($search_invoice_type != "All") { $where_clause .= sprintf (' AND invoice_type = "%s"', $search_invoice_type); } if ($search_company_role > 0) { $where_clause .= sprintf (' AND id_company IN (SELECT id FROM tcompany WHERE id_company_role = %d)', $search_company_role); } if ($search_company_manager != "") { $where_clause .= sprintf (' AND id_company IN (SELECT id FROM tcompany WHERE manager = "%s")', $search_company_manager); } if ($search_contract_number != "") { $where_clause .= sprintf (' AND contract_number = "%s"', $search_contract_number); } echo "<h2>" . __('Invoice') . "</h2>"; echo "<h4>" . __('Invoice listing'); echo integria_help ("invoice_detail", true); echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li>"; $where_clause = str_replace(array("\r", "\n"), '', $where_clause); echo print_button(__('Export to CSV'), '', false, 'window.open(\'include/export_csv.php?export_csv_invoices=1&where_clause=' . str_replace('"', "\'", $where_clause) . '\')', 'class="sub csv"', true); echo print_report_button ("index.php?sec=customers&sec2=operation/invoices/invoice_detail&$search_params", __('Export to PDF')." "); echo "</li>"; echo "<li>"; echo "<a href='index.php?sec=customers&sec2=operation/invoices/invoice_stats".$search_params."'>" . print_image ("images/chart_bar_dark.png", true, array("title" => __("Invoices report"))) . "</a>"; echo "</li>"; echo "</ul>"; echo "</div>";
if ($pdf_output) { $ttl = 2; } $params = "&est_sale_search=$est_sale&id_language_search=$id_language&search_text=$search_text&id_company_search=$id_company&last_date_search=$last_date&start_date_search=$start_date&end_date_search=$end_date&country_search=$country&product=$id_category&progress_search=$progress&progress_minor_than_search=$progress_minor_than&progress_major_than_search=$progress_major_than&show_100_search=$show_100&owner_search=$owner&show_not_owned_search=$show_not_owned"; if (!empty($tags)) { $params .= '&tags[]='.implode('&tags[]=', $tags); } echo "<h2>".__('Leads') . "</h2>"; echo "<h4>".__('Lead search statistics'); if (!$pure) { echo integria_help ("lead", true); } echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li>"; if(!$pure){ echo "<a id='search_form_submit' href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&$params'>".print_image("images/go-previous.png", true, array("title" => __("Back to search")))."</a></li>"; } else { echo "<a id='search_form_submit' href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&$params'>".print_image("images/chart_bar_dark.png", true, array("title" => __("")))."</a></li>"; } if(!$pure){ echo "<li><a href='index.php?sec=customers&sec2=operation/leads/lead&tab=statistics&pure=1'>".print_image ("images/html_tabs.png", true, array("title" => __("HTML")))."</a></li>"; } else { echo "<li><a href='index.php?sec=customers&sec2=operation/leads/lead&tab=statistics&pure=0'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back")))."</a></li>"; } echo "</ul>";
$incident_reporter_options[0] = __('Disabled'); $incident_reporter_options[1] = __('Enabled'); $newsletter_options[0] = __('Disabled'); $newsletter_options[1] = __('Enabled'); $ticket_options[0] = __('Disabled'); $ticket_options[1] = __('Enabled'); echo "<table width='99%' class='search-table-button\n'>"; echo "<tr>"; echo "<td style='vertical-align: top;'>" . print_input_text("iwu_defaultime", $config["iwu_defaultime"], '', 5, 5, true, __('Ticket WU Default time')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_select($incident_reporter_options, "email_on_incident_update", $config["email_on_incident_update"], '', '', '', true, 0, true, __('Send email on every ticket update')) . print_help_tip(__("Enabling this, you will get emails on file attachs also. If left disabled, you only get notifications only in major events on tickets"), true) . "</td>"; echo "<td style='vertical-align: top;'>" . print_input_text("limit_size", $config["limit_size"], '', 5, 5, true, __('Max. tickets by search')) . integria_help("limit_size", true) . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='vertical-align: top;'>" . print_select($incident_reporter_options, "show_owner_incident", $config["show_owner_incident"], '', '', '', true, 0, true, __('Show ticket owner')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_select($incident_reporter_options, "show_creator_incident", $config["show_creator_incident"], '', '', '', true, 0, true, __('Show ticket creator')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_input_text("auto_incident_close", $config["auto_incident_close"], '', 10, 10, true, __('Auto ticket close')) . integria_help("auto_incident_close", true) . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='vertical-align: top;'>" . print_checkbox("iw_creator_enabled", 1, $config["iw_creator_enabled"], true, __('Enable IW to change creator')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_select($newsletter_options, "incident_creation_wu", $config["incident_creation_wu"], '', '', '', true, 0, true, __('Editor adds a WU on ticket creation')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_select($ticket_options, "enabled_ticket_editor", $config["enabled_ticket_editor"], '', '', '', true, 0, true, __('Enable quick edit mode')) . "</td>"; echo "<tr>"; echo "<td style='vertical-align: top;'>" . print_checkbox("incident_type_change", 1, $config["incident_type_change"], true, __('Allow to change the ticket type')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_checkbox("change_incident_datetime", 1, $config["change_incident_datetime"], true, __('Allow to set the date/time in creation ')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_checkbox("email_ticket_on_creation_and_closing", 1, $config["email_ticket_on_creation_and_closing"], true, __('Send email only on creation and closing ')) . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='vertical-align: top;'>" . print_checkbox("ticket_owner_is_creator", 1, $config["ticket_owner_is_creator"], true, __('Ignore user defined by the group for owner')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_checkbox("show_user_name", 1, $config["show_user_name"], true, __('Show user name instead of id in the ticket search')) . "</td>"; echo "<td style='vertical-align: top;'>" . print_checkbox("required_ticket_type", 1, $config["required_ticket_type"], true, __('Required ticket type')) . "</td>"; echo "</tr>";
// GNU General Public License for more details. global $config; check_login (); if (! give_acl ($config['id_user'], 0, "VR")) { // Doesn't have access to this page audit_db ($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access inventory list"); include ("general/noaccess.php"); exit; } echo '<h2>' . __('Inventory') . '</h2>'; echo '<h4>' . __('Overview'); echo integria_help ("inventory", true); echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li class='view_normal_button'>"; echo "<a href='#' onclick='change_view_pure()'>" . print_image ("images/html_tabs.png", true, array("title" => __("Test"))) . "</a>"; echo "</li>"; echo "<li class='view_normal_button'>"; echo "<a id='listview_form_submit' href='#' onclick='change_view_list()'>" . print_image ("images/list_view.png", true, array("title" => __("List view"))) . "</a>"; echo "</li>"; echo "<li class='view_normal_button'>";
echo "<div id='tabs'>"; if ($id_workunit) { echo "<h2>" . __('Update workunit'); } else { echo "<h2>" . __('Add workunit'); } echo "<h4>"; if ($id_task) { echo get_db_value ('name', 'ttask', 'id', $id_task); } else echo __("New work unit"); echo integria_help ("user_spare_workunit", true); echo "<ul class='ui-tabs-nav'>"; echo "<ul class='ui-tabs-nav'>"; //If single workunit update multiple addition is disabled if ($id_workunit) { echo "<li id='tabmenu2' class='ui-tabs-disabled'>"; } else { //If the multiple_wu_insert option was sent this tab is selected if ($operation == 'multiple_wu_insert') { echo "<li id='tabmenu2' class='ui-tabs-selected'>"; } else { echo "<li id='tabmenu2' class='ui-tabs'>"; } }
require_once ('include/functions_incidents.php'); $date_from = (int) get_parameter("search_from_date"); $date_start = (string) get_parameter("search_first_date"); $date_end = (string) get_parameter("search_last_date"); $show_list = (bool) get_parameter('show_list', 0); $show_stats = (bool) get_parameter('show_stats', 0); $id_search = (int) get_parameter('saved_searches'); $search = (string) get_parameter('search'); $pure = (bool) get_parameter('pure',0); echo "<h2>" .__('Support')."</h2>"; echo "<h4>" .__('Ticket reports'); if(!$pure){ echo integria_help ("incident_report", true); } echo "<div id='button-bar-title'><ul>"; if(!$pure){ echo "<li><a href='index.php?sec=incidents&sec2=operation/incidents/incident_reports&saved_searches=$id_search&show_stats=$show_stats&show_list=$show_list&pure=1'>".print_image ("images/html_tabs.png", true, array("title" => __("HTML")))."</a></li>"; } else { echo "<li><a href='index.php?sec=incidents&sec2=operation/incidents/incident_reports&saved_searches=$id_search&show_stats=$show_stats&show_list=$show_list&pure=0'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back")))."</a></li>"; } echo "</ul></div>"; echo "</h4>"; $table_search = new stdClass; $table_search->width = '100%'; $table_search->class = 'search-table'; $table_search->size = array (); $table_search->style = array ();
if (!$project_permission['manage']) { audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Forbidden", "User ".$config['id_user']." try to delete project #$id_project"); require ("general/noaccess.php"); exit; } $id_owner = get_db_value ('id_owner', 'tproject', 'id', $id_project); delete_project ($id_project); echo ui_print_success_message (__('Successfully deleted'), '', true, 'h3', true); } 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 "</td>"; } echo "</table>"; } else { return false; } return; } if ($check_custom_search) { $sql = sprintf('SELECT COUNT(id) FROM tcustom_search WHERE id_user = "******" AND section = "incidents" ORDER BY name', $config['id_user']); $count_search = get_db_value_sql($sql); if (!$count_search) { $result = __("Ticket reports are based on custom searches. In order to elaborate a report, first you will need to define a custom search on which the report will be based."); $result .= integria_help("custom_search", true); $result .= '<br><br><a href="index.php?sec=incidents&sec2=operation/incidents/incident_search">' . __('Go to Custom search') . '</a>'; } else { $result = false; } echo json_encode($result); return; } if ($set_params) { $id_ticket = get_parameter('id_ticket'); $values = array(); $values['prioridad'] = get_parameter('id_priority'); $values['resolution'] = get_parameter('id_resolution'); $values['estado'] = get_parameter('id_status'); $values['id_usuario'] = get_parameter('id_user'); $values['actualizacion'] = date('Y:m:d H:i:s');
echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true); } $smtp_prococols = array('' => __('None'), 'ssl' => 'ssl', 'sslv2' => 'sslv2', 'sslv3' => 'sslv3', 'tls' => 'tls'); $popimap = array(0 => __('POP'), 1 => __('IMAP')); $table = new StdClass(); $table->width = '100%'; $table->class = 'search-table-button'; $table->colspan = array(); $cols = 3; $table->data = array(); $row = array(); $row[] = print_input_text("notification_period", $config["notification_period"], '', 7, 7, true, __('Notification period') . integria_help("notification_period", true)); $row[] = print_input_text("mail_from", $config["mail_from"], '', 30, 50, true, __('System mail from address')); $table->data[] = $row; $row = array(); $row[] = "<br /><h4>" . __("SMTP Parameters") . integria_help("mailsetup", true) . "</h4>"; $table->data['smtp_title'] = $row; $table->colspan['smtp_title'][0] = $cols; $row = array(); $row[] = print_select($smtp_prococols, 'smtp_proto', $config['smtp_proto'], '', '', '', true, 0, true, __('Encryption')); $row[] = print_input_text("smtp_host", $config["smtp_host"], '', 35, 200, true, __('SMTP Host') . print_help_tip(__("Left it blank if you want to use your local mail, instead an external SMTP host"), true)); $row[] = print_input_text("smtp_port", $config["smtp_port"], '', 5, 10, true, __('SMTP Port')); $table->data[] = $row; $row = array(); $row[] = print_input_text("smtp_user", $config["smtp_user"], '', 25, 200, true, __('SMTP User')); $row[] = print_input_text("smtp_pass", $config["smtp_pass"], '', 25, 200, true, __('SMTP Password')); $row[] = print_button(__("Test"), 'test_smtp', false, '', 'class="sub"', true) . '<div id="test_smtp_images" style="display: inline;"></div>'; $table->data[] = $row; $row = array(); $row[] = print_input_text("smtp_queue_retries", $config["smtp_queue_retries"], '', 5, 10, true, __('SMTP Queue retries') . print_help_tip(__("This are the number of attempts the mail queue try to send the mail. Should be high (20-30) if your internet connection have frequent downtimes and near zero if its stable"), true)); $row[] = print_input_text("max_pending_mail", $config["max_pending_mail"], '', 10, 255, true, __('Max pending mail') . print_help_tip(__("Maximum number of queued emails. When this number is exceeded, an alert is activated"), true));
$row = array(); $cell = 0; $row[$cell] = print_input_text("max_days_wo", $config["max_days_wo"], '', 4, 4, true, __('Days to delete work orders') . integria_help("old_wo", true)); $cell++; $row[$cell] = print_input_text("max_days_audit", $config["max_days_audit"], '', 4, 4, true, __('Days to delete audit data') . integria_help("old_audit", true)); $cell++; $row[$cell] = print_input_text("max_days_session", $config["max_days_session"], '', 4, 4, true, __('Days to delete sessions') . integria_help("old_sessions", true)); $cell++; $table->data[] = $row; $row = array(); $cell = 0; $row[$cell] = print_input_text("max_days_workflow_events", $config["max_days_workflow_events"], '', 4, 4, true, __('Days to delete workflow events') . integria_help("old_workflow_events", true)); $cell++; $row[$cell] = print_input_text("max_days_fs_files", $config["max_days_fs_files"], '', 4, 4, true, __('Days to delete old file sharing files') . integria_help("old_fs_files", true)); $cell++; $row[$cell] = print_input_text("max_days_files_track", $config["max_days_files_track"], '', 4, 4, true, __('Days to delete old file tracking data') . integria_help("old_files_track", true)); $cell++; $table->data[] = $row; $button = print_input_hidden('update', 1, true); $button .= print_submit_button(__('Reset to default'), 'reset_button', false, 'class="sub upd"', true); $button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true); echo '<form id="setup_maintenance" name="setup" method="post">'; print_table($table); echo "<div class='button-form'>"; echo $button; echo "</div>"; echo '</form>'; ?> <script type="text/javascript"> $(document).ready (function () {
} // Linked values $sql = "SELECT id, label\n\t\tFROM tincident_type_field\t\n\t\tWHERE id_incident_type = {$id_incident_type}\n\t\t\tAND type = 'linked'"; $parents_result = get_db_all_rows_sql($sql); if ($parents_result == false) { $parents_result = array(); } $parents = array(); foreach ($parents_result as $result) { $parents[$result['id']] = $result['label']; } $table->data['id_parent_value'][0] = print_select($parents, 'parent', $parent, '', __('Select parent'), '0', true, 0, true, __("Parent"), $global_field); $table->data['id_linked_value'][0] = print_textarea('linked_value', 15, 1, $linked_value, '', true, __('Linked value') . integria_help("linked_values", true), $global_field); if ($global_field) { $table->data['id_linked_value'][1] = ""; $table->data['id_linked_value'][2] = print_textarea('add_linked_value', 15, 1, $add_linked_value, '', true, __('Add values') . integria_help("linked_values", true)); } // Buttons if ($add_field) { $button = print_input_hidden('add_field', 1, true); $button .= print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"', true); } else { if ($update_field) { if (!$global_field && ($type != 'linked' || $type != 'combo') || $global_field && ($type == 'linked' || $type == 'combo')) { $button = print_input_hidden('update_field', 1, true); $button .= print_input_hidden('add_field', 0, true); $button .= print_input_hidden('id_field', $id_field, true); $button .= print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true); } } }
$config["pwu_defaultime"] = get_parameter("pwu_defaultime", 4); $config["currency"] = (string) get_parameter("currency", "€"); /* process_sql ("DELETE FROM tconfig WHERE token = 'no_wu_completion'"); process_sql ("INSERT INTO tconfig (token, value) VALUES ('no_wu_completion', '".$config["no_wu_completion"]."')"); */ update_config_token("no_wu_completion", $config["no_wu_completion"]); update_config_token("hours_perday", $config["hours_perday"]); update_config_token("autowu_completion", $config["autowu_completion"]); update_config_token("pwu_defaultime", $config["pwu_defaultime"]); update_config_token("currency", $config["currency"]); echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true); } $table = new StdClass(); $table->width = '100%'; $table->class = 'search-table-button'; $table->colspan = array(); $table->data = array(); $table->data[0][0] = print_input_text("no_wu_completion", $config["no_wu_completion"], '', 20, 500, true, __('No WU completion users') . integria_help("no_wu_completion", true)); $table->data[0][1] = print_input_text("hours_perday", $config["hours_perday"], '', 5, 5, true, __('Work hours per day') . integria_help("hours_perday", true)); $table->data[1][0] = print_input_text("autowu_completion", $config["autowu_completion"], '', 7, 7, true, __('Auto WU Completion (days)') . integria_help("autowu_completion", true)); $table->data[1][1] = print_input_text("pwu_defaultime", $config["pwu_defaultime"], '', 5, 5, true, __('Project WU Default time')); $table->data[2][0] = print_input_text("currency", $config["currency"], '', 3, 3, true, __('Currency')); $button = print_input_hidden('update', 1, true); $button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true); echo "<form name='setup_project' method='post'>"; print_table($table); echo "<div class='button-form'>"; echo $button; echo "</div>"; echo '</form>';