当前位置: 首页>>代码示例>>PHP>>正文


PHP get_db_value_filter函数代码示例

本文整理汇总了PHP中get_db_value_filter函数的典型用法代码示例。如果您正苦于以下问题:PHP get_db_value_filter函数的具体用法?PHP get_db_value_filter怎么用?PHP get_db_value_filter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_db_value_filter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: api_get_resolution_incident

function api_get_resolution_incident($id_incident)
{
    global $config;
    $resolution = get_db_value_filter('resolution', 'tincidencia', array('id_incidencia' => $id_incident));
    return $resolution;
}
开发者ID:keunes,项目名称:integriaims,代码行数:6,代码来源:functions_api.php

示例2: get_valid_users_num

function get_valid_users_num()
{
    clean_cache_db();
    $filter = array('enable_login' => 1, 'disabled' => 0, 'login_blocked' => 0);
    return get_db_value_filter("COUNT(id_usuario)", "tusuario", $filter);
}
开发者ID:articaST,项目名称:integriaims,代码行数:6,代码来源:functions_db.php

示例3: exists_lead_tag

/** 
 * Check if a tag is assigned to a lead.
 * 
 * @param int Id of the lead.
 * @param int Id of the tag.
 * 
 * @return bool Wether the tag is assigned or not.
 */
function exists_lead_tag($lead_id, $tag_id)
{
    if (empty($lead_id)) {
        throw new InvalidArgumentException(__('The lead id cannot be empty'));
    }
    if (empty($tag_id)) {
        throw new InvalidArgumentException(__('The tag id cannot be empty'));
    }
    $filter = array(LEADS_TABLE_LEAD_ID_COL => $lead_id, LEADS_TABLE_TAG_ID_COL => $tag_id);
    return (bool) get_db_value_filter(LEADS_TABLE_ID_COL, LEADS_TABLE, $filter);
}
开发者ID:articaST,项目名称:integriaims,代码行数:19,代码来源:functions_tags.php

