• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_db_value函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: checkPermission

	public function checkPermission ($id_user, $acl = 'PR', $operation = '', $id_workunit = -1) {
		$system = System::getInstance();
		
		$permission = false;
		if (dame_admin($id_user)) {
			$permission = true;
		} else {
			// Section access
			if ($system->checkACL($acl)) {
				// If the workunit exists, should belong to the user
				if ($operation == "delete_workunit") {
					if ($id_workunit > 0) {
						$user_workunit = get_db_value("id_user", "tworkunit", "id", $id_workunit);
						if (strcasecmp($id_user, $user_workunit) == 0) {
							$permission = true;
						}
					}
				} else {
					$permission = true;
				}
			}
		}
		
		return $permission;
	}
开发者ID:articaST,项目名称:integriaims,代码行数:25,代码来源:workunits.php


示例2: process_values

function process_values(&$values, $id_inventory)
{
    /* Check empty values */
    $values['id_manufacturer'] = $values['id_manufacturer'] ? $values['id_manufacturer'] : NULL;
    $values['id_building'] = $values['id_building'] ? $values['id_building'] : NULL;
    $values['id_sla'] = $values['id_sla'] ? $values['id_sla'] : NULL;
    $values['id_product'] = $values['id_product'] ? $values['id_product'] : NULL;
    $values['id_contract'] = $values['id_contract'] ? $values['id_contract'] : NULL;
    foreach ($values as $field => $value) {
        if ($id_inventory) {
            $values[$field] = isset($values[$field][0]) && $values[$field][0] == '`' ? get_db_value($values[$field], 'tinventory', 'id', $id_inventory) : $values[$field];
        } else {
            $values[$field] = isset($values[$field][0]) && $values[$field][0] == '`' ? '' : $values[$field];
        }
    }
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:16,代码来源:inventory_importer.php


示例3: checkPermission

 public function checkPermission($id_user, $acl = 'IR', $operation = '', $id_incident = -1)
 {
     $system = System::getInstance();
     $permission = false;
     if (dame_admin($id_user)) {
         $permission = true;
     } else {
         if ($system->checkACL($this->acl)) {
             if ($id_incident > 0 && $operation == "delete") {
                 $incident_creator = get_db_value("id_creator", "tincidencia", "id_incidencia", $id_incident);
                 if ($system->checkACL("IM") && strcasecmp($id_user, $incident_creator) == 0) {
                     $permission = true;
                 }
             } else {
                 $permission = true;
             }
         }
     }
     return $permission;
 }
开发者ID:dsyman2,项目名称:integriaims,代码行数:20,代码来源:incidents.php


示例4: get_parameter

    require "general/noaccess.php";
    exit;
}
$id_nota = get_parameter("id", 0);
$id_incident = get_parameter("id_inc", 0);
// ********************************************************************
// Note detail of $id_note
// ********************************************************************
$sql4 = 'SELECT * FROM tnota WHERE id_nota = ' . $id_nota;
$res4 = mysql_query($sql4);
if ($row3 = mysql_fetch_array($res4)) {
    echo "<div class='notetitle'>";
    // titulo
    $timestamp = $row3["timestamp"];
    $nota = $row3["nota"];
    $id_usuario_nota = $row3["id_usuario"];
    $avatar = get_db_value("avatar", "tusuario", "id_usuario", $id_usuario_nota);
    // Show data
    echo "<img src='images/avatars/" . $avatar . ".png' class='avatar_small'>&nbsp;";
    echo " <a href='index.php?sec=users&sec2=operation/users/user_edit&id={$id_usuario_nota}'>";
    echo $id_usuario_nota;
    echo "</a>";
    echo " " . __("said on {$timestamp}");
    echo "</div>";
    // Body
    echo "<div class='notebody'>";
    echo clean_output_breaks($nota);
    echo "</div>";
} else {
    echo __('No data available');
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_notes_detail.php


示例5: get_db_value

				//$tracking_group = "<table class='details_table alternate'>";
				foreach ($stats[INCIDENT_METRIC_GROUP] as $key => $value) {
					$name = get_db_value ('nombre', 'tgrupo', 'id_grupo', $key);
					$tracking_group = "<tr>";
					$tracking_group .= "<td><strong>".$name."</strong>:</td>";
					$tracking_group .= "<td style='text-align:right;'>".give_human_time($value,true,true,true)."</td>";
					$tracking_group .= "</tr>";
				}
				//$tracking_group .= "</table>";
				
				echo print_container('incident_tracking_group', __('Statistics by group'), $tracking_group, 'open', true, '20px', '', '', 1, 'less_widht');
			echo "</td>";	
			echo "<td style='vertical-align:top;width: 33%;'>";
				//$tracking_user = "<table class='details_table alternate'>";
				foreach ($stats[INCIDENT_METRIC_USER] as $key => $value) {
					$name = get_db_value ('nombre_real', 'tusuario', 'id_usuario', $key);
					$tracking_user = "<tr>";
					$tracking_user .= "<td><strong>".$name."</strong>:</td>";
					$tracking_user .= "<td style='text-align:right;'>".give_human_time($value,true,true,true)."</td>";
					$tracking_user .= "</tr>";
				}
				//$tracking_user .= "</table>";
				
				echo print_container('incident_tracking_user', __('Statistics by owner'), $tracking_user, 'open', true, '20px', '', '', 1, 'less_widht');
			echo "</td>";	
		echo "</tr>";
	echo "</table>";
}

