function dbmgr_main() { echo '<link rel="stylesheet" href="include/styles/dbmanager.css" type="text/css" />'; $sql = (string) get_parameter('sql'); $clean_output = get_parameter("clean_output", 0); if ($clean_output == 0) { echo "<h1>" . __('Extensions') . " » " . __('Database interface'); $html_report_image = print_html_report_image("index.php?sec=godmode&sec2=godmode/setup/dbmanager&sql={$sql}", __("Report")); if ($html_report_image) { echo " " . $html_report_image; } echo "</h1>"; echo '<div class="note_simple">'; echo __("This is an advanced extension to interface with Integria IMS database directly using native SQL sentences. Please note that <b>you can damage</b> your Integria IMS installation if you don't know </b>exactly</b> what are you doing, this means that you can severily damage your setup using this extension. This extension is intended to be used <b>only by experienced users</b> with a depth knowledgue of Integria IMS."); echo '</div>'; echo "<br />"; echo __("Some samples of usage:") . " <blockquote><em>SHOW STATUS;<br />DESCRIBE tincidencia<br />SELECT * FROM tincidencia<br />UPDATE tincidencia SET sla_disabled = 1 WHERE inicio < '2010-01-10 00:00:00';</em></blockquote>"; echo "<br /><br />"; echo "<form method='post' action=''>"; print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES)); echo "<div style='width: 99%; text-align: right; margin-top: 6px;'>"; print_submit_button(__('Execute SQL'), '', false, 'class="sub next"'); echo "</div>"; echo "</form>"; } else { echo "<form method='post' action=''>"; print_textarea('sql', 2, 40, html_entity_decode($sql, ENT_QUOTES)); echo "<div style='width: 99%; text-align: right; margin-top: 6px;'>"; print_submit_button(__('Execute SQL'), '', false, 'class="sub next"'); echo "</div>"; echo "</form>"; } // Processing SQL Code if ($sql == '') { return; } echo "<br />"; echo "<hr />"; echo "<br />"; $error = ''; $result = dbmanager_query($sql, $error); if ($result === false) { echo '<strong>An error has occured when querying the database.</strong><br />'; echo $error; return; } if (!is_array($result)) { echo "<strong>Output: <strong>" . $result; return; } $table->width = '90%'; $table->class = 'dbmanager'; $table->head = array_keys($result[0]); $table->data = $result; print_table($table); }
$table->data[17][0] = print_textarea ('internal_note', 5, 40, $internal_note, '', true, __('Internal note')); echo '<form id="form-invoice" method="post" enctype="multipart/form-data" action="index.php?sec=customers&sec2=operation/companies/company_detail &view_invoice=1&op=invoices&id_invoice='.$id_invoice.'">'; print_table ($table); echo '<div class="button" style="width:'.$table->width.';">'; if ($id_invoice != -1) { print_submit_button (__('Update'), 'button-upd', false, 'class="sub upd"'); print_input_hidden ('id', $id); print_input_hidden ('operation_invoices', "update_invoice"); print_input_hidden ('bill_id_variable', $bill_id_variable); } else { print_submit_button (__('Add'), 'button-crt', false, 'class="sub next"'); print_input_hidden ('operation_invoices', "add_invoice"); print_input_hidden ('bill_id_variable', $bill_id_variable); } if ($id_invoice != -1) { echo '</div>'; echo '</form>'; echo '<br>'; echo '<ul class="ui-tabs-nav">'; echo '<li class="ui-tabs-selected"><span>'.__('Files').'</span></li>'; echo '<li class="ui-tabs-title">' . __('Files') . '</h1></li>'; echo '</ul>'; echo '<br>';
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>'; } }
audit_db($config["id_user"], $config["REMOTE_ADDR"], "Group management", "Deleted group '{$name}'"); echo '<h3 class="suc">' . __('Successfully deleted') . '</h3>'; } } $offset = get_parameter("offset", 0); $search_text = get_parameter("search_text", ""); echo "<table class='search-table' style='width: 99%;'><form name='bskd' method=post action='index.php?sec=users&sec2=godmode/grupos/lista_grupos'>"; echo "<td>"; echo "<b>" . __('Search text') . "</b> "; print_input_text("search_text", $search_text, '', 40, 0, false); echo "</td>"; echo "<td>"; print_submit_button(__('Search'), '', false, 'class="sub next"', false, false); echo "</td>"; echo "</table></form>"; $groups = get_db_all_rows_sql("SELECT * FROM tgrupo WHERE nombre LIKE '%{$search_text}%' ORDER BY nombre"); $groups = print_array_pagination($groups, "index.php?sec=users&sec2=godmode/grupos/lista_grupos"); print_groups_table($groups); echo '<form method="post" action="index.php?sec=users&sec2=godmode/grupos/configurar_grupo">'; echo '<div class="button" style="width: ' . $table->width . '">'; print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"'); echo '</div>'; echo '</form>'; ?> <script type="text/javascript" src="include/js/jquery.validation.functions.js"></script> <script type="text/javascript"> trim_element_on_submit('#text-search_text'); </script>
} $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>'; print_container_div("inventory_form",__("Inventory form search"),$search_other, 'open', false, false); echo '</form>'; } $write_permission = enterprise_hook ('inventory_check_acl', array ($config['id_user'], $id, true)); $page = (int)get_parameter('page', 1); switch ($mode) { case 'tree': echo '<div class = "inventory_tree_table" id = "inventory_tree_table">'; inventories_print_tree($sql_search_pagination, $last_update);
$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>'; ?> <script type="text/javascript" src="include/js/jquery.validate.js"></script>
$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[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">
$options = array(); $options['id'] = 'news_json'; $options['hidden'] = 1; $options['content'] = base64_encode(json_encode($news)); print_div($options); } // Prints news dialog template echo '<div id="news_dialog" title="" style="display: none;">'; echo '<div style="position:absolute; top:30px; left: 10px; text-align: left; right:0%; height:70px; min-width:560px; width: 95%; margin: 0 auto; border: 1px solid #FFF; line-height: 19px;">'; echo '<span style="display: block; height: 260px; overflow: auto; text-align: justify; padding: 5px 15px 4px 10px; background: #ECECEC; border-radius: 4px;" id="new_content"></span>'; echo '<span style="font-size: 12px; display: block; margin-top: 20px;" id="new_creator"></span>'; echo '<span style="font-size: 12px; display: block; font-style: italic;" id="new_date"></span>'; echo '</div>'; echo '<div style="position:absolute; margin: 0 auto; top: 340px; right: 10px; width: 570px">'; echo '<div style="float: right; width: 20%;">'; print_submit_button("Ok", 'hide-news-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok" style="width:100px;"'); echo '</div>'; echo '</div>'; echo '</div>'; ?> <script type="text/javascript" src="include/js/encode_decode_base64.js"></script> <script type="text/javascript" language="javascript"> /* <![CDATA[ */ $(document).ready (function () { if (typeof($('#news_json').html()) != "undefined") { var news_raw = Base64.decode($('#news_json').html()); var news = JSON.parse(news_raw); var inew = 0;
echo "<td width=\"45%\">"; echo "<a id=\"browse_button\">" . __('browse it') . "</a>"; echo "</table>"; echo "<input name=\"upfile\" type=\"file\" id=\"file-upfile\" class=\"sub file\" />"; echo "</div>"; echo "<ul></ul>"; echo "</form>"; echo "<div id='file_description_table_hook' style='display:none;'>"; $table = new stdClass; $table->width = '99%'; $table->id = 'incident_file_description'; $table->class = 'search-table-button'; $table->data = array(); $table->data[0][0] = print_textarea ("file_description", 5, 40, '', '', true, __('Description')); $table->data[1][0] = print_submit_button (__('Add'), 'crt_btn', false, 'class="sub create"', true); print_table($table); echo "</div>"; } if ($clean_output) { echo '<h1 class="ticket_clean_report_title">'.__("Files")."</h1>"; } else { echo "<h3>".__('Files')."</h3>"; } // Files attached to this incident $files = get_incident_files ($id); if ($files === false) {
$have_cost = 0; $keep_cost = 0; $public = 0; $keep_public = 0; $table->data[2][0] = print_checkbox ('have_cost', 1, $have_cost, true, __('Have cost')); $table->data[2][1] = print_checkbox ('keep_cost', 1, $keep_cost, true, __('Keep cost')); $table->data[3][0] = print_checkbox ('public', 1, $public, true, __('Public')); $table->data[3][1] = print_checkbox ('keep_public', 1, $keep_public, true, __('Keep public')); $table->colspan[5][0] = 2; $table->data[5][0] = print_submit_button (__('Update'), 'update_btn', false, 'class="sub upd"', true); $table->data[5][0] .= print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"', true); print_table ($table); echo '</div>'; ?> <script type="text/javascript"> $(document).ready (function () { //WU Multiple delete $("#submit-delete_btn").click (function () { if (! confirm ("<?php echo __('Are you sure?')?>")) return false; var checkboxValues = "";
$table_search->data[0][2] .= print_select($object_fields, 'object_fields_search[]', '', '', 'Select', '', true, 4, true, false, false, 'width: 200px;'); $params_assigned['input_id'] = 'text-owner'; $params_assigned['input_name'] = 'owner'; $params_assigned['input_value'] = $owner; $params_assigned['title'] = 'Owner'; $params_assigned['return'] = true; $table_search->data[1][0] = user_print_autocomplete_input($params_assigned); $contracts = get_contracts(); $manufacturers = get_manufacturers(); $table_search->data[1][1] = print_select($contracts, 'id_contract', $id_contract, '', __('None'), 0, true, false, false, __('Contract'), '', 'width: 200px;'); $table_search->data[1][2] = print_select($manufacturers, 'id_manufacturer', $id_manufacturer, '', __('None'), 0, true, false, false, __('Manufacturer'), '', 'width: 200px;'); $table_search->data[1][3] = print_checkbox_extended('last_update', 1, $last_update, false, '', '', true, __('Last updated')); $buttons = '<div style=" text-align: right;">'; $buttons .= print_input_hidden('search', 1, true); $buttons .= print_input_hidden('mode', $mode, true); $buttons .= print_submit_button(__('Search'), 'search', false, 'class="sub search"', true); $filter["query"] = $sql_search; serialize_in_temp($filter, $config["id_user"]); $buttons .= print_button(__('Export to CSV'), '', false, 'window.open(\'' . 'include/export_csv.php?export_csv_inventory=1' . '\')', 'class="sub csv"', true); $buttons .= print_report_button("index.php?sec=inventory&sec2=operation/inventories/inventory&search=1¶ms={$params}", __('Export to PDF') . " "); $buttons .= '</div>'; $all_inventory_status = inventories_get_inventory_status(); array_unshift($all_inventory_status, __("All")); $table_search->data[2][0] = print_select($all_inventory_status, 'inventory_status', $inventory_status, '', '', '', true, false, false, __('Status')); $params_associated['input_id'] = 'text-associated_user'; $params_associated['input_name'] = 'associated_user'; $params_associated['input_value'] = $associated_user; $params_associated['title'] = __('Associated user'); $params_associated['return'] = true; $table_search->data[2][1] = user_print_autocomplete_input($params_associated); $companies = get_companies();
else echo '<h3 class="suc">'.__('Note was deleted successfully').'</h3>'; mail_workorder ($id, 5, $res, false, $note); } $table = new StdClass(); $table->width = '100%'; $table->class = 'search-table-button'; $table->colspan = array (); $table->data = array (); $table->size = array(); $table->style = array(); $table->data[0][0] = print_textarea ('note', 10, 70, '', "style='resize:none;'", true, __('Note')); $table->data[1][0] = print_submit_button (__('Add'), 'addnote', false, 'class="sub next"', true); echo '<form method="post" action="index.php?sec=projects&sec2=operation/workorders/wo&operation=view&tab=notes&addnote=1&id='.$id.'">'; print_table ($table); echo "</form>"; // List of WO attachments $sql = "SELECT * FROM ttodo_notes WHERE id_todo = $id ORDER BY `creation` DESC"; $notes = get_db_all_rows_sql ($sql); if ($notes !== false) { echo "<h3>". __('Notes of this workorder')."</h3>"; foreach ($notes as $note) {
. print_help_tip (__("Type at least two characters to search"), true); $wo_status_values = wo_status_array (); $table->data[1][0] = print_select ($wo_status_values, 'search_status', $search_status, '', __("Any"), -1, true, 0, false, __('WO Status') ); $priorities = get_priorities(); $table->data[1][1] = print_select ($priorities, 'search_priority', $search_priority, '', __("Any"), -1, true, 0, false, __('Priority') ); $avatar = get_db_value ('avatar', 'tusuario', 'id_usuario', $config["id_user"]); if (!$avatar) $avatar = "avatar1"; $table->data[1][2] = print_submit_button (__('Search'), "search_btn", false, 'class="sub search"', true); $table->data[1][2] .= ' <a href="index.php?sec=projects&sec2=operation/workorders/wo&owner=' .$config["id_user"].'"><img src="images/avatars/'.$avatar.'.png" class="avatar_small" title="'.__('My WO\'s').'"></a>'; $table->data[1][2] .= ' <a href="index.php?sec=projects&sec2=operation/workorders/wo&creator=' .$config["id_user"].'"><img src="images/user_comment.png" title="'.__('My delegated WO\'s').'"></a>'; $table->rowspan[0][3] = 3; if ($owner != "") { $table->data[0][3] = '<b>'.__('Submitters') .'</b>'; $table->data[0][3] .= '<br>'. graph_workorder_num ('200', '100', 'submitter', $where_clause, 5); } else { $table->data[0][3] = '<b>'.__('Owners') .'</b>'; $table->data[0][3] .= '<br><div class="pie_frame">'. graph_workorder_num ('200', '100', 'owner', $where_clause, 5) . '</div>'; }
$static_displayvalue = empty($attachment->filename_original) ? '' : anchor($attachment->url, $attachment->filename_original, array('target' => '_blank')) . nbs(2); $static_displayvalue .= anchor(base_url() . 'miniant/servicequotes/servicequote/delete_attachment/' . $servicequote_id, '<i class="fa fa-trash-o" onclick="return deletethis();" title="Delete this attachment?"></i>'); print_file_element(array('label' => 'Attachment', 'name' => 'attachment', 'show' => true, 'render_static' => !empty($attachment->filename_original) || $review_only, 'static_displayvalue' => $static_displayvalue, 'required' => false)); ?> <?php if ($review_only) { ?> <a href="<?php echo base_url(); ?> miniant/servicequotes/servicequote/prepare_client_quote/<?php echo $servicequote_id; ?> /1" class="btn btn-primary"><i class="fa fa-step-backward"></i>Previous</a> <a href="<?php echo base_url(); ?> miniant/servicequotes/servicequote/record_received_parts/<?php echo $servicequote_id; ?> /1" class="btn btn-primary">Next <i class="fa fa-step-forward"></i></a> <?php } else { print_submit_container_open(); print_submit_button('Save client response'); print_submit_container_close(); } print_form_container_close(); echo '</div>'; echo form_close();
} if (!empty($pass)) { $transport_conf['pass'] = $pass; } if (!empty($proto)) { $transport_conf['proto'] = $proto; } } try { // If the transport can connect, it will not throw an exception mail_get_transport($transport_conf); // Success echo json_encode(array('result' => true, 'message' => __('Success'))); return; } catch (Exception $e) { // Failure echo json_encode(array('result' => false, 'message' => $e->getMessage())); return; } } if ($change_template_alert) { echo "<div style='float: left;'><img style='padding:10px;' src='images/icon_delete.png' alt='" . __('Delete') . "'></div>"; echo "<div style='float: left; font-size:15px; font-weight: bold; margin-top:32px;'><b>" . __('Are you sure you want to change action?') . "</b></br>"; echo "<span style='font-size:13px; font-weight: normal; line-height: 1.5em;'>" . __('Remove template contents') . "</span></div>"; echo '<form id="change_template_form" method="post">'; echo print_submit_button(__('Delete'), "delete_btn", false, 'class="sub close" width="160px;"', true); echo print_button(__('Cancel'), 'modal_cancel', false, '', '', false); echo '</form>'; return; } exit;
$result_insert = process_sql_insert($external_table, $values); if ($result_insert) { echo "<h3 class='suc'>" . __('Inserted row') . "</h3>"; } else { echo "<h3 class='error'>" . __('There was a problem inserting row') . "</h3>"; } } echo "<h1>" . __('External table management') . "</h1>"; $table->width = '98%'; $table->class = 'search-table'; $table->id = "external-editor"; $table->data = array(); $ext_tables = inventories_get_external_tables($id_object_type); $table->data[0][0] = print_select($ext_tables, 'external_table', $external_table, '', __('None'), "", true, false, false, __('Select external table')); $button = '<div style=" text-align: right;">'; $button .= print_submit_button(__('Add row'), 'search', false, 'class="sub search"', true); $button .= '</div>'; $table->data[1][1] = $button; echo '<form id="add_row" method="post" action="index.php?sec=inventory&sec2=operation/inventories/manage_external_tables&id=' . $id_object_type . '&external_table=' . $external_table . '&add_row=1">'; print_table($table); echo '</form>'; if ($external_table) { $table_list->width = '99%'; $table_list->class = 'listing'; $table_list->data = array(); $table_list->head = array(); $table_list->size = array(); $table_fields = get_db_all_rows_sql("DESC " . $external_table); if ($table_fields == false) { $table_fields = array(); }
$search = get_parameter('search', ''); unset($table); $table->class = 'result_table'; $table->width = '98%'; $table->data = array(); $table->header = array(); $table->style[0] = 'width:60px;text-align:right;'; $table->style[1] = 'width:150px'; $table->style[2] = 'width:60px;text-align:right;'; $table->style[3] = 'width:150px'; $table->style[4] = 'width:100px'; $table->data[0][0] = "<b>" . __('Search') . "</b>"; $table->data[0][1] = print_input_text('search', $search, '', 20, 0, true); $table->data[0][2] = "<b>" . __('Status') . "</b>"; $table->data[0][3] = print_select($statuses, 'status', $status, '', __('Any'), 0, true); $table->data[0][4] = print_submit_button(__('Filter'), '', false, 'class="sub search"', true); $table->data[0][5] = ''; echo '<form method="post">'; print_table($table); echo '</form>'; unset($table); // INCIDENT LIST $table->class = 'result_table listing'; $table->width = '98%'; $table->id = 'incident_search_result_table'; $table->head = array(); $table->head[0] = __('ID'); $table->head[1] = __('Ticket'); $table->head[2] = __('Status') . "<br /><em>" . __('Resolution') . "</em>"; $table->head[3] = __('Priority'); $table->head[4] = __('Updated') . "<br /><em>" . __('Started') . "</em>";
echo "<input type='hidden' name='year' value='$year'>"; echo "<td>"; // Show user $params['input_id'] = 'text-id_user'; $params['input_name'] = 'id_user'; $params['return'] = false; $params['return_help'] = false; $params['input_value'] = $id_user_show; user_print_autocomplete_input($params); echo "</td>"; echo "<td>"; print_submit_button (__('Go'), 'sub_btn', false, 'class="upd sub"'); echo "</td>"; } echo "</table></form>"; echo "</td></tr>"; echo "<tr>"; $calendars = array(); for ($ax = 1; $ax < 13; $ax++){ $calendars[] = generate_small_work_calendar ($year, $ax, $days_f, 3, $config["first_day_week"], "en", $id_user_show); } $index = 0; for ($ax = 1; $ax < 13; $ax++){ if (fmod($ax-1,4) == 0)
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 '</form>'; } echo '</div>'; } ?> <script type="text/javascript" src="include/languages/date_<?php echo $config['language_code']; ?>.js"></script> <script type="text/javascript" src="include/js/jquery.ui.autocomplete.js"></script> <script type="text/javascript" src="include/js/integria_date.js"></script>
</tr> <tr id="new_part_row" style="display: none"> <td><?php echo form_dropdown('part_type_id', $dropdowns['part_types']); echo form_hidden('part_id', null); ?> </td> <td><?php echo form_input(array('name' => 'quantity', 'placeholder' => 'Quantity')); ?> </td> <td class="actions" style="width: 220px"> <button class="btn btn-success btn-sm" type="button" id="save_new_part">Save Part/Labour</button> <button class="btn btn-warning btn-sm" type="button" id="cancel_new_part">Cancel</button> </td> </tr> </tbody> </table> </div> <?php print_fieldset_close(); echo "</div>"; print_submit_container_open(); print_submit_button(); print_cancel_button(base_url() . 'miniant/orders/order/edit/' . $order_id, 'Return to job #' . $order_id); print_submit_container_close(); print_form_container_close(); echo '</div>'; echo form_close(); echo '</div>'; echo '</div>';
$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); // 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) {
$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"> (function ($) { var $idHidden = $('input#hidden-id'); var $nameInput = $('input#text-name'); var $colourInput = $('select#colour'); var $tagSpan = $('span#tag-preview');
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->head[1] = __('Manager');
echo "</tr>"; } if ($abletomovecourses) { echo '<tr><td colspan="3" align="right">'; echo '<br />'; unset($displaylist[$category->id]); // loop and unset categories the user can't move into foreach ($displaylist as $did => $dlist) { if (!has_capability('moodle/category:update', get_context_instance(CONTEXT_COURSECAT, $did))) { unset($displaylist[$did]); } } choose_from_menu($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: submitFormById('movecourses')"); echo '<input type="hidden" name="id" value="' . $category->id . '" />'; if (has_capability('moodle/category:update', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $numcourses > 1) { print_submit_button('deletecourses', 'Delete Selected Courses', null); } echo '</td></tr>'; } echo '</table>'; echo '</div></form>'; echo '<br />'; } } echo '<div class="buttons">'; if (has_capability('moodle/category:update', get_context_instance(CONTEXT_SYSTEM)) and $numcourses > 1) { /// Print button to re-sort courses by name unset($options); $options['id'] = $category->id; $options['resort'] = 'name'; $options['sesskey'] = $USER->sesskey;
function form_search_users($return = false, $filter = false) { include_once "functions_user.php"; global $config; $output = ''; if (!$filter) { $offset = get_parameter("offset", 0); $search_text = get_parameter("search_text", ""); $disabled_user = get_parameter("disabled_user", -1); $level = get_parameter("level", -10); $group = get_parameter("group", 0); } else { $offset = (int) $filter['offset']; $search_text = (string) $filter['search_text']; $disabled_user = (int) $filter['disabled_user']; $level = (int) $filter['level']; $group = (int) $filter['group']; } $table->id = "table-user_search"; $table->width = "99%"; $table->class = "search-table"; $table->size = array(); $table->style = array(); $table->data = array(); $table->data[0][0] = print_input_text("search_text", $search_text, '', 15, 0, true, __('Search text')); $user_status = array(); $user_status[0] = __('Enabled'); $user_status[1] = __('Disabled'); $table->data[0][1] = print_select($user_status, 'disabled_user', $disabled_user, '', __('Any'), -1, true, 0, false, __('User status')); $global_profile = array(); $global_profile[-1] = __('External'); $global_profile[0] = __('Standard'); $global_profile[1] = __('Administrator'); $table->data[0][2] = print_select($global_profile, 'level', $level, '', __('Any'), -10, true, 0, false, __('Global profile')); $group_name = get_user_groups(); $group_name[-1] = __('Groupless'); $table->data[0][3] = print_select($group_name, 'group', $group, '', __('Any'), 0, true, 0, false, __('Group')); $table->data[0][4] = print_submit_button(__('Search'), 'search', false, 'class="sub search"', true); $output .= '<form name="bskd" method=post id="saved-user-form" action="index.php?sec=users&sec2=godmode/usuarios/lista_usuarios">'; $output .= print_table($table, true); $output .= '</form>'; if ($return) { return $output; } echo $output; }
echo "<form method=post action=''>"; echo "<table width=100% class=search-table-button>"; 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 () {
$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>'; } } else {
$mail .= "\n\t" . $company_user; $table->width = "99%"; $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 = {
$table->width = '100%'; $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';