示例4: check_crm_acl

        $read_permission = check_crm_acl('contract', 'cr');
        if (!$read_permission) {
            audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access Downloads browser");
            require $general_error;
            exit;
        }
        $data = get_db_row("tattachment", "id_attachment", $id_attachment);
        $data["filename"] = safe_output($data["filename"]);
        $fileLocation = $config["homedir"] . "/attachment/" . $data["id_attachment"] . "_" . $data["filename"];
        $last_name = $data["filename"];
        break;
    case "file_sharing":
        $public_key = get_parameter("key");
        if (!empty($public_key)) {
            $filter = array('public_key' => $public_key, 'file_sharing' => 1);
            $id_attachment = get_db_value_filter("id_attachment", "tattachment", $filter);
            if (empty($id_attachment)) {
                audit_db($id_user, $config["REMOTE_ADDR"], "ACL Violation", "Trying to download an invalid file sharing file");
                require $general_error;
                exit;
            }
        } else {
            audit_db($id_user, $config["REMOTE_ADDR"], "ACL Violation", "Trying to download an invalid file sharing file");
            require $general_error;
            exit;
        }
        break;
    default:
}
//Compound file path
if ($type == "release" || $type == "external_release") {
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:download_file.php

示例5: synchronize_pandora_inventory

/**
 * This function creates an inventory object for each agent of pandora with name, address, description 
 * and extra fields if are defined as operating system and url address
 */
function synchronize_pandora_inventory()
{
    global $config;
    if (!isset($config["pandora_url"])) {
        return;
    }
    if ($config["pandora_url"] == "") {
        return;
    }
    $separator = ':;:';
    $url = $config['pandora_url'] . '/include/api.php?op=get&apipass=' . $config['pandora_api_password'] . '&op2=all_agents&return_type=csv&user=' . $config['pandora_user'] . '&pass=' . $config['pandora_pass'];
    $return = call_api($url);
    $agents_csv = explode("\n", $return);
    foreach ($agents_csv as $agent_csv) {
        // Avoiding empty csv lines like latest one
        if ($agent_csv == '') {
            continue;
        }
        $values = array();
        $agent = explode(";", $agent_csv);
        $agent_id = $agent[0];
        $agent_name = $agent[1];
        $agent_name_safe = safe_input($agent_name);
        $address = $agent[2];
        $description = $agent[3];
        $os_name = $agent[4];
        $url_address = $agent[5];
        // Check if exist to avoid the creation
        $inventory_id = get_db_value('id', 'tinventory', 'name', $agent_name_safe);
        if ($inventory_id !== false) {
            process_sql_delete('tinventory', array('id' => $inventory_id));
            process_sql_delete('tobject_field_data', array('id_inventory' => $inventory_id));
        }
        $id_object_type = get_db_value('id', 'tobject_type', 'name', safe_input('Pandora agents'));
        $values['name'] = $agent_name_safe;
        $values['description'] = $description;
        $values['id_object_type'] = $id_object_type;
        $values['id_contract'] = $config['default_contract'];
        $id_inventory = process_sql_insert('tinventory', $values);
        if ($id_inventory) {
            $id_type_field_os = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => safe_input('OS')));
            $id_type_field_ip = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => safe_input('IP Address')));
            if ($id_type_field_ip == false) {
                $id_type_field_ip = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => 'IP Address'));
            }
            $id_type_field_url = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => safe_input('URL Address')));
            if ($id_type_field_url == false) {
                $id_type_field_url = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => 'URL Address'));
            }
            $id_type_field_id = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => safe_input('ID Agent')));
            if ($id_type_field_id == false) {
                $id_type_field_id = get_db_value_filter('id', 'tobject_type_field', array('id_object_type' => $id_object_type, 'label' => 'ID Agent'));
            }
            $value_os = array();
            $value_os['id_inventory'] = $id_inventory;
            $value_os['id_object_type_field'] = $id_type_field_os;
            $value_os['data'] = $os_name;
            process_sql_insert('tobject_field_data', $value_os);
            $value_ip = array();
            $value_ip['id_inventory'] = $id_inventory;
            $value_ip['id_object_type_field'] = $id_type_field_ip;
            $value_ip['data'] = $address;
            process_sql_insert('tobject_field_data', $value_ip);
            $value_url = array();
            $value_url['id_inventory'] = $id_inventory;
            $value_url['id_object_type_field'] = $id_type_field_url;
            $value_url['data'] = $url_address;
            process_sql_insert('tobject_field_data', $value_url);
            $value_id = array();
            $value_id['id_inventory'] = $id_inventory;
            $value_id['id_object_type_field'] = $id_type_field_id;
            $value_id['data'] = $agent_id;
            process_sql_insert('tobject_field_data', $value_id);
        }
    }
}
开发者ID:keunes,项目名称:integriaims,代码行数:80,代码来源:integria_cron.php