$trackings = get_db_all_rows_field_filter ('tincident_track', 'id_incident', $id, 'timestamp DESC, id_it DESC');
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:incident_tracking.php


示例6: DMR_DM_PRESTAMO_show


//.........这里部分代码省略.........
    // Load lists of values
    //-------------------------------
    $aPRES_REQUERIMIENTO = split(";", "1;Documento;2;Anexo");
    //-------------------------------
    //-------------------------------
    // Load all fields into variables from recordset or input parameters
    //-------------------------------
    $contador = 0;
    while ($bPK && ($rs && !$rs->EOF)) {
        $contador++;
        $fldDEPE_CODI = $rs->fields["DEPE_CODI"];
        $fldPRES_FECH_PEDI = $rs->fields["PRES_FECH_PEDI"];
        $fldPRES_FECH_VENC = $rs->fields["PRES_FECH_VENC"];
        $fldPRES_ID = $rs->fields["PRES_ID"];
        $fldPRES_REQUERIMIENTO = $rs->fields["PRES_REQUERIMIENTO"];
        $fldRADI_NUME_RADI = $rs->fields["RADI_NUME_RADI"];
        $fldUSUA_LOGIN_ACTU = $rs->fields["USUA_LOGIN_ACTU"];
        //-------------------------------
        // Load data from recordset when form displayed first time
        //-------------------------------
        if ($sPRESTAMOErr == "") {
            $fldUSUA_LOGIN_PRES = $rs->fields["USUA_LOGIN_PRES"];
            $fldPRES_FECH_PRES = $rs->fields["PRES_FECH_PRES"];
            $fldPRES_DESC = $rs->fields["PRES_DESC"];
            $fldPRES_ESTADO = $rs->fields["PRES_ESTADO"];
        } else {
            $fldPRES_DESC = strip(get_param("PRES_DESC_" . $contador));
            $fldPRES_ESTADO = strip(get_param("PRES_ESTADO_" . $contador));
            $fldPRES_ID = strip(get_param("PRES_ID_" . $contador));
        }
        //-------------------------------
        // Set lookup fields
        //-------------------------------
        $fldDEPE_CODI = get_db_value("SELECT DEPE_NOMB FROM DEPENDENCIA WHERE DEPE_CODI=" . tosql($fldDEPE_CODI, "Number"));
        //-------------------------------
        // Show form field
        //-------------------------------
        ?>

<tr><td colspan="2"><HR></td></tr>
	<tr>
       <td class="FieldCaptionTD">
         <font class="FieldCaptionFONT">Radicado</font>
       </td>
       <td class="DataTD">
         <font class="DataFONT">
      <?php 
        echo tohtml($fldRADI_NUME_RADI);
        ?>
&nbsp;</font>
       </td>
     </tr>
      <tr>
       <td class="FieldCaptionTD">
         <font class="FieldCaptionFONT">Fecha de Vencimiento</font>
       </td>
       <td class="DataTD">
         <font class="DataFONT"><?php 
        echo $fldPRES_FECH_VENC;
        ?>
</font>
       </td>
     </tr>
      <tr>
       <td class="FieldCaptionTD">
         <font class="FieldCaptionFONT">Requerimiento</font>
开发者ID:BackupTheBerlios,项目名称:comeet-svn,代码行数:67,代码来源:devolucionMasivo.php


示例7: get_parameter

include_once 'include/functions_user.php';
$get_group_details = (bool) get_parameter('get_group_details');
$id = (int) get_parameter('id');
$delete_user = get_parameter('delete_user', 0);
if ($delete_user) {
    $id_user_delete = get_parameter('id_user_delete');
    user_delete_user($id_user_delete);
}
if ($get_group_details) {
    if (!give_acl($config["id_user"], $id, "IR")) {
        return;
    }
    $default_user = get_db_value('id_user_default', 'tgrupo', 'id_grupo', $id);
    $real_name = get_db_value('nombre_real', 'tusuario', 'id_usuario', $default_user);
    $group = array();
    $group['forced_email'] = get_db_value('forced_email', 'tgrupo', 'id_grupo', $id);
    $group['user_real_name'] = $real_name;
    $group['id_user_default'] = $default_user;
    echo json_encode($group);
    if (defined('AJAX')) {
        return;
    }
}
if (!give_acl($config["id_user"], 0, "UM")) {
    audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access group management");
    require "general/noaccess.php";
    exit;
}
echo '<h1>' . __('Group management') . '</h1>';
$create_group = (bool) get_parameter('create_group');
$update_group = (bool) get_parameter('update_group');
开发者ID:keunes,项目名称:integriaims,代码行数:31,代码来源:lista_grupos.php


示例8: check_login

// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

global $config;

check_login ();

require_once ('include/functions_inventories.php');
require_once ('include/functions_user.php');

$id = (int) get_parameter ('id');
$inventory_name = get_db_value('name', 'tinventory', 'id', $id);


$is_enterprise = false;

if (file_exists ("enterprise/include/functions_inventory.php")) {
	require_once ("enterprise/include/functions_inventory.php");
	$is_enterprise = true;
}

$write_permission = true;

if ($is_enterprise) {
	$read_permission = inventory_check_acl($config['id_user'], $id);

	$write_permission = inventory_check_acl($config['id_user'], $id, true);
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:inventory_relationship.php


示例9: calendar_get_users_holidays_date_range

function calendar_get_users_holidays_date_range($start, $end, $id_user)
{
    $mysql_start = date('Y-m-d', $start);
    $mysql_end = date('Y-m-d', $end);
    $user_clause = "";
    if (is_array($id_user)) {
        $aux_ids = array();
        foreach ($id_user as $iu) {
            array_push($aux_ids, "'" . $iu . "'");
        }
        $user_clause = "id_user IN (" . join(",", $aux_ids) . ")";
    } else {
        $user_clause = "id_user = '{$id_user}'";
    }
    $sql = sprintf("SELECT tworkunit.timestamp AS date, tworkunit.id_user as user FROM tworkunit, tworkunit_task WHERE \n\t\t\t\t\t{$user_clause} AND tworkunit_task.id_workunit = tworkunit.id AND tworkunit_task.id_task =-1 AND \n\t\t\t\t\ttimestamp >= '{$mysql_start}' AND timestamp <= '{$mysql_end}' ORDER BY date ASC");
    $res = process_sql($sql);
    if (!$res) {
        $res = array();
    }
    $holidays = array();
    $holidays_counters = array();
    $holidays_last_day = array();
    foreach ($res as $r) {
        if (!isset($holidays[$r["user"]])) {
            $holidays[$r["user"]] = array();
            $holidays_counters[$r["user"]] = -1;
            $holidays_last_day[$r["user"]] = 0;
        }
        //Calculate start and end for the holiday value
        if (isset($holidays_last_day[$r["user"]])) {
            //Last day minus current day is 1 we increase dates for stored holidays
            $last_time = strtotime($holidays_last_day[$r["user"]]);
            $current_time = strtotime($r["date"]);
            $day_in_seconds = 24 * 3600;
            if ($current_time - $last_time <= $day_in_seconds) {
                $pos = $holidays_counters[$r["user"]];
                $holidays[$r["user"]][$pos]["end"] = strtotime($r["date"]);
                $holidays_last_day[$r["user"]] = strtotime($r["date"]);
            } else {
                array_push($holidays[$r["user"]], array("start" => strtotime($r["date"]), "end" => strtotime($r["date"])));
                $holidays_last_day[$r["user"]] = $r["date"];
                $holidays_counters[$r["user"]]++;
            }
        }
        //Update last day
        $holidays_last_day[$r["user"]] = $r["date"];
    }
    $full_holidays = array();
    $colors = array("#aa3333", "#33aa33", "#3a3a3a", "#3333aa", "#045FB4", "#DF7401", "#01DF3A", "#BE81F7", "#8181F7", "#81BEF7", "#F781F3", "#F7D358", "#F78181", "#FA8258", "#BCF5A9", "#A9A9F5", "#D0A9F5", "#E2A9F3", "#A9F5D0", "#A9F5E1", "#BDBDBD", "#E6E6E6", "#F6CECE", "#6AA4B2", "#6AB277", "#B28E6A", "#B26A97", "#776AB2", "#A58EB4", "#8EB490", "#8E96B4", "#B48E98");
    $i = 0;
    $colors_size = count($colors);
    foreach ($holidays as $key => $values) {
        $i = $i % $colors_size;
        $name = get_db_value("nombre_real", "tusuario", "id_usuario", $key);
        $url = "index.php?sec=users&sec2=operation/user_report/holidays_calendar&custom_dates=1&id_user=" . $key;
        array_push($full_holidays, array("name" => safe_output($name), "dates" => $values, "bgColor" => $colors[$i], "link" => $url));
        $i++;
    }
    return $full_holidays;
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:60,代码来源:functions_calendar.php


示例10: dlookup

function dlookup($table_name, $field_name, $where_condition)
{
    $sql = "SELECT " . $field_name . " FROM " . $table_name . " WHERE " . $where_condition;
    return get_db_value($sql);
}
开发者ID:kractos26,项目名称:orfeo,代码行数:5,代码来源:common.php


示例11: __

    $table_advanced->data[3][1] .= "<img src='images/task.png'></a>";
} else {
    $table_advanced->data[3][1] .= "&nbsp;&nbsp;<a id='task_link' title='" . __('Open this task') . "' target='_blank' href='javascript:;'></a>";
}
$table_advanced->data[1][1] = print_input_text('email_copy', $email_copy, "", 70, 500, true, __("Additional email addresses"), $blocked_incident);
if (!$blocked_incident) {
    $table_advanced->data[1][1] .= "&nbsp;&nbsp;<a href='javascript: incident_show_contact_search();'>" . print_image('images/add.png', true, array('title' => __('Add'))) . "</a>";
}
if ($create_incident) {
    $id_inventory = (int) get_parameter('id_inventory');
    $inventories = array();
    if ($id_inventory) {
        if (!give_acl($config['id_user'], $id_inventory, "VR")) {
            audit_db($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access inventory #" . $id);
        } else {
            $inventories[$id_inventory] = get_db_value('name', 'tinventory', 'id', $id_inventory);
        }
    }
    $table_advanced->data[3][2] = print_select($inventories, 'incident_inventories', NULL, '', '', '', true, false, false, __('Objects affected'));
    $table_advanced->data[3][2] .= "&nbsp;&nbsp;<a href='javascript: incident_show_inventory_search(\"\",\"\",\"\",\"\",\"\",\"\");'>" . print_image('images/add.png', true, array('title' => __('Add'))) . "</a>";
    $table_advanced->data[3][2] .= "&nbsp;&nbsp;<a href='javascript: removeInventory();'>" . print_image('images/cross.png', true, array('title' => __('Remove'))) . "</a>";
} else {
    $inventories = get_inventories_in_incident($id);
    $table_advanced->data[3][2] = print_select($inventories, 'incident_inventories', NULL, '', '', '', true, false, false, __('Objects affected'), $blocked_incident);
    if (!$blocked_incident) {
        $table_advanced->data[3][2] .= "&nbsp;&nbsp;<a href='javascript: incident_show_inventory_search(\"\",\"\",\"\",\"\",\"\",\"\");'>" . print_image('images/add.png', true, array('title' => __('Add'))) . "</a>";
        $table_advanced->data[3][2] .= "&nbsp;&nbsp;<a href='javascript: removeInventory();'>" . print_image('images/cross.png', true, array('title' => __('Remove'))) . "</a>";
    }
}
foreach ($inventories as $inventory_id => $inventory_name) {
    $table_advanced->data[3][2] .= print_input_hidden("inventories[]", $inventory_id, true, 'selected-inventories');
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_detail.php


示例12: get_db_value

        $old_name = get_db_value("name", "tinventory", "id", $inventory_id);
    }
    // Checks if the name is in the db
    $query_result = get_db_value("name", "tinventory", "name", $name);
    if ($query_result) {
        if ($name != $old_name) {
            // Exists. Validation error
            echo json_encode(false);
            return;
        }
    }
    // Does not exist
    echo json_encode(true);
    return;
}
if ($search_duplicate_name) {
    if (!isset($config['duplicate_inventory_name']) || $config['duplicate_inventory_name']) {
        echo json_encode(true);
        return;
    } else {
        $inventory_name = get_parameter('inventory_name');
        $exists = get_db_value('id', 'tinventory', 'name', $inventory_name);
        if ($exists) {
            echo json_encode(false);
            return;
        } else {
            echo json_encode(true);
            return;
        }
    }
}
开发者ID:keunes,项目名称:integriaims,代码行数:31,代码来源:remote_validations.php


示例13: combo_roles_people_task

function combo_roles_people_task($id_task, $id_user, $label = '', $return = false)
{
    $roles = get_db_all_rows_filter('trole_people_task', array('id_task' => $id_task, 'id_user' => $id_user), 'id_role');
    $user_roles = array();
    $output = '';
    if ($roles !== false) {
        foreach ($roles as $key => $rol) {
            $rol_name = get_db_value('name', 'trole', 'id', $rol['id_role']);
            $user_roles[$rol['id_role']] = $rol_name;
        }
    }
    return print_select($user_roles, 'id_profile', '', '', 0, 0, true, 0, false, $label);
}
开发者ID:keunes,项目名称:integriaims,代码行数:13,代码来源:functions_form.php


示例14: print_image

$incident_adv_details .= "</tr>";
$incident_adv_details .= "<tr>";
$incident_adv_details .= "<td class='advanced_details_icons'>" . print_image('images/sla.png', true) . "</td>";
$incident_adv_details .= "<td><table><tr><td>" . __("SLA disabled") . ":</td><td align='right'><b>" . $sla . "</b></td></tr></table></td>";
$incident_adv_details .= "</tr>";
$incident_adv_details .= "<tr>";
$incident_adv_details .= $obj_table;
$incident_adv_details .= "<tr>";
$incident_adv_details .= "<td class='advanced_details_icons'>" . print_image('images/email.png', true) . "</td>";
$incident_adv_details .= "<td><table><tr><td>" . __("Notify changes by email") . ":</td><td align='right'><b>" . $email_notify_text . "</b></td></tr></table></td>";
$incident_adv_details .= "</tr>";
$incident_adv_details .= $email_table;
$incident_adv_details .= "</table>";
$left_side .= print_container('incident_adv_details', __('Advanced details'), $incident_adv_details);
if ($incident["id_incident_type"]) {
    $type_name = get_db_value("name", "tincident_type", "id", $incident["id_incident_type"]);
    $incident_custom_fields = "<table class='advanced_details_table alternate'>";
    $incident_custom_fields .= "<tr>";
    $incident_custom_fields .= "<td><table><tr><td><b>" . $type_name . "</b></td></tr></table></td>";
    $incident_custom_fields .= "</tr>";
    $fields = incidents_get_all_type_field($incident["id_incident_type"], $id);
    foreach ($fields as $f) {
        if ($f["type"] != "textarea") {
            $incident_custom_fields .= "<tr>";
            $incident_custom_fields .= "<td>";
            $incident_custom_fields .= "<table>";
            $incident_custom_fields .= "<tr>";
            $incident_custom_fields .= "<td>" . $f["label"] . ":</td><td align='right'><b>" . $f["data"] . "</b></td>";
            $incident_custom_fields .= "</tr>";
            $incident_custom_fields .= "</table>";
            $incident_custom_fields .= "</td>";
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_dashboard_detail.php


示例15: ui_print_success_message

	process_sql ($sql);
	echo ui_print_success_message (__('Successfully reactivated'), '', true, 'h3', true);
	audit_db ($config['id_user'], $REMOTE_ADDR, "Project activated", "User ".$config['id_user']." activated project #".$id_project);
	project_tracking ($id_project, PROJECT_ACTIVATED);
}

// Delete
if ($delete_project) {
	
	if (!$project_permission['manage']) {
		audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Forbidden", "User ".$config['id_user']." try to delete project #$id_project");
		require ("general/noaccess.php");
		exit;
	}
	
	$id_owner = get_db_value ('id_owner', 'tproject', 'id', $id_project);
	delete_project ($id_project);
	echo ui_print_success_message (__('Successfully deleted'), '', true, 'h3', true);
}

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 ();
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:project.php


示例16: array

	$table->width = '100%';
	$table->head = array ();
	$table->head[0] = __('ID');
	$table->head[1] = __('Name');
	$table->head[2] = __('Group');
	$table->head[3] = __('Status');
	$table->head[4] = __('Creator');
	$table->head[5] = __('Owner');
	$table->size = array ();
	$table->size[0] = '40px';
	$table->data = array();
	
	$data = array();
	foreach ($incidents as $incident) {
		//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"];
		$data[0] = '<strong><a href="'.$link.'">#'.$incident['id_incidencia'].'</a></strong>';
		$data[1] = '<strong><a href="'.$link.'">'.$incident['titulo'].'</a></strong>';
		$data[2] = get_db_value ("nombre", "tgrupo", "id_grupo", $incident['id_grupo']);
		$data[3] = get_db_value ("name", "tincident_status", "id", $incident['estado']);
		$data[4] = $incident['id_creator'];
		$data[5] = $incident['id_usuario'];
		array_push($table->data, $data);
	}
	
	print_table ($table);
}


?>
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:incident_tickets.php


示例17: project_tree

function project_tree($id_project, $id_user)
{
    include "../include/config.php";
    $config["id_user"] = $id_user;
    if (user_belong_project($id_user, $id_project) == 0) {
        audit_db($id_user, $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to task manager of unauthorized project");
        include $config["homedir"] . "/general/noaccess.php";
        exit;
    }
    if ($id_project != -1) {
        $project_name = get_db_value("name", "tproject", "id", $id_project);
    } else {
        $project_name = "";
    }
    $dotfilename = $config["homedir"] . "/attachment/tmp/{$id_user}.dot";
    $pngfilename = $config["homedir"] . "/attachment/tmp/{$id_user}.project.png";
    $dotfile = fopen($dotfilename, "w");
    $total_task = 0;
    $sql2 = "SELECT * FROM ttask WHERE id_project = {$id_project}";
    if ($result2 = mysql_query($sql2)) {
        while ($row2 = mysql_fetch_array($result2)) {
            if (user_belong_task($id_user, $row2["id"]) == 1) {
                $task[$total_task] = $row2["id"];
                $task_name[$total_task] = $row2["name"];
                $task_parent[$total_task] = $row2["id_parent_task"];
                $task_workunit[$total_task] = get_task_workunit_hours($row2["id"]);
                $total_task++;
            }
        }
    }
    fwrite($dotfile, "digraph Integria {\n");
    fwrite($dotfile, "\t  ranksep=2.0;\n");
    fwrite($dotfile, "\t  ratio=auto;\n");
    fwrite($dotfile, "\t  size=\"9,12\";\n");
    fwrite($dotfile, "\t  node[fontsize=" . $config['fontsize'] . "];\n");
    fwrite($dotfile, '	  project [label="' . wordwrap($project_name, 12, '\\n') . '",shape="ellipse", style="filled", color="grey"];' . "\n");
    for ($ax = 0; $ax < $total_task; $ax++) {
        fwrite($dotfile, 'TASK' . $task[$ax] . ' [label="' . wordwrap($task_name[$ax], 12, '\\n') . '"];');
        fwrite($dotfile, "\n");
    }
    // Make project first parent task relation visible
    for ($ax = 0; $ax < $total_task; $ax++) {
        if ($task_parent[$ax] == 0) {
            fwrite($dotfile, 'project -> TASK' . $task[$ax] . ';');
            fwrite($dotfile, "\n");
        }
    }
    // Make task-subtask parent task relation visible
    for ($ax = 0; $ax < $total_task; $ax++) {
        if ($task_parent[$ax] != 0) {
            fwrite($dotfile, 'TASK' . $task_parent[$ax] . ' -> TASK' . $task[$ax] . ';');
            fwrite($dotfile, "\n");
        }
    }
    fwrite($dotfile, "}");
    fwrite($dotfile, "\n");
    // exec ("twopi -Tpng $dotfilename -o $pngfilename");
    exec("twopi -Tpng {$dotfilename} -o {$pngfilename}");
    Header('Content-type: image/png');
    $imgPng = imageCreateFromPng($pngfilename);
    imageAlphaBlending($imgPng, true);
    imageSaveAlpha($imgPng, true);
    imagePng($imgPng);
    //unlink ($pngfilename);
    //unlink ($dotfilename);
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:66,代码来源:functions_graph.php


示例18: __

		$table->head[7] = __('Delete');
		
		foreach ($slas as $sla) {
			$data = array ();
			
			$data[0] = "<a href='index.php?sec=incidents&sec2=operation/slas/sla_detail&id=".$sla['id']."'>".$sla['name']."</a>";
			$data[1] = incidents_hours_to_dayminseg($sla['min_response']);
			$data[2] = incidents_hours_to_dayminseg($sla['max_response']);
			$data[3] = $sla['max_incidents'];
			$data[4] = incidents_hours_to_dayminseg($sla['max_inactivity']);
			
			if ($sla['enforced'] == 1)
				$data[5] = __("Yes");
			else
				$data[5] = __("No");
			$data[6] = get_db_value ('name', 'tsla', 'id', $sla['id_sla_base']);
			$data[7] = '<a href="index.php?sec=incidents&
						sec2=operation/slas/sla_detail&
						delete_sla=1&id='.$sla['id'].'"
						onClick="if (!confirm(\''.__('Are you sure?').'\'))
						return false;">
						<img src="images/cross.png"></a>';
			array_push ($table->data, $data);
		}
		echo "<div class='divresult'>";
			print_table ($table);
		echo "</div>";
	}
}
?>
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:sla_detail.php


示例19: get_parameter

}
include_once "include/functions_objects.php";
//**********************************************************************
// Get actions
//**********************************************************************
$id = (int) get_parameter('id');
$create = (bool) get_parameter('create');
$insert_object = (bool) get_parameter('insert_object');
$update_object = (bool) get_parameter('update_object');
$delete_object = (bool) get_parameter('delete_object');
$get_icon = (bool) get_parameter('get_icon');
//**********************************************************************
// Ajax
//**********************************************************************
if ($get_icon) {
    $icon = (string) get_db_value('icon', 'tobject_type', 'id', $id);
    if (defined('AJAX')) {
        echo $icon;
        return;
    }
}
//**********************************************************************
// Tabs
//**********************************************************************
echo '<div id="tabs">';
/* Tabs list */
echo '<ul class="ui-tabs-nav">';
echo '<li class="ui-tabs-title">' . strtoupper(__('Object management')) . '</li>';
if (!empty($id)) {
    echo '<li class="ui-tabs-selected"><a href="index.php?sec=inventory&sec2=operation/inventories/manage_objects&id=' . $id . '"><span>' . __('Object details') . '</span></a></li>';
    echo '<li class="ui-tabs"><a href="index.php?sec=inventory&sec2=operation/inventories/manage_objects_types_list&id=' . $id . '"><span>' . __('Fields') . '</span></a></li>';
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:manage_objects.php


示例20: Ciudadano_show


//.........这里部分代码省略.........
              include_once("$ruta_raiz/adodb/toexport.inc.php");
    
              $ruta = "$ruta_raiz/".$carpetaBodega."tmp/Busqclasic".date('Y_m_d_H_i_s').".csv";
              $f = fopen($ruta, 'w');
              if ($f) {
              rs2csvfile($rsaux, $f);
              $linkcsv= "<a href='$ruta' target='_blank'><img style='border:0px' src='".$ruta_raiz."imagenes/csv.png' alt='Archivo CSV'/></a>";
              }
              } */
    //-------------------------------
    ?>
        <!--tr>
         <td colspan="10" class="DataTD"><b>Total Registros Encontrados: <?php 
    echo $fldTotal;
    ?>
</b></td>
        </tr-->

        <?php 
    //-------------------------------
    // Initialize page counter and records per page
    //-------------------------------
    $iCounter = 0;
    //-------------------------------
    //-------------------------------
    // Process page scroller
    //-------------------------------
    $iPage = get_param("FormCIUDADANO_Page");
    //print ("<BR>($iPage)($iRecordsPerPage)");
    if (strlen(trim($iPage)) == 0) {
        $iPage = 1;
    } else {
        if ($iPage == "last") {
            $db_count = get_db_value($sCountSQL);
            $dResult = intval($db_count) / $iRecordsPerPage;
            $iPage = intval($dResult);
            if ($iPage < $dResult) {
                $iPage++;
            }
        } else {
            $iPage = intval($iPage);
        }
    }
    if (($iPage - 1) * $iRecordsPerPage != 0) {
        //print ("<BR>($iPage)($iRecordsPerPage)");
        do {
            $iCounter++;
            $rs->MoveNext();
            //print("Entra......");
        } while ($iCounter < ($iPage - 1) * $iRecordsPerPage && (!$rs->EOF && $rs));
    }
    $iCounter = 0;
    //-------------------------------
    //$ruta_raiz ="..";
    //include "../config.php";
    //include "../jh_class/funciones_sgd.php";
    //-------------------------------
    // Display grid based on recordset
    //-------------------------------.
    $i = 1;
    while (!$rs->EOF && $rs && $iCounter < $iRecordsPerPage) {
        //-------------------------------
        // Create field variables based on database fields
        //-------------------------------
        $fldRADI_NUME_RADI = $rs->fields['RADI_NUME_RADI'];
        $fldRADI_FECH_RADI = $rs->fields['RADI_FECH_RADI'];
开发者ID:kractos26,项目名称:orfeo,代码行数:67,代码来源:busquedaPiloto1.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_db_value_filter函数代码示例发布时间:2022-05-15
下一篇:
PHP get_db_type函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap