Example #1
0
        echo "</li>";
    }
    echo "</ul>";
    echo "</div>";
    echo "<div style='height: 25px'> </div>";
} else {
    audit_db($id_user, $REMOTE_ADDR, "ACL Violation", "Trying to access to ticket " . $id_inc . " '" . $titulo . "'");
    include "general/noaccess.php";
    exit;
}
// ********************************************************************
// Notes
// ********************************************************************
echo $result_msg;
echo "<br>";
$title = __('Notes attached to ticket') . " #{$id_inc} '" . get_incident_title($id_inc) . "'";
echo "<h3>{$title}</h3>";
$sql4 = 'SELECT * FROM tworkunit_incident WHERE id_incident = ' . $id_inc . ' ORDER BY id_workunit ASC';
if ($res4 = mysql_query($sql4)) {
    while ($row4 = mysql_fetch_array($res4)) {
        $sql3 = 'SELECT * FROM tworkunit WHERE id = ' . $row4["id_workunit"];
        $res3 = mysql_query($sql3);
        while ($row3 = mysql_fetch_array($res3)) {
            show_workunit_data($row3, $title);
        }
    }
} else {
    echo __('No data available');
}
?>
Example #2
0
    audit_db("Noauth", $config["REMOTE_ADDR"], "No authenticated access", "Trying to access ticket viewer");
    require "general/noaccess.php";
    exit;
}
$id = get_parameter("id", 0);
$id_incident = get_parameter("id_incident", 0);
$title = get_parameter("title", "");
// ********************************************************************
// Note detail of $id_note
// ********************************************************************
// If WU comes from an incident, get data from incident
if ($id_incident != 0) {
    echo "<h3>";
    echo "<a href='index.php?sec=incidents&sec2=operation/incidents/incident&id={$id_incident}'>";
    echo __("Workunit detail for Incident #") . $id_incident;
    echo " - " . get_incident_title($id_incident);
    echo "</a></h3>";
} else {
    echo "<h2>{$title}</h2>";
}
$sql4 = 'SELECT * FROM tworkunit WHERE id = ' . $id;
$res4 = mysql_query($sql4);
if ($row3 = mysql_fetch_array($res4)) {
    echo "<div class='notetitle'>";
    // titulo
    $timestamp = $row3["timestamp"];
    $duration = $row3["duration"];
    $id_user = $row3["id_user"];
    $avatar = get_db_value("avatar", "tusuario", "id_usuario", $id_user);
    $description = $row3["description"];
    // Show data