".__('Note successfully added').""; } $sql2 = "SELECT * FROM tnota WHERE id_usuario = '".$config['id_user']."' AND timestamp = '".$timestamp."'"; $res2=mysql_query($sql2); $row2=mysql_fetch_array($res2); $id_nota = $row2["id_nota"]; $sql3 = "INSERT INTO tnota_inc (id_incidencia, id_nota) VALUES (".$id_inc.",".$id_nota.")"; $res3=mysql_query($sql3); $sql4 = "UPDATE tincidencia SET actualizacion = '".$timestamp."' WHERE id_incidencia = ".$id_inc; $res4 = mysql_query($sql4); } // Delete note if (isset($_GET["id_nota"])){ $note_user = give_note_author ($_GET["id_nota"]); if (((give_acl($iduser_temp, $id_grupo, "IM")==1) OR ($note_user == $iduser_temp)) OR ($usuario = $iduser_temp) ) { // Only admins (manage incident) or owners can modify incidents, including their notes // But note authors was able to delete this own notes $id_nota = $_GET["id_nota"]; $id_nota_inc = $_GET["id_nota_inc"]; $query ="DELETE FROM tnota WHERE id_nota = ".$id_nota; $query2 = "DELETE FROM tnota_inc WHERE id_nota_inc = ".$id_nota_inc; //echo "DEBUG: DELETING NOTE: ".$query."(----)".$query2; mysql_query($query); mysql_query($query2); if (mysql_query($query)) { echo "
".__('Filename')." | ".__('Description')." | ".__('Size')." | ".__('Delete')." |
---|---|---|---|
".$row["filename"].""; echo " | ".$row["description"]; echo " | ".$row["size"]; if (give_acl($iduser_temp, $id_grupo, "IM")==1){ // Delete attachment echo ' | '; } } echo " |