-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpm_list.php
executable file
·123 lines (97 loc) · 2.65 KB
/
pm_list.php
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/* I codici qui inseriti sono proprietà di
* Francesco Stasi, pertanto ne è vietata la
* vendita e la cessione a terzi senza previa
* autorizzazione dell' autore.
*/
require_once("config.php");
require_once("libs/common.php");
require_once("libs/pm_lib.php");
if(!isset($_SESSION))
{
session_start();
}
logged();
$start_pag=0;
if (isset($_REQUEST['p']) && $_REQUEST['p']>0){
$start_pag=$_REQUEST['p']*($pm_per_pag);
}
$folder=0;
if (isset($_REQUEST['f']) && $_REQUEST['f']=='1'){
$folder=1;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="author" content="Francesco Stasi"/>
<title>PM List</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
/**** PM ****/
var cur_view;
var uipan
function refresh(){
//post_page(null,cur_view);
$(uipan).load(cur_view);
}
function deletePm(url,id){
$.post(url);
$('#'+id).remove();
}
function creaN(url){
$("#imessage").attr('src',url);
}
$(function() {
/* MESSAGGI PRIVATI */
$( "#pm_menu" ).tabs({
ajaxOptions: {
error: function( xhr, status, index, anchor ) {
$( anchor.hash ).html("Si è verificato un errore." );
}
},
load: function(event,ui){
$("#pm_unread").html($(ui.panel).find("#pm_countH").html());
},
select: function(event, ui) {
var url = $.data(ui.tab, 'load.tabs');
if($(ui.tab).attr("id")=='forceMexNew'){
creaN(url);
return false;
}
uipan=ui.panel
cur_view=url;
return true;
}
});
$("#pm_wrapper").on('submit','#search', function(){
cur_view="pm_slist.php?s="+$("#search_field").val();
$(uipan).load(cur_view);
return false;
});
$( "#pm_menu" ).tabs("select" , 1 );
//pm_timer = setInterval(refresh, 7000);
});
</script>
</head>
<body>
<div id="pm_wrapper">
<div>
<form method="get" action="#" id="search" autocomplete="off">
<input id="search_field" name="q" type="text" size="40" placeholder="Cerca..." />
</form>
</div>
<div id="pm_menu">
<ul id="pm_menu_items">
<li><a href="pm_new.php" id="forceMexNew">Scrivi <?php echo $missive;?></a></li>
<li><a href="pm_slist.php?p=0&f=0" class="menuitem"> <?php echo $missive_plurali;?> <span id="pm_unread"></span></a></li>
<!--<li><a href="pm_slist.php?p=0&f=-1" class="menuitem"> <?php echo $missive_plurali;?> Inviati</a></li>-->
<li><a href="pm_slist.php?p=0&f=1" class="menuitem">Cestino</a></li>
</ul>
</div>
</div>
</body>
</html>