</script> <?php include APPPATH . "views/func.inc.php"; ?> <form name="myform" id="myform" action="<?php echo WEB_PATH; echo $form_action; ?> " method="post"> <h3>รายละเอียด</h3> <br/> <div align="center"> <textarea class="mceEditor" name="page_detail" id="page_detail"><?if(isset($form_data["page_detail"])){ echo $form_data["page_detail"];}?></textarea> </div> <?php print_input_hidden("page_id"); ?> <br/> <div align="center"> <input class="btn btn-primary" type="submit" value="บันทึกข้อมูล" /> </div> </form> <script> // prepare the form when the DOM is ready $("#myform").validate({ rules: { page_detail: { required: true } }, messages: {
echo "<tr><td>"; print_input_text ('title', $title, '', 80, 175, false, __('Subject')); echo "<tr><td>"; print_textarea ('description', 15, 50, $description, '', false, __('Message text')); echo "<tr><td>"; echo '</table>'; $button = ''; echo '<div style="width:100%;">'; $table = new StdClass; $table->width = '100%'; $table->class = "button-form"; $button .= print_submit_button (__('Send'), 'create_btn', false, 'class="sub create"', true); $button .= print_input_hidden ('operation', 'generate_email',true); $button .= print_input_hidden ('id_project', $id_project, true); $button .= print_input_hidden ('id_task', $id_task, true); $table->data[7][0] = $button; $table->colspan[7][0] = 2; print_table($table); echo '</div>'; echo '</form>'; ?> <script type="text/javascript"> $(document).ready (function () { $("#textarea-description").TextAreaResizer (); }); </script>
if ($section_write_permission || $section_manage_permission) { $table->head[3] = __('Delete'); } foreach ($contacts as $contact) { $data = array(); // Name $data[0] = "<a href='index.php?sec=customers&sec2=operation/contacts/contact_detail&id=" . $contact['id'] . "'>" . $contact['fullname'] . "</a>"; $data[1] = "<a href='index.php?sec=customers&sec2=operation/companies/company_detail&id=" . $contact['id_company'] . "'>" . get_db_value('name', 'tcompany', 'id', $contact['id_company']) . "</a>"; $data[2] = $contact['email']; if ($section_write_permission || $section_manage_permission) { $data[3] = '<a href="index.php?sec=customers& sec2=operation/contacts/contact_detail& delete_contact=1&id=' . $contact['id'] . '&offset=' . $offset . '" onClick="if (!confirm(\'' . __('Are you sure?') . '\')) return false;"> <img src="images/cross.png"></a>'; } array_push($table->data, $data); } print_table($table); } //Show create button only when contact list is displayed if (($section_write_permission || $section_manage_permission) && !$id && !$new_contact) { echo '<form method="post" action="index.php?sec=customers&sec2=operation/contacts/contact_detail">'; echo '<div style="width: ' . $table->width . '; text-align: right;">'; print_submit_button(__('Create'), 'new_btn', false, 'class="sub create"'); print_input_hidden('new_contact', 1); echo '</div>'; echo '</form>'; } }
$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); } } } $table->data['button'][0] = $button; $table->colspan['button'][0] = 3; if ($add_field) { echo '<form method="post" action="index.php?sec=incidents&sec2=operation/incidents/type_detail&id=' . $id_incident_type . '&add_field=1">'; } else { echo '<form method="post" action="index.php?sec=incidents&sec2=operation/incidents/type_detail&id=' . $id_incident_type . '&update_field=1">'; } print_table($table); echo '</form>'; ?>
//input pagination size $table_search->data[3][0] = '<label id="label-text-block_size" for="text-block_size">'.__('Block size for pagination').print_help_tip (__("Selects the paging block. By default it's set in the general options and limited to 2-1000"), true).'</label>'; $table_search->data[3][0] .= '<input type="number" required pattern="^[2-100]" name="block_size" id="text-block_size" value="'.$params['block_size'].'" size="2" min="2" max="1000">'; //order column table hidden $table_search->data[3][0] .= print_input_hidden ('sort_field', $params['sort_field_num'], true, false, 'sort_field'); $table_search->data[3][0] .= print_input_hidden ('sort_mode', $params['sort_mode'], true, false, 'sort_mode'); //offset pagination hidden if(!isset($params['offset'])){ $params['offset'] = ''; } $table_search->data[3][0] .= print_input_hidden ('offset', $params['offset'], true, false, 'offset'); //mode: list, tree, pure $table_search->data[3][0] .= print_input_hidden ('mode', $params['mode'], true, false, 'mode'); //csv querys $filter["query"] = $sql_search; $filter["query_pag"] = $sql_search_pagination; serialize_in_temp($filter, $config["id_user"]); //tree_search_submit() $table_search->data[3][1] = print_button(__('Export to CSV'), '', false, 'tree_search_submit(); window.open(\'' . 'include/export_csv.php?export_csv_inventory=1'.'\');', 'class="sub csv"', true); //button $table_search->data[3][2] = print_submit_button (__('Search'), 'search', false, 'class="sub search"', true); $search_other .= print_table($table_search, true); $search_other .= '</div>';
} $j++; } $data[$j] = '<a id="link_add_row" title=' . __("Add row") . ' href=""><img src="images/add.png"></a>'; array_push($table_list->data, $data); } echo '<form id="external_form" name="external_edition_form" method="post" action="index.php?sec=inventory&sec2=operation/inventories/manage_external_tables&insert_row=1">'; print_input_hidden('id', $id_object_type, false); print_input_hidden('external_table', $external_table, false); print_input_hidden('key', $key, false); print_table($table_list); echo '</form>'; } print_input_hidden('base_url_homedir', $config['base_url_dir'], false); print_input_hidden('id', $id_object_type, false); print_input_hidden('key', $key, false); ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript"> $(document).ready (function () { $("#external_table").change( function() { external_table = $("#external_table").val(); id_object_type = $("#hidden-id").val(); var url = $("#hidden-base_url_homedir").val()+"/index.php?sec=inventory&sec2=operation/inventories/manage_external_tables&external_table="+external_table+"&id="+id_object_type; window.location = url; });
$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[7][0] = print_label(__('CSV encoding type'), '', '', true); $table->data[7][0] .= __('Excel') . ' ' . print_radio_button('csv_standard_encoding', 0, '', $csv_standard_encoding, true); $table->data[7][0] .= print_help_tip(__("The Excel type may not be compatible with other applications"), true); $table->data[7][0] .= ' ' . __('Other') . ' ' . print_radio_button('csv_standard_encoding', 1, '', $csv_standard_encoding, true); $table->data[7][1] = print_checkbox("enable_update_manager", 1, $config["enable_update_manager"], true, __('Enable update manager updates')); $table->data[8][0] = print_input_text("max_direct_download", $config["max_direct_download"], '', 10, 255, true, __('Maximum direct download size (MB)')); $table->data[8][1] = print_input_text("max_file_size", $config["max_file_size"], '', 10, 255, true, __('Max. Upload file size')); echo "<form name='setup' method='post'>"; print_table($table); echo "<div class='button-form'>"; print_input_hidden('update', 1); print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"'); echo "</div>"; echo '</form>'; ?> <script type="text/javascript" src="include/js/integria.js"></script> <script type="text/javascript"> $(document).ready (function () { $("textarea").TextAreaResizer (); }); </script>
$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); // Delete new lines from the string $where_clause = str_replace(array("\r", "\n"), '', $where_clause); $buttons .= print_button(__('Export to CSV'), '', false, 'window.open(\'' . 'include/export_csv.php?export_csv_companies=1&where_clause=' . str_replace('"', "\\'", $where_clause) . '&date=' . $date . '\')', 'class="sub csv"', true); $table->data[2][0] = $buttons; $table->colspan[2][0] = 4; echo '<form method="post" id="company_stats_form" action="index.php?sec=customers&sec2=operation/companies/company_detail">'; print_table($table); // Input hidden for ORDER print_input_hidden('order_by_activity', $order_by_activity); print_input_hidden('order_by_company', $order_by_company); print_input_hidden('order_by_billing', $order_by_billing); echo '</form>'; $companies = crm_get_companies_list($where_clause, $date, $order_by, false, $having); $companies = print_array_pagination($companies, "index.php?sec=customers&sec2=operation/companies/company_detail{$search_params}", $offset); if ($companies !== false) { $table->width = "99%"; $table->class = "listing"; $table->data = array(); $table->style = array(); $table->colspan = array(); $table->head[0] = __('ID'); $table->head[1] = __('Company') . $company_order_image; $table->head[2] = __('Role'); $table->head[3] = __('Contracts'); $table->head[4] = __('Leads'); $table->head[5] = __('Manager');
$table->data[4][0] = "<b>".__('Description')."</b><br>$description<br>"; } echo '<form method="post" id="contact_form">'; print_table ($table); if ($new_contact || ($id && ($write_permission || $manage_permission)) ) { echo "<div class='no' style='width:100%; text-align:right;'>"; unset($table->data); $table->class = "button-form"; if ($id) { $button = print_submit_button (__('Update'), 'update_btn', false, 'class="sub upd"', true); $button .= print_input_hidden ('update_contact', 1, true); $button .= print_input_hidden ('id', $id, true); } else { $button = print_submit_button (__('Create'), 'create_btn', false, 'class="sub create"', true); $button .= print_input_hidden ('create_contact', 1, true); } $table->data['button'][0] = $button; $table->colspan['button'][0] = 2; print_table ($table); echo "</div>"; } echo "</form>"; } ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript">
global $config; check_login(); $id = (int) get_parameter('id'); $incident_creator = get_db_value("id_creator", "tincidencia", "id_incidencia", $id); if (!give_acl($config["id_user"], 0, "IW") && $config['id_user'] != $incident_creator) { // Doesn't have access to this page audit_db($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to ticket #" . $id); include "general/noaccess.php"; return; } $title = get_db_value("titulo", "tincidencia", "id_incidencia", $id); echo '<div id="upload_result"></div>'; echo "<div id='upload_control'>"; $table->width = '100%'; $table->data = array(); $table->data[0][0] = "<span style='font-size: 10px'>" . __("Please note that you cannot upload .php or .pl files, as well other source code formats. Please compress that files prior to upload (using zip or gz)") . "</span>"; $table->data[1][0] = print_textarea('file_description', 8, 1, '', "style='resize:none'", true, __('Description')); if (defined('AJAX')) { $action = 'ajax.php?page=operation/incidents/incident_detail'; } else { $action = 'index.php?sec=incidents&sec2=operation/incidents/incident_detail'; } $into_form = print_table($table, true); $into_form .= '<div class="button" style="width: ' . $table->width . '">'; $into_form .= print_button(__('Upload'), 'upload', false, '', 'class="sub upload"', true); $into_form .= '</div>'; $into_form .= print_input_hidden('id', $id, true); $into_form .= print_input_hidden('upload_file', 1, true); // Important: Set id 'form-add-file' to form. It's used from ajax control print_input_file_progress($action, $into_form, 'id="form-add-file"', 'sub next', 'button-upload'); echo '</div>';
if ($operation == 'multiple_wu_insert') { echo "<div id='tab2' class='ui-tabs-panel'>"; //Multiple WU echo "<table width='100%' class='search-table-button'>"; echo "<tr>"; echo "<td style='text-align: right;'>"; echo print_button (__('Add new parse Workunit'), 'add_link', false, 'location.href=\'index.php?sec=users&sec2=operation/users/user_spare_workunit\'', 'class="sub create"'); echo "</td>"; echo "</table>"; foreach ($multiple_wu_report as $number => $mwur) { print_single_workunit_report($mwur); } } else { echo "<div id='tab2' class='ui-tabs-panel ui-tabs-hide'>"; //Multiple WU echo '<form id="multiple_task_form" method="post" onsubmit="return validate_multiple_form()">'; print_input_hidden ('operation', 'multiple_wu_insert'); //Massive work unit list create_new_table_multiworkunit(1); echo "<table width='100%' class='button-form'>"; echo "<tr>"; echo "<td style='width: 90%;'>"; echo "</td>"; echo "<td>"; echo print_button (__('Add'), 'add_multi_wu', false, '', 'class="sub create"'); echo "</td>"; echo "<td>"; echo print_submit_button (__('Save'), 'btn_upd', false, 'class="sub save"'); echo "</td>"; echo "</tr>"; echo "</table>";
echo '<td><b>'.__('End').' </b>'; echo print_input_text ('end_date', $end_date, '', 11, 20, true) ."</td>"; echo '</tr>'; // Description echo '<tr>'; echo "<td colspan=2><b>".__("Description")."</b></td>"; echo '</tr><tr>'; echo '<td colspan=2><textarea name="description">'. $description ."</textarea></td>"; echo "</tr>"; // Buttom echo "<tr><td colspan=2>"; if ($project_access['manage']) { echo print_input_hidden ('id_project', $id_project, true); echo print_input_hidden ('action', 'update', true); echo print_submit_button (__('Update'), 'upd_btn', false, 'class="sub upd"', true); } echo "</td></tr>"; echo "</table>"; // People involved //Get users with tasks $sql = sprintf("SELECT DISTINCT id_user FROM trole_people_task, ttask WHERE ttask.id_project= %d AND ttask.id = trole_people_task.id_task", $id_project); $users_aux = get_db_all_rows_sql($sql); if(empty($users_aux)) { $users_aux = array(); }
echo '<a href="index.php?sec=customers&sec2=operation/leads/template_manager&operation=edit&id=' . $todo["id"] . '">'; echo "<b>" . $todo["name"] . "</b></a>"; echo "<td valign=top>"; echo "<b>" . $todo["id_language"] . "</b>"; echo "<td valign=top>"; $company_name = get_db_value('name', 'tcompany', 'id', $todo["id_company"]); echo $company_name; echo '<td align="center" valign=top>'; echo '<a href="index.php?sec=customers&sec2=operation/leads/template_manager&operation=edit&id=' . $todo["id"] . '"><img border=0 src="images/wrench.png"></a> '; echo '<a href="index.php?sec=customers&sec2=operation/leads/template_manager&operation=delete&id=' . $todo["id"] . '" onClick="if (!confirm(\' ' . __('Are you sure?') . '\')) return false;"><img border=0 src="images/cross.png"></a>'; } echo "</table>"; echo '<form method="post" action="index.php?sec=customers&sec2=operation/leads/template_manager">'; echo '<div style="width: 99%; text-align: right;">'; print_submit_button(__('Create'), 'crt', false, 'class="sub create"'); print_input_hidden('operation', 'create'); echo '</form></div>'; } // Fin bloque else ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript"> // Form validation trim_element_on_submit('#text-name'); validate_form("#form-template_manager"); var rules, messages; // Rules: #text-name
print_input_hidden("offset", get_parameter("offset")); echo "</form>"; /* Add a form to carry filter between treeview and listview */ echo '<form id="list_view_inventory" method="post" action="index.php?sec=inventory&sec2=operation/inventories/inventory" style="clear: both">'; print_input_hidden("search_free", $search_free); print_input_hidden("id_object_type_search", $id_object_type); foreach ($object_fields as $k => $v) { print_input_hidden("object_fields_search[]", $k); } print_input_hidden("owner", $owner); print_input_hidden("id_contract", $id_contract); print_input_hidden("id_manufacturer", $id_manufacturer); print_input_hidden("last_update", $last_update); print_input_hidden('search', 1); print_input_hidden('mode', 'list'); print_input_hidden("offset", get_parameter("offset")); echo "</form>"; ?> <script type="text/javascript" src="include/js/jquery.ui.autocomplete.js"></script> <script type="text/javascript" src="include/js/integria_inventory.js"></script> <script type="text/javascript" src="include/js/fixed-bottom-box.js"></script> <script type="text/javascript"> $(document).ready (function () { $("#listview_form_submit").click(function (event) { event.preventDefault(); $("#list_view_inventory").submit(); });
if ($buildings !== false) { $table->width = '90%'; $table->class = 'listing'; $table->data = array(); $table->size = array(); $table->size[2] = '40px'; $table->style = array(); $table->style[0] = 'font-weight: bold'; $table->head[0] = __('Name'); $table->head[1] = __('Description'); $table->head[2] = __('Delete'); foreach ($buildings as $building) { $data = array(); $data[0] = '<a href=index.php?sec=inventory&sec2=operation/buildings/building_detail&id=' . $building['id'] . '">' . $building['name'] . '</a>'; $data[1] = substr($building['description'], 0, 50) . "..."; $data[2] = '<a href="index.php?sec=inventory& sec2=operation/buildings/building_detail& delete_building=1&id=' . $building['id'] . '" onClick="if (!confirm(\'' . __('Are you sure?') . '\')) return false;"><img src="images/cross.png"></a>'; array_push($table->data, $data); } print_table($table); } echo '<form method="post" action="index.php?sec=inventory&sec2=operation/buildings/building_detail">'; echo '<div class="button" style="width: ' . $table->width . '">'; print_submit_button(__('Create'), 'new_btn', false, 'class="sub next"'); print_input_hidden('new_building', 1); echo '</div>'; echo '</form>'; }
echo "</td>"; //End date) echo "<td>"; $end = date("Y-m-d"); print_input_text_extended("end_date2", $end, "end_date", '', 7, 15, 0, '', "", false, false, __('End date')); echo "</td>"; echo "<tr><td colspan=4 align=right>"; echo "<br>"; //Create button print_submit_button(__('Create'), 'create', false, 'class="sub create"'); echo "</table>"; echo "</form>"; echo "</div>"; //Starting main form for this view echo "<form id='form-tasks' method='post' action='index.php?sec=projects&sec2=operation/projects/task_planning&id_project=" . $id_project . "'>"; print_input_hidden('update', 'update'); //Create table and table header. echo "<table class=listing width=100% cellspacing=0 cellpadding=0 border=0px>"; echo "<thead>"; echo "<tr>"; echo "<th class=header style='text-align:center;'>" . __('Task') . "</th>"; echo "<th class=header style='text-align:center;'>" . __('Owner') . "</th>"; echo "<th class=header style='text-align:center;'>" . __('Start date') . "</th>"; echo "<th class=header style='text-align:center;'>" . __('End date') . "</th>"; echo "<th class=header style='text-align:center;'>" . __('Hours worked') . "</th>"; echo "<th class=header style='text-align:center;'>" . __('Delay (days)') . "</th>"; echo "<th class=header style='text-align:center;'>" . __('Status') . "</th>"; // Last column (Del) echo "<th class=header style='text-align:center;'>" . __('Op.') . "</th>"; echo "</tr>"; echo "</thead>";
$data[4] .= '<a title=' . __("Fields") . ' href=index.php?sec=inventory&sec2=operation/inventories/manage_objects_types_list&id=' . $object["id"] . '><img src="images/page_white_text.png"></a>'; $data[4] .= '<form style="display:inline;" method="post" onsubmit="if (!confirm(\'' . __('Are you sure?') . '\')) return false;">'; $data[4] .= print_input_hidden('delete_object', 1, true); $data[4] .= print_input_hidden('id', $object["id"], true); $data[4] .= print_input_image('delete', 'images/cross.png', 1, '', true, '', array('title' => __('Delete'))); $data[4] .= '</form>'; array_push($table->data, $data); } print_table($table); } else { echo "<h4>" . __('No objects') . "</h4>"; } echo '<div style="width: ' . $table->width . '; text-align: right;">'; echo '<form method="post">'; print_input_hidden('create', 1); print_submit_button(__('Create'), 'crt_btn', false, 'class="sub next"'); echo "</form></div>"; } // end of list ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript"> $(document).ready (function () { $("#icon").change (function () { data = this.value; $("#product-icon").fadeOut ('normal', function () { $("#product-icon").attr ("src", "images/products/"+data).fadeIn ();
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->head[1] = __('Manager'); $table->head[2] = __('Completion');
$table->data[0][0] = print_input_text ('name', $name, '', 40, 255, true, __('Name')); $groups = get_user_groups ($config['id_user'], "VR"); $groups[0] = __('None'); $table->data[0][1] = print_select ($groups, "id_group", $id_group, '', '', 0, true, false, false, __('Group')); $table->data[1][0] = print_textarea ('sql', 10, 100, $sql, '', true, __('Report SQL sentence')); if (dame_admin ($config['id_user'])) { if ($id) { $button = print_input_hidden ('update_report', 1, true); $button .= print_input_hidden ('id', $id, true); $button .= print_submit_button (__('Update'), 'update', false, 'class="sub upd"', true); } else { $button = print_input_hidden ('create_report', 1, true); $button .= print_submit_button (__('Create'), 'create', false, 'class="sub create"', true); } } echo '<form id="form-inventory_report" method="post">'; print_table ($table); if (dame_admin ($config['id_user'])) echo "<div class='button-form'>" . $button . "</div>"; echo '</form>'; ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript">
include "incident_inventory_contacts.php"; break; case "tracking": include "incident_tracking.php"; break; case "tickets": include "incident_tickets.php"; break; default: break; } echo "</div>"; echo "</div>"; } //parameter to reload page print_input_hidden('base_url_homedir', $config['base_url_dir'], false); //div to show user info echo "<div class= 'dialog ui-dialog-content' title='" . __("User info") . "' id='user_info_window'></div>"; echo "<div class= 'dialog ui-dialog-content' title='" . __("Warning") . "' id='ticket_childs'></div>"; //id_incident hidden echo '<div id="id_incident_hidden" style="display:none;">'; print_input_text('id_incident_hidden', $id); echo '</div>'; ?> <script type="text/javascript" src="include/js/integria_incident_search.js"></script> <script type="text/javascript"> $(document).ready (function () {
$mail_queue .= $mail["recipient"]; $mail_queue .= "<td style='font-size: 9px;'>"; $mail_queue .= $mail["subject"]; $mail_queue .= "<td>"; $mail_queue .= $mail["attempts"]; if ($mail["status"] == 1) { $mail_queue .= "<td>" . __("Bad mail"); } else { $mail_queue .= "<td>" . __("Pending"); } $mail_queue .= "</tr>"; } $mail_queue .= "<tr></tr></table></div>"; $table->data[20][0] = $mail_queue; } $button = print_input_hidden('update', 1, true); $button .= print_submit_button(__("Reactivate pending mails"), 'pending_ok', false, 'class="sub create"', true); $button .= print_submit_button(__("Delete pending mails"), 'pending_delete', false, 'class="sub delete"', true); $button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true); $table->data[21][0] = $button; $table->colspan[21][0] = 3; echo "<form name='setup' method='post'>"; print_table($table); echo '</form>'; ?> <script type="text/javascript"> $(document).ready (function () { $("textarea").TextAreaResizer (); }); </script>
function form_search_incident($return = false, $filter = false) { include_once "functions_user.php"; global $config; $output = ''; if (!$filter) { $search_string = (string) get_parameter('search_string'); $status = (int) get_parameter('search_status', -10); $priority = (int) get_parameter('search_priority', -1); $resolution = (int) get_parameter('search_resolution', -1); $id_group = (int) get_parameter('search_id_group'); $id_inventory = (int) get_parameter('search_id_inventory'); $id_company = (int) get_parameter('search_id_company'); $search_id_user = (string) get_parameter('search_id_user'); $search_id_incident_type = (int) get_parameter('search_id_incident_type'); $date_from = (int) get_parameter("search_from_date"); $date_start = (string) get_parameter("search_first_date"); $date_end = (string) get_parameter("search_last_date"); $search_creator = (string) get_parameter('search_id_creator'); $search_editor = (string) get_parameter('search_editor'); $search_closed_by = (string) get_parameter('search_id_creator'); $group_by_project = (bool) get_parameter('search_group_by_project'); $sla_state = (int) get_parameter('search_sla_state', 0); $id_task = (int) get_parameter('search_id_task', 0); $left_sla = (int) get_parameter('search_left_sla', 0); $right_sla = (int) get_parameter('search_right_sla', 0); $show_hierarchy = (bool) get_parameter('show_hierarchy'); $type_fields = incidents_get_type_fields($search_id_incident_type); $search_type_field = array(); foreach ($type_fields as $key => $type_field) { $search_type_field[$type_field['id']] = (string) get_parameter('search_type_field_' . $type_field['id']); } } else { $search_string = (string) $filter['string']; $priority = (int) $filter['priority']; $id_group = (int) $filter['id_group']; $status = (int) $filter['status']; $resolution = (int) $filter['resolution']; $id_company = (int) $filter['id_company']; $id_inventory = (int) $filter['id_inventory']; $search_id_incident_type = (int) $filter['id_incident_type']; $search_id_user = (string) $filter['id_user']; $date_from = (int) $filter['from_date']; $date_start = (string) $filter['first_date']; $date_end = (string) $filter['last_date']; $search_creator = (string) $filter['id_creator']; $search_editor = (string) $filter['editor']; $search_closed_by = (string) $filter['closed_by']; $group_by_project = (bool) $filter['group_by_project']; $sla_state = (int) $filter['sla_state']; $id_task = (int) $filter['id_task']; $left_sla = (int) $filter['left_sla']; $right_sla = (int) $filter['right_sla']; $show_hierarchy = (bool) $filter['show_hierarchy']; $type_fields = incidents_get_type_fields($search_id_incident_type); $search_type_field = array(); if ($type_fields) { foreach ($type_fields as $key => $type_field) { $search_type_field[$type_field['id']] = (string) $filter['type_field_' . $type_field['id']]; } } } /* No action is set, so the form will be sent to the current page */ $table = new stdclass(); $table->width = "99%"; $table->class = "search-table-button"; $table->cellspacing = 2; $table->cellpadding = 2; $table->data = array(); $table->size = array(); $table->style = array(); $table->style[0] = 'width: 25%'; $table->style[1] = 'width: 25%'; $table->style[2] = 'width: 25%; vertical-align:text-top;'; $table->style[3] = 'width: 25%'; $table->rowstyle = array(); $table->rowstyle[1] = 'display: none'; $table->rowstyle[2] = 'display: none'; $table->rowstyle[3] = 'display: none'; $table->rowstyle[4] = 'display: none'; $table->rowstyle[5] = 'display: none'; $table->rowstyle[6] = 'text-align: right'; $table->colspan = array(); $table->colspan[0][0] = 2; $table->colspan[6][0] = 4; $table->colspan[7][1] = 3; $table->rowspan = array(); $table->rowspan[2][2] = 2; $table->data[0][0] = print_input_text('search_string', $search_string, '', 50, 100, true, __('Search string')); $available_status = get_indicent_status(); $available_status[-10] = __("Not closed"); $table->data[0][1] = print_select($available_status, 'search_status', $status, '', __('Any'), 0, true, false, true, __('Status')); $groups = users_get_groups_for_select($config['id_user'], "IW", true, true); $table->data[0][2] = print_select($groups, 'search_id_group', $id_group, '', '', '', true, false, false, __('Group')); $table->data[0][3] = print_checkbox_extended('search_show_hierarchy', 1, $show_hierarchy, false, '', '', true, __('Show hierarchy')); $params_owner = array(); $params_owner['input_id'] = 'text-search_id_user'; $params_owner['input_name'] = 'search_id_user'; $params_owner['input_value'] = $search_id_user; $params_owner['title'] = __('Owner'); $params_owner['return'] = true; $table->data[1][0] = user_print_autocomplete_input($params_owner); $params_editor = array(); $params_editor['input_id'] = 'text-search_editor'; $params_editor['input_name'] = 'search_editor'; $params_editor['input_value'] = $search_editor; $params_editor['title'] = __('Editor'); $params_editor['return'] = true; $table->data[1][1] = user_print_autocomplete_input($params_editor); $params_closed_by = array(); $params_closed_by['input_id'] = 'text-search_closed_by'; $params_closed_by['input_name'] = 'search_closed_by'; $params_closed_by['input_value'] = $search_closed_by; $params_closed_by['title'] = __('Closed by'); $params_closed_by['return'] = true; $table->data[1][2] = user_print_autocomplete_input($params_closed_by); $params_creator = array(); $params_creator['input_id'] = 'text-search_id_creator'; $params_creator['input_name'] = 'search_id_creator'; $params_creator['input_value'] = $search_creator; $params_creator['title'] = __('Creator'); $params_creator['return'] = true; $table->data[1][3] = user_print_autocomplete_input($params_creator); $table->data[2][0] = print_select(get_priorities(), 'search_priority', $priority, '', __('Any'), -1, true, false, false, __('Priority'), false); $table->data[2][1] = print_select(get_incident_resolutions(), 'search_resolution', $resolution, '', __('Any'), -1, true, false, false, __('Resolution'), false); $table->data[2][2] = get_last_date_control($date_from, 'search_from_date', __('Date'), $date_start, 'search_first_date', __('Created from'), $date_end, 'search_last_date', __('Created to')); $name = $id_inventory ? get_inventory_name($id_inventory) : ''; $table->data[2][3] = print_input_text('inventory_name', $name, '', 7, 0, true, __('Inventory'), false); $table->data[2][3] .= " <a href='javascript: show_search_inventory(\"\",\"\",\"\",\"\",\"\",\"\");'>" . print_image('images/zoom.png', true, array('title' => __('Search inventory'))) . "</a>"; $table->data[2][3] .= print_input_hidden('id_inventory', $id_inventory, true); if (!get_external_user($config["id_user"])) { $table->data[4][0] = print_select(get_companies(), 'search_id_company', $id_company, '', __('All'), 0, true, false, false, __('Company')); } $table->data[4][1] = print_select(get_incident_types(), 'search_id_incident_type', $search_id_incident_type, 'javascript:change_type_fields_table();', __('All'), 0, true, false, false, __('Ticket type')); $table->data[4][3] = print_checkbox_extended('search_group_by_project', 1, $group_by_project, false, '', '', true, __('Group by project/task')); $sla_states = array(); $sla_states[1] = __('SLA is fired'); $sla_states[2] = __('SLA is not fired'); $table->data[5][0] = print_select($sla_states, 'search_sla_state', $sla_state, '', __('All'), 0, true, false, false, __('SLA')); $table->data[5][1] = combo_task_user_participant($config["id_user"], 0, $id_task, true, __("Task"), 'search_id_task'); $table->data[5][2] = print_input_text('search_left_sla', $left_sla, '', 7, 0, true, __('SLA > (%)'), false); $table->data[5][3] = print_input_text('search_right_sla', $right_sla, '', 7, 0, true, __('SLA < (%)'), false); $table_type_fields = new stdclass(); $table_type_fields->width = "100%"; $table_type_fields->class = "search-table"; $table_type_fields->data = array(); //Print custom field data $column = 0; $row = 0; if ($type_fields) { foreach ($type_fields as $key => $type_field) { $data = $search_type_field[$type_field['id']]; if ($type_field['type'] == "text" || $type_field['type'] == "textarea") { $input = print_input_text('search_type_field_' . $type_field['id'], $data, '', 30, 30, true, $type_field['label']); } else { if ($type_field['type'] == "combo") { $combo_values = explode(",", $type_field['combo_value']); $values = array(); foreach ($combo_values as $value) { $values[$value] = $value; } $input = print_select($values, 'search_type_field_' . $type_field['id'], $data, '', __('Any'), '', true, false, false, $type_field['label']); } else { if ($type_field['type'] == "linked") { $linked_values = explode(",", $type_field['linked_value']); $values = array(); foreach ($linked_values as $value) { $value_without_parent = preg_replace("/^.*\\|/", "", $value); $values[$value_without_parent] = $value_without_parent; $has_childs = get_db_all_rows_sql("SELECT * FROM tincident_type_field WHERE parent=" . $type_field['id']); if ($has_childs) { $i = 0; foreach ($has_childs as $child) { if ($i == 0) { $childs = $child['id']; } else { $childs .= ',' . $child['id']; } $i++; } $childs = "'" . $childs . "'"; $script = 'javascript:change_linked_type_fields_table(' . $childs . ',' . $type_field['id'] . ');'; } else { $script = ''; } } $input = print_select($values, 'search_type_field_' . $type_field['id'], $data, $script, __('Any'), '', true, false, false, $type_field['label']); } } } $table_type_fields->data[$row][$column] = $input; if ($column >= 3) { $column = 0; $row++; } else { $column++; } } } if ($table_type_fields->data) { $table_type_fields_html = print_table($table_type_fields, true); } $table->data[6][0] = "<div id='table_type_fields'>" . $table_type_fields_html . "</div>"; $table->data[7][0] = '<div style="width: 100%; text-align: left; height: 20px;"><a class="show_advanced_search" id="show_advanced_search" href="javascript:show_ad_search();">' . __('Advanced search') . '></a></div>'; //Store serialize filter serialize_in_temp($filter, $config["id_user"]); $table->data[7][2] = print_submit_button(__('Search'), 'search', false, 'class="sub search"', true); $table->data[7][2] .= print_button(__('Export to CSV'), '', false, 'window.open(\'' . 'include/export_csv.php?export_csv_tickets=1' . '\')', 'class="sub csv"', true); $table->colspan[7][2] = 4; $output .= '<form id="search_incident_form" method="post" action="index.php?sec=incidents&sec2=operation/incidents/incident_search">'; $output .= print_table($table, true); $output .= '</form>'; echo "<div class= 'dialog ui-dialog-content' id='search_inventory_window'></div>"; if ($return) { return $output; } echo $output; }
$row = array(); // Name $row[0] = __('Name') . ' '; $row[1] = print_input_text('name', $name, '', 25, 100, true); // Colour $row[2] = __('Colour') . ' '; $tag_colours = get_available_tag_colours(); $row[3] = print_select($tag_colours, 'colour', $colour, '', '', '', true, false, false); // Preview $row[4] = __('Preview') . ' '; $row[5] = '<span id="tag-preview"></span>'; $row[6] = print_input_hidden('id', $id, true); if (empty($id)) { $row[6] .= print_input_hidden('action', 'create', true); } else { $row[6] .= print_input_hidden('action', 'update', true); } $row[6] .= print_submit_button(__('Add'), 'create_btn', false, 'class="sub create"', true); $row[6] .= print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true); $row[6] .= ' '; $row[6] .= print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"', true); $table->data[] = $row; echo '<form id="tags-form" method="POST">'; print_table($table); echo '</form>'; // List $tags = get_available_tags(); html_render_tags_view($tags); ?> <script type="text/javascript">
} $data[6] = get_db_value('name', 'tsla', 'id', $sla['id_sla_base']); $data[7] = '<a href="index.php?sec=incidents& sec2=operation/slas/sla_detail& delete_sla=1&id=' . $sla['id'] . '" onClick="if (!confirm(\'' . __('Are you sure?') . '\')) return false;"> <img src="images/cross.png"></a>'; array_push($table->data, $data); } print_table($table); } echo '<form id="form-sla_detail" method="post" action="index.php?sec=incidents&sec2=operation/slas/sla_detail">'; echo '<div style="width: ' . $table->width . '; text-align: right;">'; print_submit_button(__('Create'), 'new_btn', false, 'class="sub create"'); print_input_hidden('new_sla', 1); echo '</div>'; echo '</form>'; } ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript" src="include/js/integria_incident_search.js"></script> <script type="text/javascript"> // Form validation trim_element_on_submit('#text-search_text'); trim_element_on_submit('#text-name');
print_input_hidden ("search_".$key, $value); } print_input_hidden ('sec2', 'operation/reporting/incidents_html'); print_input_hidden ('clean_output', 1); echo "</form>"; /* Add a form to generate HTML reports */ echo '<form id="pdf_report_form" method="post" target="_blank" action="index.php" style="clear: both">'; foreach ($filter as $key => $value) { print_input_hidden ("search_".$key, $value); } print_input_hidden ('sec2', 'operation/reporting/incidents_html'); print_input_hidden ('clean_output', 1); print_input_hidden ('pdf_output', 1); echo '</form>'; if ($incidents == false) { echo ui_print_error_message (__('Nothing was found'), '', true, 'h3', true); } else { $simple_mode = true; if ($show_stats) { $simple_mode = false; } print_incidents_stats_simply ($incidents, false, $simple_mode); } ?>
$table_description->data[0][0] = print_textarea("file_description", 3, 40, '', '', true, __('Description')); $table_description->data[1][0] = print_submit_button(__('Add'), 'crt_btn', false, 'class="sub create"', true); $html .= "<div id='file_description_table_hook' style='display:none;'>"; $html .= print_table($table_description, true); $html .= "</div>"; $table->colspan[10][0] = 4; $table->data[10][0] = print_container('file_upload_container', __('File upload'), $html, 'closed', true, false); } if ($create_incident) { $button = print_input_hidden('action', 'insert', true); if (give_acl($config["id_user"], 0, "IW")) { $button .= print_submit_button(__('Create'), 'action2', false, 'class="sub create"', true); } } else { $button = print_input_hidden('id', $id, true); $button .= print_input_hidden('action', 'update', true); $button .= print_submit_button(__('Update'), 'action2', false, 'class="sub upd"', true); } $table->colspan['button'][0] = 4; $table->data['button'][0] = $button; if ($has_permission) { if ($create_incident) { $action = 'index.php?sec=incidents&sec2=operation/incidents/incident_detail'; echo '<form id="incident_status_form" method="post" enctype="multipart/form-data">'; print_table($table); echo '</form>'; } else { echo '<form id="incident_status_form" method="post">'; print_table($table); echo '</form>'; }
function print_company_autocomplete_input($parameters) { if (isset($parameters['input_name'])) { $input_name = $parameters['input_name']; } $input_value = ''; $company_name = ''; if (isset($parameters['input_value'])) { $input_value = $parameters['input_value']; $company_name = get_db_value("name", "tcompany", "id", $input_value); if (!$company_name) { $company_name = ""; } } if (isset($parameters['input_id'])) { $input_id = $parameters['input_id']; } $return = false; if (isset($parameters['return'])) { $return = $parameters['return']; } //$input_size = 15; if (isset($parameters['size'])) { $input_size = $parameters['size']; } //$input_maxlength = 50; if (isset($parameters['maxlength'])) { $input_maxlength = $parameters['maxlength']; } $title = ''; if (isset($parameters['title'])) { $title = $parameters['title']; } $help_message = "Type at least two characters to search"; if (isset($parameters['help_message'])) { $help_message = $parameters['help_message']; } $return_help = true; if (isset($parameters['return_help'])) { $return_help = $parameters['return_help']; } $filter = ""; if (isset($parameters['filter'])) { $filter = $parameters['filter']; } $attributes = 'class="company_autocomplete"'; $html = ""; $html .= print_input_text_extended("autocomplete_" . $input_name, $company_name, $input_id, '', $input_size, $input_maxlength, false, '', $attributes, true, '', __($title)) . print_help_tip(__($help_message), $return_help); $html .= print_input_hidden($input_name, $input_value, true); if ($filter) { $html .= print_input_hidden("autocomplete_" . $input_name . "_filter", $filter, true); } if ($return) { return $html; } else { echo $html; } }
$table->class = 'search-table'; $table->style = array (); $table->style[0] = 'font-weight: bold;'; $table->data = array (); $table->data[0][0] = __('Search'); $table->data[0][0] .= print_input_text ("search_text", $search_text, "", 20, 100, true); $table->data[1][0] = print_submit_button (__('Search'), "search_btn", false, 'class="sub search"', true);; echo "<div class='divform'>"; echo '<form method="post" action="index.php?sec=incidents&sec2=operation/slas/sla_detail">'; print_table ($table); echo '</form>'; echo '<form id="form-sla_detail" method="post" action="index.php?sec=incidents&sec2=operation/slas/sla_detail">'; unset($table->data); $table->data[0][0] = print_submit_button (__('Create'), 'new_btn', false, 'class="sub create"',true); $table->data[0][0] .= print_input_hidden ('new_sla', 1); print_table ($table); echo '</form>'; echo "</div>"; $sql = "SELECT * FROM tsla $where_clause ORDER BY name"; $slas = get_db_all_rows_sql ($sql); if ($slas !== false) { $table->width = "100%"; $table->class = "listing"; $table->data = array (); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->head[0] = __('Name');
$table->class = "search-table-button"; $table->data = array(); $table->size = array(); $table->style = array(); $table->style[0] = 'font-weight: bold'; $table->colspan[1][0] = 3; $table->colspan[2][0] = 3; $table->colspan[3][0] = 3; $table->data[0][0] = print_input_text("from", $from, "", 30, 100, true, __('From')); $table->data[0][1] = print_input_text("to", $to, "", 30, 100, true, __('To')); $table->data[0][2] = print_input_text("cco", $cco, "", 30, 100, true, __('Send a copy to')); $table->data[1][0] = print_input_text("subject", $subject, "", 130, 100, true, __('Subject')); $table->data[2][0] = print_textarea("mail", 10, 1, $mail, 'style="height:350px;"', true, __('E-mail')); $table->data[3][0] = print_submit_button(__('Send email'), 'apply_btn', false, 'class="sub upd"', true); $table->data[3][0] .= print_input_hidden('id', $id, true); $table->data[3][0] .= print_input_hidden('send', 1, true); echo '<form method="post" id="lead_mail_go">'; print_table($table); echo "</form>"; ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript" > validate_form("#lead_mail_go"); // Rules: #text-from rules = { required: true, email: 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>'; echo '</form>'; echo'</div>'; ?>