136
|
1 |
<?php |
|
2 |
/* |
|
3 |
Copyright (c) 2005, Alex Tingle. $Revision: 287 $ |
|
4 |
|
|
5 |
This program is free software; you can redistribute it and/or |
|
6 |
modify it under the terms of the GNU General Public License |
|
7 |
as published by the Free Software Foundation; either version 2 |
|
8 |
of the License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU General Public License |
|
16 |
along with this program; if not, write to the Free Software |
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 |
*/ |
|
19 |
|
|
20 |
/** Represents all posts from a particular day. |
|
21 |
* Generated by ec3_util_calendar_days(). */ |
|
22 |
class ec3_Day |
|
23 |
{ |
|
24 |
var $is_event =False; |
|
25 |
var $titles =array(); |
|
26 |
function ec3_Day(){} |
|
27 |
function add_post($title,$time,$is_event) |
|
28 |
{ |
|
29 |
$safe_title=strip_tags($title); |
|
30 |
$safe_title= |
|
31 |
str_replace( |
|
32 |
array(',','@'), |
|
33 |
' ', |
|
34 |
htmlspecialchars( |
|
35 |
stripslashes($safe_title), |
|
36 |
ENT_QUOTES, |
|
37 |
get_option('blog_charset') |
|
38 |
) |
|
39 |
); |
|
40 |
if($is_event) |
|
41 |
{ |
|
42 |
$safe_title.=' @'.$time; |
|
43 |
$this->is_event=True; |
|
44 |
} |
|
45 |
$this->titles[]=$safe_title; |
|
46 |
} |
|
47 |
function get_titles() |
|
48 |
{ |
|
49 |
return implode(', ',$this->titles); |
|
50 |
} |
|
51 |
} |
|
52 |
|
|
53 |
?> |