[go: up one dir, main page]

Menu

[r19]: / reception.php  Maximize  Restore  History

Download this file

93 lines (82 with data), 3.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
$pageRef='Reception';
include('includes/header.php');
?>
<script>
function newNote(){
window.location.href = 'http://<?php echo $_SERVER['SERVER_ADDR']?>/Oreste/newNote.php';
}
function successInDeletingNoteF(transport){
var args=transport.responseText.evalJSON();
//Success in delete request
//Operation result advice
$('qResult').style.display='block';
$('qResult').innerHTML=args.opText;
if(parseInt(args.opResult) == 0){
//Success in delete operation
window.location.href = 'http://<?php echo $_SERVER['SERVER_ADDR']?>/Oreste/reception.php';
}else{
//Failure in delete operation
}
}
function failureInDeletingNoteF(){
//Failure in delete request
alert('<?php echo _T("NI_reception_II"); ?>');
}
function deleteNote(noteId, noteTitle){
answer = confirm('<?php echo _T("NI_reception_I") ?>');
if(answer != 0){
OL_deleteNote(noteId, {onSuccess: successInDeletingNoteF, onFailure: failureInDeletingNoteF});
}else{
}
}
</script>
<div id="qResult" class="OpResult"></div>
<div class="Columns">
<div class="Column1">
<!-- *********************************************************** -->
<!-- * Menu tab * -->
<!-- *********************************************************** -->
<div class="Block"><div class="BlockBL"><div></div></div><div class="BlockBR"><div></div></div><div class="BlockTL"></div><div class="BlockTR"><div></div></div><div class="BlockT"></div><div class="BlockR"><div></div></div><div class="BlockB"><div></div></div><div class="BlockL"></div><div class="BlockC"></div><div class="BlockContent"><span class="BlockHeader"><span><?php echo _T("Actions"); ?></span></span><div class="BlockContentBorder">
<ul>
<li><a href="javascript:newNote();"><?php echo _T("Write a note"); ?></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="MainColumn">
<!-- *********************************************************** -->
<!-- * Notes * -->
<!-- *********************************************************** -->
<?php
$getNotes = mysql_query("SELECT * FROM notes WHERE noteDestId='$_SESSION[user]' ORDER BY noteTime ");
while($row = mysql_fetch_array($getNotes)) {
echo "<div style=\"margin: 10px 0px 0px 0px; float: right; border: solid 1px gray; background-color: #FFFFC2; width: 99%;\">";
echo "<table style=\"width: 100%;\">";
echo "<tr><td><b><i>" . $row[noteTitle] . "</i></b></td><td style=\"width: 10%; vertical-align: top; text-align: right;\"><a href=\"javascript:deleteNote('" . $row[noteId] . "', '" . $row[noteTitle] . "');\"><img src=\"images/cancella.png\"></a></td></tr>";
echo "<tr><td colspan=\"2\" style=\"text-align: left\"><i>" . nl2br($row[noteContent]) . "</i></td></tr>";
echo "<tr><td colspan=\"2\" style=\"text-align: right\"><i>" . $row[noteMit] . "(" . $row[noteTimestamp] . ")</i></td></tr>";
echo "</table>";
echo "</div>";
}
?>
</div>
</div>
<script>
// ************************************************************
// * Observe window load event to call the init page function *
// ************************************************************
Event.observe(window, 'load', function(){
// **************************
// * Install event handlers *
// **************************
Event.observe('qResult', 'mouseover', function(){OL_makeThisElementInvisible('qResult');});
});
</script>
<!-- tags opened in the header -->
</div>
</div>
</div>
</body>
</html>