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'); } ?> <script type="text/javascript" src="include/js/integria_incident_search.js"></script>
echo '</li>'; echo '</ul>'; } else { echo "<h1 class='ticket_clean_report_title'>" . __('Comments') . "</h1>"; } echo '<div id="comment-list">'; // Workunit view $workunits = get_incident_workunits($id_incident); if (!$workunits) { echo '<h4>' . __('No comment was done in this ticket') . '</h4>'; return; } foreach ($workunits as $workunit) { $workunit_data = get_workunit_data($workunit['id_workunit']); echo '<div class="comment">'; show_workunit_data($workunit_data, $title); echo '</div>'; } echo '</div>'; ?> <script type="text/javascript"> // Enclose in its own scope (function ($) { // Comment form controller var $commentForm = $("form#form-add-workunit"); var $commentList = $("div#comment-list"); var $commentProfile = $commentForm.find('select#work_profile'); var $commentDuration = $commentForm.find('input#text-duration'); var $commentHaveCost = $commentForm.find('input#checkbox-have_cost');