示例6: create_workunit

     // Do not send mail in this WU
     create_workunit($id, $wu_text, $editor, $config["iwu_defaultime"], 0, "", 1, 0);
 }
 // Email notify to all people involved in this incident
 if ($email_notify) {
     mail_incident($id, $usuario, "", 0, 1);
 }
 //insert data to incident type fields
 if ($id_incident_type != 0) {
     $sql_label = "SELECT `label` FROM `tincident_type_field` WHERE id_incident_type = {$id_incident_type}";
     $labels = get_db_all_rows_sql($sql_label);
     if ($labels === false) {
         $labels = array();
     }
     foreach ($labels as $label) {
         $id_incident_field = get_db_value_filter('id', 'tincident_type_field', array('id_incident_type' => $id_incident_type, 'label' => $label['label']), 'AND');
         $values_insert['id_incident'] = $id;
         $values_insert['data'] = get_parameter(base64_encode($label['label']));
         //~ $values_insert['data'] = str_replace('
', "",get_parameter (base64_encode($label['label'])));
         $values_insert['id_incident_field'] = $id_incident_field;
         $id_incident_field = get_db_value('id', 'tincident_type_field', 'id_incident_type', $id_incident_type);
         process_sql_insert('tincident_field_data', $values_insert);
     }
 }
 // ATTACH A FILE IF IS PROVIDED
 $upfiles = json_decode(safe_output($upfiles), true);
 if (!empty($upfiles)) {
     include_once 'include/functions_workunits.php';
     foreach ($upfiles as $file) {
         if (is_array($file)) {
             if ($file['description']) {
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_detail.php

示例7: get_incidents

		}		
		
		if ($count % 4 == 0) {
			$search_by_owner .= "<tr>";
		}

		$incidents = get_incidents("id_usuario = '".$owners["id_usuario"]."' AND estado <> 7", true);
		
		$search_by_owner .= "<td>";
		$search_by_owner .= "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_search&search_first_date=" . $first_start . "&search_id_user=".$owners["id_usuario"]."'>";
		if($owners["avatar"]){
			$search_by_owner .= '<div class="bubble_little">' . print_image('images/avatars/' . $owners["avatar"] . '.png', true) . '</div>';
		} else {
			$search_by_owner .= '<div class="bubble_little"></div>';
		}
		$long_name = get_db_value_filter ("nombre_real", "tusuario", array("id_usuario" => $owners["id_usuario"]));
	
		$search_by_owner .= $long_name." (".count($incidents).")";
		$search_by_owner .= "</a>";
		$search_by_owner .= "</td>";
		
		if ($count % 4 == 3) {
			$search_by_owner .= "</tr>";
		}

		//Increase counter
		$count++;
	}
}

$search_by_owner .= "</table>";
开发者ID:keunes,项目名称:integriaims,代码行数:31,代码来源:incident_dashboard.php

示例8: get_parameter

$user_pass = get_parameter('user_pass', '');
$return_type = get_parameter('return_type', 'csv');
$info = get_parameter('info', false);
if ($info == "version") {
    if ($config["enteprise"] == 1) {
        $enterprise = "Enterprise Edition";
    } else {
        $enterprise = "OpenSource Edition";
    }
    if (!$config["minor_release"]) {
        $config["minor_release"] = 0;
    }
    echo "Integria IMS {$enterprise} " . $config["version"] . " Build " . $config["build_version"] . " MR" . $config["minor_release"];
    exit;
}
$api_password = get_db_value_filter('value', 'tconfig', array('token' => 'api_password'));
$correct_login = false;
if (!empty($api_password)) {
    if ($pass === $api_password) {
        $correct_login = true;
    }
} else {
    if (ip_acl_check($ip_origin)) {
        $correct_login = true;
    }
}
if (!$correct_login) {
    sleep(15);
    exit;
}
switch ($op) {
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:api.php

示例9: inventories_get_info

function inventories_get_info($id_item, $id_father)
{
    global $config;
    $result = array();
    $info_inventory = get_db_row('tinventory', 'id', $id_item);
    $info_fields = get_db_all_rows_filter('tobject_type_field', array('id_object_type' => $id_father));
    if ($info_inventory !== false) {
        $result['name'] = $info_inventory['name'];
        $result['data'] = array();
        if (!empty($info_inventory['owner'])) {
            $owner = $info_inventory['owner'];
            $name_owner = get_db_value('nombre_real', 'tusuario', 'id_usuario', $owner);
            if (empty($name_owner)) {
                $name_owner = '--';
            }
        } else {
            $name_owner = '--';
        }
        $row = array();
        $row['label'] = __('Owner');
        $row['data'] = $name_owner;
        $result['data'][] = $row;
        if (!empty($info_inventory['id_parent'])) {
            $parent = $info_inventory['id_parent'];
            $name_parent = get_db_value('name', 'tinventory', 'id', $parent);
            if (empty($name_parent)) {
                $name_parent = '--';
            }
        } else {
            $name_parent = '--';
        }
        $row = array();
        $row['label'] = __('Parent');
        $row['data'] = $name_parent;
        $result['data'][] = $row;
        if (!empty($info_inventory['id_manufacturer'])) {
            $manufacturer = $info_inventory['id_manufacturer'];
            $name_manufacturer = get_db_value('name', 'tmanufacturer', 'id', $info_inventory['id_manufacturer']);
            if (empty($name_manufacturer)) {
                $name_manufacturer = '--';
            }
        } else {
            $name_manufacturer = '--';
        }
        $row = array();
        $row['label'] = __('Manufacturer');
        $row['data'] = $name_manufacturer;
        $result['data'][] = $row;
        if (!empty($info_inventory['id_contract'])) {
            $contract = $info_inventory['id_contract'];
            $name_contract = get_db_value('name', 'tcontract', 'id', $info_inventory['id_contract']);
            if (empty($name_contract)) {
                $name_contract = '--';
            }
        } else {
            $name_contract = '--';
        }
        $row = array();
        $row['label'] = __('Contract');
        $row['data'] = $name_contract;
        $result['data'][] = $row;
        if ($info_fields !== false) {
            foreach ($info_fields as $info) {
                $filter = array('id_inventory' => $id_item, 'id_object_type_field' => $info['id']);
                $value = get_db_value_filter('data', 'tobject_field_data', $filter);
                $data = '--';
                if (!empty($value)) {
                    $data = $value;
                }
                $info_field = array();
                $info_field['label'] = $info['label'];
                $info_field['data'] = $data;
                $result['data'][] = $info_field;
                if ($info['type'] == 'external' && $value != false) {
                    $all_fields_ext = inventories_get_all_external_field($info['external_table_name'], $info['external_reference_field'], $info['id']);
                    foreach ($all_fields_ext as $field) {
                        $data = '--';
                        if (!empty($field['data'])) {
                            $data = $field['data'];
                        }
                        $info_field_external = array();
                        $info_field['label'] = $field['label'];
                        $info_field['data'] = $data;
                        $result['data'][] = $info_field_external;
                    }
                }
            }
        }
    }
    return $result;
}
开发者ID:keunes,项目名称:integriaims,代码行数:91,代码来源:functions_inventories.php

示例10: if

			require_once ('general/login_page.php');
			exit ("</html>");
		}
	}
}
else if (! isset ($_SESSION['id_usuario'])) {

	// There is no user connected
	echo '</head>';
	echo '<body class="login">';
	require ('general/login_page.php');
	exit;
}
else {
	if (isset ($_SESSION['id_usuario'])) {
		$user_in_db = get_db_value_filter('id_usuario', 'tusuario', array('id_usuario'=>$_SESSION['id_usuario']));
		if ($user_in_db == false) {
			//logout
			$_REQUEST = array ();
			$_GET = array ();
			$_POST = array ();
			echo '<body class="login">';
			require ('general/login_page.php');
			$iduser = $_SESSION["id_usuario"];
			logoff_db ($iduser, $config["REMOTE_ADDR"]);
			unset($_SESSION["id_usuario"]);
			exit;
		}
	}
	
	// Create id_user variable in $config hash, of ALL pages.
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:index.php

示例11: process_sql

     $result_sql = process_sql($sql, 'insert_id');
     if ($result_sql !== false) {
         $project = get_db_value('name', 'tproject', 'id', $id_project);
         audit_db($config["id_user"], $config["REMOTE_ADDR"], "User/Role added to project", "User {$id_user} added to project {$project}");
     } else {
         $project = get_db_value('name', 'tproject', 'id', $id_project);
         $result_output = "<h3 class='error'>" . __('Error assigning access to project ' . $project . '.') . "</h3>";
         continue;
         // Does not insert the task
     }
 }
 // User->Task insert
 $filter = array();
 $filter['id_user'] = $id_user;
 $filter['id_task'] = $id_task;
 $result_sql = get_db_value_filter('MIN(id_role)', 'trole_people_task', $filter);
 if ($result_sql == false) {
     $sql = "INSERT INTO trole_people_task\n\t\t\t\t\t(id_task, id_user, id_role) VALUES\n\t\t\t\t\t({$id_task}, '{$id_user}', '{$id_role}')";
     $result_sql = process_sql($sql, 'insert_id');
     if ($result_sql !== false) {
         $project = get_db_value('name', 'tproject', 'id', $id_project);
         audit_db($config["id_user"], $config["REMOTE_ADDR"], "User/Role added to project", "User {$id_user} added to project {$project}");
     } else {
         $task = get_db_value("name", "ttask", "id", $id_task);
         $result_output = "<h3 class='error'>" . __('Error assigning access to task ' . $task . '.') . "</h3>";
     }
 } else {
     $sql = "UPDATE trole_people_task\n\t\t\t\t\tSET id_role={$id_role}\n\t\t\t\t\tWHERE id_user='{$id_user}'\n\t\t\t\t\t\tAND id_task={$id_task}";
     $result_sql = process_sql($sql);
     if ($result_sql !== false) {
         $role = get_db_value("name", "trole", "id", $id_role);
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:role_user_global.php

示例12: getIncidentDetail

 private function getIncidentDetail()
 {
     $system = System::getInstance();
     $ui = Ui::getInstance();
     $incident = get_db_row("tincidencia", "id_incidencia", $this->id_incident);
     if (!$incident) {
         $html = "<h2 class=\"error\">" . __('Ticket not found') . "</h2>";
     } else {
         include_once $system->getConfig('homedir') . "/include/functions_incidents.php";
         // DETAILS
         $resolution = incidents_get_incident_resolution_text($incident['id_incidencia']);
         $priority = incidents_get_incident_priority_text($incident['id_incidencia']);
         $priority_image = print_priority_flag_image($incident['prioridad'], true, "../");
         $group = incidents_get_incident_group_text($incident['id_incidencia']);
         $status = incidents_get_incident_status_text($incident['id_incidencia']);
         $type = incidents_get_incident_type_text($incident['id_incidencia']);
         // Get the status icon
         if ($incident['estado'] < 3) {
             $status_icon = 'status_new';
         } else {
             if ($incident['estado'] < 7) {
                 $status_icon = 'status_pending';
             } else {
                 $status_icon = 'status_closed';
             }
         }
         $ui->contentBeginGrid();
         // $options = array(
         // 	'action' => "index.php?page=incidents",
         // 	'method' => 'POST',
         // 	'data-ajax' => 'false'
         // 	);
         // $ui->beginForm($options);
         // 	// Filter status
         // 	$values = array();
         // 	$values[0] = __('Any');
         // 	$values[-10] = __('Not closed');
         // 	$status_table = process_sql ("select * from tincident_status");
         // 	foreach ($status_table as $status) {
         // 		$values[$status['id']] = __($status['name']);
         // 	}
         // 	$options = array(
         // 		'name' => 'filter_status',
         // 		'title' => __('Status'),
         // 		'items' => $values,
         // 		'selected' => $this->filter_status
         // 		);
         // 	$ui->formAddSelectBox($options);
         // $form_html = $ui->getEndForm();
         $status_cell = "<div class='detail-element'>\n\t\t\t\t\t\t\t\t" . __('Status') . "<br>\n\t\t\t\t\t\t\t\t<img src='../images/{$status_icon}.png'><br>\n\t\t\t\t\t\t\t\t<strong>{$status}</strong>\n\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($status_cell);
         $group_cell = "<div class='detail-element'>\n\t\t\t\t\t\t\t\t" . __('Group') . "<br>\n\t\t\t\t\t\t\t\t<img src='../images/group.png'><br>\n\t\t\t\t\t\t\t\t<strong>{$group}</strong>\n\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($group_cell);
         $priority_cell = "<div class='detail-element'>\n\t\t\t\t\t\t\t\t" . __('Priority') . "<br>\n\t\t\t\t\t\t\t\t{$priority_image}<br>\n\t\t\t\t\t\t\t\t<strong>{$priority}</strong>\n\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($priority_cell);
         $resolution_cell = "<div class='detail-element'>\n\t\t\t\t\t\t\t\t" . __('Resolution') . "<br>\n\t\t\t\t\t\t\t\t<img src='../images/resolution.png'><br>\n\t\t\t\t\t\t\t\t<strong>{$resolution}</strong>\n\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($resolution_cell);
         $type_cell = "<div class='detail-element'>\n\t\t\t\t\t\t\t\t" . __('Type') . "<br>\n\t\t\t\t\t\t\t\t<img src='../images/incident.png'><br>\n\t\t\t\t\t\t\t\t<strong>{$type}</strong>\n\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($type_cell);
         $detail_grid = $ui->getContentEndGrid();
         $ui->contentBeginCollapsible(__('Details'));
         $ui->contentCollapsibleAddItem($detail_grid);
         $detail = $ui->getEndCollapsible("", "b", "c", false);
         $detail = "<div style='padding-left: 2px; padding-right: 2px;'>{$detail}</div>";
         // DESCRIPTION
         if ($incident['descripcion'] != "") {
             $ui->contentBeginCollapsible(__('Description'));
             $ui->contentCollapsibleAddItem($incident['descripcion']);
             $description = $ui->getEndCollapsible("", "b", "c", false);
         }
         // CUSTOM FIELDS
         if ($incident['id_incident_type']) {
             $type_name = get_db_value("name", "tincident_type", "id", $incident['id_incident_type']);
             $fields = incidents_get_all_type_field($incident['id_incident_type'], $incident['id_incidencia']);
             $custom_fields = "";
             $ui->contentBeginCollapsible($type_name);
             foreach ($fields as $field) {
                 $custom_fields = $field["label"] . ":&nbsp;<strong>" . $field["data"] . "</strong>";
                 $ui->contentCollapsibleAddItem($custom_fields);
             }
             $custom_fields = $ui->getEndCollapsible("", "b", "c", false);
         }
         // PEOPLE
         $ui->contentBeginGrid();
         $name_creator = get_db_value_filter("nombre_real", "tusuario", array("id_usuario" => $incident['id_creator']));
         $avatar_creator = get_db_value_filter("avatar", "tusuario", array("id_usuario" => $incident['id_creator']));
         $creator_cell = "<div style='text-align: center;'>\n\t\t\t\t\t\t\t\t\t\t<div class='bubble_little'>\n\t\t\t\t\t\t\t\t\t\t\t<img src='../images/avatars/{$avatar_creator}.png'>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<strong style='color: #FF9933'>" . __('Created by') . ":</strong><br>\n\t\t\t\t\t\t\t\t\t{$name_creator}\n\t\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($creator_cell);
         $name_owner = get_db_value_filter("nombre_real", "tusuario", array("id_usuario" => $incident['id_usuario']));
         $avatar_owner = get_db_value_filter("avatar", "tusuario", array("id_usuario" => $incident['id_usuario']));
         $owner_cell = "<div style='text-align: center;'>\n\t\t\t\t\t\t\t\t\t\t<div class='bubble_little'>\n\t\t\t\t\t\t\t\t\t\t\t<img src='../images/avatars/{$avatar_owner}.png'>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<strong style='color: #FF9933'>" . __('Owned by') . ":</strong><br>\n\t\t\t\t\t\t\t\t\t{$name_owner}\n\t\t\t\t\t\t\t\t</div>";
         $ui->contentGridAddCell($owner_cell);
         if ($incident['estado'] == STATUS_CLOSED) {
             if (empty($incident["closed_by"])) {
                 $name_closer = __('Unknown');
                 $avatar_closer = '../avatar_unknown';
             } else {
                 $name_closer = get_db_value_filter("nombre_real", "tusuario", array("id_usuario" => $incident['closed_by']));
                 $avatar_closer = get_db_value_filter("avatar", "tusuario", array("id_usuario" => $incident['closed_by']));
             }
//.........这里部分代码省略.........
开发者ID:dsyman2,项目名称:integriaims,代码行数:101,代码来源:incident.php

示例13: count

    /* Auto fill values */
    $len = count($data);
    if ($len < $nfields) {
        $data = array_pad($data, $nfields, '');
    } elseif ($len > $nfields) {
        $data = array_slice($data, NULL, $nfields);
    }
    $values = array_combine($fields, $data);
    if (empty($values['name'])) {
        continue;
    }
    /* Check parent */
    if (is_int($values['id_parent'])) {
        $id_parent = (int) get_db_value('id', 'tinventory', 'id', $values['id_parent']);
    } else {
        $id_parent = (int) get_db_value('id', 'tinventory', 'name', (string) $values['id_parent']);
    }
    $values['id_parent'] = $id_parent ? $id_parent : NULL;
    /* Check if the inventory item already exists */
    $id_inventory = (int) get_db_value_filter('id', 'tinventory', array('name' => $values['name'], 'id_parent' => $values['id_parent']));
    process_values($values, $id_inventory);
    if ($id_inventory) {
        process_sql_update('tinventory', $values, array('id' => $id_inventory));
        echo 'Updated inventory "' . $values['name'] . '"';
    } else {
        process_sql_insert('tinventory', $values);
        echo 'Inserted inventory "' . $values['name'] . '"';
    }
    echo "\n";
}
fclose($file);
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventory_importer.php

示例14: inventory_tracking

         inventory_tracking($id, INVENTORY_OBJECT_TYPE, $id_object_type);
     }
     //parent
     if ($id_parent != 0) {
         $id_object_type_inherit = get_db_value('id_object_type', 'tinventory', 'id', $id_parent);
         //parent has object
         if ($id_object_type_inherit !== false) {
             $inherit_fields = get_db_all_rows_filter('tobject_type_field', array('id_object_type' => $id_object_type_inherit, 'inherit' => 1));
             if ($inherit_fields === false) {
                 $inherit_fields = array();
             }
             foreach ($inherit_fields as $key => $field) {
                 $values = array();
                 $values['id_object_type_field'] = $field['id'];
                 $values['id_inventory'] = $id;
                 $data = get_db_value_filter('data', 'tobject_field_data', array('id_inventory' => $id_parent, 'id_object_type_field' => $field['id']));
                 $values['data'] = $data;
                 process_sql_insert('tobject_field_data', $values);
             }
         }
         inventory_tracking($id, INVENTORY_PARENT_CREATED, $id_parent);
     }
     $result_companies = enterprise_hook('inventory_update_companies', array($id, get_parameter('companies')));
     $result_users = enterprise_hook('inventory_update_users', array($id, get_parameter('users')));
     $result_msg = '<h3 class="suc">' . __('Successfully created') . '</h3>';
     $result_msg .= "<h3><a href='index.php?sec=inventory&sec2=operation/inventories/inventory_detail&id={$id}'>" . __("Click here to continue working with Object #") . $id . "</a></h3>";
 } else {
     $result_msg = '<h3 class="error">' . $err_message . '</h3>';
 }
 $id = 0;
 $name = "";
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventory_detail.php

示例15: print_image

$incident_users .= "<td>";
$incident_users .= '<div class="bubble">' . print_image('images/avatars/' . $avatar_asigned . '.png', true, $options) . '</div>';
$incident_users .= '<span>' . __('Owned by') . ':</span><br>' . $long_name_asigned;
$incident_users .= "</td>";
$avatar_closer = get_db_value_filter("avatar", "tusuario", array("id_usuario" => $incident["closed_by"]));
$incident_users .= "<td>";
$incident_users .= '<div class="bubble">';
if ($incident["estado"] != STATUS_CLOSED) {
    $long_name_closer = '<em>' . __('Not closed yet') . '</em>';
    $incident_users .= print_image('images/avatar_notyet.png', true);
} else {
    if (empty($incident["closed_by"])) {
        $long_name_closer = '<em>' . __('Unknown') . '</em>';
        $incident_users .= print_image('images/avatar_unknown.png', true);
    } else {
        $long_name_closer = get_db_value_filter("nombre_real", "tusuario", array("id_usuario" => $incident["closed_by"]));
        $closer = $incident['closed_by'];
        $options["onclick"] = "openUserInfo(\"{$closer}\")";
        $incident_users .= print_image('images/avatars/' . $avatar_closer . '.png', true, $options);
    }
}
$incident_users .= '</div>';
$incident_users .= '<span>' . __('Closed by') . ':</span><br>' . $long_name_closer;
$incident_users .= "</td>";
$incident_users .= "</tr>";
$incident_users .= "</table>";
$right_side = print_container('incident_users', __('People') . print_help_tip(_('Click on icons for more details'), true), $incident_users);
// Quick editor
if ($config['enabled_ticket_editor']) {
    $has_im = give_acl($config['id_user'], $id_grupo, "IM") || $config['id_user'] == $incident['id_creator'];
    $has_iw = give_acl($config['id_user'], $id_grupo, "IW") || $config['id_user'] == $incident['id_usuario'] || $config['id_user'] == $incident['id_creator'];
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_dashboard_detail.php


注:本文中的get_db_value_filter函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。