if ($clean_output == 0) { // link full screen if ($pure) { $html_report_image = print_html_report_image ("index.php?sec=users&sec2=operation/user_report/report_annual&id_user=$id_user_show&year=$year", __("Full screen"), "", array("pure" => 0)); } else { $html_report_image = print_html_report_image ("index.php?sec=users&sec2=operation/user_report/report_annual&id_user=$id_user_show&year=$year", __("Full screen"), "", array("pure" => 1)); if ($html_report_image) { echo "<li>" . $html_report_image . "</li>"; } // link PDF report $report_image = print_report_image ("index.php?sec=users&sec2=operation/user_report/report_annual&id_user=$id_user_show&year=$year", __("PDF report")); if ($report_image) { echo "<li>" . $report_image . "</li>"; } } } echo "</ul>"; echo "</div>"; echo "</h4>"; echo "<table class='search-table' width=100% style='text-align:right;'><tr><td>"; echo "<table style='margin: 0px auto; '><tr>"; echo "<td style='text-align:right;'>"; echo "<a href='index.php?sec=users&sec2=operation/user_report/annual_workunits&operation=show_vacations&year=$year&id_user=$id_user_show'>".__('Vacations days').'</a>'; echo "<td class='day_vacation day_legend'>";
$table->head[1] = __('View'); $table->head[2] = __('PDF'); $table->head[3] = __('CSV'); $table->head[4] = __('Delete'); $table->size = array(); foreach ($reports as $report) { $data = array(); if (dame_admin($config['id_user'])) { $data[0] = '<a href="index.php?sec=users&sec2=operation/inventories/inventory_reports_detail&id=' . $report['id'] . '">'; $data[0] .= $report['name']; $data[0] .= '</a>'; } else { $data[0] .= $report['name']; } $data[1] = print_html_report_image("index.php?sec=users&sec2=operation/inventories/inventory_reports_detail&render_html=1&id=" . $report['id'], __("HTML report")); $data[2] = print_report_image("index.php?sec=users&sec2=operation/inventories/inventory_reports_detail&render_html=1&id=" . $report['id'], __("PDF report")); $data[3] = "<a href='index.php?sec=users&sec2=operation/inventories/inventory_reports_detail&render=1&raw_output=1&clean_output=1&id=" . $report['id'] . "'><img src='images/binary.png'></a>"; $data[4] = "<a href='index.php?sec=users&sec2=operation/inventories/inventory_reports&delete_report=1&id=" . $report["id"] . "'>"; $data[4] .= '<img src="images/cross.png">'; $data[4] .= '</a>'; array_push($table->data, $data); } print_table($table); } echo '<form method="post" action="index.php?sec=users&sec2=operation/inventories/inventory_reports_detail">'; echo '<div class="button" style="width: 99%">'; if (dame_admin($config['id_user'])) { print_submit_button(__('Create'), 'new_btn', false, 'class="sub create"'); } echo '</div>'; echo '</form>';
$name = $project["name"]; $description = $project["description"]; $start_date = $project["start"]; $end_date = $project["end"]; $owner = $project["id_owner"]; $id_project_group = $project["id_project_group"]; } // Main project table echo "<h1>" . __('Project report') . " » " . get_db_value("name", "tproject", "id", $id_project); if (!$clean_output) { echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li>"; echo "<a href='index.php?sec=projects&sec2=operation/projects/project_detail&id_project={$id_project}'>" . print_image("images/go-previous.png", true, array("title" => __("Back to project editor"))) . "</a>"; echo "</li>"; $report_image = print_report_image("index.php?sec=projects&sec2=operation/projects/project_report&id_project={$id_project}", __("PDF report")); if ($report_image) { echo "<li>"; echo $report_image; echo "</li>"; } echo "</ul>"; echo "</div>"; } echo "</h1>"; // Right/Left Tables $table->width = '100%'; $table->class = "none"; $table->size = array(); $table->size[0] = '50%'; $table->size[1] = '50%';
$wus = workunits_get_vacation_wu($id_user_show, $year); $title = __('VACATIONS'); break; case 'show_worked_projects': $wus = workunits_get_worked_project_wu($id_user_show, $year); $title = __('PROJECTS'); break; case 'show_worked_tickets': $wus = workunits_get_worked_ticket_wu($id_user_show, $year); $title = __('TICKETS'); break; default: break; } echo "<h1>" . __('Workunit resume for user') . " " . $id_user_show . " - " . $title; $report_image = print_report_image("index.php?sec=users&sec2=operation/user_report/annual_workunits&operation={$operation}&id_user={$id_user_show}&year={$year}", __("PDF report")); if ($report_image) { echo " " . $report_image; } echo "<div id='button-bar-title'>"; echo "<ul>"; echo '<li>'; echo '<a href="index.php?sec=users&sec2=operation/user_report/report_annual&id_user='******'&year=' . $year . '">' . print_image("images/go-previous.png", true, array("title" => __("Back to incident"))) . "</a>"; echo '</li>'; echo "</ul>"; echo "</div>"; echo "</h1>"; if (empty($wus)) { echo '<h4>' . __('No data to show') . '</h4>'; } else { foreach ($wus as $workunit) {
$graph_ttl = 2; } $search_params = "&search_text={$search_text}&search_invoice_status={$search_invoice_status}&search_last_date={$search_last_date}&search_date_end={$search_date_end}&search_date_begin={$search_date_begin}&search_invoice_type={$search_invoice_type}&search_company_role={$search_company_role}&search_company_manager={$search_company_manager}"; $read = check_crm_acl('company', 'cr'); if (!$read) { include "general/noaccess.php"; exit; } echo "<h1>" . __('Invoice statistics'); if (!$pdf_report) { echo "<div id='button-bar-title'>"; echo "<ul>"; echo "<li>"; echo "<a href='index.php?sec=customers&sec2=operation/invoices/invoice_detail" . $search_params . "'>" . print_image("images/go-previous.png", true, array("title" => __("Back to project editor"))) . "</a>"; echo "</li>"; $report_image = print_report_image("index.php?sec=customers&sec2=operation/invoices/invoice_stats&report_name=" . __("Invoice Statistics report") . $search_params, __("PDF report")); if ($report_image) { echo "<li>"; echo $report_image; echo "</li>"; } echo "</ul>"; echo "</div>"; } echo "</h1>"; $where_clause = " 1 = 1 "; if ($search_text != "") { $where_clause .= sprintf('AND (id_company IN (SELECT id FROM tcompany WHERE name LIKE "%%%s%%") OR bill_id LIKE "%%%s%%" OR description LIKE "%%%s%%")', $search_text, $search_text, $search_text); }
} $kb_data = get_db_row("tkb_data", "id", $id); $data = $kb_data["data"]; $title = $kb_data["title"]; $timestamp = $kb_data["timestamp"]; $id_language = $kb_data["id_language"]; $product = ''; if ($kb_data["id_product"]) { $product = get_db_value('name', 'tkb_product', 'id', $kb_data['id_product']); } $category = ''; if ($kb_data["id_category"]) { $category = get_db_value('name', 'tkb_category', 'id', $kb_data['id_category']); } echo '<h2>' . __('KB article review'); $report_image = print_report_image("index.php?sec=kb&sec2=operation/kb/browse_data&view={$id}", __("PDF")); if ($report_image) { echo " "; echo $report_image; } if ($edit_perm) { echo " "; echo "<a href='index.php?sec=kb&sec2=operation/kb/manage_data&update=" . $kb_data['id'] . "'><img border=0 title='" . __('Edit') . "' src='images/application_edit.png'></a>"; } echo '</h2>'; $avatar = get_db_value('avatar', 'tusuario', 'id_usuario', $kb_data['id_user']); echo "<p><b>{$title}</b>"; // Title header echo "<div class='notetitle' style='height: 50px;'>"; echo "<table class='blank' border=0 width='100%' cellspacing=0 cellpadding=0 style='background: transparent; line-height: 12px; border: 0px; margin-left: 0px;margin-top: 0px;'>"; echo "<tr><td rowspan=3 width='7%'>";
if ($lock_month != "") { $this_month = date('Y-m-d H:i:s', strtotime("{$year}-{$month}-01")); $this_month_limit = date('Y-m-d H:i:s', strtotime("{$year}-{$month}-31")); $workunits = get_db_all_rows_sql("SELECT id FROM tworkunit WHERE id_user='******' AND locked = '' AND timestamp >= '{$this_month}' AND timestamp < '{$this_month_limit}'"); foreach ($workunits as $workunit) { if (check_workunit_permission($workunit["id"])) { lock_task_workunit($workunit["id"]); } } } echo "<h1>" . __('Monthly report for') . " {$id}"; // Lock all workunits in this month echo " <a href='index.php?sec=users&sec2=operation/user_report/monthly&lock_month={$month}&month={$month}&year={$year}&id={$id}'>"; echo "<img src='images/rosette.png' border=0 title='" . _("Lock all workunits in this month") . "'>"; echo "</a>"; $report_image = print_report_image("index.php?sec=users&sec2=operation/user_report/monthly&month={$month}&year={$year}&id={$id}", __("PDF report")); if ($report_image) { echo " " . $report_image; } echo "</h1>"; $first_of_month = gmmktime(0, 0, 0, $month, 1, $year); list($year, $month_name) = explode(',', gmstrftime('%Y,%B', $first_of_month)); echo "<table width=99% class='search-table' style='padding: 0px; border-spacing: 0px;'>"; echo "<tr><td colspan=4 class='calendar_annual_header' style='text-align: center;'>"; echo "<a href='index.php?sec=users&sec2=operation/user_report/monthly&month={$prev_month}&year={$prev_year}&id={$id}'><img src='images/control_rewind_blue.png' title='" . __('Prev') . "' class='calendar_arrow'></a>"; echo "<span class='calendar-month' style='font-size: 0.93em; color: #FFFFFF; padding: 3px;'>" . strtoupper(htmlentities(ucfirst($month_name))) . " {$year}</span>"; echo "<a href='index.php?sec=users&sec2=operation/user_report/monthly&month={$next_month}&year={$next_year}&id={$id}'><img src='images/control_fastforward_blue.png' title='" . __('Next') . "' class='calendar_arrow'></a>"; echo "</td></tr>"; echo "<tr><td>"; if (give_acl($config["id_user"], 0, "PM")) { echo "<td colspan=3 style='text-align: center; padding-top: 5px;'>";
echo "<h2>" . __("Full report") . "</h2>"; echo "<h4>"; if ($user_id != "") { echo dame_nombre_real ($user_id); } if ($clean_output == 0){ // link full screen if($render_resolution == 0){ $html_report_image = print_html_report_image ("index.php?sec=users&sec2=operation/user_report/report_full&render_resolution=1&user_id=$user_id&end_date=$end_date&start_date=$start_date&incident_resolution=$resolution&search_id_group=$id_group&author=$author&editor=$editor&search_status=$status&only_projects=$only_projects", __("Full screen"), "", "", 1); if ($html_report_image) { echo " " . $html_report_image; } // link PDF report $report_image = print_report_image ("index.php?sec=users&sec2=operation/user_report/report_full&user_id=$user_id&end_date=$end_date&start_date=$start_date&incident_resolution=$resolution&search_id_group=$id_group&author=$author&editor=$editor&search_status=$status&only_projects=$only_projects", __("PDF report")); if ($report_image) { echo " " . $report_image; } } if($render_resolution == 1){ echo "<a style='float:right;' href='index.php?sec=users&sec2=operation/user_report/report_full&user_id=$user_id'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back to full report")))."</a>"; } } echo "</h4>"; if ($clean_output == 0){ if($render_resolution == 0){ echo "<form id='form-report_full' method='post' action='index.php?sec=users&sec2=operation/user_report/report_full'>"; echo "<table class='search-table-button' style='' width='100%'>";