本文整理汇总了PHP中human_time_comparation函数的典型用法代码示例。如果您正苦于以下问题:PHP human_time_comparation函数的具体用法?PHP human_time_comparation怎么用?PHP human_time_comparation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了human_time_comparation函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_db_value
}
$data[3] = '<a href="' . $config["base_url"] . '/index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id=' . $incident['id_incidencia'] . '">' . $incident['titulo'] . '</a>';
$data[4] = get_db_value("nombre", "tgrupo", "id_grupo", $incident['id_grupo']);
if ($config["show_creator_incident"] == 1) {
$id_creator_company = get_db_value("id_company", "tusuario", "id_usuario", $incident["id_creator"]);
if ($id_creator_company != 0) {
$company_name = (string) get_db_value('name', 'tcompany', 'id', $id_creator_company);
$data[4] .= "<br><span style='font-style:italic'>{$company_name}</span>";
}
}
$resolution = isset($resolutions[$incident['resolution']]) ? $resolutions[$incident['resolution']] : __('None');
$data[5] = '<strong>' . $statuses[$incident['estado']] . '</strong><br /><em>' . $resolution . '</em>';
$data[6] = print_priority_flag_image($incident['prioridad'], true);
$data[7] = human_time_comparation($incident["actualizacion"]);
$data[7] .= '<br /><em>';
$data[7] .= human_time_comparation($incident["inicio"]);
$data[7] .= '</em>';
$data[8] = $incident['id_usuario'];
array_push($table->data, $data);
}
print_table($table);
}
}
echo "<div class= 'dialog ui-dialog-content' title='" . __("Warning") . "' id='custom_search'></div>";
?>
<script type="text/javascript" src="include/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="include/languages/date_<?php
echo $config['language_code'];
?>
.js"></script>
<script type="text/javascript" src="include/js/integria_date.js"></script>
示例2: get_db_sql
} else {
$data[3] = "";
}
$sum_leads = get_db_sql("SELECT COUNT(id) FROM tlead WHERE progress < 100 AND id_company = " . $company["id"]);
if ($sum_leads > 0) {
$leads_data = " ({$sum_leads}) ";
$leads_data .= get_db_sql("SELECT SUM(estimated_sale) FROM tlead WHERE progress < 100 AND id_company = " . $company["id"]);
$data[4] = "<a title='{$leads_data}' href='index.php?sec=customers&sec2=operation/companies/company_detail&op=leads&id=" . $company["id"] . "'><img src='images/icon_lead.png'></a>";
} else {
$data[4] = "";
}
$data[5] = $company["manager"];
$data[6] = $company["country"];
// get last activity date for this company record
$last_activity = get_db_sql("SELECT MAX(date) FROM tcompany_activity WHERE id_company = " . $company["id"]);
$data[7] = human_time_comparation($last_activity);
if (!$company["billing"]) {
$company["billing"] = '0.00';
}
$data[8] = $company["billing"];
// . " " . $config["currency"];
$manage_permission = check_crm_acl('company', 'cm', $config['id_user'], $company['id']);
if ($manage_permission) {
$data[9] = "<a href='#' onClick='javascript: show_validation_delete(\"delete_company\"," . $company['id'] . ",0," . $offset . ",\"" . $search_params . "\");'><img src='images/cross.png'></a>";
} else {
$data[9] = '';
}
array_push($table->data, $data);
}
print_table($table);
}
示例3: get_db_row
}
if ($wo["id_wo_category"]){
$category = get_db_row ("two_category", "id", $wo["id_wo_category"]);
$data[7] = "<img src='images/wo_category/".$category["icon"]."' title='".$category["name"]."'>";
} else {
$data[7] = "";
}
if ($wo["end_date"] != "0000-00-00 00:00:00")
$data[8] = "<span style='font-size: 9px'>".substr($wo["end_date"],0,10). "</span>";
else
$data[8] = "--";
$data[9] = "<span style='font-size: 9px'>". human_time_comparation($wo["start_date"]) . "<br>". human_time_comparation($wo["last_update"]). "</span>";
$data[10] = "";
if ($wo['assigned_user'] == $config["id_user"]){
if ($wo["progress"] == 0){
$data[10] .= "<a href='index.php?sec=projects&sec2=operation/workorders/wo$params&id=". $wo['id']."&set_progress=1'><img src='images/ack.png' title='".__("Set as finished")."'></a>";
}
}
if (($wo["progress"] < 2) AND ($wo["created_by_user"] == $config["id_user"]) AND ($wo["need_external_validation"] == 1) ){
$data[10] = "<a href='index.php?sec=projects&sec2=operation/workorders/wo$params&id="
. $wo['id']."&set_progress=2&offset=$offset'><img src='images/rosette.png' title='".__("Validate")."'></a>";
}
// Evaluate different conditions to allow WO deletion
$can_delete = dame_admin($config["id_user"]);
示例4: get_incidents
$incidents = get_incidents($filter);
if (empty($incidents)) {
$table->colspan[0][0] = 9;
$table->data[0][0] = __('Nothing was found');
$incidents = array();
}
$row = 0;
foreach ($incidents as $incident) {
$table->data[$row][0] = '#' . $incident['id_incidencia'];
$table->data[$row][1] = '<a href="index.php?sec=incidents&sec2=operation/incidents_simple/incident&id=' . $incident['id_incidencia'] . '">' . $incident['titulo'] . '</a>';
$resolution = isset($resolutions[$incident['resolution']]) ? $resolutions[$incident['resolution']] : __('None');
$table->data[$row][2] = '<strong>' . $statuses[$incident['estado']] . '</strong><br /><em>' . $resolution . '</em>';
$table->data[$row][3] = print_priority_flag_image($incident['prioridad'], true);
$table->data[$row][4] = human_time_comparation($incident["actualizacion"]);
$table->data[$row][4] .= '<br /><em>';
$table->data[$row][4] .= human_time_comparation($incident["inicio"]);
$table->data[$row][4] .= '</em>';
if ($config["show_owner_incident"] == 1) {
$table->data[$row][5] = $incident['id_usuario'];
}
if ($incident["estado"] < 3) {
$table->rowclass[$row] = 'red';
} elseif ($incident["estado"] < 6) {
$table->rowclass[$row] = 'yellow';
} else {
$table->rowclass[$row] = 'green';
}
$table->rowstyle[$row] = 'border-bottom: 1px solid rgb(204, 204, 204);';
$row++;
}
print_table($table);
示例5: get_download_type_icon
$row["id_type"] = -1;
}
$data[3] = get_download_type_icon($row["id_type"]);
if (give_acl($config["id_user"], 0, "FRW")) {
// Downloads
$data[4] = get_db_sql("SELECT COUNT(*) FROM tdownload_tracking where id_download = " . $row["id"]);
// Public URL
if ($row["public"]) {
$url = $config["base_url"] . "/operation/common/download_file.php?type=external_release&id_attachment=" . $row["external_id"];
$data[5] = "<a href='{$url}'><img src='images/world.png'></a>";
} else {
$data[5] = "";
}
}
// Timestamp
$data[6] = human_time_comparation($row["date"]);
if (give_acl($config["id_user"], 0, "FRW")) {
// Edit
$data[7] = "<a href='index.php?sec=download&sec2=operation/download/browse&update=" . $row["id"] . "'><img border='0' src='images/wrench.png'></a>";
$data[7] .= " ";
// Delete
$data[7] .= "<a href='index.php?sec=download&sec2=operation/download/browse&delete_data=" . $row["id"] . "' onClick='if (!confirm(\\' " . __('Are you sure?') . "\\')) return false;'><img border='0' src='images/cross.png'></a>";
}
array_push($table->data, $data);
}
print_table($table);
}
}
}
//external_id hidden
echo '<div id="external_id_hidden" style="display:none;">';
示例6: user_search_result
//.........这里部分代码省略.........
}
$count = get_db_sql("SELECT COUNT(id_usuario) FROM tusuario {$search} ");
$sql1 = "{$query1} LIMIT {$offset}, " . $size_page;
echo "<div class='divresult'>";
pagination($count, "index.php?sec=users&sec2=godmode/usuarios/lista_usuarios&search_text=" . $search_text . "&disabled_user=" . $disabled_user . "&level=" . $level . "&group=" . $group, $offset, true);
$resq1 = process_sql($sql1);
if (!$resq1) {
echo ui_print_error_message(__("No users"), '', true, 'h3', true);
} else {
echo '<table width="100%" class="listing">';
if ($filter == 0) {
echo '<th>' . print_checkbox('all_user_checkbox', 1, false, true);
echo '<th title="' . __('Enabled/Disabled') . '">' . __('E/D');
echo '<th title="' . __('Enabled login') . '">' . __('Enabled login');
}
echo '<th>' . __('User ID');
echo '<th>' . __('Name');
echo '<th>' . __('Company');
echo '<th>' . __('Last contact');
echo '<th>' . __('Profile');
if ($filter == 0) {
echo '<th>' . __('Delete');
}
// Init vars
$nombre = "";
$nivel = "";
$comentarios = "";
$fecha_registro = "";
if ($resq1) {
foreach ($resq1 as $rowdup) {
$nombre = $rowdup["id_usuario"];
$nivel = $rowdup["nivel"];
$realname = $rowdup["nombre_real"];
$fecha_registro = $rowdup["fecha_registro"];
$avatar = $rowdup["avatar"];
if ($rowdup["nivel"] == 0) {
$nivel = "<img src='images/group.png' title='" . __("Grouped user") . "'>";
} elseif ($rowdup["nivel"] == 1) {
$nivel = "<img src='images/integria_mini_logo.png' title='" . __("Administrator") . "'>";
} else {
$nivel = "<img src='images/user_gray.png' title='" . __("Standalone user") . "'>";
}
$disabled = $rowdup["disabled"];
$id_company = $rowdup["id_company"];
$enabled_login = $rowdup["enable_login"];
echo "<tr>";
if ($filter == 0) {
echo "<td>";
echo print_checkbox_extended("user-" . $rowdup["id_usuario"], $rowdup["id_usuario"], false, false, "", "class='user_checkbox'", true);
echo "<td>";
if ($disabled == 1) {
echo "<img src='images/lightbulb_off.png' title='" . __("Disabled") . "'> ";
}
echo "<td>";
if ($enabled_login == 1) {
echo "<img src='images/accept.png' title='" . __("Enabled login") . "'> ";
} else {
echo "<img src='images/fail.png' title='" . __("Disabled login") . "'> ";
}
}
echo "<td>";
if ($filter == 0) {
echo "<a href='index.php?sec=users&sec2=godmode/usuarios/configurar_usuarios&update_user=" . $nombre . "'>" . ucfirst($nombre) . "</a>";
} else {
$url = "javascript:loadContactUser(\"" . $nombre . "\",\"" . $clickin . "\");";
echo "<a href='" . $url . "'>" . ucfirst($nombre) . "</a>";
}
echo "<td style=''>" . $realname;
$company_name = (string) get_db_value('name', 'tcompany', 'id', $id_company);
echo "<td>" . $company_name . "</td>";
echo "<td style=''>" . human_time_comparation($fecha_registro);
echo "<td>";
print_user_avatar($nombre, true);
echo " ";
if ($config["enteprise"] == 1) {
$sql1 = 'SELECT * FROM tusuario_perfil WHERE id_usuario = "' . $nombre . '"';
$result = mysql_query($sql1);
echo "<a href='#' class='tip'> <span>";
if (mysql_num_rows($result)) {
while ($row = mysql_fetch_array($result)) {
echo dame_perfil($row["id_perfil"]) . "/ ";
echo dame_grupo($row["id_grupo"]) . "<br>";
}
} else {
echo __('This user doesn\'t have any assigned profile/group');
}
echo "</span></a>";
}
echo $nivel;
if ($filter == 0) {
echo '<td align="center">';
echo '<a href="index.php?sec=users&sec2=godmode/usuarios/lista_usuarios&borrar_usuario=' . $nombre . '" onClick="if (!confirm(\'' . __('Are you sure?') . '\')) return false;"><img src="images/cross.png"></a>';
echo '</td>';
}
}
}
echo "</table>";
}
echo "</div>";
}
示例7: print_file_types_table
function print_file_types_table($return = false)
{
$condition = get_filter_by_fr_category_accessibility();
$types = process_sql("SELECT tdownload_type.id AS id,\n\t\t\t\t\t\t\t\ttdownload_type.name AS name,\n\t\t\t\t\t\t\t\ttdownload_type.description AS description,\n\t\t\t\t\t\t\t\ttdownload_type.icon AS icon,\n\t\t\t\t\t\t\t\tCOUNT(tdownload.id) AS num_files,\n\t\t\t\t\t\t\t\tMAX(tdownload.date) AS last_update\n\t\t\t\t\t\tFROM tdownload, tdownload_type, tdownload_type_file\n\t\t\t\t\t\tWHERE tdownload.id = tdownload_type_file.id_download\n\t\t\t\t\t\t\tAND tdownload_type.id = tdownload_type_file.id_type\n\t\t\t\t\t\t\t{$condition}\n\t\t\t\t\t\tGROUP BY name\n\t\t\t\t\t\tORDER BY last_update DESC");
if (!$types) {
$types = array();
}
$without_type = process_sql("SELECT -1 AS id,\n\t\t\t\t\t\t\t\t\t\t'' AS name,\n\t\t\t\t\t\t\t\t\t\t'' AS description,\n\t\t\t\t\t\t\t\t\t\t'default.png' AS icon,\n\t\t\t\t\t\t\t\t\t\tCOUNT(id) AS num_files,\n\t\t\t\t\t\t\t\t\t\tMAX(date) AS last_update\n\t\t\t\t\t\t\t\tFROM tdownload\n\t\t\t\t\t\t\t\tWHERE id NOT IN (SELECT id_download FROM tdownload_type_file)\n\t\t\t\t\t\t\t\t\t{$condition}\n\t\t\t\t\t\t\t\tORDER BY last_update DESC");
if ($without_type) {
$without_type = $without_type[0];
$without_type["name"] = __('Without type');
if (!$types) {
$types[0] = $without_type;
} elseif ($types[0]["last_update"] < $without_type["last_update"]) {
array_unshift($types, $without_type);
} elseif ($types[count($types) - 1]["last_update"] > $without_type["last_update"]) {
array_push($types, $without_type);
} else {
$types_aux = array();
for ($i = 0; $i < count($types); $i++) {
$types_aux[] = $types[$i];
if (isset($types[$i]["last_update"]) && isset($types[$i + 1]["last_update"])) {
if ($types[$i]["last_update"] > $without_type["last_update"] && $types[$i + 1]["last_update"] < $without_type["last_update"]) {
$types_aux[] = $without_type;
}
}
}
$types = $types_aux;
$types_aux = null;
}
}
$table = new stdClass();
$table->width = '100%';
$table->class = 'blank';
$table->style = array();
$table->style[0] = "min-width:50%; width:50%; max-width:50%";
$table->style[1] = "min-width:50%; width:50%; max-width:50%";
$table->valign = array();
$table->valign[0] = "top";
$table->valign[1] = "top";
$table->data = array();
$column_num = 2;
$column_count = 0;
$column = 0;
foreach ($types as $type) {
$table_type = new stdClass();
$table_type->width = '100%';
$table_type->class = 'search-table-white';
$table_type->style = array();
$table_type->style[0] = "vertical-align:top; min-width:25px; width:25px; max-width:25px";
$table_type->data = array();
if ((int) $type["num_files"] > 0) {
$file_releases = get_file_releases(0, $type["id"], 10, true);
$fr_names = __('Last updated file releases') . ":";
foreach ($file_releases as $fr) {
$fr_names .= "\n" . $fr;
}
} else {
$fr_names = "";
}
$table_type->data[0][0] = print_image("images/download_type/" . $type["icon"], true);
$table_type->data[0][1] = "<a style='font-weight: bold;' href='index.php?sec=download&sec2=operation/download/browse&id_type=" . $type["id"] . "'>" . $type["name"] . "</a>";
$table_type->data[0][1] .= " <div style='display:inline;' title='{$fr_names}'>(" . (int) $type["num_files"] . ")</div>";
$table_type->data[0][1] .= "<br>";
$table_type->data[0][1] .= "<div>" . $type["description"] . "</div>";
$table_type->data[0][1] .= "<div style='color: #FF9933;'><i>" . __('Last update') . ": " . human_time_comparation($type["last_update"]) . "</i></div>";
$table->data[0][$column] .= print_table($table_type, true);
$column_count += 1;
$column += 1;
if ($column_count >= $column_num) {
$column_count = 0;
$column = 0;
}
}
print_table($table, $return);
}
示例8: incident_details_list
function incident_details_list($id_incident, $return = false)
{
$output = '';
$incident = get_incident($id_incident);
$output .= '<ul id="incident-details-list" class="sidemenu">';
$output .= ' <strong>' . __('Open at') . '</strong>: ' . human_time_comparation($incident['inicio']);
if ($incident['estado'] == 7) {
$output .= '<br /> <strong>' . __('Closed at') . '</strong>: ' . human_time_comparation($incident['cierre']);
}
if ($incident['actualizacion'] != $incident['inicio']) {
$output .= '<br /> <strong>' . __('Last update') . '</strong>: ' . human_time_comparation($incident['actualizacion']);
}
/* Show workunits if there are some */
$workunit_count = get_incident_count_workunits($id_incident);
if ($workunit_count) {
$work_hours = get_incident_workunit_hours($id_incident);
$workunits = get_incident_workunits($id_incident);
$workunit_data = get_workunit_data($workunits[0]['id_workunit']);
$output .= '<br /> <strong>' . __('Last work at') . '</strong>: ' . human_time_comparation($workunit_data['timestamp']);
$output .= '<br /> <strong>' . __('Workunits') . '</strong>: ' . $workunit_count;
$output .= '<br /> <strong>' . __('Time used') . '</strong>: ' . $work_hours;
$output .= '<br /> <strong>' . _('Done by') . '</strong>: <em>' . $workunit_data['id_user'] . '</em>';
}
$output .= '</ul>';
if ($return) {
return $output;
}
echo $output;
}
示例9: get_db_sql
echo "<td class=f9>";
$product_name = get_db_sql ("SELECT name FROM tkb_product WHERE id = ".$row["id_product"]);
$product_img = get_db_sql ("SELECT icon FROM tkb_product WHERE id = ".$row["id_product"]);
if (!$product_img) {
echo "";
}
else {
echo "<img title='$product_name' src='images/products/". $product_img . "'>";
}
// Language
echo "<td class=f9>";
echo $row["id_language"];
// Timestamp
echo "<td class='f9' valign='top'>";
echo human_time_comparation($row["timestamp"]);
if (give_acl($config["id_user"], 0, "KW")) {
// Delete
echo "<td class='f9' align='center' >";
echo "<a href='index.php?sec=kb&sec2=operation/kb/manage_data&update=".$row['id']."'><img border=0 title='".__('Edit')."' src='images/application_edit.png'></a>";
echo " ";
echo '<a href="index.php?sec=kb&sec2=operation/kb/browse&delete_data='.$row["id"].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"><img src="images/cross.png"></a>';
}
}
echo "</table>";
} else {
$downloads = array();
echo ui_print_error_message (__('No items found'), '', true, 'h3', true);
}
示例10: array
$table->width = "95%";
$table->class = "listing";
$table->data = array ();
$table->size = array ();
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->head = array ();
$table->head[0] = __("Description");
$table->head[1] = __("Timestamp");
$table->head[2] = __("User ID");
foreach ($activities as $activity) {
$data = array ();
$timestamp = $activity["timestamp"];
$nota = $activity["description"];
$id_usuario_nota = $activity["id_user"];
$data[0] = $nota;
$data[1] = human_time_comparation ($timestamp);
$data[2] = $id_usuario_nota;
array_push ($table->data, $data);
}
print_table ($table);
}
}
?>
示例11: translate_lead_progress
$data[4] = "<a href='index.php?sec=customers&sec2=operation/companies/company_detail&id=".$lead['id_company']."'>".get_db_value ('name', 'tcompany', 'id', $lead['id_company'])."</a>";
if ($lead["owner"] != "")
$data[4] .= "<br><i>" . $lead["owner"] . "</i>";
$data[5] = translate_lead_progress ($lead['progress']) . " <i>(".$lead['progress']. "%)</i>";
if ($lead['estimated_sale'] != 0)
$data[6] = format_numeric($lead['estimated_sale']);
else
$data[6] = "--";
$data[7] = "<img src='images/lang/".$lead["id_language"].".png'>";
$data[8] = ucfirst(strtolower($lead['country']));
$data[9] = "<span style='font-size: 9px' title='". $lead['creation'] . "'>" . human_time_comparation ($lead['creation']) . "</span>";
$data[9] .= "<br><span style='font-size: 9px'>". human_time_comparation ($lead['modification']). "</span>";
if ($lead['progress'] < 100 && $lead['owner'] == "")
$data[10] = "<a href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&id=".
$lead['id']."&make_owner=1&offset=$offset'><img src='images/award_star_silver_1.png' title='".__("Take ownership of this lead")."'></a> ";
else
$data[10] = "";
// Close that lead
if ($lead['progress'] < 100 && ((($config["id_user"] == $lead["owner"] && ($section_write_permission || $section_manage_permission)) || dame_admin($config["id_user"])))) {
$data[10] .= "<a href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&id=".
$lead['id']."&close=1&offset=$offset'><img src='images/lock.png' title='".__('Close this lead')."'></a>";
}
// Show delete control if its owned by the user
示例12: ui_print_truncate_text
$owner = $l['owner'];
$details = ui_print_truncate_text($owner, $char_truncate, false, true);
$lead_list .= "<div class='pipeline-list-owner'>".$owner."</div>";
}
if (!empty($l['estimated_close_date']) && $l['estimated_close_date'] != '0000-00-00 00:00:00') {
$estimated_close_date = date('Y-m-d', strtotime($l['estimated_close_date']));
$lead_list .= "<div title= '".__('Estimated close date')."' class='pipeline-list-estimated_close_date'>".$estimated_close_date."</div>";
}
// Detect if the lead is pretty old
if (calendar_time_diff ($l["modification"]) > $lead_warning_time) {
$human_time_lead = human_time_comparation ($l['modification']);
$time_title = sprintf (__("Updated %s ago"), $human_time_lead);
$lead_list .= "<img class='pipeline-warning-icon' src='images/header_warning.png' title='".$time_title."' alt='".$time_title."'>";
}
// Detect if the lead have specific changes in the last 7 days
$sql = sprintf("SELECT id_lead, id_user, description, UNIX_TIMESTAMP(timestamp) AS datetime
FROM tlead_history
WHERE id_lead = %d
AND UNIX_TIMESTAMP(timestamp) >= %d
ORDER BY datetime DESC", $l['id'], time() - SECONDS_1WEEK);
$lead_history = process_sql($sql);
if ($lead_history !== false) {
示例13: WHERE
$incidents_home = '';
if ($incidents > 0) {
$sql_2 = "SELECT * FROM tincidencia WHERE (id_creator = '" . $config["id_user"] . "' OR id_usuario = '" . $config["id_user"] . "') AND estado IN (1,2,3,4,5) ORDER BY actualizacion DESC limit 5";
$result_2 = mysql_query($sql_2);
if ($result_2) {
$incidents_home .= "<table width=100% class='landing_incidents listing'>";
$incidents_home .= "<tr><th>" . _("Status") . "</th><th>" . __("Priority") . "</th><th>" . __("Updated") . "</th><th>" . __("Ticket") . "</th><th>" . __("Last WU") . "</th></tr>";
}
while ($row_2 = mysql_fetch_array($result_2)) {
$idi = $row_2["id_incidencia"];
$incidents_home .= "<tr><td>";
$incidents_home .= render_status($row_2["estado"]);
$incidents_home .= "<td>";
$incidents_home .= print_priority_flag_image($row_2['prioridad'], true);
$incidents_home .= "<td>";
$incidents_home .= human_time_comparation($row_2["actualizacion"]);
$incidents_home .= "<td>";
$incidents_home .= "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id={$idi}'>";
$incidents_home .= $row_2["titulo"];
$incidents_home .= "</b></a>";
$incidents_home .= "</td>";
$incidents_home .= "<td style='font-size: 10px'>";
$last_wu = get_incident_lastworkunit($idi);
$incidents_home .= $last_wu["id_user"];
$incidents_home .= "</td></tr>";
}
if (isset($row_2)) {
$incidents_home .= "</table>";
}
} else {
$incidents_home .= "<div class='landing_empty'>";
示例14: __
$table->head[3] = __("Priority");
$table->head[4] = __("Updated");
$table->data = array();
foreach ($incidents as $inc) {
$data = array();
if (give_acl($config["id_user"], 0, "IR")) {
$link_start = '<a href="index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id='.$inc["id_incidencia"].'">';
$link_end = '</a>';
} else {
$link_start = "";
$link_end = "";
}
$data[0] = $link_start."#".$inc["id_incidencia"].$link_end;
$data[1] = $link_start.$inc["titulo"].$link_end;
$status = get_db_value("name", "tincident_status", "id", $inc["estado"]);
$data[2] = $status;
$data[3] = print_priority_flag_image ($inc['prioridad'], true);
$data[4] = human_time_comparation ($inc["actualizacion"]);
array_push($table->data, $data);
}
print_table($table);
}
?>
示例15: incidents_search_result_group_by_project
//.........这里部分代码省略.........
$tr_status = 'class="yellow_row ' . $class . '"';
} else {
$tr_status = 'class="green_row ' . $class . '"';
}
echo '<tr ' . $tr_status . ' id="incident-' . $incident['id_incidencia'] . '"';
echo " style='border-bottom: 1px solid #ccc;' >";
echo '<td>';
print_checkbox_extended('incidentcb-' . $incident['id_incidencia'], $incident['id_incidencia'], false, '', '', 'class="cb_incident"');
echo '</td>';
//Print incident link if not ajax, if ajax link to js funtion to replace parent
$link = "index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id=" . $incident["id_incidencia"];
if ($ajax) {
$link = "javascript:update_parent('" . $incident["id_incidencia"] . "')";
}
echo '<td>';
echo '<strong><a href="' . $link . '">#' . $incident['id_incidencia'] . '</a></strong></td>';
// SLA Fired ??
if ($incident["affected_sla_id"] != 0) {
echo '<td width="25"><img src="images/exclamation.png" /></td>';
} else {
echo '<td></td>';
}
echo '<td>';
echo '<strong><a href="' . $link . '">' . $incident['titulo'] . '</a></strong><br>';
echo "<span style='font-size:11px;font-style:italic'>";
echo incidents_get_incident_type_text($incident["id_incidencia"]);
// Added by slerena 26Ago2013
$sql = sprintf("SELECT *\n\t\t\t\t\t\t\tFROM tincident_type_field\n\t\t\t\t\t\t\tWHERE id_incident_type = %d", $incident["id_incident_type"]);
$config['mysql_result_type'] = MYSQL_ASSOC;
$type_fields = get_db_all_rows_sql($sql);
$type_fields_values_text = "";
if ($type_fields) {
foreach ($type_fields as $type_field) {
if ($type_field["show_in_list"]) {
$field_data = get_db_value_filter("data", "tincident_field_data", array("id_incident" => $incident["id_incidencia"], "id_incident_field" => $type_field["id"]));
if ($field_data) {
if ($type_field["type"] == "textarea") {
$field_data = "<div style='display: inline-block;' title='{$field_data}'>" . substr($field_data, 0, 15) . "...</div>";
}
$type_fields_values_text .= " <div title='" . $type_field["label"] . "' style='display: inline-block;'>[{$field_data}]</div>";
}
}
}
}
echo " {$type_fields_values_text}";
echo '</span></td>';
echo '<td>' . get_db_value("nombre", "tgrupo", "id_grupo", $incident['id_grupo']);
if ($config["show_creator_incident"] == 1) {
$id_creator_company = get_db_value("id_company", "tusuario", "id_usuario", $incident["id_creator"]);
if ($id_creator_company != 0) {
$company_name = (string) get_db_value('name', 'tcompany', 'id', $id_creator_company);
echo "<br><span style='font-size:11px;font-style:italic'>{$company_name}</span>";
}
}
echo '</td>';
$resolution = isset($resolutions[$incident['resolution']]) ? $resolutions[$incident['resolution']] : __('None');
echo '<td class="f9"><strong>' . $statuses[$incident['estado']] . '</strong><br /><em>' . $resolution . '</em></td>';
// priority
echo '<td>';
print_priority_flag_image($incident['prioridad']);
$last_wu = get_incident_lastworkunit($incident["id_incidencia"]);
if ($last_wu["id_user"] == $incident["id_creator"]) {
echo "<br><img src='images/comment.gif' title='" . $last_wu["id_user"] . "'>";
}
echo '</td>';
echo '<td style="font-size:11px;">' . human_time_comparation($incident["actualizacion"]);
// Show only if it's different
if ($incident["inicio"] != $incident["actualizacion"]) {
echo "<br><em>[" . human_time_comparation($incident["inicio"]);
echo "]</em>";
}
echo "<br>";
echo '<span style="font-size:9px;">';
if (isset($config["show_user_name"]) && $config["show_user_name"]) {
$updated_by = get_db_value('nombre_real', 'tusuario', 'id_usuario', $last_wu["id_user"]);
} else {
$updated_by = $last_wu["id_user"];
}
//~ echo $last_wu["id_user"];
echo $updated_by;
echo "</span>";
echo '</td>';
if ($config["show_creator_incident"] == 1) {
echo "<td class='f9'>";
$incident_creator = $incident["id_creator"];
echo substr($incident_creator, 0, 12);
echo "</td>";
}
if ($config["show_owner_incident"] == 1) {
echo "<td class='f9'>";
$incident_owner = $incident["id_usuario"];
echo substr($incident_owner, 0, 12);
echo "</td>";
}
echo '</tr>';
}
}
echo '</tbody>';
echo '</table>';
}