4 * Event Calendar for Elxis CMS 2008.x and 2009.x
6 * Frontend Event Handler
9 * @package eventCalendar
10 * @author Apostolos Koutsoulelos <akoutsoulelos@yahoo.gr>
11 * @copyright Copyright (C) 2009-2010 Apostolos Koutsoulelos. All rights reserved.
12 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
16 // Prevent direct inclusion of this file
17 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
21 /******************************************************************************/
22 /* THE CLASS THAT WILL CONTAIN THE COMPONENT'S FRONT-END HTML FUNCTIONALITY */
23 /******************************************************************************/
24 class clsEventCalendarHTML
{
26 /************************/
27 /* Display the header */
28 /************************/
29 protected function displayHeaderHTML($menuitem, $catids="") {
30 global $objEventCalendar, $my, $mosConfig_live_site;
32 // Draw a simple html header
33 $permits = explode(',', $my->allowed
); ?
>
35 <script type
="text/javascript">
36 function shadeOn( item
) {
37 item
.src
= "<?php echo $objEventCalendar->live_path; ?>/templates/f_<?php echo $objEventCalendar->params['com']->get('css_filename'); ?>/view_" + item
.id +
"_f2.png";
40 function shadeOff( item
) {
41 item
.src
= "<?php echo $objEventCalendar->live_path; ?>/templates/f_<?php echo $objEventCalendar->params['com']->get('css_filename'); ?>/view_" + item
.id +
".png";
45 <table
class="event_calendar_header_table"><tr
>
46 <?php
if ( ($objEventCalendar->task
!= 'editevent') && ($objEventCalendar->task
!= 'printevent') ) { ?
>
48 <?php
if (in_array($objEventCalendar->params
['com']->get('who_can_post_events'), $permits) ) { ?
>
49 <img src
="<?php echo $objEventCalendar->live_path; ?>/templates/f_<?php echo $objEventCalendar->params['com']->get('css_filename'); ?>/new.png" width
="16" height
="16" border
="0"/>
50 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=editevent
".$menuitem) ?>" title
="<?php echo _E_ADDCONTENT; ?>"><?php
echo _E_ADD
; ?
></a
>
52 <?php
if ( (in_array($objEventCalendar->params
['com']->get('who_can_edit_events'), $permits)) && ($objEventCalendar->task
== 'eventview') ) { ?
>
54 <img src
="<?php echo $objEventCalendar->live_path; ?>/templates/f_<?php echo $objEventCalendar->params['com']->get('css_filename'); ?>/edit.png" width
="16" height
="16" border
="0"/>
55 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=editevent
&eventid
=".$objEventCalendar->eventid.$menuitem) ?>" title
="<?php echo _E_EDITCONTENT; ?>"><?php
echo _E_EDIT
; ?
></a
>
59 <?php
if ( $objEventCalendar->params
['com']->get('view_nav', true) ) { ?
>
61 <b
><?php
echo ($objEventCalendar->task
!= 'printevent')?
$objEventCalendar->lng
->FRONT_VIEW
.':':''; ?
>
63 <?php
switch ($objEventCalendar->task
) {
65 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month."&day
=".$objEventCalendar->day.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_day.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_DAY; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="day" id
="day" /></a
> 
; 
;
66 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$objEventCalendar->year."&week
=".$objEventCalendar->week.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_week.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_WEEK; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="week" id
="week" /></a
> 
; 
;
67 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_month.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_MONTH; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="month" id
="month" /></a
> 
; 
;
70 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month."&day
=".$objEventCalendar->day.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_day.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_DAY; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="day" id
="day" /></a
> 
; 
;
71 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$objEventCalendar->year."&week
=".$objEventCalendar->week.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_week.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_WEEK; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="week" id
="week" /></a
> 
; 
;
72 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_month.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_MONTH; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="month" id
="month" /></a
> 
; 
;
75 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month."&day
=".$objEventCalendar->day.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_day.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_DAY; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="day" id
="day" /></a
> 
; 
;
76 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$objEventCalendar->year."&week
=".$objEventCalendar->week.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_week.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_WEEK; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="week" id
="week" /></a
> 
; 
;
77 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_month.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_MONTH; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="month" id
="month" /></a
> 
; 
;
80 if ($objEventCalendar->task
!= 'printevent') { ?
>
81 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month."&day
=".$objEventCalendar->day.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_day.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_DAY; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="day" id
="day" /></a
> 
; 
;
82 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$objEventCalendar->year."&week
=".$objEventCalendar->week.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_week.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_WEEK; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="week" id
="week" /></a
> 
; 
;
83 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month.$catids.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_month.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_MONTH; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="month" id
="month" /></a
> 
; 
;
85 if ( $objEventCalendar->params
['com']->get('view_print', true) ) {
86 echo ($objEventCalendar->task
!= 'printevent')?
'| ':'';
87 $image = mosAdminMenus
::ImageCheck( 'printButton.png', '/components/com_eventcalendar/templates/f_'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'/', NULL, NULL, _CMN_PRINT
, 1, 'right' );
88 $link = 'index2.php?option=com_eventcalendar&task=printevent&eventid='.$objEventCalendar->eventid
.'&Itemid='.$Itemid;
89 $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';
91 if ( $objEventCalendar->task
== 'printevent' ) {
92 echo '<a href="javascript:void(0);" onclick="javascript:window.print(); return false" title="'._CMN_PRINT
.'">'._LEND
;
94 echo '<a href="javascript:void(0);" onclick="javascript:window.open(\''.$link.'\', \'PrintWindow\', \''.$status.'\');" title="'._CMN_PRINT
.'">'._LEND
;
101 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month."&day
=".$objEventCalendar->day.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_day.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_DAY; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="day" id
="day" /></a
> 
; 
;
102 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$objEventCalendar->year."&week
=".$objEventCalendar->week.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_week.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_WEEK; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="week" id
="week" /></a
> 
; 
;
103 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".$objEventCalendar->year."&month
=".$objEventCalendar->month.$menuitem ) ?>"><img src
="<?php echo $objEventCalendar->live_path.'/templates/f_'.$objEventCalendar->params['com']->get('css_filename').'/view_month.png'; ?>" width
="16" height
="16" border
="0" title
="<?php echo $objEventCalendar->lng->CP_TAB_GENERAL_DEFAULT_VIEW_MONTH; ?>" onmouseover
="shadeOn(this)" onmouseout
="shadeOff(this)" name
="month" id
="month" /></a
> 
; 
;
106 if ( $objEventCalendar->params
['com']->get('view_rss', true) ) {
108 $image = mosAdminMenus
::ImageCheck( 'rss.png', '/components/com_eventcalendar/templates/f_'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'/', NULL, NULL, 'RSS feeds', 1, 'right' );
109 echo '<a href='.sefReltoAbs('index.php?option=com_eventcalendar&task=syndication', EVCALBASE
.'/syndication.html').' title="RSS feeds">'.$image.'</a>';
118 /************************/
119 /* Display month view */
120 /************************/
121 static public function displayMonthViewHTML( $weeknrs ) {
122 global $mainframe, $objEventCalendar, $Itemid;
124 $mainframe->setPageTitle( $objEventCalendar->lng
->CP_TAB_GENERAL_DEFAULT_VIEW_MONTH
." ".$objEventCalendar->lng
->FRONT_VIEW
);
126 // Print components css information and header inclusions
127 $linktag = '<link href="'.$objEventCalendar->live_path
.'/templates/'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'" rel="stylesheet" type="text/css" />';
128 if (mosGetParam( $_REQUEST, 'pop', 0)) {
131 $mainframe->addCustomHeadTag($linktag);
134 // Load core HTML library
135 mosCommonHTML
::loadOverlib();
137 // Set some variables
138 $menuitem = "&Itemid=".$Itemid;
139 if (isset($objEventCalendar->catid
)) {
140 $catids = (is_array($objEventCalendar->catid
))?
implode("+", $objEventCalendar->catid
):$objEventCalendar->catid
;
142 $catids = ($catids == "")?
"":"&catid=".$catids;
144 // Draw a simple html header
145 clsEventCalendarHTML
::displayHeaderHTML($menuitem, $catids);
147 // Display month table
148 $thisMonth = mktime( 0, 0, 0, $objEventCalendar->month
, 1, $objEventCalendar->year
);
149 $lastMonth = strtotime( "1 month ago", $thisMonth );
150 $nextMonth = strtotime( "+ 1 month", $thisMonth );
152 <table
class="event_calendar_month_table">
154 <?php
if ($objEventCalendar->params
['com']->get('show_weeknumber', true)) { ?
>
155 <td rowspan
="2"></td
>
157 <td colspan
="2" class="nav_other_month"><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".date("Y
", $lastMonth)."&month
=".date("m
", $lastMonth). $catids . $menuitem ) ?>"><?php
echo strftime("%B", $lastMonth) ?
></a
></td
>
158 <td colspan
="3" class="nav_cur_month"><?php
echo strftime( "%B", $thisMonth ) . " " . strftime("%Y", $thisMonth) ?
></td
>
159 <td colspan
="2" class="nav_other_month"><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=monthview
&year
=".date("Y
", $nextMonth)."&month
=".date("m
", $nextMonth). $catids . $menuitem ) ?>"><?php
echo strftime("%B", $nextMonth) ?
></a
></td
>
163 for($dcount = 0; $dcount < 7; $dcount++
) {?
>
164 <td
class="weekdays_name<?php echo (strftime("%w
", $objEventCalendar->calendar[$dcount]) == 0)?'_sunday':''; ?>"><?php
echo strftime("%A", $objEventCalendar->calendar
[$dcount]) ?
></td
>
167 <?php
for ($wcount = 1; $wcount <= count($weeknrs); $wcount++
) { ?
>
170 if ($objEventCalendar->params
['com']->get('show_weeknumber', true)) { ?
>
171 <td
class="week_nrs">
173 if ($objEventCalendar->params
['com']->get('week_number_links', true)) { //(($objEventCalendar->calendar[0] <> NULL)?$objEventCalendar->calendar[0]:$objEventCalendar->calendar[6] - 604800)
175 <a href
="<?php echo sefRelToAbs( "index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$objEventCalendar->year."&week
=".$weeknrs[$wcount-1]. $catids . $menuitem) ?>" class="event_calendar_month_table_week_nrs">
176 <?php
echo $weeknrs[$wcount-1]; ?
>
179 echo $weeknrs[$wcount-1];
184 for ($wdcount = 1; $wdcount <= 7; $wdcount++
) {
185 $working_day = $objEventCalendar->calendar
[(($wcount * 7) - 7) +
($wdcount - 1)];
186 if(isset($working_day)) {
187 if (date("m", $working_day) < date("m", $objEventCalendar->date
)) { ?
>
188 <td
class="other_month_day" valign
="top">
189 <span
class="<?php echo (date("w
", $working_day) == 0)?'event_sunday':''; ?>"><?php
echo strftime("%B", $working_day) ?
></span
>
191 } elseif (date("m", $working_day) > date("m", $objEventCalendar->date
)) { ?
>
192 <td
class="other_month_day" valign
="top">
193 <span
class="<?php echo (date("w
", $working_day) == 0)?'event_sunday':''; ?>"><?php
echo strftime("%B", $working_day) ?
></span
>
196 <td
class="month_day<?php echo (date("Y
-m
-d
", $working_day) == date("Y
-m
-d
", time()))?'_today':''; ?>" valign
="top">
197 <span
class="<?php echo (date("w
", $working_day) == 0)?'event_sunday':''; ?>"> <?php
echo strftime("%d", $working_day) ?
><hr
class="event" /></span
>
199 foreach ($objEventCalendar->events
as $day_event) {
200 // Calculate recursion
201 if ($objEventCalendar->calcRecursion($working_day, $day_event)) {
202 // Check if working_day is an excepted
203 $exceptions = $objEventCalendar->calcExceptions( $day_event );
204 if (array_search($working_day, $exceptions) === false) { ?
>
205 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>; font-size: x-small; line-height: 10px;">
206 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem) ?>" title
="<?php echo $day_event->title ?>"><?php
echo eUTF
::utf8_substr(eUTF
::utf8_trim($day_event->title
), 0, 15).'...'; ?
></a
>
223 /***********************/
224 /* Display week view */
225 /***********************/
226 static public function displayWeekViewHTML() {
227 global $mainframe, $objEventCalendar, $Itemid;
229 $mainframe->setPageTitle( $objEventCalendar->lng
->CP_TAB_GENERAL_DEFAULT_VIEW_WEEK
." ".$objEventCalendar->lng
->FRONT_VIEW
);
231 // Print components css information and header inclusions
232 $linktag = '<link href="'.$objEventCalendar->live_path
.'/templates/'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'" rel="stylesheet" type="text/css" />';
233 if (mosGetParam( $_REQUEST, 'pop', 0)) {
237 $mainframe->addCustomHeadTag($linktag);
240 // Load core HTML library
241 mosCommonHTML
::loadOverlib();
243 // Set some variables
244 $menuitem = "&Itemid=".$Itemid;
245 if (isset($objEventCalendar->catid
)) {
246 $catids = (is_array($objEventCalendar->catid
))?
implode("+", $objEventCalendar->catid
):$objEventCalendar->catid
;
248 $catids = ($catids == "")?
"":"&catid=".$catids;
250 // Draw a simple html header
251 clsEventCalendarHTML
::displayHeaderHTML($menuitem, $catids);
253 // Display week table
254 $week_startingday = $objEventCalendar->params
['com']->get( 'week_startingday' , 0);
255 $firstDay_stamp = (date("w", $objEventCalendar->date
) == $week_startingday)?
$objEventCalendar->date
:strtotime(('last '.$objEventCalendar->weekdays
[$week_startingday]), $objEventCalendar->date
);
256 $lastDay_stamp = (date("w", $objEventCalendar->date
) == ((($week_startingday - 1) < 0)?
6:$week_startingday - 1))?
$objEventCalendar->date
:strtotime(('next '.$objEventCalendar->weekdays
[((($week_startingday - 1) < 0)?
6:$week_startingday - 1)]), $objEventCalendar->date
);
258 // Catch a small week offset error
259 if (($objEventCalendar->week
- 1) == 0 ) {
261 $prevweekyear = $objEventCalendar->year
- 1;
263 $prevweek = $objEventCalendar->week
- 1;
264 $prevweekyear = $objEventCalendar->year
;
266 if (($objEventCalendar->week +
1) == 53 ) {
268 $nextweekyear = $objEventCalendar->year +
1;
270 $nextweek = $objEventCalendar->week +
1;
271 $nextweekyear = $objEventCalendar->year
;
274 <table
class="event_calendar_week_table">
277 <td
class="nav_other_week" colspan
="2"><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$prevweekyear."&week
=".$prevweek. $catids . $menuitem ) ?>" title
="<?php echo $objEventCalendar->lng->FRONT_VIEW_WEEK_PREV_TITLE ?>">«
<?php
echo $objEventCalendar->lng
->FRONT_VIEW_WEEK_PREV ?
></a
></td
>
278 <td
class="nav_cur_week" colspan
="3"><?php
echo date("Y/m/d", $firstDay_stamp).' - '.date("Y/m/d", $lastDay_stamp); ?
> </td
>
279 <td
class="nav_other_week" colspan
="2"><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=weekview
&year
=".$nextweekyear."&week
=".$nextweek. $catids . $menuitem ) ?>" title
="<?php echo $objEventCalendar->lng->FRONT_VIEW_WEEK_NEXT_TITLE ?>"><?php
echo $objEventCalendar->lng
->FRONT_VIEW_WEEK_NEXT ?
> »
</a
></td
>
282 <td
class="week_nrs"><?php
echo (strlen($objEventCalendar->week
) == 1)?
'0'.$objEventCalendar->week
:$objEventCalendar->week
; ?
></td
>
284 for($dcount = 0; $dcount < 7; $dcount++
) {?
>
285 <td
class="weekdays_name<?php echo (strftime("%w
", $objEventCalendar->calendar[$dcount]) == 0)?'_sunday':''; ?>"><?php
echo strftime("%A", $objEventCalendar->calendar
[$dcount]) ?
></td
>
289 $start_time = $objEventCalendar->timetable
[$objEventCalendar->timetable_selected
][0];
290 $end_time = $objEventCalendar->timetable
[$objEventCalendar->timetable_selected
][1];
291 $hcount = $end_time - $start_time;
293 for ($i = 0; $i <= $hcount; $i++
) { ?
>
295 <td
class="week_hour"><?php
echo ($start_time +
$i) . ':00'; ?
></td
>
297 $working_day = $firstDay_stamp;
298 for ($x = 0; $x <=6; $x++
) { ?
>
299 <td
class="week_day<?php echo (date("Y
-m
-d
", $working_day) == date("Y
-m
-d
", time()))?'_today':''; ?>">
301 foreach ($objEventCalendar->events
as $day_event) {
302 // Calculate recursion
303 if ($objEventCalendar->calcRecursion($working_day, $day_event)) {
304 // Check if working_day is an excepted
305 $exceptions = $objEventCalendar->calcExceptions( $day_event);
306 if (array_search($working_day, $exceptions) === false) {
307 switch ($day_event->recur_type
) {
310 if ( date("Y-m-d", strtotime($day_event->start_date
)) == date("Y-m-d", strtotime($day_event->end_date
)) ) {
312 if ( (($i +
$start_time) >= date("H", strtotime($day_event->start_date
))) && (($i +
$start_time) <= date("H", strtotime($day_event->end_date
))) ) { ?
>
313 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
314 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo eUTF
::utf8_substr(eUTF
::utf8_trim($day_event->title
), 0, 15) . '...'; ?
></a
>
318 // If multiple days event
320 // Calculate hour for starting day
321 if (date("Y-m-d", strtotime($day_event->start_date
)) == date("Y-m-d", $working_day)) {
322 if ( ($i +
$start_time) >= date("H", strtotime($day_event->start_date
)) ) { ?
>
323 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
324 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo eUTF
::utf8_substr(eUTF
::utf8_trim($day_event->title
), 0, 15) . '...'; ?
></a
>
328 // Calculate hour for ending day
329 } else if ( date("Y-m-d", strtotime($day_event->end_date
)) == date("Y-m-d", $working_day) ) {
330 if ( ($i +
$start_time) <= date("H", strtotime($day_event->end_date
)) ) { ?
>
331 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
332 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo eUTF
::utf8_substr(eUTF
::utf8_trim($day_event->title
), 0, 15) . '...'; ?
></a
>
336 // Fill interval days
338 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
339 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo eUTF
::utf8_substr(eUTF
::utf8_trim($day_event->title
), 0, 15) . '...'; ?
></a
>
346 if ( (($i +
$start_time) >= date("H", strtotime($day_event->start_date
))) && (($i +
$start_time) <= date("H", strtotime($day_event->end_date
))) ) { ?
>
347 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
348 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo eUTF
::utf8_substr(eUTF
::utf8_trim($day_event->title
), 0, 15) . '...'; ?
></a
>
359 $working_day = strtotime("+1 day", $working_day);
369 /**********************/
370 /* Display day view */
371 /**********************/
372 static public function displayDayViewHTML() {
373 global $mainframe, $objEventCalendar, $Itemid;
375 $mainframe->setPageTitle( $objEventCalendar->lng
->CP_TAB_GENERAL_DEFAULT_VIEW_DAY
." ".$objEventCalendar->lng
->FRONT_VIEW
);
377 // Print components css information and header inclusions
378 $linktag = '<link href="'.$objEventCalendar->live_path
.'/templates/'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'" rel="stylesheet" type="text/css" />';
379 if (mosGetParam( $_REQUEST, 'pop', 0)) {
382 $mainframe->addCustomHeadTag($linktag);
385 // Load core HTML library
386 mosCommonHTML
::loadOverlib();
388 // Set some variables
389 $menuitem = "&Itemid=".$Itemid;
390 if (isset($objEventCalendar->catid
)) {
391 $catids = (is_array($objEventCalendar->catid
))?
implode("+", $objEventCalendar->catid
):$objEventCalendar->catid
;
393 $catids = ($catids == "")?
"":"&catid=".$catids;
395 // Draw a simple html header
396 clsEventCalendarHTML
::displayHeaderHTML($menuitem, $catids);
399 $week_startingday = $objEventCalendar->params
['com']->get( 'week_startingday' , 0);
400 $firstDay_stamp = (date("w", $objEventCalendar->date
) == $week_startingday)?
$objEventCalendar->date
:strtotime(('last '.$objEventCalendar->weekdays
[$week_startingday]), $objEventCalendar->date
);?
>
402 <table
class="event_calendar_day_table">
405 <td
class="nav_other_day"><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".date("Y
", strtotime("-1 day
", $objEventCalendar->date))."&month
=".date("m
", strtotime("-1 day
", $objEventCalendar->date))."&day
=".date("d
", strtotime("-1 day
", $objEventCalendar->date)). $catid . $menuitem ) ?>"><?php
echo '« ' . ((date("Y-m-d", $objEventCalendar->date
) == date("Y-m-d", time()))?
$objEventCalendar->lng
->FRONT_VIEW_DAY_YESTERDAY
:$objEventCalendar->lng
->FRONT_VIEW_WEEK_PREV
) ?
></a
></th
>
406 <td
class="nav_cur_day"><?php
echo ((date("Y-m-d", $objEventCalendar->date
) == date("Y-m-d", time()))?
($objEventCalendar->lng
->FRONT_VIEW_DAY_TODAY
.'<br />'.date("Y/m/d", $objEventCalendar->date
)):(date("Y/m/d", $objEventCalendar->date
))) ?
></th
>
407 <td
class="nav_other_day"><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=dayview
&year
=".date("Y
", strtotime("+
1 day
", $objEventCalendar->date))."&month
=".date("m
", strtotime("+
1 day
", $objEventCalendar->date))."&day
=".date("d
", strtotime("+
1 day
", $objEventCalendar->date)). $catid . $menuitem ) ?>"><?php
echo ((date("Y-m-d", $objEventCalendar->date
) == date("Y-m-d", time()))?
$objEventCalendar->lng
->FRONT_VIEW_DAY_TOMMOROW
:$objEventCalendar->lng
->FRONT_VIEW_WEEK_NEXT
) . ' »' ?
></a
></th
>
410 $start_time = $objEventCalendar->timetable
[$objEventCalendar->timetable_selected
][0];
411 $end_time = $objEventCalendar->timetable
[$objEventCalendar->timetable_selected
][1];
412 $hcount = $end_time - $start_time;
414 $workingday = strtotime(date("Y-m-d", $objEventCalendar->date
));
415 for ($i = 0; $i <= $hcount; $i++
) { ?
>
417 <td
class="day_hour" width
="5%"><?php
echo ($start_time +
$i) . ':00'; ?
></td
>
418 <td
class="day" colspan
="3">
420 foreach ($objEventCalendar->events
as $day_event) {
421 // Calculate recursion
422 if ($objEventCalendar->calcRecursion($workingday, $day_event)) {
423 // Check if working_day is an excepted
424 $exceptions = $objEventCalendar->calcExceptions( $day_event);
425 if (array_search($workingday, $exceptions) === false) {
426 switch ($day_event->recur_type
) {
429 if ( date("Y-m-d", strtotime($day_event->start_date
)) == date("Y-m-d", strtotime($day_event->end_date
)) ) {
431 if ( (($i +
$start_time) >= date("H", strtotime($day_event->start_date
))) && (($i +
$start_time) <= date("H", strtotime($day_event->end_date
))) ) { ?
>
432 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
433 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo $day_event->title
; ?
></a
>
437 // If multiple days event
439 // Calculate hour for starting day
440 if (date("Y-m-d", strtotime($day_event->start_date
)) == date("Y-m-d", $workingday)) {
441 if ( ($i +
$start_time) >= date("H", strtotime($day_event->start_date
)) ) { ?
>
442 <div
class="event" style
="border-color:<?php echo $day_event->getColor() ?>;font-size: x-small; line-height: 10px;">
443 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo $day_event->title
; ?
></a
>
447 // Calculate hour for ending day
448 } else if ( date("Y-m-d", strtotime($day_event->end_date
)) == date("Y-m-d", $workingday) ) {
449 if ( ($i +
$start_time) <= date("H", strtotime($day_event->end_date
)) ) { ?
>
450 <div
class="event" style
="border-color:<?php echo $day_event->getColor(); ?>;font-size: x-small; line-height: 10px;">
451 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo $day_event->title
; ?
></a
>
455 // Fill interval days
457 <div
class="event" style
="border-color:<?php echo $day_event->getColor(); ?>;font-size: x-small; line-height: 10px;">
458 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo $day_event->title
; ?
></a
>
465 if ( (($i +
$start_time) >= date("H", strtotime($day_event->start_date
))) && (($i +
$start_time) <= date("H", strtotime($day_event->end_date
))) ) { ?
>
466 <div
class="event" style
="border-color:<?php echo $day_event->getColor(); ?>;font-size: x-small; line-height: 10px;">
467 <a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $day_event->id . $menuitem ) ?>" title
="<?php echo $day_event->title ?>"><?php
echo $day_event->title
; ?
></a
>
485 /*******************************/
486 /* Display the category list */
487 /*******************************/
488 static public function displayEventViewHTML( $event, $category ) {
489 global $objEventCalendar, $mainframe, $Itemid, $my, $database, $lang;
491 $mainframe->setPageTitle( $event->title
);
493 // Print components css information and header inclusions
494 $linktag = '<link href="'.$objEventCalendar->live_path
.'/templates/'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'" rel="stylesheet" type="text/css" />';
495 if (mosGetParam( $_REQUEST, 'pop', 0)) {
499 $mainframe->addCustomHeadTag($linktag);
502 // Load core HTML library
503 mosCommonHTML
::loadOverlib();
505 // Set some variables
506 $menuitem = "&Itemid=".$Itemid;
507 if (isset($objEventCalendar->catid
)) {
508 $catids = (is_array($objEventCalendar->catid
))?
implode("+", $objEventCalendar->catid
):$objEventCalendar->catid
;
510 $catids = ($catids == "")?
"":"&catid=".$catids;
512 // Draw a simple html header
513 clsEventCalendarHTML
::displayHeaderHTML($menuitem, $catids);
515 // Display event table
517 <script type
="text/javascript" src
="<?php echo $objEventCalendar->live_apath; ?>/eventcalendar.ajax.js"></script
>
519 <table
class="event_calendar_event_table">
521 <td
class="title" style
="border-color:<?php echo $objEventCalendar->getParam('color', $category->params); ?>">
522 <h3
><?php
echo $event->title ?
> <i
><small
>(<?php
echo $category->name ?
>)</small
></i
></h3
>
525 <td style
="height: 10px;"></td
>
528 <?php
if ($event->contact
) { ?
>
529 <b
><?php
echo $objEventCalendar->lng
->EDT_INFO_PERSON ?
>:</b
> <?php
echo $event->contact ?
>
533 <td style
="height: 10px;"></td
>
535 <?php
if ($event->description
) { ?
>
536 <td
class="description"><?php
echo $event->description ?
></td
>
539 <td style
="height: 10px;"></td
>
542 <b
><?php
echo $objEventCalendar->lng
->EDT_START ?
>:</b
> <?php
echo date($objEventCalendar->params
['com']->get('date_format', 'd-m-Y'), strtotime($event->start_date
)) ?
> και ώρα
<?php
echo date("H:i:s", strtotime($event->start_date
)) ?
>
544 <b
><?php
echo $objEventCalendar->lng
->EDT_END ?
>:</b
> <?php
echo date($objEventCalendar->params
['com']->get('date_format', 'd-m-Y'), strtotime($event->end_date
)) ?
> και ώρα
<?php
echo date("H:i:s", strtotime($event->end_date
)) ?
>
547 <td style
="height: 10px;"></td
>
549 <?php
if ($objEventCalendar->params
['com']->get('view_periodicity')) { ?
>
551 <td
class="recursion">
552 <b
><?php
echo $objEventCalendar->lng
->EDT_REPEAT_TYPE ?
>: </b
>
554 switch ($event->recur_type
) {
556 echo $objEventCalendar->lng
->LST_REC_WEEK
." ";
557 echo (strrpos($event->recur_week
,"1") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_MON
;
558 echo (strrpos($event->recur_week
,"2") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_TUE
;
559 echo (strrpos($event->recur_week
,"3") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_WED
;
560 echo (strrpos($event->recur_week
,"4") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_THU
;
561 echo (strrpos($event->recur_week
,"5") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_FRI
;
562 echo (strrpos($event->recur_week
,"6") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_SUN
;
563 echo (strrpos($event->recur_week
,"0") === false)?
"":$objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_SAT
;
566 echo $objEventCalendar->lng
->LST_REC_MONTH
." ";
567 if ($event->recur_month
== 1) {
568 echo $event->recur_month
.$objEventCalendar->lng
->LST_REC_MONTH_SUFFIX_1
;
569 } else if ($event->recur_month
== 2) {
570 echo $event->recur_month
.$objEventCalendar->lng
->LST_REC_MONTH_SUFFIX_2
;
572 echo $event->recur_month
.$objEventCalendar->lng
->LST_REC_MONTH_SUFFIX_ALL
;
576 echo $objEventCalendar->lng
->LST_REC_YEAR
." ".$event->recur_year_d
."/".$event->recur_year_m
;
580 echo $objEventCalendar->lng
->LST_REC_DAY
;
588 if ($objEventCalendar->params
['com']->get('view_reservation')) { ?
>
589 <tr
><td style
="height: 10px;"></td
></tr
>
592 <b
><?php
echo $objEventCalendar->lng
->EDT_RSV ?
>: </b
>
593 <div
class="reserve" id
="reserve" name
="reserve">
596 if (intval($event->pp_price
) == 0) {
598 $query = "SELECT name FROM #__users WHERE id IN (".$event->rsv
.")";
599 $database->setQuery( $query );
600 $users = $database->loadResultArray();
602 echo '<i>'.$users[0].'</i>';
603 for ($i = 1; $i < count($users); $i++
) {
604 echo ', '.'<i>'.$users[$i].'</i>';
607 echo '<i>'.$objEventCalendar->lng
->EDT_RSV_NONE
.'</i>';
610 if ( in_array($my->id
, explode(',', $event->rsv
)) ) {
611 echo "<br/><br/>".$objEventCalendar->lng
->EDT_RSV_YES
."<br/>"; ?
>
612 <input
class="button" type
="button" value
="<?php echo $objEventCalendar->lng->EDT_RSV_CAN; ?>" id
="cancel-rsv" name
="cancel-rsv" onclick
="showReserve(<?php echo $my->id; ?>, <?php echo $event->id; ?>, 'cancel');" />
614 echo "<br/><br/>".$objEventCalendar->lng
->EDT_RSV_NO
."<br/>"; ?
>
615 <input
class="button" type
="button" value
="<?php echo $objEventCalendar->lng->EDT_RSV_SUB; ?>" id
="submit-rsv" name
="submit-rsv" onclick
="showReserve(<?php echo $my->id; ?>, <?php echo $event->id; ?>, 'reserve');" />
619 $r = rand(100, 999); ?
>
620 <form
class="ppBuyNowForm" name
="paypalsubmit<?php echo $r; ?>" action
="https://www.paypal.com/cgi-bin/webscr" method
="post">
621 <img
class="ppBuyNowImg" src
="<?php echo $objEventCalendar->live_path; ?>/templates/f_<?php echo $objEventCalendar->params['com']->get('css_filename'); ?>/default.gif" border
="0" align
="left" alt
="<?php echo $event->title; ?>" style
="margin: 4px;" />
622 <?php
echo $objEventCalendar->lng
->EDT_PP_PRICE
; ?
>: <span
class="ppBuyNowPrice"><?php
echo $event->pp_price
." ".$objEventCalendar->params
['com']->get('pp_curlist', 'EUR'); ?
></span
><br
/>
623 <?php
if (file_exists( $objEventCalendar->abs_path
."/templates/f_".$objEventCalendar->params
['com']->get('css_filename')."/".$lang.".gif" )) {
626 $butlang = 'english';
628 <input type
="hidden" name
="charset" value
="utf-8" />
629 <input type
="hidden" name
="cmd" value
="_xclick" />
630 <?php
$parts = split('@', $objEventCalendar->params
['com']->get('pp_mail', 'mypaypal@email.com')); ?
>
631 <script type
='text/javascript'>
633 document
.write('<input type="hidden" name="business" value="');
634 document
.write('<?php echo $parts[0]; ?>');
635 document
.write('@');
636 document
.write('<?php echo $parts[1]; ?>');
637 document
.write('" />');
640 <input type
="hidden" name
="item_name" value
="<?php echo $event->title; ?>" />
641 <input type
="hidden" name
="amount" value
="<?php echo $event->pp_price; ?>" />
642 <input type
="hidden" name
="no_shipping" value
="2" />
643 <input type
="hidden" name
="no_note" value
="1" />
644 <input type
="hidden" name
="currency_code" value
="<?php echo $objEventCalendar->params['com']->get('pp_curlist', 'EUR'); ?>" />
645 <input type
="hidden" name
="tax" value
="0" />
646 <input type
="hidden" name
="quantity" value
="1" />
647 <input type
="image" style
="margin-top: 10px;" src
="<?php echo $objEventCalendar->live_path; ?>/templates/f_<?php echo $objEventCalendar->params['com']->get('css_filename').'/'.$butlang.'.gif'?>" name
="submit" title
="<?php echo $objEventCalendar->lng->EDT_PP_BUY; ?>" alt
="<?php echo $objEventCalendar->lng->EDT_PP_BUY; ?>" />
655 <tr
><td style
="height: 10px;"></td
></tr
>
657 <td
class="contact" style
="border-color: <?php echo $objEventCalendar->getParam('color', $category->params); ?>">
658 <?php
if ($event->url
) {
659 if ($objEventCalendar->task
!= 'printevent') { ?
>
660 <a href
="<?php echo $event->url ?>" target
="_blank"><?php
echo $objEventCalendar->lng
->EDT_INFO_WEB ?
></a
>
662 echo '<b>' . $objEventCalendar->lng
->EDT_INFO_WEB
. ': </b>' . $event->url
;
665 echo ($objEventCalendar->task
!= 'printevent')?
' ':'<br />';
667 $email = $event->email
;
668 $parts = split('@', $email);
669 if ($objEventCalendar->task
!= 'printevent') { ?
>
670 <script type
="text/javascript">
672 document
.write('<a href="ma');
673 document
.write('ilto:');
674 document
.write('<?php echo $parts[0]; ?>');
675 document
.write('@');
676 document
.write('<?php echo $parts[1]; ?>');
677 document
.write('"><?php echo $objEventCalendar->lng->EDT_INFO_MAIL ?>');
678 document
.write('</a>');
682 <script type
="text/javascript">
684 document
.write('<b><?php echo $objEventCalendar->lng->EDT_INFO_MAIL ?>: </b>');
685 document
.write('<?php echo $parts[0]; ?>');
686 document
.write('@');
687 document
.write('<?php echo $parts[1]; ?>');
699 /*******************************/
700 /* Display the category list */
701 /*******************************/
702 static public function displayCategoriesListHTML( $categories ) {
703 global $objEventCalendar, $mainframe, $Itemid;
705 $mainframe->setPageTitle( $objEventCalendar->lng
->FRONT_VIEW_CAT_TITLE
);
707 // Print components css information and header inclusions
708 $linktag = '<link href="'.$objEventCalendar->live_path
.'/templates/'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'" rel="stylesheet" type="text/css" />';
709 if (mosGetParam( $_REQUEST, 'pop', 0)) {
713 $mainframe->addCustomHeadTag($linktag);
716 // Load core HTML library
717 mosCommonHTML
::loadOverlib();
719 // Set some variables
720 $menuitem = "&Itemid=".$Itemid;
722 // Draw a simple html header
723 clsEventCalendarHTML
::displayHeaderHTML($menuitem);
725 // Display category table
727 <table
class="event_calendar_categories_table">
728 <tr
><td colspan
="2"><h3
><?php
echo $objEventCalendar->lng
->FRONT_VIEW_CAT_TITLE
; ?
>:</h3
></td
></tr
> <?php
729 foreach ($categories as $category) { ?
>
731 <div
class="categories" style
="border-color:<?php echo $objEventCalendar->getParam('color', $category->params); ?>">
732 <b
><?php
echo $category->title
; ?
></b
>
734 <hr
class="categories" style
="border-color:<?php echo $objEventCalendar->getParam('color', $category->params); ?>;"/>
736 <tr
><td colspan
="2" height
="10px"></td
></tr
>
737 <?php
if ($category->description
) { ?
>
738 <tr
><td colspan
="2" class="description"><?php
echo $category->description
; ?
></td
></tr
>
739 <tr
><td colspan
="2" height
="10px"></td
></tr
>
742 <td
class="events" width
="100%"> <?php
743 foreach ($objEventCalendar->events
as $cat_event) {
744 if ($cat_event->catid
== $category->id
) { ?
>
745 <li
><a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=eventview
&eventid
=" . $cat_event->id . $menuitem) ?>"><?php
echo date("Y-m-d", strtotime($cat_event->start_date
)) . ': ' . $cat_event->title
; ?
></a
></li
> <?php
750 <tr
><td height
="20px"></td
></tr
> <?php
756 /*********************************/
757 /* Display the edit event form */
758 /*********************************/
759 static public function displayEventEditHTML($event) {
760 global $my, $mainframe, $objEventCalendar, $Itemid;
762 $mainframe->setPageTitle( $objEventCalendar->lng
->EDT_SUBMIT
);
765 $tokname = 'token'.$my->id
;
766 $mytoken = md5(uniqid(rand(), TRUE));
767 $_SESSION[$tokname] = $mytoken;
769 // Print components css information and header inclusions
770 $linktag = '<link href="'.$objEventCalendar->live_path
.'/templates/'.$objEventCalendar->params
['com']->get('css_filename', 'default.css').'" rel="stylesheet" type="text/css" />';
771 if (mosGetParam( $_REQUEST, 'pop', 0)) {
774 $mainframe->addCustomHeadTag($linktag);
777 // Load core HTML library
778 mosCommonHTML
::loadOverlib();
779 mosCommonHTML
::loadCalendar();
781 // Set some variables
782 $menuitem = "&Itemid=".$Itemid;
784 // Display edit/add event table
785 $seoCancel = sefRelToAbs("index.php?option=com_eventcalendar&task=cancel".$menuitem, EVCALBASE
."/editevent/cancel.html");
786 $seoAction = sefRelToAbs("index.php?option=com_eventcalendar&task=save".$menuitem, EVCALBASE
."/editevent/save.html");
788 <script type
="text/javascript">
789 function submitbutton(pressbutton
) {
790 var form
= document
.adminForm
;
791 if (pressbutton
== 'cancel') {
792 document
.location
.href
= '<?php echo $seoCancel; ?>';
796 if (form
.title
.value
== "") {
797 alert('<?php echo $objEventCalendar->lng->ALERT_EDIT_NO_TITLE ?>');
798 } else if ( form
.catid
.value
== "0" ) {
799 alert('<?php echo $objEventCalendar->lng->ALERT_EDIT_NO_CATEGORY ?>');
800 } else if ( form
.start_date
.value
== "" ) {
801 alert('<?php echo $objEventCalendar->lng->ALERT_EDIT_NO_START_DATE ?>');
802 } else if ( form
.end_date
.value
== "" ) {
803 alert('<?php echo $objEventCalendar->lng->ALERT_EDIT_NO_END_DATE ?>');
805 submitform( pressbutton
);
809 //JavaScript functions for recur-exception-adding/-removing:
810 //adds an entry to the except-dates-list from the edit-form-field
811 function addToList() {
812 var dates
= document
.adminForm
.dateexcept
.value
;
813 var neu
= new Option (dates
, dates
, false, false);
814 document
.adminForm
.daten
.options
[document
.adminForm
.daten
.options
.length
] = neu
;
815 document
.adminForm
.dateexcept
.value
= '';
816 document
.adminForm
.dateexcept
.focus();
820 //removes an entry from the excepts-list
822 document
.adminForm
.daten
.options
[document
.adminForm
.daten
.selectedIndex
] = null;
826 //writes hidden entries for the except-dates | here the dates are stored in raw / as timestamp
827 function writeHiddenEntry() {
828 document
.adminForm
.recur_except
.value
= '';
830 for(i
=0;i
<document
.adminForm
.daten
.length
;i++
) {
831 var nextEntry
= document
.adminForm
.daten
.options
[i
].value
;
832 document
.adminForm
.recur_except
.value
= document
.adminForm
.recur_except
.value +
',' + nextEntry
;
836 //show or hide recursion options
837 function recurChange(index
) {
838 trWeek
= document
.getElementById('weekly');
839 trMonth
= document
.getElementById('monthly');
840 trYear
= document
.getElementById('yearly');
843 trWeek
.style
.visibility
= 'collapse';
844 trMonth
.style
.visibility
= 'collapse';
845 trYear
.style
.visibility
= 'collapse';
846 } else if (index
== 1) {
847 trWeek
.style
.visibility
= 'visible';
848 trMonth
.style
.visibility
= 'collapse';
849 trYear
.style
.visibility
= 'collapse';
850 } else if (index
== 2) {
851 trWeek
.style
.visibility
= 'collapse';
852 trMonth
.style
.visibility
= 'visible';
853 trYear
.style
.visibility
= 'collapse';
854 } else if (index
== 3) {
855 trWeek
.style
.visibility
= 'collapse';
856 trMonth
.style
.visibility
= 'collapse';
857 trYear
.style
.visibility
= 'visible';
862 <h1
class="contentheading"><?php
echo $objEventCalendar->lng
->EDT_SUBMIT
; ?
>: <?php
echo ($event->id
!= '')?_E_EDIT
:_E_ADD
; ?
></h1
>
864 <form action
="<?php echo $seoAction ?> "method
="post" name
="adminForm">
868 <td
><?php
echo _E_TITLE
; ?
>:</td
>
870 <input
class="inputbox" type
="text" name
="title" size
="50" maxlength
="100" value
="<?php echo (isset($event))?$event->title:'' ?>" />
874 <td
><?php
echo _E_CATEGORY
; ?
>:</td
>
876 <?php
$active = (isset($event))?
$event->catid
:NULL;
877 echo mosAdminMenus
::ComponentCategory('catid','com_eventcalendar', $active); ?
>
881 <td
><?php
echo $objEventCalendar->lng
->EDT_START
; ?
>:</td
>
883 <input type
="text" name
="start_date" id
="start_date" size
="20" class="inputbox" value
="<?php echo (isset($event))?$event->start_date:'' ?>" />
884  
;<input type
="button" value
=" ... " class="button" onclick
="return showCalendar('start_date')" />
888 <td
><?php
echo $objEventCalendar->lng
->EDT_END
; ?
>:</td
>
890 <input type
="text" name
="end_date" id
="end_date" size
="20" class="inputbox" value
="<?php echo (isset($event))?$event->end_date:'' ?>" />
891  
;<input type
="button" value
=" ... " class="button" onclick
="return showCalendar('end_date')" />
895 <td valign
="top"><?php
echo _E_LANGUAGE ?
>:</td
>
897 <?php
echo mosAdminMenus
::SelectLanguages( 'languages', (isset($event)?
$event->language
:''), _E_ALL_LANGUAGES
); ?
>
902 <td valign
="top"><?php
echo _CMN_DESCRIPTION
; ?
>:</td
>
905 //parameters : areaname, content, hidden field, width, height, rows, cols
906 editorArea( 'editor1', ((isset($event))?
$event->description
:'') , 'description', '450', '300', '60', '20' );
911 <h3
class="contentheading"><?php
echo$objEventCalendar->lng
->EDT_DETAILS ?
>:</h2
>
913 $tabulator = new mosTabs( 0 );
914 $tabulator->startPane( "Edit" );
915 $tabulator->startTab( $objEventCalendar->lng
->EDT_REPEAT_OPT
, "repeat" );
919 <td
><?php
echo $objEventCalendar->lng
->EDT_REPEAT_TYPE ?
>:</td
>
921 <select name
="recur_type" size
="1" class="selectbox" onchange
="recurChange(this.selectedIndex)">
922 <option value
="day" <?php
echo (isset($event) && $event->recur_type
== 'day' ||
!isset($event))?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->LST_REC_DAY ?
></option
>
923 <option value
="week" <?php
echo (isset($event) && $event->recur_type
== 'week')?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->LST_REC_WEEK ?
></option
>
924 <option value
="month" <?php
echo (isset($event) && $event->recur_type
== 'month')?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->LST_REC_MONTH ?
></option
>
925 <option value
="year" <?php
echo (isset($event) && $event->recur_type
== 'year')?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->LST_REC_YEAR ?
></option
>
929 <tr name
="weekly" id
="weekly" style
="visibility: <?php echo ($event->recur_type == 'week')?'visible':'collapse'; ?>">
930 <td valign
="top"><?php
echo $objEventCalendar->lng
->EDT_WEEKLY_OPT ?
>:</td
>
932 <select name
="recur_week" size
="7" multiple
="multiple">
933 <option value
="1" <?php
echo (isset($event) && strrpos($event->recur_week
,'1') !== false ||
!isset($event))?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_MON ?
></option
>
934 <option value
="2" <?php
echo (isset($event) && strrpos($event->recur_week
,'2') !== false)?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_TUE ?
></option
>
935 <option value
="3" <?php
echo (isset($event) && strrpos($event->recur_week
,'3') !== false)?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_WED ?
></option
>
936 <option value
="4" <?php
echo (isset($event) && strrpos($event->recur_week
,'4') !== false)?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_THU ?
></option
>
937 <option value
="5" <?php
echo (isset($event) && strrpos($event->recur_week
,'5') !== false)?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_FRI ?
></option
>
938 <option value
="6" <?php
echo (isset($event) && strrpos($event->recur_week
,'6') !== false)?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_SUN ?
></option
>
939 <option value
="0" <?php
echo (isset($event) && strrpos($event->recur_week
,'0') !== false)?
'selected="selected"':"" ?
>><?php
echo $objEventCalendar->lng
->CP_TAB_DATEFORMAT_START_SAT ?
></option
>
943 <tr name
="monthly" id
="monthly" style
="visibility: <?php echo ($event->recur_type == 'month')?'visible':'collapse'; ?>">
944 <td
><?php
echo $objEventCalendar->lng
->EDT_MONTHLY_OPT ?
>:</td
>
946 <select name
="recur_month" size
="1" class="selectbox">
947 <option value
="1" <?php
echo (isset($event) && strrpos($event->recur_month
,'1') !== false ||
!isset($event))?
'selected="selected"':"" ?
>>1</option
>
948 <option value
="2" <?php
echo (isset($event) && strrpos($event->recur_month
,'2') !== false)?
'selected="selected"':"" ?
>>2</option
>
949 <option value
="3" <?php
echo (isset($event) && strrpos($event->recur_month
,'3') !== false)?
'selected="selected"':"" ?
>>3</option
>
950 <option value
="4" <?php
echo (isset($event) && strrpos($event->recur_month
,'4') !== false)?
'selected="selected"':"" ?
>>4</option
>
951 <option value
="5" <?php
echo (isset($event) && strrpos($event->recur_month
,'5') !== false)?
'selected="selected"':"" ?
>>5</option
>
952 <option value
="6" <?php
echo (isset($event) && strrpos($event->recur_month
,'6') !== false)?
'selected="selected"':"" ?
>>6</option
>
953 <option value
="7" <?php
echo (isset($event) && strrpos($event->recur_month
,'7') !== false)?
'selected="selected"':"" ?
>>7</option
>
954 <option value
="8" <?php
echo (isset($event) && strrpos($event->recur_month
,'8') !== false)?
'selected="selected"':"" ?
>>8</option
>
955 <option value
="9" <?php
echo (isset($event) && strrpos($event->recur_month
,'9') !== false)?
'selected="selected"':"" ?
>>9</option
>
956 <option value
="10" <?php
echo (isset($event) && strrpos($event->recur_month
,'10') !== false)?
'selected="selected"':"" ?
>>11</option
>
957 <option value
="11" <?php
echo (isset($event) && strrpos($event->recur_month
,'11') !== false)?
'selected="selected"':"" ?
>>12</option
>
958 <option value
="12" <?php
echo (isset($event) && strrpos($event->recur_month
,'12') !== false)?
'selected="selected"':"" ?
>>12</option
>
959 <option value
="13" <?php
echo (isset($event) && strrpos($event->recur_month
,'13') !== false)?
'selected="selected"':"" ?
>>13</option
>
960 <option value
="14" <?php
echo (isset($event) && strrpos($event->recur_month
,'14') !== false)?
'selected="selected"':"" ?
>>14</option
>
961 <option value
="15" <?php
echo (isset($event) && strrpos($event->recur_month
,'15') !== false)?
'selected="selected"':"" ?
>>15</option
>
962 <option value
="16" <?php
echo (isset($event) && strrpos($event->recur_month
,'16') !== false)?
'selected="selected"':"" ?
>>16</option
>
963 <option value
="17" <?php
echo (isset($event) && strrpos($event->recur_month
,'17') !== false)?
'selected="selected"':"" ?
>>17</option
>
964 <option value
="18" <?php
echo (isset($event) && strrpos($event->recur_month
,'18') !== false)?
'selected="selected"':"" ?
>>18</option
>
965 <option value
="19" <?php
echo (isset($event) && strrpos($event->recur_month
,'19') !== false)?
'selected="selected"':"" ?
>>19</option
>
966 <option value
="20" <?php
echo (isset($event) && strrpos($event->recur_month
,'20') !== false)?
'selected="selected"':"" ?
>>20</option
>
967 <option value
="21" <?php
echo (isset($event) && strrpos($event->recur_month
,'21') !== false)?
'selected="selected"':"" ?
>>21</option
>
968 <option value
="22" <?php
echo (isset($event) && strrpos($event->recur_month
,'22') !== false)?
'selected="selected"':"" ?
>>22</option
>
969 <option value
="23" <?php
echo (isset($event) && strrpos($event->recur_month
,'23') !== false)?
'selected="selected"':"" ?
>>23</option
>
970 <option value
="24" <?php
echo (isset($event) && strrpos($event->recur_month
,'24') !== false)?
'selected="selected"':"" ?
>>24</option
>
971 <option value
="25" <?php
echo (isset($event) && strrpos($event->recur_month
,'25') !== false)?
'selected="selected"':"" ?
>>25</option
>
972 <option value
="26" <?php
echo (isset($event) && strrpos($event->recur_month
,'26') !== false)?
'selected="selected"':"" ?
>>26</option
>
973 <option value
="27" <?php
echo (isset($event) && strrpos($event->recur_month
,'27') !== false)?
'selected="selected"':"" ?
>>27</option
>
974 <option value
="28" <?php
echo (isset($event) && strrpos($event->recur_month
,'28') !== false)?
'selected="selected"':"" ?
>>28</option
>
975 <option value
="29" <?php
echo (isset($event) && strrpos($event->recur_month
,'29') !== false)?
'selected="selected"':"" ?
>>29</option
>
976 <option value
="30" <?php
echo (isset($event) && strrpos($event->recur_month
,'30') !== false)?
'selected="selected"':"" ?
>>30</option
>
977 <option value
="31" <?php
echo (isset($event) && strrpos($event->recur_month
,'31') !== false)?
'selected="selected"':"" ?
>>31</option
>
981 <tr name
="yearly" id
="yearly" style
="visibility: <?php echo ($event->recur_type == 'year')?'visible':'collapse'; ?>">
982 <td
><?php
echo $objEventCalendar->lng
->EDT_YEARLY_OPT ?
>:</td
>
984 <select name
="recur_year_d" size
="1" class="selectbox">
985 <option value
="1" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'1') !== false ||
!isset($event))?
'selected="selected"':"" ?
>>1</option
>
986 <option value
="2" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'2') !== false)?
'selected="selected"':"" ?
>>2</option
>
987 <option value
="3" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'3') !== false)?
'selected="selected"':"" ?
>>3</option
>
988 <option value
="4" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'4') !== false)?
'selected="selected"':"" ?
>>4</option
>
989 <option value
="5" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'5') !== false)?
'selected="selected"':"" ?
>>5</option
>
990 <option value
="6" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'6') !== false)?
'selected="selected"':"" ?
>>6</option
>
991 <option value
="7" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'7') !== false)?
'selected="selected"':"" ?
>>7</option
>
992 <option value
="8" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'8') !== false)?
'selected="selected"':"" ?
>>8</option
>
993 <option value
="9" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'9') !== false)?
'selected="selected"':"" ?
>>9</option
>
994 <option value
="10" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'10') !== false)?
'selected="selected"':"" ?
>>11</option
>
995 <option value
="11" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'11') !== false)?
'selected="selected"':"" ?
>>12</option
>
996 <option value
="12" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'12') !== false)?
'selected="selected"':"" ?
>>12</option
>
997 <option value
="13" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'13') !== false)?
'selected="selected"':"" ?
>>13</option
>
998 <option value
="14" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'14') !== false)?
'selected="selected"':"" ?
>>14</option
>
999 <option value
="15" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'15') !== false)?
'selected="selected"':"" ?
>>15</option
>
1000 <option value
="16" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'16') !== false)?
'selected="selected"':"" ?
>>16</option
>
1001 <option value
="17" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'17') !== false)?
'selected="selected"':"" ?
>>17</option
>
1002 <option value
="18" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'18') !== false)?
'selected="selected"':"" ?
>>18</option
>
1003 <option value
="19" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'19') !== false)?
'selected="selected"':"" ?
>>19</option
>
1004 <option value
="20" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'20') !== false)?
'selected="selected"':"" ?
>>20</option
>
1005 <option value
="21" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'21') !== false)?
'selected="selected"':"" ?
>>21</option
>
1006 <option value
="22" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'22') !== false)?
'selected="selected"':"" ?
>>22</option
>
1007 <option value
="23" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'23') !== false)?
'selected="selected"':"" ?
>>23</option
>
1008 <option value
="24" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'24') !== false)?
'selected="selected"':"" ?
>>24</option
>
1009 <option value
="25" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'25') !== false)?
'selected="selected"':"" ?
>>25</option
>
1010 <option value
="26" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'26') !== false)?
'selected="selected"':"" ?
>>26</option
>
1011 <option value
="27" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'27') !== false)?
'selected="selected"':"" ?
>>27</option
>
1012 <option value
="28" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'28') !== false)?
'selected="selected"':"" ?
>>28</option
>
1013 <option value
="29" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'29') !== false)?
'selected="selected"':"" ?
>>29</option
>
1014 <option value
="30" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'30') !== false)?
'selected="selected"':"" ?
>>30</option
>
1015 <option value
="31" <?php
echo (isset($event) && strrpos($event->recur_year_d
,'31') !== false)?
'selected="selected"':"" ?
>>31</option
>
1018 <select name
="recur_year_m" size
="1" class="selectbox">
1019 <option value
="1" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'1') !== false)?
'selected="selected"':"" ?
>>1</option
>
1020 <option value
="2" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'2') !== false)?
'selected="selected"':"" ?
>>2</option
>
1021 <option value
="3" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'3') !== false)?
'selected="selected"':"" ?
>>3</option
>
1022 <option value
="4" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'4') !== false)?
'selected="selected"':"" ?
>>4</option
>
1023 <option value
="5" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'5') !== false)?
'selected="selected"':"" ?
>>5</option
>
1024 <option value
="6" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'6') !== false)?
'selected="selected"':"" ?
>>6</option
>
1025 <option value
="7" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'7') !== false)?
'selected="selected"':"" ?
>>7</option
>
1026 <option value
="8" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'8') !== false)?
'selected="selected"':"" ?
>>8</option
>
1027 <option value
="9" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'9') !== false)?
'selected="selected"':"" ?
>>9</option
>
1028 <option value
="10" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'10') !== false)?
'selected="selected"':"" ?
>>11</option
>
1029 <option value
="11" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'11') !== false)?
'selected="selected"':"" ?
>>12</option
>
1030 <option value
="12" <?php
echo (isset($event) && strrpos($event->recur_year_m
,'12') !== false)?
'selected="selected"':"" ?
>>12</option
>
1036 $tabulator->endTab();
1037 $tabulator->startTab( $objEventCalendar->lng
->EDT_EXCEPT
, "except" );
1041 <td
><?php
echo $objEventCalendar->lng
->EDT_EXCEPT_ADD ?
>:</td
>
1043 <input style
="margin-top:6px;" type
="text" size
="10" name
="dateexcept" id
="exceptions" class="inputbox"/>
1044  
;<input type
="button" value
=" ... " onclick
="return showCalendar('exceptions','dd.mm.yyyy')" class="button" />
1045  
; 
;<input type
="button" value
=" + " onclick
="addToList()" class="button" /><input type
="button" value
=" - " onclick
="remList()" class="button" />
1049 <td
><?php
echo $objEventCalendar->lng
->EDT_EXCEPT_LIST ?
>:</td
>
1051 <select size
="10" class="selectbox" style
="width:173px;" name
="daten">
1053 if (isset($event) && $event->recur_except
) {
1054 $except_dates = split("\n",$event->recur_except
);
1056 foreach ($except_dates AS $except) {
1058 echo '<option value="'.$except.'">'.$except.'</option>';
1059 $exceptdates .= ','.$except;
1065 <input type
="hidden" name
="recur_except" value
="<?php echo (isset($event) && $event->recur_except)?$exceptdates:"" ?>" />
1070 $tabulator->endTab();
1071 $tabulator->startTab( $objEventCalendar->lng
->EDT_INFO
, "info" );
1073 <table
class="adminform">
1075 <td
><?php
echo $objEventCalendar->lng
->EDT_INFO_PERSON ?
>:</td
>
1076 <td
><input
class="inputbox" type
="text" size
="50" name
="contact" value
="<?php echo (isset($event))?htmlspecialchars( $event->contact, ENT_QUOTES ):'' ?>" /></td
>
1079 <td
><?php
echo $objEventCalendar->lng
->EDT_INFO_WEB ?
>:</td
>
1080 <td
><input
class="inputbox" type
="text" size
="50" name
="url" value
="<?php echo (isset($event))?$event->url:'' ?>" /></td
>
1083 <td
><?php
echo $objEventCalendar->lng
->EDT_INFO_MAIL ?
>:</td
>
1084 <td
><input
class="inputbox" type
="text" size
="50" name
="email" value
="<?php echo (isset($event))?$event->email:'' ?>" /></td
>
1088 $tabulator->endTab();
1089 $tabulator->startTab( $objEventCalendar->lng
->CP_TAB_PP
, "paypal" );
1091 <table
class="adminform">
1093 <td
><?php
echo $objEventCalendar->lng
->EDT_PP_PRICE ?
>: 
; 
; 
;</td
>
1094 <td
><input
class="inputbox" type
="text" size
="10" name
="pp_price" value
="<?php echo (isset($event) AND ($event->pp_price))?htmlspecialchars( $event->pp_price, ENT_QUOTES ):'0.0' ?>" /></td
>
1095 <td
><?php
echo mosToolTip($objEventCalendar->lng
->EDT_PP_PRICE_TOOLTIP
, $objEventCalendar->lng
->EDT_PP_PRICE
);?
></td
>
1099 $tabulator->endTab();
1100 $tabulator->endPane();
1104 <input type
="hidden" name
="option" value
="com_eventcalendar" />
1105 <input type
="hidden" name
="task" value
="" />
1106 <input type
="hidden" name
="Itemid" value
="<?php echo $Itemid; ?>" />
1107 <input type
="hidden" name
="id" value
="<?php echo (isset($event))?$event->id:""; ?>" />
1108 <input type
="hidden" name
="<?php echo $tokname; ?>" value
="<?php echo $mytoken; ?>" autocomplete
="off" />
1111 <input type
="button" name
="submitit" value
="<?php echo _E_SAVE; ?>" title
="<?php echo _E_SAVE; ?>" class="button" onclick
="submitbutton('save');" />  
;
1112 <input type
="button" name
="subcontent" value
="<?php echo _GEM_CANCEL; ?>" title
="<?php echo _GEM_CANCEL; ?>" class="button" onclick
="submitbutton('cancel');" />
1116 <div style
="clear:both;"></div
>
1120 /********************/
1121 /* Display footer */
1122 /********************/
1123 static public function displayFooterHTML( $categories, $marked = "" ) {
1124 global $objEventCalendar, $Itemid;
1126 $menuitem = "&Itemid=".$Itemid;
1127 if (isset($objEventCalendar->catid
)) {
1128 $catids = (is_array($objEventCalendar->catid
))?
implode("+", $objEventCalendar->catid
):$objEventCalendar->catid
;
1130 $catids = ($catids !== "")?
"&catid=".$catids:""; ?
>
1132 <table
class="event_calendar_footer_table">
1133 <?php
if ($categories) {
1134 $cat_col = $objEventCalendar->params
['com']->get('col_catlist', 3);
1135 $cat_total = count($categories); ?
>
1136 <tr
><td colspan
="<?php echo ($cat_col + 1); ?>" height
="5px"></td
></tr
>
1138 <td colspan
="<?php echo $cat_col; ?>"><b
><?php
echo $objEventCalendar->lng
->FRONT_VIEW_CAT
; ?
>:</b
></td
>
1139 <td
class="all_events" colspan
="<?php echo ($cat_col + 1); ?>">
1140 [<a href
="<?php echo sefRelToAbs("index
.php?option
=com_eventcalendar
&task
=catview
". $menuitem); ?>">
1141 <small
><?php
echo _SEL_CATEGORY
; ?
></small
>
1145 <tr
><td width
="5%"></td
>
1146 <?php
$k = 0; $y = 1;
1147 for ($x=1; $x <= $cat_col; $x++
) { ?
>
1148 <td width
="<?php echo (95 / $cat_col) ?>%"> <?php
1149 for ($i=$k; $i < (( $cat_total / $cat_col) * $y); $i++
) { ?
>
1150 <div
class="event" style
="border-color:<?php echo $objEventCalendar->getParam('color', $categories[$i]->params) ?>">
1151 <a href
="<?php echo sefRelToAbs( "/index
.php?option
=com_eventcalendar
&task
=catview
&catid
=" . $categories[$i]->id . $menuitem); ?>">
1153 echo ($marked)?
((array_search($categories[$i]->id
, $marked) === false)?
'':'<b>'):'';
1154 echo $categories[$i]->title
;
1155 echo ($marked)?
((array_search($categories[$i]->id
, $marked) === false)?
'':'</b>'):'';