mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Event calendar - move prefs out of core, with update option. Fix a few things and generally tidy up. Needs attention from the theme experts in patches.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
@@ -17,6 +17,8 @@
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - large calendar display
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
@@ -47,7 +49,7 @@ if (isset($_POST['printlists']))
|
||||
exit();
|
||||
}
|
||||
|
||||
//e107::getScParser();
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
|
||||
@@ -102,10 +104,6 @@ $calSc->ecalClass = &$ecal_class;
|
||||
$calSc->setCalDate($dateArray);
|
||||
$calSc->catFilter = $cat_filter;
|
||||
|
||||
//setScVar('event_calendar_shortcodes', 'ecalClass', &$ecal_class); // Give shortcodes a pointer to calendar class
|
||||
//callScFunc('event_calendar_shortcodes','setCalDate', $dateArray); // Tell shortcodes the date to display
|
||||
//setScVar('event_calendar_shortcodes', 'catFilter', $cat_filter); // Category filter
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// Start calculating text to display
|
||||
@@ -191,7 +189,6 @@ $text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER_START, FALSE, $calSc
|
||||
for ($i = 0; $i < 7; $i++)
|
||||
{
|
||||
$calSc->headerDay = $ecal_class->day_offset_string($i);
|
||||
//setScVar('event_calendar_shortcodes', 'headerDay', $ecal_class->day_offset_string($i));
|
||||
$text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER, FALSE, $calSc);
|
||||
}
|
||||
$text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_HEADER_END, FALSE, $calSc);
|
||||
@@ -212,8 +209,6 @@ for ($c = 1; $c <= $numberdays; $c++)
|
||||
{ // Loop through the number of days in this month
|
||||
$calSc->todayStart = $start; // Start of current day
|
||||
$calSc->curDay = $c; // Current day of month
|
||||
//setScVar('event_calendar_shortcodes', 'todayStart', $start); // Start of current day
|
||||
//setScVar('event_calendar_shortcodes', 'curDay', $c); // Current day of month
|
||||
|
||||
$got_ev = array_key_exists($c, $events) && is_array($events[$c]) && count($events[$c]) > 0; // Flag set if events on this day
|
||||
|
||||
@@ -232,24 +227,24 @@ for ($c = 1; $c <= $numberdays; $c++)
|
||||
}
|
||||
if ($got_ev)
|
||||
{
|
||||
foreach($events[$c] as $ev)
|
||||
{
|
||||
if ($ev['startofevent'])
|
||||
foreach($events[$c] as $ev)
|
||||
{
|
||||
$ev['indicat'] = '';
|
||||
$ev['imagesize'] = '8';
|
||||
$ev['fulltopic'] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ev['indicat'] = '';
|
||||
$ev['imagesize'] = '4';
|
||||
$ev['fulltopic'] = FALSE;
|
||||
}
|
||||
//setScVar('event_calendar_shortcodes', 'event', $ev); // Give shortcodes the event data
|
||||
$calSc->event = $ev;
|
||||
$text .= $e107->tp->parseTemplate($CALENDAR_SHOWEVENT, FALSE, $calSc);
|
||||
}
|
||||
if ($ev['startofevent'])
|
||||
{
|
||||
$ev['indicat'] = '';
|
||||
$ev['imagesize'] = '8';
|
||||
$ev['fulltopic'] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ev['indicat'] = '';
|
||||
$ev['imagesize'] = '4';
|
||||
$ev['fulltopic'] = FALSE;
|
||||
}
|
||||
//setScVar('event_calendar_shortcodes', 'event', $ev); // Give shortcodes the event data
|
||||
$calSc->event = $ev;
|
||||
$text .= $e107->tp->parseTemplate($CALENDAR_SHOWEVENT, FALSE, $calSc);
|
||||
}
|
||||
}
|
||||
$text .= $e107->tp->parseTemplate($CALENDAR_CALENDAR_DAY_END, FALSE, $calSc);
|
||||
|
||||
|
@@ -1,227 +1,233 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2010 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - calendar menu display
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
$e107 = e107::getInstance();
|
||||
if (!$e107->isInstalled('calendar_menu')) return '';
|
||||
|
||||
if (!isset($ecal_class))
|
||||
{
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
}
|
||||
// See if the page is already in the cache
|
||||
$cache_tag = 'nq_event_cal_cal';
|
||||
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
|
||||
{
|
||||
echo $cacheData;
|
||||
return;
|
||||
}
|
||||
global $pref;
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
// Doesn't use shortcodes - rather a specific format for that
|
||||
//e107::getScParser();
|
||||
//require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
if (is_readable(THEME.'calendar_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'calendar_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require(e_PLUGIN.'calendar_menu/calendar_template.php');
|
||||
}
|
||||
|
||||
$show_recurring = TRUE; // Could be pref later
|
||||
$cat_filter = '*'; // Could be another pref later.
|
||||
$cal_datearray = $ecal_class->cal_date;
|
||||
$cal_current_month = $cal_datearray['mon'];
|
||||
$cal_current_year = $cal_datearray['year'];
|
||||
$numberdays = date("t", $ecal_class->cal_timedate); // number of days in this month
|
||||
$cal_monthstart = gmmktime(0, 0, 0, $cal_current_month, 1, $cal_current_year); // Time stamp for first day of month
|
||||
$cal_firstdayarray = getdate($cal_monthstart);
|
||||
$cal_monthend = gmmktime(0, 0, 0, $cal_current_month + 1, 1, $cal_current_year) -1; // Time stamp for last day of month
|
||||
//$cal_thismonth = $cal_datearray['mon'];
|
||||
$cal_thisday = $cal_datearray['mday']; // Today
|
||||
$cal_events = array();
|
||||
$cal_titles = array();
|
||||
$cal_recent = array();
|
||||
$cal_totev = 0;
|
||||
|
||||
$ev_list = $ecal_class->get_events($cal_monthstart, $cal_monthend, TRUE, $cat_filter, $show_recurring,
|
||||
'event_start, event_thread, event_title, event_recurring, event_allday', 'event_cat_icon');
|
||||
$cal_totev = count($ev_list);
|
||||
|
||||
// Generate an array, one element per day of the month, and assign events to them
|
||||
foreach ($ev_list as $cal_row)
|
||||
{
|
||||
if (is_array($cal_row['event_start'])) $temp = $cal_row['event_start']; else $temp = array($cal_row['event_start']);
|
||||
foreach ($temp as $ts)
|
||||
{ // Split up any recurring events
|
||||
$cal_start_day = date('j',$ts); // Day of month for start
|
||||
// Mark start day of each event
|
||||
$cal_events[$cal_start_day][] = $cal_row['event_cat_icon']; // Only first is actually used
|
||||
if (isset($cal_row['is_recent'])) $cal_recent[$cal_start_day] = TRUE;
|
||||
$cal_titles[$cal_start_day][] = $cal_row['event_title']; // In case titles displayed on mouseover
|
||||
}
|
||||
}
|
||||
|
||||
// set up month array for calendar display
|
||||
$cal_months = array(EC_LAN_0, EC_LAN_1, EC_LAN_2, EC_LAN_3, EC_LAN_4, EC_LAN_5, EC_LAN_6, EC_LAN_7, EC_LAN_8, EC_LAN_9, EC_LAN_10, EC_LAN_11);
|
||||
if ($pref['eventpost_dateformat'] == 'my')
|
||||
{
|
||||
$calendar_title = $cal_months[$cal_current_month-1] .' '. $cal_current_year;
|
||||
}
|
||||
else
|
||||
{
|
||||
$calendar_title = $cal_current_year .' '. $cal_months[$cal_current_month-1];
|
||||
}
|
||||
switch ($pref['eventpost_menulink'])
|
||||
{
|
||||
case 0 : $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/event.php' >".$calendar_title."</a>";
|
||||
break;
|
||||
case 1 : $calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/calendar.php' >".$calendar_title."</a>";
|
||||
break;
|
||||
default : ;
|
||||
}
|
||||
$cal_text = $CALENDAR_MENU_START;
|
||||
if ($pref['eventpost_showeventcount']=='1')
|
||||
{
|
||||
if ($cal_totev)
|
||||
{
|
||||
$cal_text .= EC_LAN_26 . ": " . $cal_totev;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cal_text .= EC_LAN_27;
|
||||
}
|
||||
$cal_text .= "<br /><br />";
|
||||
}
|
||||
$cal_start = $cal_monthstart; // First day of month as time stamp
|
||||
// Start the table
|
||||
$cal_text .= $CALENDAR_MENU_TABLE_START;
|
||||
// Open header row
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_START;
|
||||
// Now do the headings (days of week)
|
||||
for ($i = 0; $i < 7; $i++)
|
||||
{
|
||||
$cal_day = $ecal_class->day_offset_string($i);
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_FRONT;
|
||||
$cal_text .= $e107->tp->text_truncate($cal_day, 1, ''); // Unlikely to have room for more than 1 letter
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_BACK;
|
||||
}
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_END; // Close off header row, open first date row
|
||||
// Calculate number of days to skip before 'real' days on first line of calendar
|
||||
$firstdayoffset = date('w',$cal_start) - $ecal_class->ec_first_day_of_week;
|
||||
if ($firstdayoffset < 0) $firstdayoffset+= 7;
|
||||
for ($cal_c = 0; $cal_c < $firstdayoffset; $cal_c++)
|
||||
{
|
||||
$cal_text .= $CALENDAR_MENU_DAY_NON;
|
||||
}
|
||||
$cal_loop = $firstdayoffset;
|
||||
// Now do the days of the month
|
||||
for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
|
||||
{ // Six cases to decode:
|
||||
// 1 - Today, no events
|
||||
// 2 - Some other day, no events
|
||||
// 3 - Today with events
|
||||
// 4 - Some other day with events
|
||||
// 5 - Today with recently added events
|
||||
// 6 - Some other day with recently added events
|
||||
$cal_css = 2; // The default - not today, no events
|
||||
$cal_img = $cal_c; // Default 'image' is the day of the month
|
||||
$cal_event_count = 0;
|
||||
$title = "";
|
||||
if ($cal_thisday == $cal_c) $cal_css = 1;
|
||||
$cal_linkut = gmmktime(0 , 0 , 0 , $cal_current_month, $cal_c, $cal_current_year).".one"; // Always need "one"
|
||||
if (array_key_exists($cal_c, $cal_events))
|
||||
{ // There are events today
|
||||
$cal_event_count = count($cal_events[$cal_c]); // See how many events today
|
||||
if ($cal_event_count)
|
||||
{ // Show icon if it exists
|
||||
$cal_css += 2; // Gives 3 for today, 4 for other day
|
||||
if (isset($pref['eventpost_showmouseover']) && ($pref['eventpost_showmouseover'] == 1))
|
||||
{
|
||||
$cal_ins = " title='";
|
||||
foreach ($cal_titles[$cal_c] as $cur_title)
|
||||
{ // New line would be better, but doesn't get displayed
|
||||
$title .= $cal_ins.$cur_title;
|
||||
$cal_ins = ", ";
|
||||
}
|
||||
$title .= "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($cal_event_count == 1)
|
||||
{
|
||||
$title = " title='1 ".EC_LAN_135."' ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = " title='{$cal_event_count} " . EC_LAN_106 . "' ";
|
||||
}
|
||||
}
|
||||
if (isset($cal_recent[$cal_c]) && $cal_recent[$cal_c])
|
||||
{
|
||||
$cal_css += 2;
|
||||
}
|
||||
|
||||
if (!empty($cal_events[$cal_c]['0']))
|
||||
{
|
||||
$cal_event_icon = 'calendar_menu/images/'.$cal_events[$cal_c]['0']; // Icon file could be NULL
|
||||
if (is_readable(e_PLUGIN.$cal_event_icon))
|
||||
{
|
||||
$cal_img = "<img src='".e_PLUGIN_ABS.$cal_event_icon."' alt='' />";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$cal_text .= $CALENDAR_MENU_DAY_START[$cal_css]."<a {$title} href='" . e_PLUGIN_ABS."calendar_menu/event.php?{$cal_linkut}'>{$cal_img}</a>";
|
||||
$cal_text .= $CALENDAR_MENU_DAY_END[$cal_css];
|
||||
$cal_loop++;
|
||||
if ($cal_loop == 7)
|
||||
{ // Start next row
|
||||
$cal_loop = 0;
|
||||
if ($cal_c != $numberdays)
|
||||
{
|
||||
$cal_text .= $CALENDAR_MENU_WEEKSWITCH;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($cal_loop != 0)
|
||||
{
|
||||
for($cal_a = ($cal_loop + 1); $cal_a <= 7; $cal_a++)
|
||||
{
|
||||
$cal_text .= $CALENDAR_MENU_DAY_NON;
|
||||
}
|
||||
}
|
||||
// Close table
|
||||
$cal_text .= $CALENDAR_MENU_END;
|
||||
// Now handle the data, cache as well
|
||||
ob_start(); // Set up a new output buffer
|
||||
$ns->tablerender($calendar_title, $cal_text, 'calendar_menu');
|
||||
$cache_data = ob_get_flush(); // Get the page content, and display it
|
||||
$e107->ecache->set($cache_tag, $cache_data); // Save to cache
|
||||
unset($ev_list);
|
||||
unset($cal_text);
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - calendar menu display
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - calendar menu display
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
$e107 = e107::getInstance();
|
||||
if (!$e107->isInstalled('calendar_menu')) return '';
|
||||
|
||||
if (!isset($ecal_class))
|
||||
{
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
}
|
||||
|
||||
// See if the page is already in the cache
|
||||
$cache_tag = 'nq_event_cal_cal';
|
||||
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
|
||||
{
|
||||
echo $cacheData;
|
||||
return;
|
||||
}
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
// Doesn't use shortcodes - rather a specific format for that
|
||||
if (is_readable(THEME.'calendar_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'calendar_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require(e_PLUGIN.'calendar_menu/calendar_template.php');
|
||||
}
|
||||
|
||||
$show_recurring = TRUE; // Could be pref later
|
||||
$cat_filter = '*'; // Could be another pref later.
|
||||
$cal_datearray = $ecal_class->cal_date;
|
||||
$cal_current_month = $cal_datearray['mon'];
|
||||
$cal_current_year = $cal_datearray['year'];
|
||||
$numberdays = date("t", $ecal_class->cal_timedate); // number of days in this month
|
||||
$cal_monthstart = gmmktime(0, 0, 0, $cal_current_month, 1, $cal_current_year); // Time stamp for first day of month
|
||||
$cal_firstdayarray = getdate($cal_monthstart);
|
||||
$cal_monthend = gmmktime(0, 0, 0, $cal_current_month + 1, 1, $cal_current_year) -1; // Time stamp for last day of month
|
||||
//$cal_thismonth = $cal_datearray['mon'];
|
||||
$cal_thisday = $cal_datearray['mday']; // Today
|
||||
$cal_events = array();
|
||||
$cal_titles = array();
|
||||
$cal_recent = array();
|
||||
$cal_totev = 0;
|
||||
|
||||
$ev_list = $ecal_class->get_events($cal_monthstart, $cal_monthend, TRUE, $cat_filter, $show_recurring,
|
||||
'event_start, event_thread, event_title, event_recurring, event_allday', 'event_cat_icon');
|
||||
$cal_totev = count($ev_list);
|
||||
|
||||
// Generate an array, one element per day of the month, and assign events to them
|
||||
foreach ($ev_list as $cal_row)
|
||||
{
|
||||
if (is_array($cal_row['event_start'])) $temp = $cal_row['event_start']; else $temp = array($cal_row['event_start']);
|
||||
foreach ($temp as $ts)
|
||||
{ // Split up any recurring events
|
||||
$cal_start_day = date('j',$ts); // Day of month for start
|
||||
// Mark start day of each event
|
||||
$cal_events[$cal_start_day][] = $cal_row['event_cat_icon']; // Only first is actually used
|
||||
if (isset($cal_row['is_recent'])) $cal_recent[$cal_start_day] = TRUE;
|
||||
$cal_titles[$cal_start_day][] = $cal_row['event_title']; // In case titles displayed on mouseover
|
||||
}
|
||||
}
|
||||
|
||||
// set up month array for calendar display
|
||||
$cal_months = array(EC_LAN_0, EC_LAN_1, EC_LAN_2, EC_LAN_3, EC_LAN_4, EC_LAN_5, EC_LAN_6, EC_LAN_7, EC_LAN_8, EC_LAN_9, EC_LAN_10, EC_LAN_11);
|
||||
if ($this->ecal_class->pref['eventpost_dateformat'] == 'my')
|
||||
{
|
||||
$calendar_title = $cal_months[$cal_current_month-1] .' '. $cal_current_year;
|
||||
}
|
||||
else
|
||||
{
|
||||
$calendar_title = $cal_current_year .' '. $cal_months[$cal_current_month-1];
|
||||
}
|
||||
|
||||
switch ($this->ecal_class->pref['eventpost_menulink'])
|
||||
{
|
||||
case 0 :
|
||||
$calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/event.php' >".$calendar_title."</a>";
|
||||
break;
|
||||
case 1 :
|
||||
$calendar_title = "<a {$CALENDAR_MENU_HDG_LINK_CLASS} href='".e_PLUGIN."calendar_menu/calendar.php' >".$calendar_title."</a>";
|
||||
break;
|
||||
default : ;
|
||||
}
|
||||
|
||||
$cal_text = $CALENDAR_MENU_START;
|
||||
if ($this->ecal_class->pref['eventpost_showeventcount']=='1')
|
||||
{
|
||||
if ($cal_totev)
|
||||
{
|
||||
$cal_text .= EC_LAN_26 . ": " . $cal_totev;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cal_text .= EC_LAN_27;
|
||||
}
|
||||
$cal_text .= "<br /><br />";
|
||||
}
|
||||
|
||||
$cal_start = $cal_monthstart; // First day of month as time stamp
|
||||
// Start the table
|
||||
$cal_text .= $CALENDAR_MENU_TABLE_START;
|
||||
// Open header row
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_START;
|
||||
// Now do the headings (days of week)
|
||||
for ($i = 0; $i < 7; $i++)
|
||||
{
|
||||
$cal_day = $ecal_class->day_offset_string($i);
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_FRONT;
|
||||
$cal_text .= $e107->tp->text_truncate($cal_day, 1, ''); // Unlikely to have room for more than 1 letter
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_BACK;
|
||||
}
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_END; // Close off header row, open first date row
|
||||
// Calculate number of days to skip before 'real' days on first line of calendar
|
||||
$firstdayoffset = date('w',$cal_start) - $ecal_class->ec_first_day_of_week;
|
||||
if ($firstdayoffset < 0) $firstdayoffset+= 7;
|
||||
for ($cal_c = 0; $cal_c < $firstdayoffset; $cal_c++)
|
||||
{
|
||||
$cal_text .= $CALENDAR_MENU_DAY_NON;
|
||||
}
|
||||
$cal_loop = $firstdayoffset;
|
||||
// Now do the days of the month
|
||||
for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
|
||||
{ // Six cases to decode:
|
||||
// 1 - Today, no events
|
||||
// 2 - Some other day, no events
|
||||
// 3 - Today with events
|
||||
// 4 - Some other day with events
|
||||
// 5 - Today with recently added events
|
||||
// 6 - Some other day with recently added events
|
||||
$cal_css = 2; // The default - not today, no events
|
||||
$cal_img = $cal_c; // Default 'image' is the day of the month
|
||||
$cal_event_count = 0;
|
||||
$title = "";
|
||||
if ($cal_thisday == $cal_c) $cal_css = 1;
|
||||
$cal_linkut = gmmktime(0 , 0 , 0 , $cal_current_month, $cal_c, $cal_current_year).".one"; // Always need "one"
|
||||
if (array_key_exists($cal_c, $cal_events))
|
||||
{ // There are events today
|
||||
$cal_event_count = count($cal_events[$cal_c]); // See how many events today
|
||||
if ($cal_event_count)
|
||||
{ // Show icon if it exists
|
||||
$cal_css += 2; // Gives 3 for today, 4 for other day
|
||||
if (isset($this->ecal_class->pref['eventpost_showmouseover']) && ($this->ecal_class->pref['eventpost_showmouseover'] == 1))
|
||||
{
|
||||
$cal_ins = " title='";
|
||||
foreach ($cal_titles[$cal_c] as $cur_title)
|
||||
{ // New line would be better, but doesn't get displayed
|
||||
$title .= $cal_ins.$cur_title;
|
||||
$cal_ins = ", ";
|
||||
}
|
||||
$title .= "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($cal_event_count == 1)
|
||||
{
|
||||
$title = " title='1 ".EC_LAN_135."' ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = " title='{$cal_event_count} " . EC_LAN_106 . "' ";
|
||||
}
|
||||
}
|
||||
if (isset($cal_recent[$cal_c]) && $cal_recent[$cal_c])
|
||||
{
|
||||
$cal_css += 2;
|
||||
}
|
||||
|
||||
if (!empty($cal_events[$cal_c]['0']))
|
||||
{
|
||||
$cal_event_icon = 'calendar_menu/images/'.$cal_events[$cal_c]['0']; // Icon file could be NULL
|
||||
if (is_readable(e_PLUGIN.$cal_event_icon))
|
||||
{
|
||||
$cal_img = "<img src='".e_PLUGIN_ABS.$cal_event_icon."' alt='' />";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$cal_text .= $CALENDAR_MENU_DAY_START[$cal_css]."<a {$title} href='" . e_PLUGIN_ABS."calendar_menu/event.php?{$cal_linkut}'>{$cal_img}</a>";
|
||||
$cal_text .= $CALENDAR_MENU_DAY_END[$cal_css];
|
||||
$cal_loop++;
|
||||
if ($cal_loop == 7)
|
||||
{ // Start next row
|
||||
$cal_loop = 0;
|
||||
if ($cal_c != $numberdays)
|
||||
{
|
||||
$cal_text .= $CALENDAR_MENU_WEEKSWITCH;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($cal_loop != 0)
|
||||
{
|
||||
for($cal_a = ($cal_loop + 1); $cal_a <= 7; $cal_a++)
|
||||
{
|
||||
$cal_text .= $CALENDAR_MENU_DAY_NON;
|
||||
}
|
||||
}
|
||||
// Close table
|
||||
$cal_text .= $CALENDAR_MENU_END;
|
||||
// Now handle the data, cache as well
|
||||
ob_start(); // Set up a new output buffer
|
||||
$ns->tablerender($calendar_title, $cal_text, 'calendar_menu');
|
||||
$cache_data = ob_get_flush(); // Get the page content, and display it
|
||||
$e107->ecache->set($cache_tag, $cache_data); // Save to cache
|
||||
unset($ev_list);
|
||||
unset($cal_text);
|
||||
?>
|
@@ -1,90 +1,174 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| (c) e107 Inc 2008-2009
|
||||
| http://e107.org
|
||||
|
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_setup.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
|
||||
{
|
||||
|
||||
function install_post($param)
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
if($this->insertDefaultCategory(FALSE))
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
|
||||
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function install_pre($param)
|
||||
{
|
||||
// echo "Calendar uninstall routine<br />";
|
||||
}
|
||||
|
||||
|
||||
function upgrade_post($param)
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
if($this->insertDefaultCategory(TRUE))
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function insertDefaultCategory($isUpgrade = FALSE) // Insert the text for the default category into the DB here
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
require_once('ecal_class.php'); // Gets the define for the 'Default' category
|
||||
if ($isUpgrade && $sql->db_Select('event_cat','event_cat_name',"event_cat_name='".EC_DEFAULT_CATEGORY."' ", TRUE))
|
||||
{
|
||||
return EC_ADINST_LAN_08.'<br />';
|
||||
}
|
||||
$ec_insert_entries = "INSERT INTO `#event_cat` (event_cat_name, event_cat_description, event_cat_ahead, event_cat_msg1, event_cat_msg2, event_cat_lastupdate)
|
||||
VALUES ('".EC_DEFAULT_CATEGORY."', '".EC_ADINST_LAN_03."', 5,
|
||||
'".EC_ADINST_LAN_01."', '".EC_ADINST_LAN_02."',
|
||||
'".intval(time())."') ";
|
||||
|
||||
return $sql->db_Select_gen($ec_insert_entries);
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Installation and update handler for event calendar plugin
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Plugin file - installation and update handling
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
|
||||
|
||||
class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
|
||||
{
|
||||
|
||||
function install_post($param)
|
||||
{
|
||||
$somethingFailed = FALSE;
|
||||
|
||||
$mes = eMessage::getInstance();
|
||||
if ($this->insertDefaultCategory(FALSE, $mes) == FALSE)
|
||||
{
|
||||
$somethingFailed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ($somethingFailed)
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function install_pre($param)
|
||||
{
|
||||
// echo "Calendar uninstall routine<br />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called to see if plugin upgrade is required
|
||||
*
|
||||
* @param $param mixed - no purpose currently
|
||||
* @return boolean TRUE if upgrade required, FALSE otherwise
|
||||
*/
|
||||
function upgrade_required($param = FALSE)
|
||||
{
|
||||
$required = FALSE;
|
||||
|
||||
$data = e107::pref('calendar_menu');
|
||||
if (count($data) == 0)
|
||||
{
|
||||
$required = TRUE;
|
||||
}
|
||||
//print_a($data);
|
||||
return $required;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Upgrade stage 1
|
||||
*
|
||||
* @param $param mixed - no purpose currently
|
||||
* @return - none
|
||||
*/
|
||||
function upgrade_pre($param = FALSE)
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
$calPref = e107::pref('calendar_menu');
|
||||
if (count($calPref) == 0)
|
||||
{ // Need to move prefs over
|
||||
unset($calPref);
|
||||
|
||||
$calNew = e107::getPlugConfig('calendar_menu'); // Initialize calendar_menu prefs.
|
||||
$corePrefs = e107::getConfig('core'); // Core Prefs Object.
|
||||
$pref = e107::pref('core'); // Core Prefs Array.
|
||||
|
||||
foreach($pref as $k=>$v)
|
||||
{
|
||||
if(substr($k, 0, 10) == 'eventpost_')
|
||||
{
|
||||
$calNew->add($k, $v);
|
||||
$corePrefs->remove($k);
|
||||
}
|
||||
}
|
||||
$calNew->save();
|
||||
$corePrefs->save();
|
||||
|
||||
$calPref = e107::pref('calendar_menu'); // retrieve calendar_menu pref array.
|
||||
//print_a($calPref);
|
||||
|
||||
|
||||
$mes->add(EC_ADINST_LAN_10, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_09, E_MESSAGE_INFO); // Nothing to do - prefs already moved
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Upgrade final stage - add default category
|
||||
*
|
||||
* @param $param mixed - no purpose currently
|
||||
* @return - none
|
||||
*/
|
||||
function upgrade_post($param)
|
||||
{
|
||||
$this->insertDefaultCategory(TRUE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make sure default category is in calendar database; add it if not.
|
||||
*
|
||||
* Adds an appropriate message to the passed message handler.
|
||||
* Returns TRUE if the call can be deemed a success (category present or added); FALSE on error
|
||||
*/
|
||||
function insertDefaultCategory($isUpgrade) // Insert the text for the default category into the DB here
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
$sql = e107::getDb();
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php'); // Gets the define for the 'Default' category
|
||||
if ($isUpgrade && $sql->db_Select('event_cat','event_cat_name',"event_cat_name='".EC_DEFAULT_CATEGORY."' "))
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_08, E_MESSAGE_INFO); // Nothing to do - default category already present
|
||||
return TRUE;
|
||||
}
|
||||
$ec_insert_entries = "INSERT INTO `#event_cat` (event_cat_name, event_cat_description, event_cat_ahead, event_cat_msg1, event_cat_msg2, event_cat_lastupdate)
|
||||
VALUES ('".EC_DEFAULT_CATEGORY."', '".EC_ADINST_LAN_03."', 5,
|
||||
'".EC_ADINST_LAN_01."', '".EC_ADINST_LAN_02."',
|
||||
'".intval(time())."') ";
|
||||
|
||||
if ($result = $sql->db_Select_gen($ec_insert_entries))
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@@ -1,320 +1,322 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Templates for event calendar displays
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
|
||||
|
||||
//global $sc_style;
|
||||
|
||||
$ec_images_path = e_IMAGE;
|
||||
$ec_images_path_abs = e_IMAGE_ABS;
|
||||
if (!defined('EC_RECENT_ICON'))
|
||||
{
|
||||
define('EC_RECENT_ICON',e_IMAGE.'generic/new.png');
|
||||
define('EC_RECENT_ICON_ABS',e_IMAGE_ABS.'generic/new.png');
|
||||
} // Filename of icon used to flag recent events
|
||||
|
||||
|
||||
|
||||
|
||||
// TIME SWITCH BUTTONS ------------------------------------------------------------
|
||||
$sc_style['EC_PREV_MONTH']['pre'] = "<span class='defaulttext'>";
|
||||
$sc_style['EC_PREV_MONTH']['post'] = "</span>";
|
||||
|
||||
$sc_style['EC_CURRENT_MONTH']['pre'] = "<b>";
|
||||
$sc_style['EC_CURRENT_MONTH']['post'] = "</b>";
|
||||
|
||||
$sc_style['EC_NEXT_MONTH']['pre'] = "<span class='defaulttext'>";
|
||||
$sc_style['EC_NEXT_MONTH']['post'] = "</span>";
|
||||
|
||||
$sc_style['EC_PREV_YEAR']['pre'] = '';
|
||||
$sc_style['EC_PREV_YEAR']['post'] = '';
|
||||
|
||||
$sc_style['EC_MONTH_LIST']['pre'] = '';
|
||||
$sc_style['EC_MONTH_LIST']['post'] = '';
|
||||
|
||||
$sc_style['EC_NEXT_YEAR']['pre'] = '';
|
||||
$sc_style['EC_NEXT_YEAR']['post'] = '';
|
||||
|
||||
|
||||
$CALENDAR_TIME_TABLE = "
|
||||
<table cellpadding='0' cellspacing='1' class='fborder' style='width:100%'>
|
||||
<tr>
|
||||
<td class='forumheader' style='width:18%; text-align:left'>{EC_PREV_MONTH}</td>
|
||||
<td class='fcaption' style='width:64%; text-align:center'>{EC_CURRENT_MONTH}</td>
|
||||
<td class='forumheader' style='width:18%; text-align:right'>{EC_NEXT_MONTH}</td>
|
||||
</tr>\n
|
||||
<tr>
|
||||
<td class='forumheader3' style='text-align:left'>{EC_PREV_YEAR}</td>
|
||||
<td class='fcaption' style='text-align:center; vertical-align:middle'>{EC_MONTH_LIST}</td>
|
||||
<td class='forumheader3' style='text-align:right'>{EC_NEXT_YEAR}</td>
|
||||
</tr>\n
|
||||
</table>";
|
||||
|
||||
|
||||
|
||||
// NAVIGATION BUTTONS
|
||||
//$sc_style['NAV_LINKCURRENTMONTH']['pre'] = "<span class='button' style='width:120px; '>";
|
||||
//$sc_style['NAV_LINKCURRENTMONTH']['post'] = "</span>";
|
||||
$sc_style['EC_NAV_LINKCURRENTMONTH']['pre'] = "";
|
||||
$sc_style['EC_NAV_LINKCURRENTMONTH']['post'] = "";
|
||||
|
||||
$CALENDAR_NAVIGATION_TABLE = "
|
||||
<div style='text-align:center; margin-bottom:20px;'>
|
||||
<form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='calform'>
|
||||
<table border='0' cellpadding='0' cellspacing='0' style='width:100%;'>
|
||||
<tr>
|
||||
<td style='text-align:center;'>{EC_NAV_CATEGORIES} {EC_NAV_BUT_ALLEVENTS} {EC_NAV_BUT_VIEWCAT} {EC_NAV_BUT_ENTEREVENT} {EC_NAV_BUT_SUBSCRIPTION} {EC_NAV_BUT_PRINTLISTS} {EC_NAV_LINKCURRENTMONTH}</td>
|
||||
</tr>\n
|
||||
</table>
|
||||
</form>
|
||||
</div>";
|
||||
|
||||
|
||||
|
||||
// EVENT LIST ------------------------------------------------------------
|
||||
$sc_style['EC_EVENTLIST_CAPTION']['pre'] = "<tr><td class='fcaption' colspan='2'>";
|
||||
$sc_style['EC_EVENTLIST_CAPTION']['post'] = ":<br /><br /></td></tr>\n";
|
||||
|
||||
$EVENT_EVENTLIST_TABLE_START = "<table style='width:100%' class='fborder'>{EC_EVENTLIST_CAPTION}";
|
||||
$EVENT_EVENTLIST_TABLE_END = "</table>";
|
||||
|
||||
|
||||
|
||||
// EVENT ARCHIVE ------------------------------------------------------------
|
||||
$sc_style['EC_EVENTARCHIVE_CAPTION']['pre'] = "<tr><td colspan='2' class='fcaption'>";
|
||||
$sc_style['EC_EVENTARCHIVE_CAPTION']['post'] = "</td></tr>\n";
|
||||
|
||||
$EVENT_ARCHIVE_TABLE_START = "<br /><table style='width:100%' class='fborder'>{EC_EVENTARCHIVE_CAPTION}";
|
||||
$EVENT_ARCHIVE_TABLE = "
|
||||
<tr>
|
||||
<td style='width:35%; vertical-align:top' class='forumheader3'>{EC_EVENT_RECENT_ICON}{EC_EVENTARCHIVE_DATE}</td>
|
||||
<td style='width:65%' class='forumheader3'>{EC_EVENTARCHIVE_HEADING}</td>
|
||||
</tr>\n";
|
||||
//<br />{EVENTARCHIVE_DETAILS}
|
||||
$EVENT_ARCHIVE_TABLE_EMPTY = "<tr><td colspan='2' class='forumheader3'>{EC_EVENTARCHIVE_EMPTY}</td></tr>\n";
|
||||
$EVENT_ARCHIVE_TABLE_END = "</table>";
|
||||
|
||||
|
||||
|
||||
// EVENT SHOW EVENT ------------------------------------------------------------
|
||||
$EVENT_EVENT_TABLE_START = "<table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'>";
|
||||
$EVENT_EVENT_TABLE_END = "</table>";
|
||||
|
||||
$sc_style['EC_EVENT_HEADING_DATE']['pre'] = "";
|
||||
$sc_style['EC_EVENT_HEADING_DATE']['post'] = "";
|
||||
|
||||
$sc_style['EC_EVENT_DETAILS']['pre'] = "<tr><td colspan='2' class='forumheader3'>";
|
||||
$sc_style['EC_EVENT_DETAILS']['post'] = "</td></tr>\n";
|
||||
|
||||
$sc_style['EC_EVENT_LOCATION']['pre'] = "<tr><td colspan='2' class='forumheader3'><b>".EC_LAN_32."</b> ";
|
||||
$sc_style['EC_EVENT_LOCATION']['post'] = "</td></tr>";
|
||||
|
||||
$sc_style['EC_EVENT_AUTHOR']['pre'] = "<b>".EC_LAN_31."</b> ";
|
||||
$sc_style['EC_EVENT_AUTHOR']['post'] = " ";
|
||||
|
||||
$sc_style['EC_EVENT_CONTACT']['pre'] = "<b>".EC_LAN_33."</b> ";
|
||||
$sc_style['EC_EVENT_CONTACT']['post'] = " ";
|
||||
|
||||
$sc_style['EC_EVENT_THREAD']['pre'] = "<tr><td colspan='2' class='forumheader3'><span class='smalltext'>";
|
||||
$sc_style['EC_EVENT_THREAD']['post'] = "</span></td></tr>\n";
|
||||
|
||||
$sc_style['EC_EVENT_CATEGORY']['pre'] = "<b>".EC_LAN_30."</b> ";
|
||||
$sc_style['EC_EVENT_CATEGORY']['post'] = " ";
|
||||
|
||||
$sc_style['EC_EVENT_DATE_START']['pre'] = '';
|
||||
$sc_style['EC_EVENT_DATE_START']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_TIME_START']['pre'] = '';
|
||||
$sc_style['EC_EVENT_TIME_START']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_DATE_END']['pre'] = '';
|
||||
$sc_style['EC_EVENT_DATE_END']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_TIME_END']['pre'] = '';
|
||||
$sc_style['EC_EVENT_TIME_END']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_EVENT_DATE_TIME']['pre'] = "<b>".EC_LAN_29."</b> ";
|
||||
$sc_style['EC_EVENT_EVENT_DATE_TIME']['post'] = '';
|
||||
|
||||
$sc_style['EC_IFNOT_ALLDAY']['pre'] = EC_LAN_144;
|
||||
$sc_style['EC_IFNOT_ALLDAY']['post'] = "";
|
||||
|
||||
// The $EVENT_EVENT_DATETIME strings are used with the EC_EVENT_EVENT_DATE_TIME shortcode.
|
||||
// There are four cases, each with a corresponding index into $EVENT_EVENT_DATETIME:
|
||||
// 0 - Normal event, starting and finishing on different dates (the 'original' default)
|
||||
// 1 - Normal event, starting and finishing on the same day
|
||||
// 2 - All-day event, starting and finishing on different days
|
||||
// 3 - All-day event, starting and finishing on the same day
|
||||
$EVENT_EVENT_DATETIME[0] = "{EC_EVENT_DATE_START}".EC_LAN_144."{EC_EVENT_TIME_START}<b> ".EC_LAN_69."</b> {EC_EVENT_DATE_END}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_END}";
|
||||
$EVENT_EVENT_DATETIME[1] = "{EC_EVENT_DATE_START} ".EC_LAN_84." {EC_EVENT_TIME_START}".EC_LAN_85."{EC_EVENT_TIME_END}";
|
||||
$EVENT_EVENT_DATETIME[2] = "{EC_EVENT_DATE_START} <b>".EC_LAN_69."</b> {EC_EVENT_DATE_END}";
|
||||
$EVENT_EVENT_DATETIME[3] = "{EC_EVENT_DATE_START}";
|
||||
|
||||
|
||||
$EVENT_EVENT_TABLE = "
|
||||
<tr>
|
||||
<td >
|
||||
<a href='#{EC_EVENT_ID}' class='e-show-if-js e-expandit fcaption' style='display:inline-block; cursor:pointer; text-align:left; border:0px solid #000; width:100%' title='".EC_LAN_132."'>{EC_EVENT_RECENT_ICON}{EC_EVENT_CAT_ICON}{EC_EVENT_HEADING_DATE}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_START} - {EC_EVENT_TITLE}</a>
|
||||
<div id='{EC_EVENT_ID}' {EC_EVENT_DISPLAYCLASS} style='padding-top:10px; padding-bottom:10px; text-align:left;'>
|
||||
<table style='width:100%;' cellspacing='0' cellpadding='0'>
|
||||
<tr><td colspan='2' class='forumheader3'>{EC_EVENT_AUTHOR} {EC_EVENT_CAT_ICON} {EC_EVENT_CATEGORY} {EC_EVENT_CONTACT} {EC_EVENT_OPTIONS}</td></tr>
|
||||
<tr><td colspan='2' class='forumheader3'>{EC_EVENT_EVENT_DATE_TIME}</td></tr>\n
|
||||
{EC_EVENT_LOCATION}
|
||||
{EC_EVENT_DETAILS}
|
||||
{EC_EVENT_THREAD}
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>\n
|
||||
";
|
||||
|
||||
//------------------------------------------
|
||||
// CALENDAR CALENDAR - 'Big' calendar
|
||||
//------------------------------------------
|
||||
$CALENDAR_CALENDAR_START = "
|
||||
<div style='text-align:center'>
|
||||
<table cellpadding='0' cellspacing='1' class='fborder' style='background-color:#DDDDDD; width:100%'>
|
||||
<colgroup>
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
</colgroup>";
|
||||
|
||||
$CALENDAR_CALENDAR_END = "
|
||||
</tr>\n</table></div>";
|
||||
|
||||
// 'Empty' cells where there's not a day at all
|
||||
$CALENDAR_CALENDAR_DAY_NON = "<td style='width:14%;height:90px;'></td>";
|
||||
|
||||
//header row
|
||||
$CALENDAR_CALENDAR_HEADER_START = "<tr>";
|
||||
$CALENDAR_CALENDAR_HEADER = "<td class='fcaption' style='z-index: -1; background-color:#000; color:#FFF; width:90px; height:20px; text-align:center; vertical-align:middle;'>{EC_CALENDAR_CALENDAR_HEADER_DAY}</td>";
|
||||
$CALENDAR_CALENDAR_HEADER_END = "</tr>\n<tr>";
|
||||
|
||||
|
||||
$CALENDAR_CALENDAR_WEEKSWITCH = "</tr>\n<tr>";
|
||||
|
||||
//today
|
||||
$CALENDAR_CALENDAR_DAY_TODAY = "
|
||||
<td class='forumheader3' style='vertical-align:top;height:90px;'>
|
||||
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>{EC_CALENDAR_CALENDAR_DAY_TODAY_HEADING}</span>";
|
||||
|
||||
//day has events
|
||||
$CALENDAR_CALENDAR_DAY_EVENT = "
|
||||
<td class='forumheader3' style='z-index: 1;vertical-align:top;height:90px;'>
|
||||
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EVENT_HEADING}</b></span>";
|
||||
|
||||
// no events and not today
|
||||
$CALENDAR_CALENDAR_DAY_EMPTY = "
|
||||
<td class='forumheader2' style='z-index: 1;vertical-align:top;height:90px;'>
|
||||
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EMPTY_HEADING}</b></span>";
|
||||
|
||||
$CALENDAR_CALENDAR_DAY_END = "</td>";
|
||||
|
||||
// CALENDAR SHOW EVENT
|
||||
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['pre'] = "<td style='vertical-align:top; color: #0; background-color: #ff00; width:10px;'>";
|
||||
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['post'] = "</td>";
|
||||
$CALENDAR_SHOWEVENT = "<table cellspacing='0' cellpadding='0' style='width:100%;'><tr>{EC_CALENDAR_CALENDAR_RECENT_ICON}<td style='vertical-align:top; width:10px;'>{EC_SHOWEVENT_IMAGE}</td><td style='vertical-align:top; width:2%;'>{EC_SHOWEVENT_INDICAT}</td><td style='vertical-align:top;'>{EC_SHOWEVENT_HEADING}</td></tr>\n</table>";
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
// Calendar menu - 'Small' calendar
|
||||
//------------------------------------------
|
||||
$CALENDAR_MENU_HDG_LINK_CLASS = "class='forumlink'"; // Class, and optional style, for menu heading if its a clickable link
|
||||
$CALENDAR_MENU_START = "<div style='text-align:center'>";
|
||||
$CALENDAR_MENU_TABLE_START = "<table cellpadding='0' cellspacing='1' style='width:100%;' class='fborder'>"; // colgroup doesn't work!
|
||||
|
||||
$CALENDAR_MENU_END = "</tr></table></div>";
|
||||
|
||||
// Blank cells at beginning and end
|
||||
$CALENDAR_MENU_DAY_NON = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '><br /></td>";
|
||||
|
||||
//header row
|
||||
$CALENDAR_MENU_HEADER_START = "<tr>\n";
|
||||
$CALENDAR_MENU_HEADER_FRONT = "<td class='forumheader' style='text-align:center; vertical-align:middle;'><span class='smalltext'>";
|
||||
$CALENDAR_MENU_HEADER_BACK = "</span></td>";
|
||||
$CALENDAR_MENU_HEADER_END = "</tr>\n<tr>";
|
||||
|
||||
|
||||
$CALENDAR_MENU_WEEKSWITCH = "</tr>\n<tr>";
|
||||
|
||||
// Start and end CSS for date cells - six cases to decode, determined by array index:
|
||||
// 1 - Today, no events
|
||||
// 2 - Some other day, no events
|
||||
// 3 - Today with events
|
||||
// 4 - Some other day with events
|
||||
// 5 - today with events, one or more of which has recently been added/updated
|
||||
// 6 - Some other day with events, one or more of which has recently been added/updated
|
||||
|
||||
|
||||
//today, no events
|
||||
$CALENDAR_MENU_DAY_START['1'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
|
||||
// no events and not today
|
||||
$CALENDAR_MENU_DAY_START['2'] = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
|
||||
//day has events - same whether its today or not
|
||||
$CALENDAR_MENU_DAY_START['3'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
$CALENDAR_MENU_DAY_START['4'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
// day has events, one which is recently added/updated
|
||||
$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
// Example highlight using background colour:
|
||||
//$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF8000;'>";
|
||||
//$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF0000; '>";
|
||||
|
||||
|
||||
$CALENDAR_MENU_DAY_END['1'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['2'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['3'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['4'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['5'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['6'] = "</td>";
|
||||
|
||||
//============================================================================
|
||||
// Next event menu template
|
||||
$sc_style['EC_NEXT_EVENT_TIME']['pre'] = EC_LAN_144;
|
||||
$sc_style['EC_NEXT_EVENT_TIME']['post'] = "";
|
||||
// Following are original styles
|
||||
//$sc_style['NEXT_EVENT_ICON']['pre'] = "<img style='border:0px' src='";
|
||||
//$sc_style['NEXT_EVENT_ICON']['post'] = "' alt='' /> ";
|
||||
// Following to 'float right' on a larger icon
|
||||
$sc_style['EC_NEXT_EVENT_ICON']['pre'] = "<img style='clear: right; float: left; margin: 0px 3px 0px 0px; padding:1px; border: 0px;' src='";
|
||||
$sc_style['EC_NEXT_EVENT_ICON']['post'] = "' alt='' />";
|
||||
|
||||
|
||||
if (!isset($EVENT_CAL_FE_LINE))
|
||||
{
|
||||
$EVENT_CAL_FE_LINE = "{EC_NEXT_EVENT_RECENT_ICON}{EC_NEXT_EVENT_ICON}{EC_NEXT_EVENT_DATE}{EC_NEXT_EVENT_TIME}<br /><strong>{EC_NEXT_EVENT_TITLE}</strong>{EC_NEXT_EVENT_GAP}";
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Templates for event calendar displays
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Templates for event calendar displays
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
|
||||
|
||||
//global $sc_style;
|
||||
|
||||
$ec_images_path = e_IMAGE;
|
||||
$ec_images_path_abs = e_IMAGE_ABS;
|
||||
if (!defined('EC_RECENT_ICON'))
|
||||
{
|
||||
define('EC_RECENT_ICON',e_IMAGE.'generic/new.png');
|
||||
define('EC_RECENT_ICON_ABS',e_IMAGE_ABS.'generic/new.png');
|
||||
} // Filename of icon used to flag recent events
|
||||
|
||||
|
||||
|
||||
|
||||
// TIME SWITCH BUTTONS ------------------------------------------------------------
|
||||
$sc_style['EC_PREV_MONTH']['pre'] = "<span class='defaulttext'>";
|
||||
$sc_style['EC_PREV_MONTH']['post'] = "</span>";
|
||||
|
||||
$sc_style['EC_CURRENT_MONTH']['pre'] = "<b>";
|
||||
$sc_style['EC_CURRENT_MONTH']['post'] = "</b>";
|
||||
|
||||
$sc_style['EC_NEXT_MONTH']['pre'] = "<span class='defaulttext'>";
|
||||
$sc_style['EC_NEXT_MONTH']['post'] = "</span>";
|
||||
|
||||
$sc_style['EC_PREV_YEAR']['pre'] = '';
|
||||
$sc_style['EC_PREV_YEAR']['post'] = '';
|
||||
|
||||
$sc_style['EC_MONTH_LIST']['pre'] = '';
|
||||
$sc_style['EC_MONTH_LIST']['post'] = '';
|
||||
|
||||
$sc_style['EC_NEXT_YEAR']['pre'] = '';
|
||||
$sc_style['EC_NEXT_YEAR']['post'] = '';
|
||||
|
||||
|
||||
$CALENDAR_TIME_TABLE = "
|
||||
<table cellpadding='0' cellspacing='1' class='fborder' style='width:100%'>
|
||||
<tr>
|
||||
<td class='forumheader' style='width:18%; text-align:left'>{EC_PREV_MONTH}</td>
|
||||
<td class='fcaption' style='width:64%; text-align:center'>{EC_CURRENT_MONTH}</td>
|
||||
<td class='forumheader' style='width:18%; text-align:right'>{EC_NEXT_MONTH}</td>
|
||||
</tr>\n
|
||||
<tr>
|
||||
<td class='forumheader3' style='text-align:left'>{EC_PREV_YEAR}</td>
|
||||
<td class='fcaption' style='text-align:center; vertical-align:middle'>{EC_MONTH_LIST}</td>
|
||||
<td class='forumheader3' style='text-align:right'>{EC_NEXT_YEAR}</td>
|
||||
</tr>\n
|
||||
</table>";
|
||||
|
||||
|
||||
|
||||
// NAVIGATION BUTTONS
|
||||
//$sc_style['NAV_LINKCURRENTMONTH']['pre'] = "<span class='button' style='width:120px; '>";
|
||||
//$sc_style['NAV_LINKCURRENTMONTH']['post'] = "</span>";
|
||||
$sc_style['EC_NAV_LINKCURRENTMONTH']['pre'] = "";
|
||||
$sc_style['EC_NAV_LINKCURRENTMONTH']['post'] = "";
|
||||
|
||||
$CALENDAR_NAVIGATION_TABLE = "
|
||||
<div style='text-align:center; margin-bottom:20px;'>
|
||||
<form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='calform'>
|
||||
<table border='0' cellpadding='0' cellspacing='0' style='width:100%;'>
|
||||
<tr>
|
||||
<td style='text-align:center;'>{EC_NAV_CATEGORIES} {EC_NAV_BUT_ALLEVENTS} {EC_NAV_BUT_VIEWCAT} {EC_NAV_BUT_ENTEREVENT} {EC_NAV_BUT_SUBSCRIPTION} {EC_NAV_BUT_PRINTLISTS} {EC_NAV_LINKCURRENTMONTH}</td>
|
||||
</tr>\n
|
||||
</table>
|
||||
</form>
|
||||
</div>";
|
||||
|
||||
|
||||
|
||||
// EVENT LIST ------------------------------------------------------------
|
||||
$sc_style['EC_EVENTLIST_CAPTION']['pre'] = "<tr><td class='fcaption' colspan='2'>";
|
||||
$sc_style['EC_EVENTLIST_CAPTION']['post'] = ":<br /><br /></td></tr>\n";
|
||||
|
||||
$EVENT_EVENTLIST_TABLE_START = "<table style='width:100%' class='fborder'>{EC_EVENTLIST_CAPTION}";
|
||||
$EVENT_EVENTLIST_TABLE_END = "</table>";
|
||||
|
||||
|
||||
|
||||
// EVENT ARCHIVE ------------------------------------------------------------
|
||||
$sc_style['EC_EVENTARCHIVE_CAPTION']['pre'] = "<tr><td colspan='2' class='fcaption'>";
|
||||
$sc_style['EC_EVENTARCHIVE_CAPTION']['post'] = "</td></tr>\n";
|
||||
|
||||
$EVENT_ARCHIVE_TABLE_START = "<br /><table style='width:100%' class='fborder'>{EC_EVENTARCHIVE_CAPTION}";
|
||||
$EVENT_ARCHIVE_TABLE = "
|
||||
<tr>
|
||||
<td style='width:35%; vertical-align:top' class='forumheader3'>{EC_EVENT_RECENT_ICON}{EC_EVENTARCHIVE_DATE}</td>
|
||||
<td style='width:65%' class='forumheader3'>{EC_EVENTARCHIVE_HEADING}</td>
|
||||
</tr>\n";
|
||||
//<br />{EVENTARCHIVE_DETAILS}
|
||||
$EVENT_ARCHIVE_TABLE_EMPTY = "<tr><td colspan='2' class='forumheader3'>{EC_EVENTARCHIVE_EMPTY}</td></tr>\n";
|
||||
$EVENT_ARCHIVE_TABLE_END = "</table>";
|
||||
|
||||
|
||||
|
||||
// EVENT SHOW EVENT ------------------------------------------------------------
|
||||
$EVENT_EVENT_TABLE_START = "<table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'>";
|
||||
$EVENT_EVENT_TABLE_END = "</table>";
|
||||
|
||||
$sc_style['EC_EVENT_HEADING_DATE']['pre'] = "";
|
||||
$sc_style['EC_EVENT_HEADING_DATE']['post'] = "";
|
||||
|
||||
$sc_style['EC_EVENT_DETAILS']['pre'] = "<tr><td colspan='2' class='forumheader3'>";
|
||||
$sc_style['EC_EVENT_DETAILS']['post'] = "</td></tr>\n";
|
||||
|
||||
$sc_style['EC_EVENT_LOCATION']['pre'] = "<tr><td colspan='2' class='forumheader3'><b>".EC_LAN_32."</b> ";
|
||||
$sc_style['EC_EVENT_LOCATION']['post'] = "</td></tr>";
|
||||
|
||||
$sc_style['EC_EVENT_AUTHOR']['pre'] = "<b>".EC_LAN_31."</b> ";
|
||||
$sc_style['EC_EVENT_AUTHOR']['post'] = " ";
|
||||
|
||||
$sc_style['EC_EVENT_CONTACT']['pre'] = "<b>".EC_LAN_33."</b> ";
|
||||
$sc_style['EC_EVENT_CONTACT']['post'] = " ";
|
||||
|
||||
$sc_style['EC_EVENT_THREAD']['pre'] = "<tr><td colspan='2' class='forumheader3'><span class='smalltext'>";
|
||||
$sc_style['EC_EVENT_THREAD']['post'] = "</span></td></tr>\n";
|
||||
|
||||
$sc_style['EC_EVENT_CATEGORY']['pre'] = "<b>".EC_LAN_30."</b> ";
|
||||
$sc_style['EC_EVENT_CATEGORY']['post'] = " ";
|
||||
|
||||
$sc_style['EC_EVENT_DATE_START']['pre'] = '';
|
||||
$sc_style['EC_EVENT_DATE_START']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_TIME_START']['pre'] = '';
|
||||
$sc_style['EC_EVENT_TIME_START']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_DATE_END']['pre'] = '';
|
||||
$sc_style['EC_EVENT_DATE_END']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_TIME_END']['pre'] = '';
|
||||
$sc_style['EC_EVENT_TIME_END']['post'] = '';
|
||||
|
||||
$sc_style['EC_EVENT_EVENT_DATE_TIME']['pre'] = "<b>".EC_LAN_29."</b> ";
|
||||
$sc_style['EC_EVENT_EVENT_DATE_TIME']['post'] = '';
|
||||
|
||||
$sc_style['EC_IFNOT_ALLDAY']['pre'] = EC_LAN_144;
|
||||
$sc_style['EC_IFNOT_ALLDAY']['post'] = "";
|
||||
|
||||
// The $EVENT_EVENT_DATETIME strings are used with the EC_EVENT_EVENT_DATE_TIME shortcode.
|
||||
// There are four cases, each with a corresponding index into $EVENT_EVENT_DATETIME:
|
||||
// 0 - Normal event, starting and finishing on different dates (the 'original' default)
|
||||
// 1 - Normal event, starting and finishing on the same day
|
||||
// 2 - All-day event, starting and finishing on different days
|
||||
// 3 - All-day event, starting and finishing on the same day
|
||||
$EVENT_EVENT_DATETIME[0] = "{EC_EVENT_DATE_START}".EC_LAN_144."{EC_EVENT_TIME_START}<b> ".EC_LAN_69."</b> {EC_EVENT_DATE_END}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_END}";
|
||||
$EVENT_EVENT_DATETIME[1] = "{EC_EVENT_DATE_START} ".EC_LAN_84." {EC_EVENT_TIME_START}".EC_LAN_85."{EC_EVENT_TIME_END}";
|
||||
$EVENT_EVENT_DATETIME[2] = "{EC_EVENT_DATE_START} <b>".EC_LAN_69."</b> {EC_EVENT_DATE_END}";
|
||||
$EVENT_EVENT_DATETIME[3] = "{EC_EVENT_DATE_START}";
|
||||
|
||||
|
||||
$EVENT_EVENT_TABLE = "
|
||||
<tr>
|
||||
<td >
|
||||
<a href='#{EC_EVENT_ID}' class='e-show-if-js e-expandit fcaption' style='display:inline-block; cursor:pointer; text-align:left; border:0px solid #000; width:100%' title='".EC_LAN_132."'>{EC_EVENT_RECENT_ICON}{EC_EVENT_CAT_ICON}{EC_EVENT_HEADING_DATE}{EC_IFNOT_ALLDAY=EC_EVENT_TIME_START} - {EC_EVENT_TITLE}</a>
|
||||
<div id='{EC_EVENT_ID}' {EC_EVENT_DISPLAYCLASS} style='padding-top:10px; padding-bottom:10px; text-align:left;'>
|
||||
<table style='width:100%;' cellspacing='0' cellpadding='0'>
|
||||
<tr><td colspan='2' class='forumheader3'>{EC_EVENT_AUTHOR} {EC_EVENT_CAT_ICON} {EC_EVENT_CATEGORY} {EC_EVENT_CONTACT} {EC_EVENT_OPTIONS}</td></tr>
|
||||
<tr><td colspan='2' class='forumheader3'>{EC_EVENT_EVENT_DATE_TIME}</td></tr>\n
|
||||
{EC_EVENT_LOCATION}
|
||||
{EC_EVENT_DETAILS}
|
||||
{EC_EVENT_THREAD}
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>\n
|
||||
";
|
||||
|
||||
//------------------------------------------
|
||||
// CALENDAR CALENDAR - 'Big' calendar
|
||||
//------------------------------------------
|
||||
$CALENDAR_CALENDAR_START = "
|
||||
<div style='text-align:center'>
|
||||
<table cellpadding='0' cellspacing='1' class='fborder' style='background-color:#DDDDDD; width:100%'>
|
||||
<colgroup>
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
<col style='width:14%; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;' />
|
||||
</colgroup>";
|
||||
|
||||
$CALENDAR_CALENDAR_END = "
|
||||
</tr>\n</table></div>";
|
||||
|
||||
// 'Empty' cells where there's not a day at all
|
||||
$CALENDAR_CALENDAR_DAY_NON = "<td style='width:14%;height:90px;'></td>";
|
||||
|
||||
//header row
|
||||
$CALENDAR_CALENDAR_HEADER_START = "<tr>";
|
||||
$CALENDAR_CALENDAR_HEADER = "<td class='fcaption' style='z-index: -1; background-color:#000; color:#FFF; width:90px; height:20px; text-align:center; vertical-align:middle;'>{EC_CALENDAR_CALENDAR_HEADER_DAY}</td>";
|
||||
$CALENDAR_CALENDAR_HEADER_END = "</tr>\n<tr>";
|
||||
|
||||
|
||||
$CALENDAR_CALENDAR_WEEKSWITCH = "</tr>\n<tr>";
|
||||
|
||||
//today
|
||||
$CALENDAR_CALENDAR_DAY_TODAY = "
|
||||
<td class='forumheader3' style='vertical-align:top;height:90px;'>
|
||||
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>{EC_CALENDAR_CALENDAR_DAY_TODAY_HEADING}</span>";
|
||||
|
||||
//day has events
|
||||
$CALENDAR_CALENDAR_DAY_EVENT = "
|
||||
<td class='forumheader3' style='z-index: 1;vertical-align:top;height:90px;'>
|
||||
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EVENT_HEADING}</b></span>";
|
||||
|
||||
// no events and not today
|
||||
$CALENDAR_CALENDAR_DAY_EMPTY = "
|
||||
<td class='forumheader2' style='z-index: 1;vertical-align:top;height:90px;'>
|
||||
<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{EC_CALENDAR_CALENDAR_DAY_EMPTY_HEADING}</b></span>";
|
||||
|
||||
$CALENDAR_CALENDAR_DAY_END = "</td>";
|
||||
|
||||
// CALENDAR SHOW EVENT
|
||||
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['pre'] = "<td style='vertical-align:top; color: #0; background-color: #ff00; width:10px;'>";
|
||||
$sc_style['EC_CALENDAR_CALENDAR_RECENT_ICON']['post'] = "</td>";
|
||||
$CALENDAR_SHOWEVENT = "<table cellspacing='0' cellpadding='0' style='width:100%;'><tr>{EC_CALENDAR_CALENDAR_RECENT_ICON}<td style='vertical-align:top; width:10px;'>{EC_SHOWEVENT_IMAGE}</td><td style='vertical-align:top; width:2%;'>{EC_SHOWEVENT_INDICAT}</td><td style='vertical-align:top;'>{EC_SHOWEVENT_HEADING}</td></tr>\n</table>";
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
// Calendar menu - 'Small' calendar
|
||||
//------------------------------------------
|
||||
$CALENDAR_MENU_HDG_LINK_CLASS = "class='forumlink'"; // Class, and optional style, for menu heading if its a clickable link
|
||||
$CALENDAR_MENU_START = "<div style='text-align:center'>";
|
||||
$CALENDAR_MENU_TABLE_START = "<table cellpadding='0' cellspacing='1' style='width:100%;' class='fborder'>"; // colgroup doesn't work!
|
||||
|
||||
$CALENDAR_MENU_END = "</tr></table></div>";
|
||||
|
||||
// Blank cells at beginning and end
|
||||
$CALENDAR_MENU_DAY_NON = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '><br /></td>";
|
||||
|
||||
//header row
|
||||
$CALENDAR_MENU_HEADER_START = "<tr>\n";
|
||||
$CALENDAR_MENU_HEADER_FRONT = "<td class='forumheader' style='text-align:center; vertical-align:middle;'><span class='smalltext'>";
|
||||
$CALENDAR_MENU_HEADER_BACK = "</span></td>";
|
||||
$CALENDAR_MENU_HEADER_END = "</tr>\n<tr>";
|
||||
|
||||
|
||||
$CALENDAR_MENU_WEEKSWITCH = "</tr>\n<tr>";
|
||||
|
||||
// Start and end CSS for date cells - six cases to decode, determined by array index:
|
||||
// 1 - Today, no events
|
||||
// 2 - Some other day, no events
|
||||
// 3 - Today with events
|
||||
// 4 - Some other day with events
|
||||
// 5 - today with events, one or more of which has recently been added/updated
|
||||
// 6 - Some other day with events, one or more of which has recently been added/updated
|
||||
|
||||
|
||||
//today, no events
|
||||
$CALENDAR_MENU_DAY_START['1'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
|
||||
// no events and not today
|
||||
$CALENDAR_MENU_DAY_START['2'] = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
|
||||
//day has events - same whether its today or not
|
||||
$CALENDAR_MENU_DAY_START['3'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
$CALENDAR_MENU_DAY_START['4'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
// day has events, one which is recently added/updated
|
||||
$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
|
||||
// Example highlight using background colour:
|
||||
//$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF8000;'>";
|
||||
//$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF0000; '>";
|
||||
|
||||
|
||||
$CALENDAR_MENU_DAY_END['1'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['2'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['3'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['4'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['5'] = "</td>";
|
||||
$CALENDAR_MENU_DAY_END['6'] = "</td>";
|
||||
|
||||
//============================================================================
|
||||
// Next event menu template
|
||||
$sc_style['EC_NEXT_EVENT_TIME']['pre'] = EC_LAN_144;
|
||||
$sc_style['EC_NEXT_EVENT_TIME']['post'] = "";
|
||||
// Following are original styles
|
||||
//$sc_style['NEXT_EVENT_ICON']['pre'] = "<img style='border:0px' src='";
|
||||
//$sc_style['NEXT_EVENT_ICON']['post'] = "' alt='' /> ";
|
||||
// Following to 'float right' on a larger icon
|
||||
$sc_style['EC_NEXT_EVENT_ICON']['pre'] = "<img style='clear: right; float: left; margin: 0px 3px 0px 0px; padding:1px; border: 0px;' src='";
|
||||
$sc_style['EC_NEXT_EVENT_ICON']['post'] = "' alt='' />";
|
||||
|
||||
|
||||
if (!isset($EVENT_CAL_FE_LINE))
|
||||
{
|
||||
$EVENT_CAL_FE_LINE = "{EC_NEXT_EVENT_RECENT_ICON}{EC_NEXT_EVENT_ICON}{EC_NEXT_EVENT_DATE}{EC_NEXT_EVENT_TIME}<br /><strong>{EC_NEXT_EVENT_TITLE}</strong>{EC_NEXT_EVENT_GAP}";
|
||||
}
|
||||
|
||||
|
||||
?>
|
@@ -1,35 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* BBCode template for calendar menu (pretend we're custom page)
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_bb.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
$temp['event'] = "
|
||||
{BB_HELP=ec_event}<br />
|
||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
||||
{BB=bq}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||
{BB_PREIMAGEDIR=".e_IMAGE."newspost_images/}
|
||||
{BB=preimage}{BB=prefile}
|
||||
";
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* BBCode template for calendar menu (pretend we're custom page)
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_bb.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* BBCode template
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
$temp['event'] = "
|
||||
{BB_HELP=ec_event}<br />
|
||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
||||
{BB=bq}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||
{BB_PREIMAGEDIR=".e_IMAGE."newspost_images/}
|
||||
{BB=preimage}{BB=prefile}
|
||||
";
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -1,413 +1,411 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2001-2010 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - cron task
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
include_lan(e_PLUGIN.'/calendar_menu/languages/English_mailer.php');
|
||||
|
||||
class calendar_menu_cron // include plugin-folder in the name.
|
||||
{
|
||||
private $logRequirement = 0; // Flag to determine logging level
|
||||
private $debugLevel = 0; // Used for internal debugging
|
||||
private $logHandle = NULL;
|
||||
private $ecalClass; // Calendar library routines
|
||||
private $e107;
|
||||
private $defaultMessage = array(); // Used where nothing special defined
|
||||
private $startTime; // Start date for processing
|
||||
private $mailManager;
|
||||
private $ourDB; // Used for some things
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
//$this->debugLevel = 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Cron configuration
|
||||
*
|
||||
* Defines one or more cron tasks to be performed
|
||||
*
|
||||
* @return array of task arrays
|
||||
*/
|
||||
public function config()
|
||||
{
|
||||
$cron = array();
|
||||
$cron[] = array('name' => LAN_EC_MAIL_04, 'category' => 'plugin', 'function' => 'processSubs', 'description' => LAN_EC_MAIL_05);
|
||||
return $cron;
|
||||
}
|
||||
|
||||
|
||||
private function checkDB()
|
||||
{
|
||||
if ($this->ourDB == NULL)
|
||||
{
|
||||
$this->ourDB = new db;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logging routine - writes lines to a text file
|
||||
*
|
||||
* Auto-opens log file (if necessary) on first call
|
||||
*
|
||||
* @param string $logText - body of text to write
|
||||
* @param boolean $closeAfter - if TRUE, log file closed before exit; otherwise left open
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
function logLine($logText, $closeAfter = FALSE, $addTimeDate = FALSE)
|
||||
{
|
||||
if ($this->logRequirement == 0) return;
|
||||
|
||||
$logFilename = e_LOG.'calendar_mail.txt';
|
||||
if ($this->logHandle == NULL)
|
||||
{
|
||||
if (!($this->logHandle = fopen($logFilename, "a")))
|
||||
{ // Problem creating file?
|
||||
echo "File open failed!<br />";
|
||||
$this->logRequirement = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (fwrite($this->logHandle,($addTimeDate ? date('D j M Y G:i:s').': ' : '').$logText."\r\n") == FALSE)
|
||||
{
|
||||
$this->logRequirement = 0;
|
||||
echo 'File write failed!<br />';
|
||||
}
|
||||
|
||||
if ($closeAfter)
|
||||
{
|
||||
fclose($this->logHandle);
|
||||
$this->logHandle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called to process the calendar menu subscriptions list - the cron task must be set to call us once/day (typically at about 0100)
|
||||
*
|
||||
* Emails are added to the queue.
|
||||
* Various events are logged in a text file
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
public function processSubs()
|
||||
{
|
||||
global $pref;
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$this->ecalClass = new ecal_class;
|
||||
|
||||
e107::getScParser();
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
if (is_readable(THEME.'ec_mailout_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'ec_mailout_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require(e_PLUGIN.'calendar_menu/ec_mailout_template.php');
|
||||
}
|
||||
|
||||
|
||||
$this->startTime = mktime(0, 0, 0, date('n'), date('d'), date('Y')); // Date for start processing
|
||||
setScVar('event_calendar_shortcodes', 'ecalClass', &$this->ecalClass); // Give shortcode a pointer to calendar class
|
||||
|
||||
|
||||
$this->logRequirement = varset($pref['eventpost_emaillog'], 0);
|
||||
if ($this->debugLevel >= 2) $this->logRequirement = 2; // Force full logging if debug
|
||||
|
||||
|
||||
// Start of the 'real' code
|
||||
$this->logLine("\r\n\r\n".LAN_EC_MAIL_06.date('D j M Y G:i:s'));
|
||||
|
||||
|
||||
// Start with the 'in advance' emails
|
||||
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
|
||||
event_cat_last < " . intval($this->startTime) . " and
|
||||
event_cat_ahead > 0 and
|
||||
event_start >= (" . intval($this->startTime) . "+(86400*(event_cat_ahead))) and
|
||||
event_start < (" . intval($this->startTime) . "+(86400*(event_cat_ahead+1))) and
|
||||
find_in_set(event_cat_notify,'1,3,5,7')";
|
||||
|
||||
$this->sendMailshot($cal_args, 'Advance',1, $calendar_shortcodes);
|
||||
|
||||
|
||||
$insertString = 'event_cat_today < '.intval($this->startTime).' and';
|
||||
if ($this->debugLevel > 0) $insertString = ''; // Allows us to so a mailshot every call of cron tick
|
||||
|
||||
// then for today
|
||||
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
|
||||
{$insertString} event_start >= (" . intval($this->startTime) . ") and
|
||||
event_start < (86400+" . intval($this->startTime) . ") and
|
||||
find_in_set(event_cat_notify,'2,3,6,7')";
|
||||
|
||||
$this->sendMailshot($cal_args, 'today',2, $calendar_shortcodes);
|
||||
|
||||
|
||||
// Finally do 'day before' emails (its an alternative to 'today' emails)
|
||||
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
|
||||
{$insertString} event_start >= (" . intval($this->startTime) ." + 86400 ) and
|
||||
event_start < (" . intval($this->startTime) ." + 172800) and
|
||||
find_in_set(event_cat_notify,'4,5,6,7')";
|
||||
|
||||
$this->sendMailshot($cal_args, 'tomorrow',2, $calendar_shortcodes);
|
||||
|
||||
|
||||
$this->logLine(' .. Run completed',TRUE, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// Function called to load in default templates (messages) if required - only accesses database once
|
||||
function loadDefaultMessages()
|
||||
{
|
||||
if (($this->defaultMessage[1] != '') && ($this->defaultMessage[2] != '')) return;
|
||||
$this->checkDB();
|
||||
if ($this->ourDB->db_Select('event_cat', 'event_cat_msg1,event_cat_msg2', "event_cat_name = '".EC_DEFAULT_CATEGORY."' "))
|
||||
{
|
||||
if ($row = $this->ourDB->db_Fetch())
|
||||
{
|
||||
$this->defaultMessage[1] = $row['event_cat_msg1'];
|
||||
$this->defaultMessage[2] = $row['event_cat_msg2'];
|
||||
}
|
||||
}
|
||||
// Put in generic message rather than nothing - will help flag omission
|
||||
if ($this->defaultMessage[1] == '') $this->defaultMessage[1] = EC_LAN_146;
|
||||
if ($this->defaultMessage[2] == '') $this->defaultMessage[2] = EC_LAN_147;
|
||||
}
|
||||
|
||||
|
||||
private function checkMailManager()
|
||||
{
|
||||
if ($this->mailManager == NULL)
|
||||
{
|
||||
require_once(e_HANDLER .'mail_manager_class.php');
|
||||
$this->mailManager = new e107MailManager();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Function to actually send a mailshot
|
||||
*/
|
||||
function sendMailshot($cal_query, $shot_type, $msg_num, $calendar_shortcodes)
|
||||
{
|
||||
global $pref;
|
||||
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Starting emails for '.$shot_type, FALSE, TRUE);
|
||||
if ($this->debugLevel >= 2) $this->logLine("\r\n Query is: ".$cal_query);
|
||||
}
|
||||
|
||||
if ($num_cat_proc = $this->e107->sql->db_Select_gen($cal_query))
|
||||
{ // Got at least one event to process here
|
||||
if ($this->logRequirement > 1)
|
||||
$this->logLine(' - '.$num_cat_proc.' categories found to process');
|
||||
|
||||
$this->checkDB(); // Make sure we've got another DB object
|
||||
while ($thisevent = $this->e107->sql->db_Fetch())
|
||||
{ // Process one event at a time
|
||||
|
||||
$this->logLine(' Processing event: '.$event_title);
|
||||
setScVar('event_calendar_shortcodes', 'event', $thisevent); // Save current values in shortcode
|
||||
|
||||
// Note that event processed, and generate the email
|
||||
if ($msg_num == 1)
|
||||
{
|
||||
$this->ourDB->db_Update('event_cat', 'event_cat_last='.time().' where event_cat_id='.intval($event_cat_id));
|
||||
$cal_msg = $thisevent['event_cat_msg1'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ourDB->db_Update('event_cat', 'event_cat_today='.time().' where event_cat_id='.intval($event_cat_id));
|
||||
$cal_msg = $thisevent['event_cat_msg2'];
|
||||
}
|
||||
|
||||
if (trim($cal_msg) == '')
|
||||
{
|
||||
$this->loadDefaultMessages();
|
||||
$cal_msg = $this->defaultMessage[$msg_num];
|
||||
}
|
||||
|
||||
|
||||
// Parsing the template here means we can't use USER-related shortcodes
|
||||
// Main ones which are relevant: MAIL_DATE_START, MAIL_TIME_START, MAIL_DATE_END,
|
||||
// MAIL_TIME_END, MAIL_TITLE, MAIL_DETAILS, MAIL_CATEGORY, MAIL_LOCATION,
|
||||
// MAIL_CONTACT, MAIL_THREAD (maybe). Also MAIL_LINK, MAIL_SHORT_DATE
|
||||
// Best to strip entities here rather than at entry - handles old events as well
|
||||
// Note that certain user-related substitutions will work, however - |USERID|, |USERNAME|, |DISPLAYNAME|
|
||||
$cal_title = html_entity_decode($this->e107->tp->parseTemplate($pref['eventpost_mailsubject'], TRUE),ENT_QUOTES,CHARSET);
|
||||
$cal_msg = html_entity_decode($this->e107->tp->parseTemplate($cal_msg, TRUE),ENT_QUOTES,CHARSET);
|
||||
|
||||
// Four cases for the query:
|
||||
// 1. No forced mailshots - based on event_subs table only Need INNER JOIN
|
||||
// 2. Forced mailshot to members - send to all users (don't care about subscriptions) Don't need JOIN
|
||||
// 3. Forced mailshot to group of members - based on user table only Don't need JOIN
|
||||
// 4. Forced mailshot to group, plus optional subscriptions - use the lot! Need LEFT JOIN
|
||||
// (Always block sent to banned members)
|
||||
$manual_subs = (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1'));
|
||||
$subs_fields = '';
|
||||
$subs_join = '';
|
||||
$whereClause = '';
|
||||
$group_clause = '';
|
||||
|
||||
if ($event_cat_force_class != e_UC_MEMBER)
|
||||
{ // Cases 1, 3, 4 (basic query does for case 2)
|
||||
if ((!$thisevent['event_cat_force_class']) || ($manual_subs))
|
||||
{ // Cases 1 & 4 - need to join with event_subs database
|
||||
$subs_fields = ", es.* ";
|
||||
if ($thisevent['event_cat_force_class']) $subs_join = 'LEFT'; else $subs_join = 'INNER';
|
||||
$subs_join .= ' join `#event_subs` AS es on u.`user_id`=es.`event_userid` ';
|
||||
$whereClause = ' es.`event_cat`='.intval($thisevent['event_category']).' ';
|
||||
$group_clause = ' GROUP BY u.`user_id`';
|
||||
}
|
||||
|
||||
if ($event_cat_force_class)
|
||||
{ // cases 3 and 4 - ... and check for involuntary subscribers
|
||||
if ($whereClause) $whereClause .= ' OR ';
|
||||
if ($thisevent['event_cat_force_class'] == e_UC_ADMIN)
|
||||
{
|
||||
$whereClause .= '(u.`user_admin` = 1 )';
|
||||
}
|
||||
else
|
||||
{
|
||||
$whereClause .= "find_in_set('".intval($thisevent['event_cat_force_class'])."', u.`user_class`)";
|
||||
$group_clause = ' GROUP BY u.`user_id`';
|
||||
}
|
||||
}
|
||||
|
||||
if ($whereClause) $whereClause = ' AND ('.$whereClause.' ) ';
|
||||
} // End of cases 1, 3, 4
|
||||
|
||||
$cal_emilargs = "SELECT u.`user_id`, u.`user_class`, u.`user_email`, u.`user_name`, u.`user_ban`, u.`user_admin`{$subs_fields}
|
||||
from `#user` AS u {$subs_join}
|
||||
WHERE u.`user_ban` = 0 {$whereClause} {$group_clause}";
|
||||
|
||||
|
||||
if ($this->debugLevel >= 2)
|
||||
{
|
||||
$this->logLine("\r\n Email selection query is: ".$cal_emilargs);
|
||||
}
|
||||
if ($num_shots = $this->ourDB->db_Select_gen($cal_emilargs))
|
||||
{
|
||||
$this->logLine(' - '.$num_shots.' emails found to send');
|
||||
|
||||
// Definitely got some emails to send here
|
||||
$this->checkMailManager(); // Make sure our mail manager is loaded
|
||||
|
||||
// Start by adding the email details
|
||||
$email = array(
|
||||
'mail_create_app' => 'calendar_menu',
|
||||
'mail_title' => str_replace('--REF--', intval(time()/3600), LAN_EC_MAIL_07),
|
||||
'mail_subject' => $cal_title,
|
||||
'mail_body' => $cal_msg,
|
||||
'mail_sender_email' => $pref['eventpost_mailaddress'],
|
||||
'mail_sender_name' => $pref['eventpost_mailfrom'],
|
||||
'mail_send_style' => 'textonly'
|
||||
);
|
||||
if (FALSE === ($mailMainID = $this->mailManager->saveEmail($email, TRUE)))
|
||||
{
|
||||
$this->logLine('Error adding mail body to database - run abandoned');
|
||||
break;
|
||||
}
|
||||
$this->mailManager->mailInitCounters($mailMainID); // Initialise counters for emails added
|
||||
|
||||
|
||||
// Now loop through adding users
|
||||
while ($row = $this->ourDB->db_Fetch())
|
||||
{
|
||||
if ($this->debugLevel == 0)
|
||||
{
|
||||
$recipient = array(
|
||||
'mail_recipient_id' => $row['user_id'],
|
||||
'mail_recipient_name' => $row['user_name'],
|
||||
'mail_recipient_email' => $row['user_email'],
|
||||
'mail_target_info' => array( // Adding this info means it could be substituted
|
||||
'USERID' => $row['user_id'],
|
||||
'DISPLAYNAME' => $row['user_name'],
|
||||
'USERNAME' => $row['user_loginname']
|
||||
)
|
||||
);
|
||||
$result = $this->mailManager->mailAddNoDup($mailMainID, $recipient, MAIL_STATUS_TEMP);
|
||||
if ($result === FALSE)
|
||||
{
|
||||
$this->logLine("Error adding recipient {$row['user_id']}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$send_result = " **DEBUG**";
|
||||
}
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Send to '.$user_id.':'.$user_email.' Name: '.$user_name.' Result = '.$send_result);
|
||||
}
|
||||
}
|
||||
$this->mailManager->mailUpdateCounters($mailMainID); // Save counters to DB
|
||||
if ($this->mailManager->activateEmail($mailMainID, FALSE, time() + 80000) === TRUE)
|
||||
{
|
||||
$this->logLine("Email {$mailMainID} activated");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->logLine("Error activating email {$mailMainID}");
|
||||
}
|
||||
}
|
||||
elseif ($num_cat === FALSE)
|
||||
{
|
||||
$this->logLine(' User read error for '.$shot_type.': '.$this->ourDB->$mySQLlastErrNum.':'.$this->ourDB->$mySQLlastErrText);
|
||||
}
|
||||
elseif ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' - no users found.');
|
||||
}
|
||||
} // while
|
||||
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Completed emails for '.$shot_type.' at '.date('D j M Y G:i:s'));
|
||||
}
|
||||
}
|
||||
elseif ($num_cat === FALSE)
|
||||
{
|
||||
$this->logLine(' DB read error for '.$shot_type.': '.$this->e107->sql->$mySQLlastErrNum.':'.$this->e107->sql->$mySQLlastErrText);
|
||||
}
|
||||
elseif ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' - no records found.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2001-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - cron task
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - cron task
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
include_lan(e_PLUGIN.'/calendar_menu/languages/English_mailer.php');
|
||||
|
||||
class calendar_menu_cron // include plugin-folder in the name.
|
||||
{
|
||||
private $logRequirement = 0; // Flag to determine logging level
|
||||
private $debugLevel = 0; // Used for internal debugging
|
||||
private $logHandle = NULL;
|
||||
private $ecalClass; // Calendar library routines
|
||||
private $e107;
|
||||
private $defaultMessage = array(); // Used where nothing special defined
|
||||
private $startTime; // Start date for processing
|
||||
private $mailManager;
|
||||
private $ourDB; // Used for some things
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
//$this->debugLevel = 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Cron configuration
|
||||
*
|
||||
* Defines one or more cron tasks to be performed
|
||||
*
|
||||
* @return array of task arrays
|
||||
*/
|
||||
public function config()
|
||||
{
|
||||
$cron = array();
|
||||
$cron[] = array('name' => LAN_EC_MAIL_04, 'category' => 'plugin', 'function' => 'processSubs', 'description' => LAN_EC_MAIL_05);
|
||||
return $cron;
|
||||
}
|
||||
|
||||
|
||||
private function checkDB()
|
||||
{
|
||||
if ($this->ourDB == NULL)
|
||||
{
|
||||
$this->ourDB = new db;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logging routine - writes lines to a text file
|
||||
*
|
||||
* Auto-opens log file (if necessary) on first call
|
||||
*
|
||||
* @param string $logText - body of text to write
|
||||
* @param boolean $closeAfter - if TRUE, log file closed before exit; otherwise left open
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
function logLine($logText, $closeAfter = FALSE, $addTimeDate = FALSE)
|
||||
{
|
||||
if ($this->logRequirement == 0) return;
|
||||
|
||||
$logFilename = e_LOG.'calendar_mail.txt';
|
||||
if ($this->logHandle == NULL)
|
||||
{
|
||||
if (!($this->logHandle = fopen($logFilename, "a")))
|
||||
{ // Problem creating file?
|
||||
echo "File open failed!<br />";
|
||||
$this->logRequirement = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (fwrite($this->logHandle,($addTimeDate ? date('D j M Y G:i:s').': ' : '').$logText."\r\n") == FALSE)
|
||||
{
|
||||
$this->logRequirement = 0;
|
||||
echo 'File write failed!<br />';
|
||||
}
|
||||
|
||||
if ($closeAfter)
|
||||
{
|
||||
fclose($this->logHandle);
|
||||
$this->logHandle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called to process the calendar menu subscriptions list - the cron task must be set to call us once/day (typically at about 0100)
|
||||
*
|
||||
* Emails are added to the queue.
|
||||
* Various events are logged in a text file
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
public function processSubs()
|
||||
{
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$this->ecalClass = new ecal_class;
|
||||
|
||||
e107::getScParser();
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
if (is_readable(THEME.'ec_mailout_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'ec_mailout_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require(e_PLUGIN.'calendar_menu/ec_mailout_template.php');
|
||||
}
|
||||
|
||||
|
||||
$this->startTime = mktime(0, 0, 0, date('n'), date('d'), date('Y')); // Date for start processing
|
||||
setScVar('event_calendar_shortcodes', 'ecalClass', &$this->ecalClass); // Give shortcode a pointer to calendar class
|
||||
|
||||
|
||||
$this->logRequirement = varset($this->ecal_class->pref['eventpost_emaillog'], 0);
|
||||
if ($this->debugLevel >= 2) $this->logRequirement = 2; // Force full logging if debug
|
||||
|
||||
|
||||
// Start of the 'real' code
|
||||
$this->logLine("\r\n\r\n".LAN_EC_MAIL_06.date('D j M Y G:i:s'));
|
||||
|
||||
|
||||
// Start with the 'in advance' emails
|
||||
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
|
||||
event_cat_last < " . intval($this->startTime) . " and
|
||||
event_cat_ahead > 0 and
|
||||
event_start >= (" . intval($this->startTime) . "+(86400*(event_cat_ahead))) and
|
||||
event_start < (" . intval($this->startTime) . "+(86400*(event_cat_ahead+1))) and
|
||||
find_in_set(event_cat_notify,'1,3,5,7')";
|
||||
|
||||
$this->sendMailshot($cal_args, 'Advance',1, $calendar_shortcodes);
|
||||
|
||||
|
||||
$insertString = 'event_cat_today < '.intval($this->startTime).' and';
|
||||
if ($this->debugLevel > 0) $insertString = ''; // Allows us to so a mailshot every call of cron tick
|
||||
|
||||
// then for today
|
||||
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
|
||||
{$insertString} event_start >= (" . intval($this->startTime) . ") and
|
||||
event_start < (86400+" . intval($this->startTime) . ") and
|
||||
find_in_set(event_cat_notify,'2,3,6,7')";
|
||||
|
||||
$this->sendMailshot($cal_args, 'today',2, $calendar_shortcodes);
|
||||
|
||||
|
||||
// Finally do 'day before' emails (its an alternative to 'today' emails)
|
||||
$cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and
|
||||
{$insertString} event_start >= (" . intval($this->startTime) ." + 86400 ) and
|
||||
event_start < (" . intval($this->startTime) ." + 172800) and
|
||||
find_in_set(event_cat_notify,'4,5,6,7')";
|
||||
|
||||
$this->sendMailshot($cal_args, 'tomorrow',2, $calendar_shortcodes);
|
||||
|
||||
|
||||
$this->logLine(' .. Run completed',TRUE, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// Function called to load in default templates (messages) if required - only accesses database once
|
||||
function loadDefaultMessages()
|
||||
{
|
||||
if (($this->defaultMessage[1] != '') && ($this->defaultMessage[2] != '')) return;
|
||||
$this->checkDB();
|
||||
if ($this->ourDB->db_Select('event_cat', 'event_cat_msg1,event_cat_msg2', "event_cat_name = '".EC_DEFAULT_CATEGORY."' "))
|
||||
{
|
||||
if ($row = $this->ourDB->db_Fetch())
|
||||
{
|
||||
$this->defaultMessage[1] = $row['event_cat_msg1'];
|
||||
$this->defaultMessage[2] = $row['event_cat_msg2'];
|
||||
}
|
||||
}
|
||||
// Put in generic message rather than nothing - will help flag omission
|
||||
if ($this->defaultMessage[1] == '') $this->defaultMessage[1] = EC_LAN_146;
|
||||
if ($this->defaultMessage[2] == '') $this->defaultMessage[2] = EC_LAN_147;
|
||||
}
|
||||
|
||||
|
||||
private function checkMailManager()
|
||||
{
|
||||
if ($this->mailManager == NULL)
|
||||
{
|
||||
require_once(e_HANDLER .'mail_manager_class.php');
|
||||
$this->mailManager = new e107MailManager();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Function to actually send a mailshot
|
||||
*/
|
||||
function sendMailshot($cal_query, $shot_type, $msg_num, $calendar_shortcodes)
|
||||
{
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Starting emails for '.$shot_type, FALSE, TRUE);
|
||||
if ($this->debugLevel >= 2) $this->logLine("\r\n Query is: ".$cal_query);
|
||||
}
|
||||
|
||||
if ($num_cat_proc = $this->e107->sql->db_Select_gen($cal_query))
|
||||
{ // Got at least one event to process here
|
||||
if ($this->logRequirement > 1)
|
||||
$this->logLine(' - '.$num_cat_proc.' categories found to process');
|
||||
|
||||
$this->checkDB(); // Make sure we've got another DB object
|
||||
while ($thisevent = $this->e107->sql->db_Fetch())
|
||||
{ // Process one event at a time
|
||||
|
||||
$this->logLine(' Processing event: '.$event_title);
|
||||
setScVar('event_calendar_shortcodes', 'event', $thisevent); // Save current values in shortcode
|
||||
|
||||
// Note that event processed, and generate the email
|
||||
if ($msg_num == 1)
|
||||
{
|
||||
$this->ourDB->db_Update('event_cat', 'event_cat_last='.time().' where event_cat_id='.intval($event_cat_id));
|
||||
$cal_msg = $thisevent['event_cat_msg1'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ourDB->db_Update('event_cat', 'event_cat_today='.time().' where event_cat_id='.intval($event_cat_id));
|
||||
$cal_msg = $thisevent['event_cat_msg2'];
|
||||
}
|
||||
|
||||
if (trim($cal_msg) == '')
|
||||
{
|
||||
$this->loadDefaultMessages();
|
||||
$cal_msg = $this->defaultMessage[$msg_num];
|
||||
}
|
||||
|
||||
|
||||
// Parsing the template here means we can't use USER-related shortcodes
|
||||
// Main ones which are relevant: MAIL_DATE_START, MAIL_TIME_START, MAIL_DATE_END,
|
||||
// MAIL_TIME_END, MAIL_TITLE, MAIL_DETAILS, MAIL_CATEGORY, MAIL_LOCATION,
|
||||
// MAIL_CONTACT, MAIL_THREAD (maybe). Also MAIL_LINK, MAIL_SHORT_DATE
|
||||
// Best to strip entities here rather than at entry - handles old events as well
|
||||
// Note that certain user-related substitutions will work, however - |USERID|, |USERNAME|, |DISPLAYNAME|
|
||||
$cal_title = html_entity_decode($this->e107->tp->parseTemplate($this->ecal_class->pref['eventpost_mailsubject'], TRUE),ENT_QUOTES,CHARSET);
|
||||
$cal_msg = html_entity_decode($this->e107->tp->parseTemplate($cal_msg, TRUE),ENT_QUOTES,CHARSET);
|
||||
|
||||
// Four cases for the query:
|
||||
// 1. No forced mailshots - based on event_subs table only Need INNER JOIN
|
||||
// 2. Forced mailshot to members - send to all users (don't care about subscriptions) Don't need JOIN
|
||||
// 3. Forced mailshot to group of members - based on user table only Don't need JOIN
|
||||
// 4. Forced mailshot to group, plus optional subscriptions - use the lot! Need LEFT JOIN
|
||||
// (Always block sent to banned members)
|
||||
$manual_subs = (isset($this->ecal_class->pref['eventpost_asubs']) && ($this->ecal_class->pref['eventpost_asubs'] == '1'));
|
||||
$subs_fields = '';
|
||||
$subs_join = '';
|
||||
$whereClause = '';
|
||||
$group_clause = '';
|
||||
|
||||
if ($event_cat_force_class != e_UC_MEMBER)
|
||||
{ // Cases 1, 3, 4 (basic query does for case 2)
|
||||
if ((!$thisevent['event_cat_force_class']) || ($manual_subs))
|
||||
{ // Cases 1 & 4 - need to join with event_subs database
|
||||
$subs_fields = ", es.* ";
|
||||
if ($thisevent['event_cat_force_class']) $subs_join = 'LEFT'; else $subs_join = 'INNER';
|
||||
$subs_join .= ' join `#event_subs` AS es on u.`user_id`=es.`event_userid` ';
|
||||
$whereClause = ' es.`event_cat`='.intval($thisevent['event_category']).' ';
|
||||
$group_clause = ' GROUP BY u.`user_id`';
|
||||
}
|
||||
|
||||
if ($event_cat_force_class)
|
||||
{ // cases 3 and 4 - ... and check for involuntary subscribers
|
||||
if ($whereClause) $whereClause .= ' OR ';
|
||||
if ($thisevent['event_cat_force_class'] == e_UC_ADMIN)
|
||||
{
|
||||
$whereClause .= '(u.`user_admin` = 1 )';
|
||||
}
|
||||
else
|
||||
{
|
||||
$whereClause .= "find_in_set('".intval($thisevent['event_cat_force_class'])."', u.`user_class`)";
|
||||
$group_clause = ' GROUP BY u.`user_id`';
|
||||
}
|
||||
}
|
||||
|
||||
if ($whereClause) $whereClause = ' AND ('.$whereClause.' ) ';
|
||||
} // End of cases 1, 3, 4
|
||||
|
||||
$cal_emilargs = "SELECT u.`user_id`, u.`user_class`, u.`user_email`, u.`user_name`, u.`user_ban`, u.`user_admin`{$subs_fields}
|
||||
from `#user` AS u {$subs_join}
|
||||
WHERE u.`user_ban` = 0 {$whereClause} {$group_clause}";
|
||||
|
||||
|
||||
if ($this->debugLevel >= 2)
|
||||
{
|
||||
$this->logLine("\r\n Email selection query is: ".$cal_emilargs);
|
||||
}
|
||||
if ($num_shots = $this->ourDB->db_Select_gen($cal_emilargs))
|
||||
{
|
||||
$this->logLine(' - '.$num_shots.' emails found to send');
|
||||
|
||||
// Definitely got some emails to send here
|
||||
$this->checkMailManager(); // Make sure our mail manager is loaded
|
||||
|
||||
// Start by adding the email details
|
||||
$email = array(
|
||||
'mail_create_app' => 'calendar_menu',
|
||||
'mail_title' => str_replace('--REF--', intval(time()/3600), LAN_EC_MAIL_07),
|
||||
'mail_subject' => $cal_title,
|
||||
'mail_body' => $cal_msg,
|
||||
'mail_sender_email' => $this->ecal_class->pref['eventpost_mailaddress'],
|
||||
'mail_sender_name' => $this->ecal_class->pref['eventpost_mailfrom'],
|
||||
'mail_send_style' => 'textonly'
|
||||
);
|
||||
if (FALSE === ($mailMainID = $this->mailManager->saveEmail($email, TRUE)))
|
||||
{
|
||||
$this->logLine('Error adding mail body to database - run abandoned');
|
||||
break;
|
||||
}
|
||||
$this->mailManager->mailInitCounters($mailMainID); // Initialise counters for emails added
|
||||
|
||||
|
||||
// Now loop through adding users
|
||||
while ($row = $this->ourDB->db_Fetch())
|
||||
{
|
||||
if ($this->debugLevel == 0)
|
||||
{
|
||||
$recipient = array(
|
||||
'mail_recipient_id' => $row['user_id'],
|
||||
'mail_recipient_name' => $row['user_name'],
|
||||
'mail_recipient_email' => $row['user_email'],
|
||||
'mail_target_info' => array( // Adding this info means it could be substituted
|
||||
'USERID' => $row['user_id'],
|
||||
'DISPLAYNAME' => $row['user_name'],
|
||||
'USERNAME' => $row['user_loginname']
|
||||
)
|
||||
);
|
||||
$result = $this->mailManager->mailAddNoDup($mailMainID, $recipient, MAIL_STATUS_TEMP);
|
||||
if ($result === FALSE)
|
||||
{
|
||||
$this->logLine("Error adding recipient {$row['user_id']}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$send_result = " **DEBUG**";
|
||||
}
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Send to '.$user_id.':'.$user_email.' Name: '.$user_name.' Result = '.$send_result);
|
||||
}
|
||||
}
|
||||
$this->mailManager->mailUpdateCounters($mailMainID); // Save counters to DB
|
||||
if ($this->mailManager->activateEmail($mailMainID, FALSE, time() + 80000) === TRUE)
|
||||
{
|
||||
$this->logLine("Email {$mailMainID} activated");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->logLine("Error activating email {$mailMainID}");
|
||||
}
|
||||
}
|
||||
elseif ($num_cat === FALSE)
|
||||
{
|
||||
$this->logLine(' User read error for '.$shot_type.': '.$this->ourDB->$mySQLlastErrNum.':'.$this->ourDB->$mySQLlastErrText);
|
||||
}
|
||||
elseif ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' - no users found.');
|
||||
}
|
||||
} // while
|
||||
|
||||
if ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' Completed emails for '.$shot_type.' at '.date('D j M Y G:i:s'));
|
||||
}
|
||||
}
|
||||
elseif ($num_cat === FALSE)
|
||||
{
|
||||
$this->logLine(' DB read error for '.$shot_type.': '.$this->e107->sql->$mySQLlastErrNum.':'.$this->e107->sql->$mySQLlastErrText);
|
||||
}
|
||||
elseif ($this->logRequirement > 1)
|
||||
{
|
||||
$this->logLine(' - no records found.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -1,37 +1,39 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - Front page
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_frontpage.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php');
|
||||
|
||||
$front_page['calendar'] = array(
|
||||
'title' => EC_ADLAN_1,
|
||||
'page' => array(
|
||||
array('page' => e_PLUGIN_ABS.'calendar_menu/calendar.php', 'title' => EC_ADLAN_A09 ),
|
||||
array('page' => e_PLUGIN_ABS.'calendar_menu/event.php', 'title' => EC_LAN_163 ))
|
||||
);
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - Front page
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_frontpage.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - Front page
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php');
|
||||
|
||||
$front_page['calendar'] = array(
|
||||
'title' => EC_ADLAN_1,
|
||||
'page' => array(
|
||||
array('page' => e_PLUGIN_ABS.'calendar_menu/calendar.php', 'title' => EC_ADLAN_A09 ),
|
||||
array('page' => e_PLUGIN_ABS.'calendar_menu/event.php', 'title' => EC_LAN_163 ))
|
||||
);
|
||||
|
||||
?>
|
@@ -1,110 +1,112 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Calendar e_list Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_list.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class list_calendar_menu
|
||||
{
|
||||
function list_calendar_menu($parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
function getListData()
|
||||
{
|
||||
$list_caption = $this->parent->settings['caption'];
|
||||
$list_display = ($this->parent->settings['open'] ? "" : "none");
|
||||
|
||||
require_once('ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
$current_day = $ecal_class->cal_date['mday'];
|
||||
$current_month = $ecal_class->cal_date['mon'];
|
||||
$current_year = $ecal_class->cal_date['year'];
|
||||
|
||||
$current = mktime(0,0,0,$current_month, $current_day, $current_year);
|
||||
|
||||
if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" )
|
||||
{
|
||||
$lvisit = $this->parent->getlvisit();
|
||||
$qry = " event_datestamp>".intval($lvisit)." AND ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = "";
|
||||
}
|
||||
|
||||
$bullet = $this->parent->getBullet($this->parent->settings['icon']);
|
||||
|
||||
$qry = "
|
||||
SELECT e.*, c.event_cat_name
|
||||
FROM #event AS e
|
||||
LEFT JOIN #event_cat AS c ON c.event_cat_id = e.event_category
|
||||
WHERE ".$qry." e.event_start>='$current' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."'
|
||||
ORDER BY e.event_start ASC LIMIT 0,".intval($this->parent->settings['amount']);
|
||||
|
||||
if(!$event_items = $this->parent->e107->sql->db_Select_gen($qry))
|
||||
{
|
||||
$list_data = LIST_CALENDAR_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
while($row = $this->parent->e107->sql->db_Fetch())
|
||||
{
|
||||
$record = array();
|
||||
$tmp = explode(".", $row['event_author']);
|
||||
if($tmp[0] == "0")
|
||||
{
|
||||
$record['author'] = $tmp[1];
|
||||
}
|
||||
elseif(is_numeric($tmp[0]) && $tmp[0] != "0")
|
||||
{
|
||||
$record['author'] = (USER ? "<a href='".e_BASE."user.php?id.".$tmp[0]."'>".$tmp[1]."</a>" : $tmp[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$record['author'] = "";
|
||||
}
|
||||
|
||||
$rowheading = $this->parent->parse_heading($row['event_title']);
|
||||
$record['icon'] = $bullet;
|
||||
$record['heading'] = "<a href='".e_PLUGIN."calendar_menu/event.php?".$row['event_start'].".event.".$row['event_id']."'>".$rowheading."</a>";
|
||||
$record['category'] = $row['event_cat_name'];
|
||||
$record['date'] = ($this->parent->settings['date'] ? ($row['event_start'] ? $this->parent->getListDate($row['event_start']) : "") : "");
|
||||
$record['info'] = '';
|
||||
|
||||
$list_data[] = $record;
|
||||
}
|
||||
}
|
||||
//return array with 'records', (global)'caption', 'display'
|
||||
return array(
|
||||
'records'=>$list_data,
|
||||
'caption'=>$list_caption,
|
||||
'display'=>$list_display
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Calendar e_list Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_list.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Calendar e_list Handler
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class list_calendar_menu
|
||||
{
|
||||
function list_calendar_menu($parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
function getListData()
|
||||
{
|
||||
$list_caption = $this->parent->settings['caption'];
|
||||
$list_display = ($this->parent->settings['open'] ? "" : "none");
|
||||
|
||||
require_once('ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
$current_day = $ecal_class->cal_date['mday'];
|
||||
$current_month = $ecal_class->cal_date['mon'];
|
||||
$current_year = $ecal_class->cal_date['year'];
|
||||
|
||||
$current = mktime(0,0,0,$current_month, $current_day, $current_year);
|
||||
|
||||
if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" )
|
||||
{
|
||||
$lvisit = $this->parent->getlvisit();
|
||||
$qry = " event_datestamp>".intval($lvisit)." AND ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = "";
|
||||
}
|
||||
|
||||
$bullet = $this->parent->getBullet($this->parent->settings['icon']);
|
||||
|
||||
$qry = "
|
||||
SELECT e.*, c.event_cat_name
|
||||
FROM #event AS e
|
||||
LEFT JOIN #event_cat AS c ON c.event_cat_id = e.event_category
|
||||
WHERE ".$qry." e.event_start>='$current' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."'
|
||||
ORDER BY e.event_start ASC LIMIT 0,".intval($this->parent->settings['amount']);
|
||||
|
||||
if(!$event_items = $this->parent->e107->sql->db_Select_gen($qry))
|
||||
{
|
||||
$list_data = LIST_CALENDAR_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
while($row = $this->parent->e107->sql->db_Fetch())
|
||||
{
|
||||
$record = array();
|
||||
$tmp = explode(".", $row['event_author']);
|
||||
if($tmp[0] == "0")
|
||||
{
|
||||
$record['author'] = $tmp[1];
|
||||
}
|
||||
elseif(is_numeric($tmp[0]) && $tmp[0] != "0")
|
||||
{
|
||||
$record['author'] = (USER ? "<a href='".e_BASE."user.php?id.".$tmp[0]."'>".$tmp[1]."</a>" : $tmp[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$record['author'] = "";
|
||||
}
|
||||
|
||||
$rowheading = $this->parent->parse_heading($row['event_title']);
|
||||
$record['icon'] = $bullet;
|
||||
$record['heading'] = "<a href='".e_PLUGIN."calendar_menu/event.php?".$row['event_start'].".event.".$row['event_id']."'>".$rowheading."</a>";
|
||||
$record['category'] = $row['event_cat_name'];
|
||||
$record['date'] = ($this->parent->settings['date'] ? ($row['event_start'] ? $this->parent->getListDate($row['event_start']) : "") : "");
|
||||
$record['info'] = '';
|
||||
|
||||
$list_data[] = $record;
|
||||
}
|
||||
}
|
||||
//return array with 'records', (global)'caption', 'display'
|
||||
return array(
|
||||
'records'=>$list_data,
|
||||
'caption'=>$list_caption,
|
||||
'display'=>$list_display
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -1,208 +1,210 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2010 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - mailout function
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_mailout.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
|
||||
|
||||
include_lan(e_PLUGIN.'/calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
|
||||
|
||||
/*
|
||||
Class for event calendar mailout function
|
||||
|
||||
Allows admins to send mail to those subscribed to calendar events
|
||||
*/
|
||||
// These variables determine the circumstances under which this class is loaded (only used during loading, and may be overwritten later)
|
||||
$mailerIncludeWithDefault = TRUE; // Mandatory - if false, show only when mailout for this specific plugin is enabled
|
||||
$mailerExcludeDefault = FALSE; // Mandatory - if TRUE, when this plugin's mailout is active, the default (core) isn't loaded
|
||||
|
||||
class calendar_menu_mailout
|
||||
{
|
||||
protected $mailCount = 0;
|
||||
protected $mailRead = 0;
|
||||
//public $mailerSource = 'calendar_menu'; //FIXME should be auto-detected // Plugin name (core mailer is special case) Must be directory for this file
|
||||
public $mailerName = LAN_EC_MAIL_01; // Text to identify the source of selector (displayed on left of admin page)
|
||||
public $mailerEnabled = TRUE; // Mandatory - set to FALSE to disable this plugin (e.g. due to permissions restrictions)
|
||||
private $selectorActive = FALSE; // Set TRUE if we've got a valid selector to start returning entries
|
||||
|
||||
|
||||
// Constructor
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return data representing the user's selection criteria as entered in the $_POST array.
|
||||
*
|
||||
* This is stored in the DB with a saved email. (Just return an empty string or array if this is undesirable)
|
||||
* The returned value is passed back to selectInit() and showSelect when needed.
|
||||
*
|
||||
* @return string Selection data - comma-separated list of category IDs
|
||||
*/
|
||||
public function returnSelectors()
|
||||
{
|
||||
$res = array();
|
||||
if (is_array($_POST['ec_category_sel']))
|
||||
{
|
||||
foreach ($_POST['ec_category_sel'] as $k => $v)
|
||||
{
|
||||
$res[] = intval($v);
|
||||
}
|
||||
}
|
||||
return implode(',',$res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called to initialise data selection routine.
|
||||
* Needs to save any queries or other information into internal variables, do initial DB queries as appropriate.
|
||||
* Could in principle read all addresses and buffer them for later routines, if this is more convenient
|
||||
*
|
||||
* @param string $selectVals - array of selection criteria as returned by returnSelectors()
|
||||
*
|
||||
* @return integer Return number of records available (or 1 if unknown) on success, FALSE on failure
|
||||
*/
|
||||
public function selectInit($selectVals = FALSE)
|
||||
{
|
||||
|
||||
$sql = e107::getDb();
|
||||
|
||||
if (($selectVals === FALSE) || ($selectVals == ''))
|
||||
{
|
||||
return 0; // No valid selector - so no valid records
|
||||
}
|
||||
|
||||
$where = array();
|
||||
$qry = 'SELECT u.user_id, u.user_name, u.user_email, u.user_loginname, u.user_sess, u.user_lastvisit FROM `#event_subs` AS es';
|
||||
$qry .= ' LEFT JOIN `#user` AS u ON es.`event_subid` = u.`user_id` WHERE es.`event_cat` IN (\''.$selectVals.'\') AND u.`user_id` IS NOT NULL';
|
||||
$qry .= ' GROUP BY u.`user_id`';
|
||||
// echo "Selector query: ".$qry.'<br />';
|
||||
if (!( $this->mail_count = $sql->db_Select_gen($qry))) return FALSE;
|
||||
$this->selectorActive = TRUE;
|
||||
$this->mail_read = 0;
|
||||
return $this->mail_count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return an email address to add to the recipients list. Return FALSE if no more addresses to add
|
||||
*
|
||||
* @return array|boolean FALSE if no more addresses available; else an array:
|
||||
* 'mail_recipient_id' - non-zero if a registered user, zero if a non-registered user. (Always non-zero from this class)
|
||||
* 'mail_recipient_name' - user name
|
||||
* 'mail_recipient_email' - email address to use
|
||||
* 'mail_target_info' - array of info which might be substituted into email, usually using the codes defined by the editor.
|
||||
* Array key is the code within '|...|', value is the string for substitution
|
||||
*/
|
||||
public function selectAdd()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
if (!$this->selectorActive) return FALSE;
|
||||
if (!($row = $sql->db_Fetch(MYSQL_ASSOC))) return FALSE;
|
||||
$ret = array('mail_recipient_id' => $row['user_id'],
|
||||
'mail_recipient_name' => $row['user_name'], // Should this use realname?
|
||||
'mail_recipient_email' => $row['user_email'],
|
||||
'mail_target_info' => array(
|
||||
'USERID' => $row['user_id'],
|
||||
'DISPLAYNAME' => $row['user_name'],
|
||||
'SIGNUP_LINK' => $row['user_sess'],
|
||||
'USERNAME' => $row['user_loginname'],
|
||||
'USERLASTVISIT' => $row['user_lastvisit']
|
||||
)
|
||||
);
|
||||
$this->mail_read++;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called once all email addresses read, to do any housekeeping needed
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
public function select_close()
|
||||
{
|
||||
// Nothing to do here
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called to show current selection criteria, and optionally allow edit
|
||||
*
|
||||
* @param boolean $allow_edit is TRUE to allow user to change the selection; FALSE to just display current settings
|
||||
* @param string $selectVals is the current selection information - in the same format as returned by returnSelectors()
|
||||
*
|
||||
* @return array Returns array which is displayed in a table cell.
|
||||
*/
|
||||
public function showSelect($allow_edit = FALSE, $selectVals = FALSE)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$frm = e107::getForm();
|
||||
$var = array();
|
||||
// $ret = "<table style='width:95%'>";
|
||||
$selects = array_flip(explode(',', $selectVals));
|
||||
|
||||
if ($sql->db_Select('event_cat', 'event_cat_id, event_cat_name', "event_cat_name != 'Default'"))
|
||||
{
|
||||
$c=0;
|
||||
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$checked = (isset($selects[$row['event_cat_id']])) ? " checked='checked'" : '';
|
||||
if ($allow_edit)
|
||||
{
|
||||
$var[$c]['caption'] = $row['event_cat_name'];
|
||||
$var[$c]['html'] = $frm->checkbox('ec_category_sel[]',$row['event_cat_id'],$checked);
|
||||
|
||||
/*$ret .= "<tr><td><input type='checkbox' name='ec_category_sel[]' value='{$row['event_cat_id']}' {$checked}/></td><td>
|
||||
".$row['event_cat_name']."</td></tr>";*/
|
||||
}
|
||||
elseif($checked)
|
||||
{
|
||||
$var[$c]['html'] = $row['event_cat_name'];
|
||||
$var[$c]['caption'] = LAN_EC_MAIL_03;
|
||||
|
||||
/*$ret .= "<tr><td>".LAN_EC_MAIL_03."</td><td>
|
||||
".$row['event_cat_name']."</td></tr>";*/
|
||||
}
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$var[0]['caption'] = LAN_EC_MAIL_02;
|
||||
$var[0]['html'] = '';
|
||||
}
|
||||
|
||||
return $var;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - mailout function
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_mailout.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar - mailout function
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
|
||||
|
||||
include_lan(e_PLUGIN.'/calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
|
||||
|
||||
/*
|
||||
Class for event calendar mailout function
|
||||
|
||||
Allows admins to send mail to those subscribed to calendar events
|
||||
*/
|
||||
// These variables determine the circumstances under which this class is loaded (only used during loading, and may be overwritten later)
|
||||
$mailerIncludeWithDefault = TRUE; // Mandatory - if false, show only when mailout for this specific plugin is enabled
|
||||
$mailerExcludeDefault = FALSE; // Mandatory - if TRUE, when this plugin's mailout is active, the default (core) isn't loaded
|
||||
|
||||
class calendar_menu_mailout
|
||||
{
|
||||
protected $mailCount = 0;
|
||||
protected $mailRead = 0;
|
||||
//public $mailerSource = 'calendar_menu'; //FIXME should be auto-detected // Plugin name (core mailer is special case) Must be directory for this file
|
||||
public $mailerName = LAN_EC_MAIL_01; // Text to identify the source of selector (displayed on left of admin page)
|
||||
public $mailerEnabled = TRUE; // Mandatory - set to FALSE to disable this plugin (e.g. due to permissions restrictions)
|
||||
private $selectorActive = FALSE; // Set TRUE if we've got a valid selector to start returning entries
|
||||
|
||||
|
||||
// Constructor
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return data representing the user's selection criteria as entered in the $_POST array.
|
||||
*
|
||||
* This is stored in the DB with a saved email. (Just return an empty string or array if this is undesirable)
|
||||
* The returned value is passed back to selectInit() and showSelect when needed.
|
||||
*
|
||||
* @return string Selection data - comma-separated list of category IDs
|
||||
*/
|
||||
public function returnSelectors()
|
||||
{
|
||||
$res = array();
|
||||
if (is_array($_POST['ec_category_sel']))
|
||||
{
|
||||
foreach ($_POST['ec_category_sel'] as $k => $v)
|
||||
{
|
||||
$res[] = intval($v);
|
||||
}
|
||||
}
|
||||
return implode(',',$res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called to initialise data selection routine.
|
||||
* Needs to save any queries or other information into internal variables, do initial DB queries as appropriate.
|
||||
* Could in principle read all addresses and buffer them for later routines, if this is more convenient
|
||||
*
|
||||
* @param string $selectVals - array of selection criteria as returned by returnSelectors()
|
||||
*
|
||||
* @return integer Return number of records available (or 1 if unknown) on success, FALSE on failure
|
||||
*/
|
||||
public function selectInit($selectVals = FALSE)
|
||||
{
|
||||
|
||||
$sql = e107::getDb();
|
||||
|
||||
if (($selectVals === FALSE) || ($selectVals == ''))
|
||||
{
|
||||
return 0; // No valid selector - so no valid records
|
||||
}
|
||||
|
||||
$where = array();
|
||||
$qry = 'SELECT u.user_id, u.user_name, u.user_email, u.user_loginname, u.user_sess, u.user_lastvisit FROM `#event_subs` AS es';
|
||||
$qry .= ' LEFT JOIN `#user` AS u ON es.`event_subid` = u.`user_id` WHERE es.`event_cat` IN (\''.$selectVals.'\') AND u.`user_id` IS NOT NULL';
|
||||
$qry .= ' GROUP BY u.`user_id`';
|
||||
// echo "Selector query: ".$qry.'<br />';
|
||||
if (!( $this->mail_count = $sql->db_Select_gen($qry))) return FALSE;
|
||||
$this->selectorActive = TRUE;
|
||||
$this->mail_read = 0;
|
||||
return $this->mail_count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return an email address to add to the recipients list. Return FALSE if no more addresses to add
|
||||
*
|
||||
* @return array|boolean FALSE if no more addresses available; else an array:
|
||||
* 'mail_recipient_id' - non-zero if a registered user, zero if a non-registered user. (Always non-zero from this class)
|
||||
* 'mail_recipient_name' - user name
|
||||
* 'mail_recipient_email' - email address to use
|
||||
* 'mail_target_info' - array of info which might be substituted into email, usually using the codes defined by the editor.
|
||||
* Array key is the code within '|...|', value is the string for substitution
|
||||
*/
|
||||
public function selectAdd()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
if (!$this->selectorActive) return FALSE;
|
||||
if (!($row = $sql->db_Fetch(MYSQL_ASSOC))) return FALSE;
|
||||
$ret = array('mail_recipient_id' => $row['user_id'],
|
||||
'mail_recipient_name' => $row['user_name'], // Should this use realname?
|
||||
'mail_recipient_email' => $row['user_email'],
|
||||
'mail_target_info' => array(
|
||||
'USERID' => $row['user_id'],
|
||||
'DISPLAYNAME' => $row['user_name'],
|
||||
'SIGNUP_LINK' => $row['user_sess'],
|
||||
'USERNAME' => $row['user_loginname'],
|
||||
'USERLASTVISIT' => $row['user_lastvisit']
|
||||
)
|
||||
);
|
||||
$this->mail_read++;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called once all email addresses read, to do any housekeeping needed
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
public function select_close()
|
||||
{
|
||||
// Nothing to do here
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called to show current selection criteria, and optionally allow edit
|
||||
*
|
||||
* @param boolean $allow_edit is TRUE to allow user to change the selection; FALSE to just display current settings
|
||||
* @param string $selectVals is the current selection information - in the same format as returned by returnSelectors()
|
||||
*
|
||||
* @return array Returns array which is displayed in a table cell.
|
||||
*/
|
||||
public function showSelect($allow_edit = FALSE, $selectVals = FALSE)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$frm = e107::getForm();
|
||||
$var = array();
|
||||
// $ret = "<table style='width:95%'>";
|
||||
$selects = array_flip(explode(',', $selectVals));
|
||||
|
||||
if ($sql->db_Select('event_cat', 'event_cat_id, event_cat_name', "event_cat_name != 'Default'"))
|
||||
{
|
||||
$c=0;
|
||||
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$checked = (isset($selects[$row['event_cat_id']])) ? " checked='checked'" : '';
|
||||
if ($allow_edit)
|
||||
{
|
||||
$var[$c]['caption'] = $row['event_cat_name'];
|
||||
$var[$c]['html'] = $frm->checkbox('ec_category_sel[]',$row['event_cat_id'],$checked);
|
||||
|
||||
/*$ret .= "<tr><td><input type='checkbox' name='ec_category_sel[]' value='{$row['event_cat_id']}' {$checked}/></td><td>
|
||||
".$row['event_cat_name']."</td></tr>";*/
|
||||
}
|
||||
elseif($checked)
|
||||
{
|
||||
$var[$c]['html'] = $row['event_cat_name'];
|
||||
$var[$c]['caption'] = LAN_EC_MAIL_03;
|
||||
|
||||
/*$ret .= "<tr><td>".LAN_EC_MAIL_03."</td><td>
|
||||
".$row['event_cat_name']."</td></tr>";*/
|
||||
}
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$var[0]['caption'] = LAN_EC_MAIL_02;
|
||||
$var[0]['html'] = '';
|
||||
}
|
||||
|
||||
return $var;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -1,60 +1,62 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_notify.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
|
||||
{
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_class.php');
|
||||
$config_category = NT_LAN_EC_1;
|
||||
$config_events = array('ecalnew' => NT_LAN_EC_7, 'ecaledit' => NT_LAN_EC_2);
|
||||
}
|
||||
|
||||
if (!function_exists('notify_ecalnew'))
|
||||
{
|
||||
function notify_ecalnew($data)
|
||||
{
|
||||
global $nt;
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
$message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />';
|
||||
$message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />';
|
||||
$nt -> send('ecaledit', NT_LAN_EC_6, $message);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('notify_ecaledit'))
|
||||
{
|
||||
function notify_ecaledit($data)
|
||||
{
|
||||
global $nt;
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
$message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />';
|
||||
$message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />';
|
||||
$nt -> send('ecaledit', NT_LAN_EC_8, $message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Notify shim
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_notify.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Notify shim
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
|
||||
{
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_class.php');
|
||||
$config_category = NT_LAN_EC_1;
|
||||
$config_events = array('ecalnew' => NT_LAN_EC_7, 'ecaledit' => NT_LAN_EC_2);
|
||||
}
|
||||
|
||||
if (!function_exists('notify_ecalnew'))
|
||||
{
|
||||
function notify_ecalnew($data)
|
||||
{
|
||||
global $nt;
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
$message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />';
|
||||
$message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />';
|
||||
$nt -> send('ecaledit', NT_LAN_EC_6, $message);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('notify_ecaledit'))
|
||||
{
|
||||
function notify_ecaledit($data)
|
||||
{
|
||||
global $nt;
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
$message = NT_LAN_EC_3.': '.USERNAME.' ('.NT_LAN_EC_4.': '.$data['ip'].' )<br />';
|
||||
$message .= NT_LAN_EC_5.':<br />'.$data['cmessage'].'<br /><br />';
|
||||
$nt -> send('ecaledit', NT_LAN_EC_8, $message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -1,87 +1,89 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_rss.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if (!e107::isInstalled('calendar_menu')) return;
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php'); // RSS messages are in admin language file
|
||||
|
||||
|
||||
|
||||
//##### create feed for admin, return array $eplug_rss_feed --------------------------------
|
||||
$feed['name'] = EC_ADLAN_A12;
|
||||
$feed['url'] = 'calendar'; //the identifier for the rss feed url
|
||||
$feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category)
|
||||
$feed['path'] = 'calendar_menu'; //this is the plugin path location
|
||||
$feed['text'] = EC_ADLAN_A157;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
//##### ------------------------------------------------------------------------------------
|
||||
|
||||
require_once('ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
//##### create rss data, return as array $eplug_rss_data -----------------------------------
|
||||
$current_day = $ecal_class->cal_date['mday'];
|
||||
$current_month = $ecal_class->cal_date['mon'];
|
||||
$current_year = $ecal_class->cal_date['year'];
|
||||
$current = mktime(0,0,0,$current_month, $current_day, $current_year);
|
||||
|
||||
$qry = "
|
||||
SELECT e.*, c.event_cat_name
|
||||
FROM `#event` AS e
|
||||
LEFT JOIN `#event_cat` AS c ON c.event_cat_id = e.event_category
|
||||
WHERE e.event_start>='{$current}' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."'
|
||||
ORDER BY e.event_start ASC LIMIT 0,".$this->limit;
|
||||
|
||||
$rss = array();
|
||||
$sqlrss = new db;
|
||||
if($items = $sqlrss->db_Select_gen($qry))
|
||||
{
|
||||
$i=0;
|
||||
while($rowrss = $sqlrss -> db_Fetch())
|
||||
{
|
||||
$tmp = explode(".", $rowrss['event_author']);
|
||||
$rss[$i]['author'] = $tmp[1];
|
||||
$rss[$i]['author_email'] = '';
|
||||
$rss[$i]['link'] = $e107->base_path.$PLUGINS_DIRECTORY."calendar_menu/event.php?".$rowrss['event_start'].".event.".$rowrss['event_id'];
|
||||
$rss[$i]['linkid'] = $rowrss['event_id'];
|
||||
$rss[$i]['title'] = $rowrss['event_title'];
|
||||
$rss[$i]['description'] = '';
|
||||
$rss[$i]['category_name'] = $rowrss['event_cat_name'];
|
||||
$rss[$i]['category_link'] = '';
|
||||
$rss[$i]['datestamp'] = $rowrss['event_start'];
|
||||
$rss[$i]['enc_url'] = "";
|
||||
$rss[$i]['enc_leng'] = "";
|
||||
$rss[$i]['enc_type'] = "";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
//##### ------------------------------------------------------------------------------------
|
||||
|
||||
$eplug_rss_feed[] = $feed;
|
||||
$eplug_rss_data[] = $rss;
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* RSS news feed shim
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_rss.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* RSS news feed shim
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if (!e107::isInstalled('calendar_menu')) return;
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_admin_calendar_menu.php'); // RSS messages are in admin language file
|
||||
|
||||
|
||||
|
||||
//##### create feed for admin, return array $eplug_rss_feed --------------------------------
|
||||
$feed['name'] = EC_ADLAN_A12;
|
||||
$feed['url'] = 'calendar'; //the identifier for the rss feed url
|
||||
$feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category)
|
||||
$feed['path'] = 'calendar_menu'; //this is the plugin path location
|
||||
$feed['text'] = EC_ADLAN_A157;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
//##### ------------------------------------------------------------------------------------
|
||||
|
||||
require_once('ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
//##### create rss data, return as array $eplug_rss_data -----------------------------------
|
||||
$current_day = $ecal_class->cal_date['mday'];
|
||||
$current_month = $ecal_class->cal_date['mon'];
|
||||
$current_year = $ecal_class->cal_date['year'];
|
||||
$current = mktime(0,0,0,$current_month, $current_day, $current_year);
|
||||
|
||||
$qry = "
|
||||
SELECT e.*, c.event_cat_name
|
||||
FROM `#event` AS e
|
||||
LEFT JOIN `#event_cat` AS c ON c.event_cat_id = e.event_category
|
||||
WHERE e.event_start>='{$current}' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."'
|
||||
ORDER BY e.event_start ASC LIMIT 0,".$this->limit;
|
||||
|
||||
$rss = array();
|
||||
$sqlrss = new db;
|
||||
if($items = $sqlrss->db_Select_gen($qry))
|
||||
{
|
||||
$i=0;
|
||||
while($rowrss = $sqlrss -> db_Fetch())
|
||||
{
|
||||
$tmp = explode(".", $rowrss['event_author']);
|
||||
$rss[$i]['author'] = $tmp[1];
|
||||
$rss[$i]['author_email'] = '';
|
||||
$rss[$i]['link'] = $e107->base_path.$PLUGINS_DIRECTORY."calendar_menu/event.php?".$rowrss['event_start'].".event.".$rowrss['event_id'];
|
||||
$rss[$i]['linkid'] = $rowrss['event_id'];
|
||||
$rss[$i]['title'] = $rowrss['event_title'];
|
||||
$rss[$i]['description'] = '';
|
||||
$rss[$i]['category_name'] = $rowrss['event_cat_name'];
|
||||
$rss[$i]['category_link'] = '';
|
||||
$rss[$i]['datestamp'] = $rowrss['event_start'];
|
||||
$rss[$i]['enc_url'] = "";
|
||||
$rss[$i]['enc_leng'] = "";
|
||||
$rss[$i]['enc_type'] = "";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
//##### ------------------------------------------------------------------------------------
|
||||
|
||||
$eplug_rss_feed[] = $feed;
|
||||
$eplug_rss_data[] = $rss;
|
||||
|
||||
?>
|
@@ -1,30 +1,32 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_search.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_search.php');
|
||||
|
||||
$search_info[] = array('sfile' => e_PLUGIN.'calendar_menu/search/search_parser.php', 'qtype' => CM_SCH_LAN_1, 'refpage' => 'calendar.php');
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Search shim for event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_search.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Search shim for event calendar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_search.php');
|
||||
|
||||
$search_info[] = array('sfile' => e_PLUGIN.'calendar_menu/search/search_parser.php', 'qtype' => CM_SCH_LAN_1, 'refpage' => 'calendar.php');
|
||||
|
||||
|
@@ -1,69 +1,71 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Tagwords shim for event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_tagwords.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class e_tagwords_calendar_menu
|
||||
{
|
||||
function e_tagwords_calendar_menu()
|
||||
{
|
||||
$this->settings = array();
|
||||
|
||||
$this->settings['plugin'] = 'calendar_menu';
|
||||
$this->settings['table'] = 'event';
|
||||
$this->settings['db_id'] = 'event_id';
|
||||
$this->settings['caption'] = 'calendar';
|
||||
}
|
||||
|
||||
function getLink($id)
|
||||
{
|
||||
if($this->row=='')
|
||||
{
|
||||
if ($this->row = $this->getRecord($id))
|
||||
{
|
||||
$url = e_PLUGIN."calendar_menu/event.php?{$this->row['event_start']}.event.{$this->row['event_id']}";
|
||||
return "<a href='".$url."'>".e107::getParser()->toHTML($this->row['event_title'], TRUE, '')."</a>";
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function getRecord($id)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
$this->row = '';
|
||||
$qry = "SELECT * FROM #event as e WHERE e.event_id='{$id}'";
|
||||
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$this->row=$sql->db_Fetch();
|
||||
return $this->row;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Tagwords shim for event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_tagwords.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Tagwords shim
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class e_tagwords_calendar_menu
|
||||
{
|
||||
function e_tagwords_calendar_menu()
|
||||
{
|
||||
$this->settings = array();
|
||||
|
||||
$this->settings['plugin'] = 'calendar_menu';
|
||||
$this->settings['table'] = 'event';
|
||||
$this->settings['db_id'] = 'event_id';
|
||||
$this->settings['caption'] = 'calendar';
|
||||
}
|
||||
|
||||
function getLink($id)
|
||||
{
|
||||
if($this->row=='')
|
||||
{
|
||||
if ($this->row = $this->getRecord($id))
|
||||
{
|
||||
$url = e_PLUGIN."calendar_menu/event.php?{$this->row['event_start']}.event.{$this->row['event_id']}";
|
||||
return "<a href='".$url."'>".e107::getParser()->toHTML($this->row['event_title'], TRUE, '')."</a>";
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function getRecord($id)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
$this->row = '';
|
||||
$qry = "SELECT * FROM #event as e WHERE e.event_id='{$id}'";
|
||||
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$this->row=$sql->db_Fetch();
|
||||
return $this->row;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -1,89 +1,91 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar mailout - template file
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_mailout_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
/*
|
||||
This template is used during the subscription mailouts - it is inserted at the front of the text
|
||||
defined for each category.
|
||||
Main purpose is to define the 'pre' and 'post' styles, but it can be used much as any E107 template
|
||||
|
||||
Language constants should be in the English_mailer.php file
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
|
||||
|
||||
global $sc_style;
|
||||
|
||||
$sc_style['EC_MAIL_HEADING_DATE']['pre'] = '';
|
||||
$sc_style['EC_MAIL_HEADING_DATE']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_SHORT_DATE']['pre'] = '';
|
||||
$sc_style['EC_MAIL_SHORT_DATE']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_TITLE']['pre'] = '';
|
||||
$sc_style['EC_MAIL_TITLE']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_ID']['pre'] = '';
|
||||
$sc_style['EC_MAIL_ID']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_DETAILS']['pre'] = '';
|
||||
$sc_style['EC_MAIL_DETAILS']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_LOCATION']['pre'] = LAN_EC_MAIL_100.' ';
|
||||
$sc_style['EC_MAIL_LOCATION']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_AUTHOR']['pre'] = LAN_EC_MAIL_101.' ';
|
||||
$sc_style['EC_MAIL_AUTHOR']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_CONTACT']['pre'] = LAN_EC_MAIL_102.' ';
|
||||
$sc_style['EC_MAIL_CONTACT']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_THREAD']['pre'] = '';
|
||||
$sc_style['EC_MAIL_THREAD']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_LINK']['pre'] = '';
|
||||
$sc_style['EC_MAIL_LINK']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_CATEGORY']['pre'] = '';
|
||||
$sc_style['EC_MAIL_CATEGORY']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_DATE_START']['pre'] = '';
|
||||
$sc_style['EC_MAIL_DATE_START']['post'] = '';
|
||||
$sc_style['EC_MAIL_DATE_START_ALLDAY']['pre'] = LAN_EC_MAIL_103.' ';
|
||||
$sc_style['EC_MAIL_DATE_START_ALLDAY']['post'] = '';
|
||||
$sc_style['EC_MAIL_DATE_START_TIMED']['pre'] = LAN_EC_MAIL_104.' ';
|
||||
$sc_style['EC_MAIL_DATE_START_TIMED']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_TIME_START']['pre'] = LAN_EC_MAIL_105;
|
||||
$sc_style['EC_MAIL_TIME_START']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_DATE_END']['pre'] = LAN_EC_MAIL_106.' ';
|
||||
$sc_style['EC_MAIL_DATE_END']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_TIME_END']['pre'] = LAN_EC_MAIL_105;
|
||||
$sc_style['EC_MAIL_TIME_END']['post'] = '';
|
||||
|
||||
|
||||
?>
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar mailout - template file
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_mailout_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar mailout - template file
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
/*
|
||||
This template is used during the subscription mailouts - it is inserted at the front of the text
|
||||
defined for each category.
|
||||
Main purpose is to define the 'pre' and 'post' styles, but it can be used much as any E107 template
|
||||
|
||||
Language constants should be in the English_mailer.php file
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'_mailer.php');
|
||||
|
||||
global $sc_style;
|
||||
|
||||
$sc_style['EC_MAIL_HEADING_DATE']['pre'] = '';
|
||||
$sc_style['EC_MAIL_HEADING_DATE']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_SHORT_DATE']['pre'] = '';
|
||||
$sc_style['EC_MAIL_SHORT_DATE']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_TITLE']['pre'] = '';
|
||||
$sc_style['EC_MAIL_TITLE']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_ID']['pre'] = '';
|
||||
$sc_style['EC_MAIL_ID']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_DETAILS']['pre'] = '';
|
||||
$sc_style['EC_MAIL_DETAILS']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_LOCATION']['pre'] = LAN_EC_MAIL_100.' ';
|
||||
$sc_style['EC_MAIL_LOCATION']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_AUTHOR']['pre'] = LAN_EC_MAIL_101.' ';
|
||||
$sc_style['EC_MAIL_AUTHOR']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_CONTACT']['pre'] = LAN_EC_MAIL_102.' ';
|
||||
$sc_style['EC_MAIL_CONTACT']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_THREAD']['pre'] = '';
|
||||
$sc_style['EC_MAIL_THREAD']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_LINK']['pre'] = '';
|
||||
$sc_style['EC_MAIL_LINK']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_CATEGORY']['pre'] = '';
|
||||
$sc_style['EC_MAIL_CATEGORY']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_DATE_START']['pre'] = '';
|
||||
$sc_style['EC_MAIL_DATE_START']['post'] = '';
|
||||
$sc_style['EC_MAIL_DATE_START_ALLDAY']['pre'] = LAN_EC_MAIL_103.' ';
|
||||
$sc_style['EC_MAIL_DATE_START_ALLDAY']['post'] = '';
|
||||
$sc_style['EC_MAIL_DATE_START_TIMED']['pre'] = LAN_EC_MAIL_104.' ';
|
||||
$sc_style['EC_MAIL_DATE_START_TIMED']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_TIME_START']['pre'] = LAN_EC_MAIL_105;
|
||||
$sc_style['EC_MAIL_TIME_START']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_DATE_END']['pre'] = LAN_EC_MAIL_106.' ';
|
||||
$sc_style['EC_MAIL_DATE_END']['post'] = '';
|
||||
|
||||
$sc_style['EC_MAIL_TIME_END']['pre'] = LAN_EC_MAIL_105;
|
||||
$sc_style['EC_MAIL_TIME_END']['post'] = '';
|
||||
|
||||
|
||||
?>
|
||||
|
@@ -1,469 +1,471 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - generate lists
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_page.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
||||
| Generate a printer-friendly page of calendar events
|
||||
| Query is: ec_pf_page.php?ssssss.eeeeee[[[.cat].template].output]
|
||||
|
|
||||
| Date format is yyyymmdd or yyyymm to make it easy to generate fixed queries.
|
||||
| cat is a number corresponding to a category ID. '*' or blank gives all categories
|
||||
| template determines output style ('*' selects the default template)
|
||||
| output can be 'display' (default), 'print' or 'pdf'
|
||||
|
|
||||
| Mostly the template can use the EVENT and MAIL shortcodes - pretty much anything that
|
||||
| uses $thisevent as a parameter. MAIL is best since it's never used elsewhere at the same time
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
$e107 = e107::getInstance();
|
||||
if (!$e107->isInstalled('calendar_menu')) header('Location: '.e_BASE.'index.php');
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
define('PAGE_NAME', EC_LAN_80);
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
|
||||
|
||||
$message = '';
|
||||
unset($ec_qs);
|
||||
if (e_QUERY) $ec_qs = explode('.', e_QUERY);
|
||||
else
|
||||
{
|
||||
if (!isset($pref['eventpost_printlists']) || ($pref['eventpost_printlists'] == 0))
|
||||
header('location:'.SITEURL); // If disabled, just go back to index page
|
||||
}
|
||||
|
||||
if (isset($_POST['set_dates']) && isset($_POST['start_date']) && (isset($_POST['end_date'])))
|
||||
{
|
||||
$ec_qs[0] = $_POST['start_date'];
|
||||
$ec_qs[1] = $_POST['end_date'];
|
||||
if (isset($_POST['event_cat_ids']))
|
||||
{
|
||||
$ec_qs[2] = $_POST['event_cat_ids'];
|
||||
if ($ec_qs[2] == 'all') $ec_qs[2] = '*';
|
||||
}
|
||||
if (isset($_POST['template_choice'])) $ec_qs[3] = $_POST['template_choice'];
|
||||
}
|
||||
|
||||
if (!isset($ec_qs[3])) $ec_qs[3] = 'default'; // Template
|
||||
|
||||
if (isset($_POST['output_type'])) $ec_qs[4] = $_POST['output_type'];
|
||||
if (!isset($ec_qs[4]) || (($ec_qs[4]) != 'print') && ($ec_qs[4] != 'pdf') ) $ec_qs[4] = 'display';
|
||||
|
||||
|
||||
|
||||
$cal_super = $ecal_class->cal_super;
|
||||
|
||||
// Get templates, since we may have to give a choice if we're displaying something
|
||||
// Actually load three in order so they can accumulate, and give the option of overriding other settings
|
||||
$EVENT_CAL_PDF_HEADER = array();
|
||||
$EVENT_CAL_PDF_BODY = array();
|
||||
$EVENT_CAL_PDF_FOOTER = array();
|
||||
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_template.php');
|
||||
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_user_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_user_template.php');
|
||||
if (is_readable(THEME.'ec_pf_template.php')) require_once(THEME.'ec_pf_template.php');
|
||||
|
||||
// Hard-coded alternatives
|
||||
if (!count($EVENT_CAL_PDF_HEADER)) $EVENT_CAL_PDF_HEADER['default'] = '<br />';
|
||||
if (!count($EVENT_CAL_PDF_BODY)) $EVENT_CAL_PDF_BODY['default'] = '{EC_MAIL_DATE_START} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />';
|
||||
if (!count($EVENT_CAL_PDF_FOOTER)) $EVENT_CAL_PDF_FOOTER['default'] = '<br />';
|
||||
if (!count($EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
|
||||
// If one name only, we just assign that
|
||||
if (count($EVENT_CAL_PDF_NAMES) == 1)
|
||||
{
|
||||
$ec_pdf_template = array_pop(array_keys($EVENT_CAL_PDF_NAMES));
|
||||
// echo "Assign template: ".$ec_pdf_template."<br />";
|
||||
}
|
||||
|
||||
$ec_enable_pdf = ($pref['eventpost_printlists'] > 1) && is_readable(e_PLUGIN."pdf/e107pdf.php");
|
||||
|
||||
if (!isset($ec_qs[0]) || !isset($ec_qs[1]))
|
||||
{
|
||||
// Put up a prompt to get the view period
|
||||
require_once(HEADERF);
|
||||
$cal_text = "<div style='text-align:center'>
|
||||
<form method='post' action='".e_SELF."'>
|
||||
<table style='".USER_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:60%;vertical-align:top;' />
|
||||
<col style='width:40%;vertical-align:top;' />
|
||||
</colgroup>";
|
||||
$cal_text .= "<tr>
|
||||
<td class='forumheader3'>".EC_LAN_153."</td>
|
||||
<td class='forumheader3' style='text_align:center'>";
|
||||
$cal_text .= gen_drop(FALSE)."</td>
|
||||
</tr><tr>
|
||||
<td class='forumheader3'>".EC_LAN_154."</td>
|
||||
<td class='forumheader3' style='text_align:center'>".gen_drop(TRUE)."</td>
|
||||
</tr><tr>
|
||||
<td class='forumheader3'>".EC_LAN_155."</td>
|
||||
<td class='forumheader3' style='text_align:center'>";
|
||||
$cal_text .= $e107->tp->parseTemplate('{EC_NAV_CATEGORIES=nosubmit}', FALSE, $calSc);
|
||||
$cal_text .= "</td>
|
||||
</tr>";
|
||||
if (isset($EVENT_CAL_PDF_NAMES) && is_array($EVENT_CAL_PDF_NAMES) && (count($EVENT_CAL_PDF_NAMES) > 1))
|
||||
{ // Offer choice of templates
|
||||
$cal_text .= "<tr>
|
||||
<td class='forumheader3'>".EC_LAN_157."</td>
|
||||
<td class='forumheader3' style='text_align:center'><select name='template_choice' class='tbox' style='width:140px;' >\n";
|
||||
foreach($EVENT_CAL_PDF_NAMES as $ec_template_name => $ec_template_choice)
|
||||
{
|
||||
$cal_text .= "<option value='{$ec_template_name}'>{$ec_template_choice}</option>\n";
|
||||
}
|
||||
$cal_text .= "</select></td>
|
||||
</tr>\n";
|
||||
}
|
||||
// Radio buttons to select output type
|
||||
$cal_text .= "<tr>
|
||||
<td class='forumheader3'>".EC_LAN_158."</td>
|
||||
<td class='forumheader3' style='text_align:center'>";
|
||||
$cal_text .= "
|
||||
<input type='radio' name='output_type' value='display' checked='checked' /> ".EC_LAN_159."<br />
|
||||
<input type='radio' name='output_type' value='print' /> ".EC_LAN_160."<br />";
|
||||
if ($ec_enable_pdf)
|
||||
{
|
||||
$cal_text .= "<input type='radio' name='output_type' value='pdf' /> ".EC_LAN_161;
|
||||
}
|
||||
$cal_text .="</td></tr>";
|
||||
|
||||
$cal_text .= "<tr><td colspan='2' style='text-align:center' class='fcaption'><input class='button' type='submit' name='set_dates' value='".EC_LAN_156."' /></td></tr>";
|
||||
|
||||
$cal_text .= "</table></form></div>";
|
||||
$ns->tablerender(EC_LAN_150, $cal_text);
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (!is_numeric($ec_start_date = decode_date($ec_qs[0],FALSE)))
|
||||
{
|
||||
$message = $ec_start_date;
|
||||
}
|
||||
elseif (!is_numeric($ec_end_date = decode_date($ec_qs[1],TRUE)))
|
||||
{
|
||||
$message = $ec_end_date;
|
||||
}
|
||||
elseif ($ec_start_date >= $ec_end_date)
|
||||
{
|
||||
$message = EC_LAN_151;
|
||||
}
|
||||
elseif (($ec_end_date - $ec_start_date) > 366*86400)
|
||||
{
|
||||
$message = EC_LAN_152;
|
||||
}
|
||||
|
||||
// That's the vetting of the query done (as much as we'll do)
|
||||
if ($message !== "")
|
||||
{
|
||||
require_once(HEADERF);
|
||||
$ns->tablerender(EC_LAN_80, $message);
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
$calSc->catFilter = $cat_filter; // Category filter
|
||||
|
||||
$ec_output_type = $ec_qs[4];
|
||||
if (isset($ec_qs[5])) $ec_list_title = $ec_qs[5]; else $ec_list_title = EC_LAN_163;
|
||||
$ec_list_title = str_replace('_',' ',$ec_list_title);
|
||||
|
||||
if (($ec_output_type == 'pdf') && !$ec_enable_pdf) $ec_output_type = 'display';
|
||||
if ($ec_output_type == 'display') require_once(HEADERF);
|
||||
|
||||
|
||||
// Allow a number of categories separated by a '&'
|
||||
$cat_filter = 0;
|
||||
$ec_category_list = EC_LAN_97; // Displayable version of categories - default to 'all'
|
||||
if (isset($ec_qs[2]) && ($ec_qs[2] != '*'))
|
||||
{
|
||||
$ec_category_list = array();
|
||||
$temp = explode('&',$ec_qs[2]);
|
||||
foreach($temp as $t1)
|
||||
{
|
||||
if (!is_numeric($t1)) unset($t1);
|
||||
}
|
||||
|
||||
// Now look up the category names in the database - check access rights at the same time
|
||||
$temp = array(); // Accumulate valid category IDs
|
||||
$cal_qry = "SELECT event_cat_id, event_cat_name FROM #event_cat WHERE find_in_set(event_cat_id, '{$ec_qs[2]}') ".$ecal_class->extra_query;
|
||||
if ($sql->db_Select_gen($cal_qry))
|
||||
{
|
||||
while ($thiscat = $sql->db_Fetch())
|
||||
{
|
||||
$temp [] = $thiscat['event_cat_id'];
|
||||
$ec_category_list[] = $thiscat['event_cat_name'];
|
||||
}
|
||||
$cat_filter = implode(',',$temp); // Gives us a comma separated numeric set of categories
|
||||
}
|
||||
else
|
||||
{
|
||||
echo EC_LAN_100."<br /><br />";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// $ec_start_date - earliest date of period
|
||||
// $ec_end_date - latest date of period
|
||||
|
||||
// We'll potentially need virtually all of the event-related fields, so get them regardless. Just cut back on category fields
|
||||
$ev_list = $ecal_class->get_events($ec_start_date, $ec_end_date, FALSE, $cat_filter, TRUE, '*', 'event_cat_name,event_cat_icon');
|
||||
// Now go through and multiply up any recurring records
|
||||
$tim_arr = array();
|
||||
foreach ($ev_list as $k=>$event)
|
||||
{
|
||||
if (is_array($event['event_start']))
|
||||
{
|
||||
foreach ($event['event_start'] as $t)
|
||||
{
|
||||
$tim_arr[$t] = $k;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tim_arr[$event['event_start']] = $k;
|
||||
}
|
||||
}
|
||||
|
||||
ksort($tim_arr); // Sort into time order
|
||||
|
||||
|
||||
|
||||
if (isset($ec_qs[3])) $ec_pdf_template = $ec_qs[3];
|
||||
if (!isset($ec_pdf_template) || !array_key_exists($ec_pdf_template,$EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
|
||||
|
||||
/*
|
||||
// These available to templates/shortcodes to pick up change of start day/month/year
|
||||
global $ec_last_year, $ec_last_month, $ec_last_day, $ec_year_change, $ec_month_change, $ec_day_change;
|
||||
global $ec_start_date, $ec_end_date, $ec_pdf_options;
|
||||
global $ec_current_month, $thisevent_start_date, $thisevent_end_date ;
|
||||
*/
|
||||
|
||||
$calSc->printVars = array('lt' => $ec_list_title, 'cat' => $ec_category_list, 'ot' => $ec_output_type,
|
||||
'sd' => $ec_start_date, 'ed' => $ec_end_date); // Give shortcodes the event data
|
||||
|
||||
$ec_last_year = 0;
|
||||
$ec_last_month = 0;
|
||||
$ec_last_day = 0;
|
||||
|
||||
$cal_text = '';
|
||||
$cal_totev = count($ev_list);
|
||||
if ($cal_totev > 0)
|
||||
{
|
||||
if (isset($ec_template_styles[$ec_pdf_template]) && is_array($ec_template_styles[$ec_pdf_template]))
|
||||
{
|
||||
$ec_current_overrides = $ec_template_styles[$ec_pdf_template]; // Possible array of codes to override standard $sc_style
|
||||
$sc_style = array_merge($sc_style,$ec_current_overrides); // Override as necessary
|
||||
}
|
||||
|
||||
// If printing, wrap in a form so the button works
|
||||
if ($ec_output_type == 'print') $cal_text .= "<form action=''>\n";
|
||||
// Add header
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_HEADER[$ec_pdf_template], FALSE, $calSc);
|
||||
// Debug code
|
||||
// echo "Start date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_start_date)."<br />";
|
||||
// echo "End date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_end_date)."<br />";
|
||||
// echo "Template: ".$ec_pdf_template,"<br />";
|
||||
// echo "Header: ".$EVENT_CAL_PDF_HEADER[$ec_pdf_template]."<br />";
|
||||
// echo "Body: ".$EVENT_CAL_PDF_BODY[$ec_pdf_template]."<br />";
|
||||
// echo "Footer: ".$EVENT_CAL_PDF_FOOTER[$ec_pdf_template]."<br />";
|
||||
|
||||
foreach ($tim_arr as $tim => $ptr)
|
||||
{
|
||||
$ev_list[$ptr]['event_start'] = $tim;
|
||||
$thisevent = $ev_list[$ptr];
|
||||
// Decode dates into individual fields - we're bound to want them
|
||||
$thisevent_start_date = $ecal_class->gmgetdate($thisevent['event_start']);
|
||||
$thisevent_end_date = $ecal_class->gmgetdate($thisevent['event_end']);
|
||||
|
||||
$ec_year_change = ($ec_last_year != $thisevent_start_date['year']);
|
||||
$ec_month_change = ($ec_last_month != $thisevent_start_date['mon']);
|
||||
$ec_day_change = ($ec_last_day != $thisevent_start_date['mday']);
|
||||
|
||||
$cal_totev --; // Can use this to modify inter-event gap
|
||||
$calSc->numEvents = $cal_totev; // Number of events to display
|
||||
$calSc->event = $thisevent; // Give shortcodes the event data
|
||||
$calSc->changeFlags = array('yc' => $ec_year_change, 'mc' => $ec_month_change, 'dc' => $ec_day_change); // Give shortcodes the event data
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_BODY[$ec_pdf_template], FALSE, $calSc);
|
||||
|
||||
$ec_last_year = $thisevent_start_date['year'];
|
||||
$ec_last_month = $thisevent_start_date['mon'];
|
||||
$ec_last_day = $thisevent_start_date['mday'];
|
||||
}
|
||||
|
||||
// Add footer
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_FOOTER[$ec_pdf_template], FALSE, $calSc);
|
||||
if ($ec_output_type == 'print') $cal_text .= "</form>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cal_text.= EC_LAN_148;
|
||||
}
|
||||
|
||||
switch($ec_output_type)
|
||||
{
|
||||
case 'display':
|
||||
$e107->ns->tablerender(EC_LAN_80, $cal_text, 'ec_pf_page');
|
||||
require_once (FOOTERF);
|
||||
break;
|
||||
|
||||
case 'print':
|
||||
echo $cal_text;
|
||||
break;
|
||||
|
||||
case 'pdf':
|
||||
//TODO find a way to pass initialisation options etc to PDF driver
|
||||
include_lan(e_PLUGIN.'pdf/languages/'.e_LANGUAGE.'.php');
|
||||
// define('FPDF_FONTPATH', 'font/');
|
||||
//require the ufpdf class
|
||||
// require_once (e_PLUGIN.'pdf/ufpdf.php');
|
||||
//require the e107pdf class
|
||||
require_once (e_PLUGIN.'pdf/e107pdf.php');
|
||||
$pdf = new e107PDF();
|
||||
// $text = array($text, $creator, $author, $title, $subject, $keywords, $url);
|
||||
$text = array(
|
||||
$cal_text,
|
||||
'',
|
||||
'',
|
||||
EC_LAN_163, // Title
|
||||
'',
|
||||
'',
|
||||
e_SELF.'?'.e_QUERY, // URL
|
||||
'' // Page orientation
|
||||
);
|
||||
$pdf->makePDF($text);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// We're assuming $date_string is a string of digits
|
||||
// Which could begin with 'now' or 'now+'
|
||||
function decode_date($date_string, $last_day = FALSE)
|
||||
{ // Decode a date string
|
||||
if (strpos($date_string, 'now') === 0)
|
||||
{
|
||||
// decode special dates
|
||||
$today = getdate();
|
||||
// Knock off the 'now'
|
||||
$date_string = trim(substr($date_string, 3));
|
||||
if (($date_string != '') && ($date_string[0] == '+'))
|
||||
{
|
||||
// Knock off the '+'
|
||||
$date_string = trim(substr($date_string, 1));
|
||||
if (is_numeric($date_string) && ($date_string >= 0) && ($date_string <= 12))
|
||||
{
|
||||
$today['mon'] += $date_string;
|
||||
if ($today['mon'] > 12)
|
||||
{
|
||||
$today['mon'] -= 12;
|
||||
$today['year'] += 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return EC_LAN_149;
|
||||
}
|
||||
}
|
||||
$date_string = $today['year'].$today['mon'];
|
||||
}
|
||||
|
||||
// Here, $date_string is a string of 5, 6 or 8 digits
|
||||
// use preg_match()
|
||||
if(preg_match('/^\d{5,8}$/D', $date_string))
|
||||
{
|
||||
$month = 0;
|
||||
$day = 1;
|
||||
if (strlen($date_string) == 5)
|
||||
$date_string = substr_replace($date_string, '0', -1, 0);
|
||||
if (strlen($date_string) == 8)
|
||||
{
|
||||
$day = substr($date_string, -2, 2);
|
||||
if ($last_day)
|
||||
$day += 1;
|
||||
}
|
||||
elseif (strlen($date_string) == 6)
|
||||
{
|
||||
if ($last_day)
|
||||
$month = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error
|
||||
return EC_LAN_149;
|
||||
}
|
||||
$month += substr($date_string, 4, 2);
|
||||
$year = substr($date_string, 0, 4);
|
||||
$temp = mktime(0, 0, 0, $month, $day, $year);
|
||||
// Always do this to get whole of last day
|
||||
if ($last_day)
|
||||
$temp -= 1;
|
||||
return $temp;
|
||||
}
|
||||
else
|
||||
{ // Error
|
||||
return EC_LAN_149;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Generate monthly drop-down - FALSE = first, TRUE = last
|
||||
// For the first date we want beginning of previous year to end of current year
|
||||
// For the last date we want end of next
|
||||
function gen_drop($drop_type)
|
||||
{
|
||||
$text = "<select name='".($drop_type ? 'end_date' : 'start_date')."' class='tbox' style='width:140px;' >\n";
|
||||
if ($drop_type)
|
||||
{
|
||||
$start_date = strtotime('-3 months');
|
||||
$match_date = strtotime('+3 months'); // Propose 3-month list
|
||||
}
|
||||
else
|
||||
{
|
||||
$start_date = strtotime('-9 months');
|
||||
// $match_date = strtotime('-1 months');
|
||||
$match_date = time(); // Use current month for start date
|
||||
}
|
||||
|
||||
// Get date to be 1st of month
|
||||
$date = getdate($match_date);
|
||||
$match_date = mktime(0,0,0,$date['mon'],1,$date['year'],FALSE);
|
||||
|
||||
for ($i = 0; $i < 24; $i++)
|
||||
{
|
||||
$sel_text = (($match_date == $start_date) ? "selected='selected'" : "");
|
||||
$date = getdate($start_date);
|
||||
$text .= "<option value = '{$date['year']}{$date['mon']}' {$sel_text}>{$date['month']} {$date['year']} </option>\n";
|
||||
$start_date = mktime(0,0,0,$date['mon']+1,1,$date['year'],FALSE);
|
||||
}
|
||||
$text .= "</select>\n";
|
||||
return $text;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - generate lists
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_page.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar - generate lists
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
||||
| Generate a printer-friendly page of calendar events
|
||||
| Query is: ec_pf_page.php?ssssss.eeeeee[[[.cat].template].output]
|
||||
|
|
||||
| Date format is yyyymmdd or yyyymm to make it easy to generate fixed queries.
|
||||
| cat is a number corresponding to a category ID. '*' or blank gives all categories
|
||||
| template determines output style ('*' selects the default template)
|
||||
| output can be 'display' (default), 'print' or 'pdf'
|
||||
|
|
||||
| Mostly the template can use the EVENT and MAIL shortcodes - pretty much anything that
|
||||
| uses $thisevent as a parameter. MAIL is best since it's never used elsewhere at the same time
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
$e107 = e107::getInstance();
|
||||
if (!$e107->isInstalled('calendar_menu')) header('Location: '.e_BASE.'index.php');
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
define('PAGE_NAME', EC_LAN_80);
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
|
||||
|
||||
$message = '';
|
||||
unset($ec_qs);
|
||||
if (e_QUERY) $ec_qs = explode('.', e_QUERY);
|
||||
else
|
||||
{
|
||||
if (!isset($ecal_class->pref['eventpost_printlists']) || ($ecal_class->pref['eventpost_printlists'] == 0))
|
||||
header('location:'.SITEURL); // If disabled, just go back to index page
|
||||
}
|
||||
|
||||
if (isset($_POST['set_dates']) && isset($_POST['start_date']) && (isset($_POST['end_date'])))
|
||||
{
|
||||
$ec_qs[0] = $_POST['start_date'];
|
||||
$ec_qs[1] = $_POST['end_date'];
|
||||
if (isset($_POST['event_cat_ids']))
|
||||
{
|
||||
$ec_qs[2] = $_POST['event_cat_ids'];
|
||||
if ($ec_qs[2] == 'all') $ec_qs[2] = '*';
|
||||
}
|
||||
if (isset($_POST['template_choice'])) $ec_qs[3] = $_POST['template_choice'];
|
||||
}
|
||||
|
||||
if (!isset($ec_qs[3])) $ec_qs[3] = 'default'; // Template
|
||||
|
||||
if (isset($_POST['output_type'])) $ec_qs[4] = $_POST['output_type'];
|
||||
if (!isset($ec_qs[4]) || (($ec_qs[4]) != 'print') && ($ec_qs[4] != 'pdf') ) $ec_qs[4] = 'display';
|
||||
|
||||
|
||||
|
||||
$cal_super = $ecal_class->cal_super;
|
||||
|
||||
// Get templates, since we may have to give a choice if we're displaying something
|
||||
// Actually load three in order so they can accumulate, and give the option of overriding other settings
|
||||
$EVENT_CAL_PDF_HEADER = array();
|
||||
$EVENT_CAL_PDF_BODY = array();
|
||||
$EVENT_CAL_PDF_FOOTER = array();
|
||||
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_template.php');
|
||||
if (is_readable(e_PLUGIN.'calendar_menu/ec_pf_user_template.php')) require_once(e_PLUGIN.'calendar_menu/ec_pf_user_template.php');
|
||||
if (is_readable(THEME.'ec_pf_template.php')) require_once(THEME.'ec_pf_template.php');
|
||||
|
||||
// Hard-coded alternatives
|
||||
if (!count($EVENT_CAL_PDF_HEADER)) $EVENT_CAL_PDF_HEADER['default'] = '<br />';
|
||||
if (!count($EVENT_CAL_PDF_BODY)) $EVENT_CAL_PDF_BODY['default'] = '{EC_MAIL_DATE_START} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />';
|
||||
if (!count($EVENT_CAL_PDF_FOOTER)) $EVENT_CAL_PDF_FOOTER['default'] = '<br />';
|
||||
if (!count($EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
|
||||
// If one name only, we just assign that
|
||||
if (count($EVENT_CAL_PDF_NAMES) == 1)
|
||||
{
|
||||
$ec_pdf_template = array_pop(array_keys($EVENT_CAL_PDF_NAMES));
|
||||
// echo "Assign template: ".$ec_pdf_template."<br />";
|
||||
}
|
||||
|
||||
$ec_enable_pdf = ($ecal_class->pref['eventpost_printlists'] > 1) && is_readable(e_PLUGIN."pdf/e107pdf.php");
|
||||
|
||||
if (!isset($ec_qs[0]) || !isset($ec_qs[1]))
|
||||
{
|
||||
// Put up a prompt to get the view period
|
||||
require_once(HEADERF);
|
||||
$cal_text = "<div style='text-align:center'>
|
||||
<form method='post' action='".e_SELF."'>
|
||||
<table style='".USER_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:60%;vertical-align:top;' />
|
||||
<col style='width:40%;vertical-align:top;' />
|
||||
</colgroup>";
|
||||
$cal_text .= "<tr>
|
||||
<td class='forumheader3'>".EC_LAN_153."</td>
|
||||
<td class='forumheader3' style='text_align:center'>";
|
||||
$cal_text .= gen_drop(FALSE)."</td>
|
||||
</tr><tr>
|
||||
<td class='forumheader3'>".EC_LAN_154."</td>
|
||||
<td class='forumheader3' style='text_align:center'>".gen_drop(TRUE)."</td>
|
||||
</tr><tr>
|
||||
<td class='forumheader3'>".EC_LAN_155."</td>
|
||||
<td class='forumheader3' style='text_align:center'>";
|
||||
$cal_text .= $e107->tp->parseTemplate('{EC_NAV_CATEGORIES=nosubmit}', FALSE, $calSc);
|
||||
$cal_text .= "</td>
|
||||
</tr>";
|
||||
if (isset($EVENT_CAL_PDF_NAMES) && is_array($EVENT_CAL_PDF_NAMES) && (count($EVENT_CAL_PDF_NAMES) > 1))
|
||||
{ // Offer choice of templates
|
||||
$cal_text .= "<tr>
|
||||
<td class='forumheader3'>".EC_LAN_157."</td>
|
||||
<td class='forumheader3' style='text_align:center'><select name='template_choice' class='tbox' style='width:140px;' >\n";
|
||||
foreach($EVENT_CAL_PDF_NAMES as $ec_template_name => $ec_template_choice)
|
||||
{
|
||||
$cal_text .= "<option value='{$ec_template_name}'>{$ec_template_choice}</option>\n";
|
||||
}
|
||||
$cal_text .= "</select></td>
|
||||
</tr>\n";
|
||||
}
|
||||
// Radio buttons to select output type
|
||||
$cal_text .= "<tr>
|
||||
<td class='forumheader3'>".EC_LAN_158."</td>
|
||||
<td class='forumheader3' style='text_align:center'>";
|
||||
$cal_text .= "
|
||||
<input type='radio' name='output_type' value='display' checked='checked' /> ".EC_LAN_159."<br />
|
||||
<input type='radio' name='output_type' value='print' /> ".EC_LAN_160."<br />";
|
||||
if ($ec_enable_pdf)
|
||||
{
|
||||
$cal_text .= "<input type='radio' name='output_type' value='pdf' /> ".EC_LAN_161;
|
||||
}
|
||||
$cal_text .="</td></tr>";
|
||||
|
||||
$cal_text .= "<tr><td colspan='2' style='text-align:center' class='fcaption'><input class='button' type='submit' name='set_dates' value='".EC_LAN_156."' /></td></tr>";
|
||||
|
||||
$cal_text .= "</table></form></div>";
|
||||
$ns->tablerender(EC_LAN_150, $cal_text);
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (!is_numeric($ec_start_date = decode_date($ec_qs[0],FALSE)))
|
||||
{
|
||||
$message = $ec_start_date;
|
||||
}
|
||||
elseif (!is_numeric($ec_end_date = decode_date($ec_qs[1],TRUE)))
|
||||
{
|
||||
$message = $ec_end_date;
|
||||
}
|
||||
elseif ($ec_start_date >= $ec_end_date)
|
||||
{
|
||||
$message = EC_LAN_151;
|
||||
}
|
||||
elseif (($ec_end_date - $ec_start_date) > 366*86400)
|
||||
{
|
||||
$message = EC_LAN_152;
|
||||
}
|
||||
|
||||
// That's the vetting of the query done (as much as we'll do)
|
||||
if ($message !== "")
|
||||
{
|
||||
require_once(HEADERF);
|
||||
$ns->tablerender(EC_LAN_80, $message);
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
$calSc->catFilter = $cat_filter; // Category filter
|
||||
|
||||
$ec_output_type = $ec_qs[4];
|
||||
if (isset($ec_qs[5])) $ec_list_title = $ec_qs[5]; else $ec_list_title = EC_LAN_163;
|
||||
$ec_list_title = str_replace('_',' ',$ec_list_title);
|
||||
|
||||
if (($ec_output_type == 'pdf') && !$ec_enable_pdf) $ec_output_type = 'display';
|
||||
if ($ec_output_type == 'display') require_once(HEADERF);
|
||||
|
||||
|
||||
// Allow a number of categories separated by a '&'
|
||||
$cat_filter = 0;
|
||||
$ec_category_list = EC_LAN_97; // Displayable version of categories - default to 'all'
|
||||
if (isset($ec_qs[2]) && ($ec_qs[2] != '*'))
|
||||
{
|
||||
$ec_category_list = array();
|
||||
$temp = explode('&',$ec_qs[2]);
|
||||
foreach($temp as $t1)
|
||||
{
|
||||
if (!is_numeric($t1)) unset($t1);
|
||||
}
|
||||
|
||||
// Now look up the category names in the database - check access rights at the same time
|
||||
$temp = array(); // Accumulate valid category IDs
|
||||
$cal_qry = "SELECT event_cat_id, event_cat_name FROM #event_cat WHERE find_in_set(event_cat_id, '{$ec_qs[2]}') ".$ecal_class->extra_query;
|
||||
if ($sql->db_Select_gen($cal_qry))
|
||||
{
|
||||
while ($thiscat = $sql->db_Fetch())
|
||||
{
|
||||
$temp [] = $thiscat['event_cat_id'];
|
||||
$ec_category_list[] = $thiscat['event_cat_name'];
|
||||
}
|
||||
$cat_filter = implode(',',$temp); // Gives us a comma separated numeric set of categories
|
||||
}
|
||||
else
|
||||
{
|
||||
echo EC_LAN_100."<br /><br />";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// $ec_start_date - earliest date of period
|
||||
// $ec_end_date - latest date of period
|
||||
|
||||
// We'll potentially need virtually all of the event-related fields, so get them regardless. Just cut back on category fields
|
||||
$ev_list = $ecal_class->get_events($ec_start_date, $ec_end_date, FALSE, $cat_filter, TRUE, '*', 'event_cat_name,event_cat_icon');
|
||||
// Now go through and multiply up any recurring records
|
||||
$tim_arr = array();
|
||||
foreach ($ev_list as $k=>$event)
|
||||
{
|
||||
if (is_array($event['event_start']))
|
||||
{
|
||||
foreach ($event['event_start'] as $t)
|
||||
{
|
||||
$tim_arr[$t] = $k;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tim_arr[$event['event_start']] = $k;
|
||||
}
|
||||
}
|
||||
|
||||
ksort($tim_arr); // Sort into time order
|
||||
|
||||
|
||||
|
||||
if (isset($ec_qs[3])) $ec_pdf_template = $ec_qs[3];
|
||||
if (!isset($ec_pdf_template) || !array_key_exists($ec_pdf_template,$EVENT_CAL_PDF_NAMES)) $ec_pdf_template = 'default';
|
||||
|
||||
/*
|
||||
// These available to templates/shortcodes to pick up change of start day/month/year
|
||||
global $ec_last_year, $ec_last_month, $ec_last_day, $ec_year_change, $ec_month_change, $ec_day_change;
|
||||
global $ec_start_date, $ec_end_date, $ec_pdf_options;
|
||||
global $ec_current_month, $thisevent_start_date, $thisevent_end_date ;
|
||||
*/
|
||||
|
||||
$calSc->printVars = array('lt' => $ec_list_title, 'cat' => $ec_category_list, 'ot' => $ec_output_type,
|
||||
'sd' => $ec_start_date, 'ed' => $ec_end_date); // Give shortcodes the event data
|
||||
|
||||
$ec_last_year = 0;
|
||||
$ec_last_month = 0;
|
||||
$ec_last_day = 0;
|
||||
|
||||
$cal_text = '';
|
||||
$cal_totev = count($ev_list);
|
||||
if ($cal_totev > 0)
|
||||
{
|
||||
if (isset($ec_template_styles[$ec_pdf_template]) && is_array($ec_template_styles[$ec_pdf_template]))
|
||||
{
|
||||
$ec_current_overrides = $ec_template_styles[$ec_pdf_template]; // Possible array of codes to override standard $sc_style
|
||||
$sc_style = array_merge($sc_style,$ec_current_overrides); // Override as necessary
|
||||
}
|
||||
|
||||
// If printing, wrap in a form so the button works
|
||||
if ($ec_output_type == 'print') $cal_text .= "<form action=''>\n";
|
||||
// Add header
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_HEADER[$ec_pdf_template], FALSE, $calSc);
|
||||
// Debug code
|
||||
// echo "Start date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_start_date)."<br />";
|
||||
// echo "End date: ".strftime("%d-%m-%Y %H:%M:%S",$ec_end_date)."<br />";
|
||||
// echo "Template: ".$ec_pdf_template,"<br />";
|
||||
// echo "Header: ".$EVENT_CAL_PDF_HEADER[$ec_pdf_template]."<br />";
|
||||
// echo "Body: ".$EVENT_CAL_PDF_BODY[$ec_pdf_template]."<br />";
|
||||
// echo "Footer: ".$EVENT_CAL_PDF_FOOTER[$ec_pdf_template]."<br />";
|
||||
|
||||
foreach ($tim_arr as $tim => $ptr)
|
||||
{
|
||||
$ev_list[$ptr]['event_start'] = $tim;
|
||||
$thisevent = $ev_list[$ptr];
|
||||
// Decode dates into individual fields - we're bound to want them
|
||||
$thisevent_start_date = $ecal_class->gmgetdate($thisevent['event_start']);
|
||||
$thisevent_end_date = $ecal_class->gmgetdate($thisevent['event_end']);
|
||||
|
||||
$ec_year_change = ($ec_last_year != $thisevent_start_date['year']);
|
||||
$ec_month_change = ($ec_last_month != $thisevent_start_date['mon']);
|
||||
$ec_day_change = ($ec_last_day != $thisevent_start_date['mday']);
|
||||
|
||||
$cal_totev --; // Can use this to modify inter-event gap
|
||||
$calSc->numEvents = $cal_totev; // Number of events to display
|
||||
$calSc->event = $thisevent; // Give shortcodes the event data
|
||||
$calSc->changeFlags = array('yc' => $ec_year_change, 'mc' => $ec_month_change, 'dc' => $ec_day_change); // Give shortcodes the event data
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_BODY[$ec_pdf_template], FALSE, $calSc);
|
||||
|
||||
$ec_last_year = $thisevent_start_date['year'];
|
||||
$ec_last_month = $thisevent_start_date['mon'];
|
||||
$ec_last_day = $thisevent_start_date['mday'];
|
||||
}
|
||||
|
||||
// Add footer
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_PDF_FOOTER[$ec_pdf_template], FALSE, $calSc);
|
||||
if ($ec_output_type == 'print') $cal_text .= "</form>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cal_text.= EC_LAN_148;
|
||||
}
|
||||
|
||||
switch($ec_output_type)
|
||||
{
|
||||
case 'display':
|
||||
$e107->ns->tablerender(EC_LAN_80, $cal_text, 'ec_pf_page');
|
||||
require_once (FOOTERF);
|
||||
break;
|
||||
|
||||
case 'print':
|
||||
echo $cal_text;
|
||||
break;
|
||||
|
||||
case 'pdf':
|
||||
//TODO find a way to pass initialisation options etc to PDF driver
|
||||
include_lan(e_PLUGIN.'pdf/languages/'.e_LANGUAGE.'.php');
|
||||
// define('FPDF_FONTPATH', 'font/');
|
||||
//require the ufpdf class
|
||||
// require_once (e_PLUGIN.'pdf/ufpdf.php');
|
||||
//require the e107pdf class
|
||||
require_once (e_PLUGIN.'pdf/e107pdf.php');
|
||||
$pdf = new e107PDF();
|
||||
// $text = array($text, $creator, $author, $title, $subject, $keywords, $url);
|
||||
$text = array(
|
||||
$cal_text,
|
||||
'',
|
||||
'',
|
||||
EC_LAN_163, // Title
|
||||
'',
|
||||
'',
|
||||
e_SELF.'?'.e_QUERY, // URL
|
||||
'' // Page orientation
|
||||
);
|
||||
$pdf->makePDF($text);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// We're assuming $date_string is a string of digits
|
||||
// Which could begin with 'now' or 'now+'
|
||||
function decode_date($date_string, $last_day = FALSE)
|
||||
{ // Decode a date string
|
||||
if (strpos($date_string, 'now') === 0)
|
||||
{
|
||||
// decode special dates
|
||||
$today = getdate();
|
||||
// Knock off the 'now'
|
||||
$date_string = trim(substr($date_string, 3));
|
||||
if (($date_string != '') && ($date_string[0] == '+'))
|
||||
{
|
||||
// Knock off the '+'
|
||||
$date_string = trim(substr($date_string, 1));
|
||||
if (is_numeric($date_string) && ($date_string >= 0) && ($date_string <= 12))
|
||||
{
|
||||
$today['mon'] += $date_string;
|
||||
if ($today['mon'] > 12)
|
||||
{
|
||||
$today['mon'] -= 12;
|
||||
$today['year'] += 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return EC_LAN_149;
|
||||
}
|
||||
}
|
||||
$date_string = $today['year'].$today['mon'];
|
||||
}
|
||||
|
||||
// Here, $date_string is a string of 5, 6 or 8 digits
|
||||
// use preg_match()
|
||||
if(preg_match('/^\d{5,8}$/D', $date_string))
|
||||
{
|
||||
$month = 0;
|
||||
$day = 1;
|
||||
if (strlen($date_string) == 5)
|
||||
$date_string = substr_replace($date_string, '0', -1, 0);
|
||||
if (strlen($date_string) == 8)
|
||||
{
|
||||
$day = substr($date_string, -2, 2);
|
||||
if ($last_day)
|
||||
$day += 1;
|
||||
}
|
||||
elseif (strlen($date_string) == 6)
|
||||
{
|
||||
if ($last_day)
|
||||
$month = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error
|
||||
return EC_LAN_149;
|
||||
}
|
||||
$month += substr($date_string, 4, 2);
|
||||
$year = substr($date_string, 0, 4);
|
||||
$temp = mktime(0, 0, 0, $month, $day, $year);
|
||||
// Always do this to get whole of last day
|
||||
if ($last_day)
|
||||
$temp -= 1;
|
||||
return $temp;
|
||||
}
|
||||
else
|
||||
{ // Error
|
||||
return EC_LAN_149;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Generate monthly drop-down - FALSE = first, TRUE = last
|
||||
// For the first date we want beginning of previous year to end of current year
|
||||
// For the last date we want end of next
|
||||
function gen_drop($drop_type)
|
||||
{
|
||||
$text = "<select name='".($drop_type ? 'end_date' : 'start_date')."' class='tbox' style='width:140px;' >\n";
|
||||
if ($drop_type)
|
||||
{
|
||||
$start_date = strtotime('-3 months');
|
||||
$match_date = strtotime('+3 months'); // Propose 3-month list
|
||||
}
|
||||
else
|
||||
{
|
||||
$start_date = strtotime('-9 months');
|
||||
// $match_date = strtotime('-1 months');
|
||||
$match_date = time(); // Use current month for start date
|
||||
}
|
||||
|
||||
// Get date to be 1st of month
|
||||
$date = getdate($match_date);
|
||||
$match_date = mktime(0,0,0,$date['mon'],1,$date['year'],FALSE);
|
||||
|
||||
for ($i = 0; $i < 24; $i++)
|
||||
{
|
||||
$sel_text = (($match_date == $start_date) ? "selected='selected'" : "");
|
||||
$date = getdate($start_date);
|
||||
$text .= "<option value = '{$date['year']}{$date['mon']}' {$sel_text}>{$date['month']} {$date['year']} </option>\n";
|
||||
$start_date = mktime(0,0,0,$date['mon']+1,1,$date['year'],FALSE);
|
||||
}
|
||||
$text .= "</select>\n";
|
||||
return $text;
|
||||
}
|
||||
?>
|
||||
|
@@ -1,108 +1,110 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - template file for list generator
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
/*
|
||||
Templates file for the event calendar listings (display/print/pdf).
|
||||
There can be more than one template defined, in which case they are selectable.
|
||||
There are four strings to define:
|
||||
$EVENT_CAL_PDF_NAMES[] - a 'user-friendly' name/description (shown in selection box)
|
||||
$EVENT_CAL_PDF_HEADER[] - the template for the header - displayed once at the top pf the list
|
||||
$EVENT_CAL_PDF_BODY[] - template for each individual entry
|
||||
$EVENT_CAL_PDF_FOOTER[] - template for a footer (to close off the list)
|
||||
|
||||
The array index defines the name of the template - if there is an entry in the $EVENT_CAL_PDF_NAMES[]
|
||||
array, there must be a corresponding entry in each of the other three arrays.
|
||||
|
||||
There are two ways of managing the styling of the various shortcodes:
|
||||
a) The $sc_style array works in the usual way, and should be used where the styling is the same
|
||||
for all templates, or where you can set a 'default' styling which applies to most uses of the shortcode
|
||||
b) An $ec_template_styles array sets styles for an individual template. This need only contain the
|
||||
styles which override a default $sc_style entry.
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
|
||||
|
||||
$sc_style['EC_PR_CHANGE_YEAR']['pre'] = '<br /><em><strong>';
|
||||
$sc_style['EC_PR_CHANGE_YEAR']['post'] = '</strong></em>';
|
||||
$sc_style['EC_PR_CHANGE_MONTH']['pre'] = '<br /><strong>';
|
||||
$sc_style['EC_PR_CHANGE_MONTH']['post'] = '</strong><br />';
|
||||
$sc_style['EC_PRINT_BUTTON']['pre'] = "<br /><div style='text-align:center'>";
|
||||
$sc_style['EC_PRINT_BUTTON']['post'] = "</div>";
|
||||
$sc_style['EC_NOW_DATE']['pre'] = EC_LAN_170;
|
||||
$sc_style['EC_NOW_DATE']['post'] = "";
|
||||
$sc_style['EC_NOW_TIME']['pre'] = EC_LAN_144;
|
||||
$sc_style['EC_NOW_TIME']['post'] = "";
|
||||
$sc_style['EC_PR_CAT_LIST']['pre'] = EC_LAN_172;
|
||||
$sc_style['EC_PR_CAT_LIST']['post'] = "";
|
||||
$sc_style['EC_PR_LIST_TITLE']['pre'] = "<h3>";
|
||||
$sc_style['EC_PR_LIST_TITLE']['post'] = "</h3>";
|
||||
|
||||
// - Default style - very basic
|
||||
$EVENT_CAL_PDF_NAMES['default'] = EC_LAN_165;
|
||||
$EVENT_CAL_PDF_HEADER['default'] = "{EC_PR_LIST_TITLE}<br />{EC_PR_CAT_LIST}<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br />";
|
||||
$EVENT_CAL_PDF_BODY['default'] = "{EC_PR_CHANGE_YEAR}{EC_PR_CHANGE_MONTH}{EC_MAIL_SHORT_DATE} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />\n";
|
||||
$EVENT_CAL_PDF_FOOTER['default'] = "---End of List---<br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME}<br />{EC_PRINT_BUTTON}";
|
||||
|
||||
|
||||
// - A simple tabular style
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['pre'] = '<strong>';
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['post'] = '</strong>';
|
||||
|
||||
$EVENT_CAL_PDF_NAMES['simple'] = EC_LAN_166;
|
||||
$EVENT_CAL_PDF_HEADER['simple'] = "{EC_IF_PRINT=LOGO}<table border='0px' cellspacing='10px' cellpadding='5px'>
|
||||
<colgroup> <col width='15%'><col width='10%'><col width='10%'><col width='65%'></colgroup>
|
||||
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}</td></tr>";
|
||||
$EVENT_CAL_PDF_BODY['simple'] = "{EC_PR_CHANGE_YEAR}<tr><td>{EC_PR_CHANGE_MONTH} </td>
|
||||
<td>{EC_MAIL_DATE_START=%a %d}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
|
||||
$EVENT_CAL_PDF_FOOTER['simple'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME} <br />{EC_PRINT_BUTTON}";
|
||||
|
||||
|
||||
// - A tabular style with lines round the cells
|
||||
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='3'><em><strong><br />";
|
||||
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
|
||||
|
||||
$EVENT_CAL_PDF_NAMES['tlinclines'] = EC_LAN_167;
|
||||
$EVENT_CAL_PDF_HEADER['tlinclines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
|
||||
<colgroup> <col width='22%'><col width='8%'><col width='70%'></colgroup>
|
||||
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>";
|
||||
$EVENT_CAL_PDF_BODY['tlinclines'] = "{EC_PR_CHANGE_YEAR}<tr>
|
||||
<td>{EC_MAIL_DATE_START}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
|
||||
$EVENT_CAL_PDF_FOOTER['tlinclines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}";
|
||||
|
||||
// - A tabular style with lines round the cells and categories
|
||||
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
|
||||
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
|
||||
|
||||
$EVENT_CAL_PDF_NAMES['tlinccatlines'] = EC_LAN_171;
|
||||
$EVENT_CAL_PDF_HEADER['tlinccatlines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
|
||||
<colgroup> <col width='12%'><col width='8%'><col width='18%'><col width='62%'></colgroup>
|
||||
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>";
|
||||
$EVENT_CAL_PDF_BODY['tlinccatlines'] = "{EC_PR_CHANGE_YEAR}<tr>
|
||||
<td>{EC_MAIL_DATE_START=%D %d %b}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_CATEGORY}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
|
||||
$EVENT_CAL_PDF_FOOTER['tlinccatlines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}";
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - template file for list generator
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar - template file for list generator
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
/*
|
||||
Templates file for the event calendar listings (display/print/pdf).
|
||||
There can be more than one template defined, in which case they are selectable.
|
||||
There are four strings to define:
|
||||
$EVENT_CAL_PDF_NAMES[] - a 'user-friendly' name/description (shown in selection box)
|
||||
$EVENT_CAL_PDF_HEADER[] - the template for the header - displayed once at the top pf the list
|
||||
$EVENT_CAL_PDF_BODY[] - template for each individual entry
|
||||
$EVENT_CAL_PDF_FOOTER[] - template for a footer (to close off the list)
|
||||
|
||||
The array index defines the name of the template - if there is an entry in the $EVENT_CAL_PDF_NAMES[]
|
||||
array, there must be a corresponding entry in each of the other three arrays.
|
||||
|
||||
There are two ways of managing the styling of the various shortcodes:
|
||||
a) The $sc_style array works in the usual way, and should be used where the styling is the same
|
||||
for all templates, or where you can set a 'default' styling which applies to most uses of the shortcode
|
||||
b) An $ec_template_styles array sets styles for an individual template. This need only contain the
|
||||
styles which override a default $sc_style entry.
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined('USER_WIDTH')){ define('USER_WIDTH','width:auto'); }
|
||||
|
||||
$sc_style['EC_PR_CHANGE_YEAR']['pre'] = '<br /><em><strong>';
|
||||
$sc_style['EC_PR_CHANGE_YEAR']['post'] = '</strong></em>';
|
||||
$sc_style['EC_PR_CHANGE_MONTH']['pre'] = '<br /><strong>';
|
||||
$sc_style['EC_PR_CHANGE_MONTH']['post'] = '</strong><br />';
|
||||
$sc_style['EC_PRINT_BUTTON']['pre'] = "<br /><div style='text-align:center'>";
|
||||
$sc_style['EC_PRINT_BUTTON']['post'] = "</div>";
|
||||
$sc_style['EC_NOW_DATE']['pre'] = EC_LAN_170;
|
||||
$sc_style['EC_NOW_DATE']['post'] = "";
|
||||
$sc_style['EC_NOW_TIME']['pre'] = EC_LAN_144;
|
||||
$sc_style['EC_NOW_TIME']['post'] = "";
|
||||
$sc_style['EC_PR_CAT_LIST']['pre'] = EC_LAN_172;
|
||||
$sc_style['EC_PR_CAT_LIST']['post'] = "";
|
||||
$sc_style['EC_PR_LIST_TITLE']['pre'] = "<h3>";
|
||||
$sc_style['EC_PR_LIST_TITLE']['post'] = "</h3>";
|
||||
|
||||
// - Default style - very basic
|
||||
$EVENT_CAL_PDF_NAMES['default'] = EC_LAN_165;
|
||||
$EVENT_CAL_PDF_HEADER['default'] = "{EC_PR_LIST_TITLE}<br />{EC_PR_CAT_LIST}<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br />";
|
||||
$EVENT_CAL_PDF_BODY['default'] = "{EC_PR_CHANGE_YEAR}{EC_PR_CHANGE_MONTH}{EC_MAIL_SHORT_DATE} {EC_MAIL_TIME_START} {EC_MAIL_TITLE}<br />\n";
|
||||
$EVENT_CAL_PDF_FOOTER['default'] = "---End of List---<br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME}<br />{EC_PRINT_BUTTON}";
|
||||
|
||||
|
||||
// - A simple tabular style
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['pre'] = '<strong>';
|
||||
$ec_template_styles['simple']['EC_PR_CHANGE_MONTH']['post'] = '</strong>';
|
||||
|
||||
$EVENT_CAL_PDF_NAMES['simple'] = EC_LAN_166;
|
||||
$EVENT_CAL_PDF_HEADER['simple'] = "{EC_IF_PRINT=LOGO}<table border='0px' cellspacing='10px' cellpadding='5px'>
|
||||
<colgroup> <col width='15%'><col width='10%'><col width='10%'><col width='65%'></colgroup>
|
||||
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}</td></tr>";
|
||||
$EVENT_CAL_PDF_BODY['simple'] = "{EC_PR_CHANGE_YEAR}<tr><td>{EC_PR_CHANGE_MONTH} </td>
|
||||
<td>{EC_MAIL_DATE_START=%a %d}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
|
||||
$EVENT_CAL_PDF_FOOTER['simple'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE}{EC_IFNOT_DISPLAY=EC_NOW_TIME} <br />{EC_PRINT_BUTTON}";
|
||||
|
||||
|
||||
// - A tabular style with lines round the cells
|
||||
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='3'><em><strong><br />";
|
||||
$ec_template_styles['tlinclines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
|
||||
|
||||
$EVENT_CAL_PDF_NAMES['tlinclines'] = EC_LAN_167;
|
||||
$EVENT_CAL_PDF_HEADER['tlinclines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
|
||||
<colgroup> <col width='22%'><col width='8%'><col width='70%'></colgroup>
|
||||
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>";
|
||||
$EVENT_CAL_PDF_BODY['tlinclines'] = "{EC_PR_CHANGE_YEAR}<tr>
|
||||
<td>{EC_MAIL_DATE_START}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
|
||||
$EVENT_CAL_PDF_FOOTER['tlinclines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}";
|
||||
|
||||
// - A tabular style with lines round the cells and categories
|
||||
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['pre'] = "<tr><td colspan='4'><em><strong><br />";
|
||||
$ec_template_styles['tlinccatlines']['EC_PR_CHANGE_YEAR']['post'] = '</strong></em></td></tr>';
|
||||
|
||||
$EVENT_CAL_PDF_NAMES['tlinccatlines'] = EC_LAN_171;
|
||||
$EVENT_CAL_PDF_HEADER['tlinccatlines'] = "<table border='1px' cellspacing='0px' cellpadding='5px'>
|
||||
<colgroup> <col width='12%'><col width='8%'><col width='18%'><col width='62%'></colgroup>
|
||||
<tr ><td colspan='4' style='text-align:center'>".EC_LAN_163."<br />".EC_LAN_168."{EC_PR_LIST_START=%d-%m-%Y}<br />".EC_LAN_169."{EC_PR_LIST_END=%d-%m-%Y}<br /></td></tr>";
|
||||
$EVENT_CAL_PDF_BODY['tlinccatlines'] = "{EC_PR_CHANGE_YEAR}<tr>
|
||||
<td>{EC_MAIL_DATE_START=%D %d %b}</td><td>{EC_MAIL_TIME_START}</td><td>{EC_MAIL_CATEGORY}</td><td>{EC_MAIL_TITLE}</td></tr>\n";
|
||||
$EVENT_CAL_PDF_FOOTER['tlinccatlines'] = "</table><br /><br />{EC_IFNOT_DISPLAY=EC_NOW_DATE=%d-%m-%y}{EC_IFNOT_DISPLAY=EC_NOW_TIME}{EC_PRINT_BUTTON}";
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,302 +1,304 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* These messages are for the 'user' pages of the event calendar (including event entry/editing)
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - 'user' pages
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('EC_ADLAN_1', 'Event Calendar');
|
||||
define('EC_ADLAN_2', 'Configure Event Calendar');
|
||||
define('EC_LAN_TODAY', 'today');
|
||||
|
||||
define('EC_LAN_DAY_1', "1");
|
||||
define('EC_LAN_DAY_2', "2");
|
||||
define('EC_LAN_DAY_3', "3");
|
||||
define('EC_LAN_DAY_4', "4");
|
||||
define('EC_LAN_DAY_5', "5");
|
||||
define('EC_LAN_DAY_6', "6");
|
||||
define('EC_LAN_DAY_7', "7");
|
||||
define('EC_LAN_DAY_8', "8");
|
||||
define('EC_LAN_DAY_9', "9");
|
||||
define('EC_LAN_DAY_10', "10");
|
||||
define('EC_LAN_DAY_11', "11");
|
||||
define('EC_LAN_DAY_12', "12");
|
||||
define('EC_LAN_DAY_13', "13");
|
||||
define('EC_LAN_DAY_14', "14");
|
||||
define('EC_LAN_DAY_15', "15");
|
||||
define('EC_LAN_DAY_16', "16");
|
||||
define('EC_LAN_DAY_17', "17");
|
||||
define('EC_LAN_DAY_18', "18");
|
||||
define('EC_LAN_DAY_19', "19");
|
||||
define('EC_LAN_DAY_20', "20");
|
||||
define('EC_LAN_DAY_21', "21");
|
||||
define('EC_LAN_DAY_22', "22");
|
||||
define('EC_LAN_DAY_23', "23");
|
||||
define('EC_LAN_DAY_24', "24");
|
||||
define('EC_LAN_DAY_25', "25");
|
||||
define('EC_LAN_DAY_26', "26");
|
||||
define('EC_LAN_DAY_27', "27");
|
||||
define('EC_LAN_DAY_28', "28");
|
||||
define('EC_LAN_DAY_29', "29");
|
||||
define('EC_LAN_DAY_30', "30");
|
||||
define('EC_LAN_DAY_31', "31");
|
||||
|
||||
define('EC_LAN_0', "January");
|
||||
define('EC_LAN_1', "February");
|
||||
define('EC_LAN_2', "March");
|
||||
define('EC_LAN_3', "April");
|
||||
define('EC_LAN_4', "May");
|
||||
define('EC_LAN_5', "June");
|
||||
define('EC_LAN_6', "July");
|
||||
define('EC_LAN_7', "August");
|
||||
define('EC_LAN_8', "September");
|
||||
define('EC_LAN_9', "October");
|
||||
define('EC_LAN_10', "November");
|
||||
define('EC_LAN_11', "December");
|
||||
define('EC_LAN_JAN', "Jan");
|
||||
define('EC_LAN_FEB', "Feb");
|
||||
define('EC_LAN_MAR', "Mar");
|
||||
define('EC_LAN_APR', "Apr");
|
||||
define('EC_LAN_MAY', "May");
|
||||
define('EC_LAN_JUN', "Jun");
|
||||
define('EC_LAN_JUL', "Jul");
|
||||
define('EC_LAN_AUG', "Aug");
|
||||
define('EC_LAN_SEP', "Sep");
|
||||
define('EC_LAN_OCT', "Oct");
|
||||
define('EC_LAN_NOV', "Nov");
|
||||
define('EC_LAN_DEC', "Dec");
|
||||
define('EC_LAN_12', "Monday");
|
||||
define('EC_LAN_13', "Tuesday");
|
||||
define('EC_LAN_14', "Wednesday");
|
||||
define('EC_LAN_15', "Thursday");
|
||||
define('EC_LAN_16', "Friday");
|
||||
define('EC_LAN_17', "Saturday");
|
||||
define('EC_LAN_18', "Sunday");
|
||||
define('EC_LAN_19', "Mon");
|
||||
define('EC_LAN_20', "Tue");
|
||||
define('EC_LAN_21', "Wed");
|
||||
define('EC_LAN_22', "Thu");
|
||||
define('EC_LAN_23', "Fri");
|
||||
define('EC_LAN_24', "Sat");
|
||||
define('EC_LAN_25', "Sun");
|
||||
define('EC_LAN_26', "Events this Month");
|
||||
define('EC_LAN_27', "No events for this month.");
|
||||
define('EC_LAN_28', "Enter New Event");
|
||||
define('EC_LAN_29', "When:");
|
||||
define('EC_LAN_30', "Category:");
|
||||
define('EC_LAN_31', "Posted by:");
|
||||
define('EC_LAN_32', "Location:");
|
||||
define('EC_LAN_33', "Contact:");
|
||||
define('EC_LAN_34', "Jump to");
|
||||
define('EC_LAN_35', "Edit");
|
||||
define('EC_LAN_36', "Delete");
|
||||
define('EC_LAN_37', "None Listed.");
|
||||
define('EC_LAN_38', "Not specified");
|
||||
define('EC_LAN_39', "Click here for more information");
|
||||
define('EC_LAN_40', "Current Month");
|
||||
define('EC_LAN_41', "Total -NUM- individual events created");
|
||||
define('EC_LAN_42', "Event cannot end before it starts.");
|
||||
define('EC_LAN_43', "You left required field(s) blank.");
|
||||
define('EC_LAN_44', "New event created and entered into database.");
|
||||
define('EC_LAN_45', "Event updated in database.");
|
||||
define('EC_LAN_46', "Confirm Delete Event");
|
||||
define('EC_LAN_47', "Delete cancelled.");
|
||||
define('EC_LAN_48', "Please confirm you wish to delete this event - once deleted it cannot be retrieved");
|
||||
define('EC_LAN_49', "Cancel");
|
||||
define('EC_LAN_50', "Confirm Delete");
|
||||
define('EC_LAN_51', "Event deleted.");
|
||||
define('EC_LAN_52', "Event Category:");
|
||||
define('EC_LAN_53', "Create new category?:");
|
||||
define('EC_LAN_54', "Name:");
|
||||
//define('EC_LAN_55', "Icon:");
|
||||
define('EC_LAN_56', "Create");
|
||||
define('EC_LAN_57', "Event:");
|
||||
define('EC_LAN_58', "source info URL:");
|
||||
define('EC_LAN_59', "Contact email:");
|
||||
define('EC_LAN_60', "Update Event");
|
||||
define('EC_LAN_61', "Go");
|
||||
define('EC_LAN_62', "Next -NUM- Events ...");
|
||||
define('EC_LAN_63', "Select repeating events between start and end dates. Start and end time as set");
|
||||
define('EC_LAN_64', "Check for an all-day event");
|
||||
define('EC_LAN_65', "Recurring:");
|
||||
define('EC_LAN_66', "Edit Event");
|
||||
define('EC_LAN_67', "Start:");
|
||||
define('EC_LAN_68', "All day event:");
|
||||
define('EC_LAN_69', "Ends:");
|
||||
define('EC_LAN_70', "Event Title:");
|
||||
define('EC_LAN_71', "Event Time:");
|
||||
define('EC_LAN_72', "Event Date:");
|
||||
define('EC_LAN_73', "End:");
|
||||
define('EC_LAN_74', "View Category");
|
||||
//define('EC_LAN_76', "Events can be added by:");
|
||||
//define('EC_LAN_77', "Update Settings");
|
||||
//define('EC_LAN_78', "Calendar Settings");
|
||||
define('EC_LAN_79', "Calendar View");
|
||||
define('EC_LAN_80', "Event List");
|
||||
//define('EC_LAN_81', "Configure Event Calendar");
|
||||
//define('EC_LAN_82', "To activate please go to your menus screen and select the calendar_menu into one of your menu areas.");
|
||||
define('EC_LAN_83', "Calendar");
|
||||
define('EC_LAN_84', " from ");
|
||||
define('EC_LAN_85', " until ");
|
||||
define('EC_LAN_86', "Individual events from entry");
|
||||
define('EC_LAN_87', "By checking this box you may generate a large number of individual events, which you will have to edit or delete individually if they are wrong");
|
||||
define('EC_LAN_88', "You have chosen to generate -NUM- individual events.");
|
||||
define('EC_LAN_89', "If the entry is wrong, you will have to edit or delete the entries individually");
|
||||
|
||||
//define('EC_LAN_90', "Choose");
|
||||
define('EC_LAN_91', "Admin must define first");
|
||||
define('EC_LAN_92', "View Category");
|
||||
define('EC_LAN_93', "View Events List");
|
||||
define('EC_LAN_94', "Enter New Event");
|
||||
define('EC_LAN_95', "Today");
|
||||
define('EC_LAN_96', "View Calendar");
|
||||
define('EC_LAN_97', "All");
|
||||
define('EC_LAN_98', "Required fields left blank");
|
||||
define('EC_LAN_99', "Event must either be an all day event or finish after it starts");
|
||||
define('EC_LAN_100', "Invalid Category Selection");
|
||||
//define('EC_LAN_101', "Set to inactive to disable on the new event form.");
|
||||
//define('EC_LAN_102', "Show link to 'more information' with events");
|
||||
//define('EC_LAN_103', "On new event entry form.");
|
||||
//define('EC_LAN_104', "Calendar Administrator Class");
|
||||
define('EC_LAN_105', "* Required Field");
|
||||
define('EC_LAN_106', "Events");
|
||||
//define('EC_LAN_107', "This plugin is a fully featured event calendar with calendar menu.");
|
||||
define('EC_LAN_108', "Event Calendar Upgraded. See the 'readme.pdf' file for detailed information.");
|
||||
define('EC_LAN_109', "Unable to delete this event.");
|
||||
define('EC_LAN_110', "Event Number ");
|
||||
define('EC_LAN_111', "All the events on ");
|
||||
define('EC_LAN_112', "All the Events in ");
|
||||
define('EC_LAN_113', "Event form already submitted.");
|
||||
//define('EC_LAN_114', "Week starts with:");
|
||||
define('EC_LAN_115', "Sunday");
|
||||
define('EC_LAN_116', "Monday");
|
||||
//define('EC_LAN_117', "Length of daynames (characters)");
|
||||
//define('EC_LAN_118', "Date format in calendar header:");
|
||||
//define('EC_LAN_119', "month/year");
|
||||
//define('EC_LAN_120', "year/month");
|
||||
define('EC_LAN_121', "Show Calendar");
|
||||
define('EC_LAN_122', 'Event information (single event)');
|
||||
define('EC_LAN_123', "Subscriptions");
|
||||
define('EC_LAN_124', "Calendar Subscriptions");
|
||||
define('EC_LAN_125', "Categories available for subscription");
|
||||
define('EC_LAN_126', "Subscribed");
|
||||
define('EC_LAN_127', "Category");
|
||||
define('EC_LAN_128', "No categories available to subscribe to");
|
||||
define('EC_LAN_129', "Update");
|
||||
define('EC_LAN_130', "Subscriptions updated");
|
||||
define('EC_LAN_131', "Return");
|
||||
define('EC_LAN_132', "Expand details");
|
||||
define('EC_LAN_133', "[read more]");
|
||||
define('EC_LAN_134', "You have to provide a category name");
|
||||
define('EC_LAN_135', "Event");
|
||||
define('EC_LAN_136', "Category Description");
|
||||
define('EC_LAN_137', "Future Events");
|
||||
|
||||
define('EC_LAN_140', "Forthcoming Events");
|
||||
define('EC_LAN_141', "No forthcoming events");
|
||||
define('EC_LAN_142', "Only registered and logged in users can subscribe to events");
|
||||
define('EC_LAN_143', "Facility not available");
|
||||
define('EC_LAN_144', " at ");
|
||||
|
||||
define('EC_LAN_145', "You must specify a category for the event");
|
||||
define('EC_LAN_146', "Advance notice of calendar event");
|
||||
define('EC_LAN_147', "Calendar event today or tomorrow");
|
||||
define('EC_LAN_148', "No events in specified date range");
|
||||
define('EC_LAN_149', "Invalid date format");
|
||||
define('EC_LAN_150', "Enter start and end date for list");
|
||||
define('EC_LAN_151', "End date after start date");
|
||||
define('EC_LAN_152', "Maximum one year's events");
|
||||
define('EC_LAN_153', "Start Date (first day of): ");
|
||||
define('EC_LAN_154', "End Date (last day of): ");
|
||||
define('EC_LAN_155', "Category: ");
|
||||
define('EC_LAN_156', "Create List");
|
||||
define('EC_LAN_157', "Layout Options:");
|
||||
define('EC_LAN_158', "Output: ");
|
||||
define('EC_LAN_159', "Display ");
|
||||
define('EC_LAN_160', "Print ");
|
||||
define('EC_LAN_161', "PDF ");
|
||||
define('EC_LAN_162', "Print this page");
|
||||
define('EC_LAN_163', "Event Listing");
|
||||
define('EC_LAN_164', "Printable Lists");
|
||||
define('EC_LAN_165', "Default Listing");
|
||||
define('EC_LAN_166', "Tabular List no lines");
|
||||
define('EC_LAN_167', "Tabular List with lines");
|
||||
define('EC_LAN_168', "From: ");
|
||||
define('EC_LAN_169', "To: ");
|
||||
define('EC_LAN_170', "Printed on: ");
|
||||
define('EC_LAN_171', "List including category");
|
||||
define('EC_LAN_172', "Event Categories: ");
|
||||
define('EC_LAN_173', "First event starts: ");
|
||||
define('EC_LAN_174', "Last event ends: ");
|
||||
define('EC_LAN_175', 'All Day');
|
||||
define('EC_LAN_176', "Recurring pattern: ");
|
||||
define('EC_LAN_177', "Cancel Entry");
|
||||
define('EC_LAN_178', "Accept Entries");
|
||||
define('EC_LAN_179', "Confirmation of multiple event entry");
|
||||
define('EC_LAN_180', 'RECORDS NOT SAVED - DB UPDATE ERROR');
|
||||
define('EC_LAN_181', "You aren't allowed to do that!");
|
||||
|
||||
define('EC_LAN_VIEWCALENDAR', 'View Calendar');
|
||||
define('EC_LAN_VIEWALLEVENTS', 'View all events');
|
||||
define('EC_LAN_ALLEVENTS', "All events");
|
||||
|
||||
/*
|
||||
// Recurring events texts - the numeric part of each define is the internal value assigned
|
||||
define('EC_LAN_RECUR_00', 'no');
|
||||
define('EC_LAN_RECUR_01', 'annual');
|
||||
define('EC_LAN_RECUR_02', 'biannual');
|
||||
define('EC_LAN_RECUR_03', 'quarterly');
|
||||
define('EC_LAN_RECUR_04', 'monthly');
|
||||
define('EC_LAN_RECUR_05', 'four weekly');
|
||||
define('EC_LAN_RECUR_06', 'fortnightly');
|
||||
define('EC_LAN_RECUR_07', 'weekly');
|
||||
define('EC_LAN_RECUR_08', 'daily');
|
||||
define('EC_LAN_RECUR_100', 'Sunday in month');
|
||||
define('EC_LAN_RECUR_101', 'Monday in month');
|
||||
define('EC_LAN_RECUR_102', 'Tuesday in month');
|
||||
define('EC_LAN_RECUR_103', 'Wednesday in month');
|
||||
define('EC_LAN_RECUR_104', 'Thursday in month');
|
||||
define('EC_LAN_RECUR_105', 'Friday in month');
|
||||
define('EC_LAN_RECUR_106', 'Saturday in month');
|
||||
|
||||
define('EC_LAN_RECUR_1100', 'First');
|
||||
define('EC_LAN_RECUR_1200', 'Second');
|
||||
define('EC_LAN_RECUR_1300', 'Third');
|
||||
define('EC_LAN_RECUR_1400', 'Fourth');
|
||||
|
||||
|
||||
// Notify
|
||||
define('NT_LAN_EC_1', 'Event Calendar Events');
|
||||
define('NT_LAN_EC_2', 'Event Updated');
|
||||
define('NT_LAN_EC_3', 'Update by');
|
||||
define('NT_LAN_EC_4', 'IP Address');
|
||||
define('NT_LAN_EC_5', 'Message');
|
||||
define('NT_LAN_EC_6', 'Event Calendar - Event added');
|
||||
define('NT_LAN_EC_7', 'New event posted');
|
||||
define('NT_LAN_EC_8', 'Event Calendar - Event modified');
|
||||
*/
|
||||
|
||||
// Prefs - language defines can be used in various places where text is set through the admin screens
|
||||
define('EC_MAILOUT_SUBJECT', "Advice of calendar event"); // Use shortcode EC_MAIL_SUBJECT
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* These messages are for the 'user' pages of the event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - 'user' pages
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('EC_ADLAN_1', 'Event Calendar');
|
||||
define('EC_ADLAN_2', 'Configure Event Calendar');
|
||||
define('EC_LAN_TODAY', 'today');
|
||||
|
||||
define('EC_LAN_DAY_1', "1");
|
||||
define('EC_LAN_DAY_2', "2");
|
||||
define('EC_LAN_DAY_3', "3");
|
||||
define('EC_LAN_DAY_4', "4");
|
||||
define('EC_LAN_DAY_5', "5");
|
||||
define('EC_LAN_DAY_6', "6");
|
||||
define('EC_LAN_DAY_7', "7");
|
||||
define('EC_LAN_DAY_8', "8");
|
||||
define('EC_LAN_DAY_9', "9");
|
||||
define('EC_LAN_DAY_10', "10");
|
||||
define('EC_LAN_DAY_11', "11");
|
||||
define('EC_LAN_DAY_12', "12");
|
||||
define('EC_LAN_DAY_13', "13");
|
||||
define('EC_LAN_DAY_14', "14");
|
||||
define('EC_LAN_DAY_15', "15");
|
||||
define('EC_LAN_DAY_16', "16");
|
||||
define('EC_LAN_DAY_17', "17");
|
||||
define('EC_LAN_DAY_18', "18");
|
||||
define('EC_LAN_DAY_19', "19");
|
||||
define('EC_LAN_DAY_20', "20");
|
||||
define('EC_LAN_DAY_21', "21");
|
||||
define('EC_LAN_DAY_22', "22");
|
||||
define('EC_LAN_DAY_23', "23");
|
||||
define('EC_LAN_DAY_24', "24");
|
||||
define('EC_LAN_DAY_25', "25");
|
||||
define('EC_LAN_DAY_26', "26");
|
||||
define('EC_LAN_DAY_27', "27");
|
||||
define('EC_LAN_DAY_28', "28");
|
||||
define('EC_LAN_DAY_29', "29");
|
||||
define('EC_LAN_DAY_30', "30");
|
||||
define('EC_LAN_DAY_31', "31");
|
||||
|
||||
define('EC_LAN_0', "January");
|
||||
define('EC_LAN_1', "February");
|
||||
define('EC_LAN_2', "March");
|
||||
define('EC_LAN_3', "April");
|
||||
define('EC_LAN_4', "May");
|
||||
define('EC_LAN_5', "June");
|
||||
define('EC_LAN_6', "July");
|
||||
define('EC_LAN_7', "August");
|
||||
define('EC_LAN_8', "September");
|
||||
define('EC_LAN_9', "October");
|
||||
define('EC_LAN_10', "November");
|
||||
define('EC_LAN_11', "December");
|
||||
define('EC_LAN_JAN', "Jan");
|
||||
define('EC_LAN_FEB', "Feb");
|
||||
define('EC_LAN_MAR', "Mar");
|
||||
define('EC_LAN_APR', "Apr");
|
||||
define('EC_LAN_MAY', "May");
|
||||
define('EC_LAN_JUN', "Jun");
|
||||
define('EC_LAN_JUL', "Jul");
|
||||
define('EC_LAN_AUG', "Aug");
|
||||
define('EC_LAN_SEP', "Sep");
|
||||
define('EC_LAN_OCT', "Oct");
|
||||
define('EC_LAN_NOV', "Nov");
|
||||
define('EC_LAN_DEC', "Dec");
|
||||
define('EC_LAN_12', "Monday");
|
||||
define('EC_LAN_13', "Tuesday");
|
||||
define('EC_LAN_14', "Wednesday");
|
||||
define('EC_LAN_15', "Thursday");
|
||||
define('EC_LAN_16', "Friday");
|
||||
define('EC_LAN_17', "Saturday");
|
||||
define('EC_LAN_18', "Sunday");
|
||||
define('EC_LAN_19', "Mon");
|
||||
define('EC_LAN_20', "Tue");
|
||||
define('EC_LAN_21', "Wed");
|
||||
define('EC_LAN_22', "Thu");
|
||||
define('EC_LAN_23', "Fri");
|
||||
define('EC_LAN_24', "Sat");
|
||||
define('EC_LAN_25', "Sun");
|
||||
define('EC_LAN_26', "Events this Month");
|
||||
define('EC_LAN_27', "No events for this month.");
|
||||
define('EC_LAN_28', "Enter New Event");
|
||||
define('EC_LAN_29', "When:");
|
||||
define('EC_LAN_30', "Category:");
|
||||
define('EC_LAN_31', "Posted by:");
|
||||
define('EC_LAN_32', "Location:");
|
||||
define('EC_LAN_33', "Contact:");
|
||||
define('EC_LAN_34', "Jump to");
|
||||
define('EC_LAN_35', "Edit");
|
||||
define('EC_LAN_36', "Delete");
|
||||
define('EC_LAN_37', "None Listed.");
|
||||
define('EC_LAN_38', "Not specified");
|
||||
define('EC_LAN_39', "Click here for more information");
|
||||
define('EC_LAN_40', "Current Month");
|
||||
define('EC_LAN_41', "Total -NUM- individual events created");
|
||||
define('EC_LAN_42', "Event cannot end before it starts.");
|
||||
define('EC_LAN_43', "You left required field(s) blank.");
|
||||
define('EC_LAN_44', "New event created and entered into database.");
|
||||
define('EC_LAN_45', "Event updated in database.");
|
||||
define('EC_LAN_46', "Confirm Delete Event");
|
||||
define('EC_LAN_47', "Delete cancelled.");
|
||||
define('EC_LAN_48', "Please confirm you wish to delete this event - once deleted it cannot be retrieved");
|
||||
define('EC_LAN_49', "Cancel");
|
||||
define('EC_LAN_50', "Confirm Delete");
|
||||
define('EC_LAN_51', "Event deleted.");
|
||||
define('EC_LAN_52', "Event Category:");
|
||||
define('EC_LAN_53', "Create new category?:");
|
||||
define('EC_LAN_54', "Name:");
|
||||
//define('EC_LAN_55', "Icon:");
|
||||
define('EC_LAN_56', "Create");
|
||||
define('EC_LAN_57', "Event:");
|
||||
define('EC_LAN_58', "source info URL:");
|
||||
define('EC_LAN_59', "Contact email:");
|
||||
define('EC_LAN_60', "Update Event");
|
||||
define('EC_LAN_61', "Go");
|
||||
define('EC_LAN_62', "Next -NUM- Events ...");
|
||||
define('EC_LAN_63', "Select repeating events between start and end dates. Start and end time as set");
|
||||
define('EC_LAN_64', "Check for an all-day event");
|
||||
define('EC_LAN_65', "Recurring:");
|
||||
define('EC_LAN_66', "Edit Event");
|
||||
define('EC_LAN_67', "Start:");
|
||||
define('EC_LAN_68', "All day event:");
|
||||
define('EC_LAN_69', "Ends:");
|
||||
define('EC_LAN_70', "Event Title:");
|
||||
define('EC_LAN_71', "Event Time:");
|
||||
define('EC_LAN_72', "Event Date:");
|
||||
define('EC_LAN_73', "End:");
|
||||
define('EC_LAN_74', "View Category");
|
||||
//define('EC_LAN_76', "Events can be added by:");
|
||||
//define('EC_LAN_77', "Update Settings");
|
||||
//define('EC_LAN_78', "Calendar Settings");
|
||||
define('EC_LAN_79', "Calendar View");
|
||||
define('EC_LAN_80', "Event List");
|
||||
//define('EC_LAN_81', "Configure Event Calendar");
|
||||
//define('EC_LAN_82', "To activate please go to your menus screen and select the calendar_menu into one of your menu areas.");
|
||||
define('EC_LAN_83', "Calendar");
|
||||
define('EC_LAN_84', " from ");
|
||||
define('EC_LAN_85', " until ");
|
||||
define('EC_LAN_86', "Individual events from entry");
|
||||
define('EC_LAN_87', "By checking this box you may generate a large number of individual events, which you will have to edit or delete individually if they are wrong");
|
||||
define('EC_LAN_88', "You have chosen to generate -NUM- individual events.");
|
||||
define('EC_LAN_89', "If the entry is wrong, you will have to edit or delete the entries individually");
|
||||
|
||||
//define('EC_LAN_90', "Choose");
|
||||
define('EC_LAN_91', "Admin must define first");
|
||||
define('EC_LAN_92', "View Category");
|
||||
define('EC_LAN_93', "View Events List");
|
||||
define('EC_LAN_94', "Enter New Event");
|
||||
define('EC_LAN_95', "Today");
|
||||
define('EC_LAN_96', "View Calendar");
|
||||
define('EC_LAN_97', "All");
|
||||
define('EC_LAN_98', "Required fields left blank");
|
||||
define('EC_LAN_99', "Event must either be an all day event or finish after it starts");
|
||||
define('EC_LAN_100', "Invalid Category Selection");
|
||||
//define('EC_LAN_101', "Set to inactive to disable on the new event form.");
|
||||
//define('EC_LAN_102', "Show link to 'more information' with events");
|
||||
//define('EC_LAN_103', "On new event entry form.");
|
||||
//define('EC_LAN_104', "Calendar Administrator Class");
|
||||
define('EC_LAN_105', "* Required Field");
|
||||
define('EC_LAN_106', "Events");
|
||||
//define('EC_LAN_107', "This plugin is a fully featured event calendar with calendar menu.");
|
||||
define('EC_LAN_108', "Event Calendar Upgraded. See the 'readme.pdf' file for detailed information.");
|
||||
define('EC_LAN_109', "Unable to delete this event.");
|
||||
define('EC_LAN_110', "Event Number ");
|
||||
define('EC_LAN_111', "All the events on ");
|
||||
define('EC_LAN_112', "All the Events in ");
|
||||
define('EC_LAN_113', "Event form already submitted.");
|
||||
//define('EC_LAN_114', "Week starts with:");
|
||||
define('EC_LAN_115', "Sunday");
|
||||
define('EC_LAN_116', "Monday");
|
||||
//define('EC_LAN_117', "Length of daynames (characters)");
|
||||
//define('EC_LAN_118', "Date format in calendar header:");
|
||||
//define('EC_LAN_119', "month/year");
|
||||
//define('EC_LAN_120', "year/month");
|
||||
define('EC_LAN_121', "Show Calendar");
|
||||
define('EC_LAN_122', 'Event information (single event)');
|
||||
define('EC_LAN_123', "Subscriptions");
|
||||
define('EC_LAN_124', "Calendar Subscriptions");
|
||||
define('EC_LAN_125', "Categories available for subscription");
|
||||
define('EC_LAN_126', "Subscribed");
|
||||
define('EC_LAN_127', "Category");
|
||||
define('EC_LAN_128', "No categories available to subscribe to");
|
||||
define('EC_LAN_129', "Update");
|
||||
define('EC_LAN_130', "Subscriptions updated");
|
||||
define('EC_LAN_131', "Return");
|
||||
define('EC_LAN_132', "Expand details");
|
||||
define('EC_LAN_133', "[read more]");
|
||||
define('EC_LAN_134', "You have to provide a category name");
|
||||
define('EC_LAN_135', "Event");
|
||||
define('EC_LAN_136', "Category Description");
|
||||
define('EC_LAN_137', "Future Events");
|
||||
|
||||
define('EC_LAN_140', "Forthcoming Events");
|
||||
define('EC_LAN_141', "No forthcoming events");
|
||||
define('EC_LAN_142', "Only registered and logged in users can subscribe to events");
|
||||
define('EC_LAN_143', "Facility not available");
|
||||
define('EC_LAN_144', " at ");
|
||||
|
||||
define('EC_LAN_145', "You must specify a category for the event");
|
||||
define('EC_LAN_146', "Advance notice of calendar event");
|
||||
define('EC_LAN_147', "Calendar event today or tomorrow");
|
||||
define('EC_LAN_148', "No events in specified date range");
|
||||
define('EC_LAN_149', "Invalid date format");
|
||||
define('EC_LAN_150', "Enter start and end date for list");
|
||||
define('EC_LAN_151', "End date after start date");
|
||||
define('EC_LAN_152', "Maximum one year's events");
|
||||
define('EC_LAN_153', "Start Date (first day of): ");
|
||||
define('EC_LAN_154', "End Date (last day of): ");
|
||||
define('EC_LAN_155', "Category: ");
|
||||
define('EC_LAN_156', "Create List");
|
||||
define('EC_LAN_157', "Layout Options:");
|
||||
define('EC_LAN_158', "Output: ");
|
||||
define('EC_LAN_159', "Display ");
|
||||
define('EC_LAN_160', "Print ");
|
||||
define('EC_LAN_161', "PDF ");
|
||||
define('EC_LAN_162', "Print this page");
|
||||
define('EC_LAN_163', "Event Listing");
|
||||
define('EC_LAN_164', "Printable Lists");
|
||||
define('EC_LAN_165', "Default Listing");
|
||||
define('EC_LAN_166', "Tabular List no lines");
|
||||
define('EC_LAN_167', "Tabular List with lines");
|
||||
define('EC_LAN_168', "From: ");
|
||||
define('EC_LAN_169', "To: ");
|
||||
define('EC_LAN_170', "Printed on: ");
|
||||
define('EC_LAN_171', "List including category");
|
||||
define('EC_LAN_172', "Event Categories: ");
|
||||
define('EC_LAN_173', "First event starts: ");
|
||||
define('EC_LAN_174', "Last event ends: ");
|
||||
define('EC_LAN_175', 'All Day');
|
||||
define('EC_LAN_176', "Recurring pattern: ");
|
||||
define('EC_LAN_177', "Cancel Entry");
|
||||
define('EC_LAN_178', "Accept Entries");
|
||||
define('EC_LAN_179', "Confirmation of multiple event entry");
|
||||
define('EC_LAN_180', 'RECORDS NOT SAVED - DB UPDATE ERROR');
|
||||
define('EC_LAN_181', "You aren't allowed to do that!");
|
||||
define('EC_LAN_182', 'Sign up to receive email notification of events');
|
||||
define('EC_LAN_183', 'Create printable lists of events');
|
||||
|
||||
define('EC_LAN_VIEWCALENDAR', 'View Calendar');
|
||||
define('EC_LAN_VIEWALLEVENTS', 'View all events');
|
||||
define('EC_LAN_ALLEVENTS', "All events");
|
||||
|
||||
/*
|
||||
// Recurring events texts - the numeric part of each define is the internal value assigned
|
||||
define('EC_LAN_RECUR_00', 'no');
|
||||
define('EC_LAN_RECUR_01', 'annual');
|
||||
define('EC_LAN_RECUR_02', 'biannual');
|
||||
define('EC_LAN_RECUR_03', 'quarterly');
|
||||
define('EC_LAN_RECUR_04', 'monthly');
|
||||
define('EC_LAN_RECUR_05', 'four weekly');
|
||||
define('EC_LAN_RECUR_06', 'fortnightly');
|
||||
define('EC_LAN_RECUR_07', 'weekly');
|
||||
define('EC_LAN_RECUR_08', 'daily');
|
||||
define('EC_LAN_RECUR_100', 'Sunday in month');
|
||||
define('EC_LAN_RECUR_101', 'Monday in month');
|
||||
define('EC_LAN_RECUR_102', 'Tuesday in month');
|
||||
define('EC_LAN_RECUR_103', 'Wednesday in month');
|
||||
define('EC_LAN_RECUR_104', 'Thursday in month');
|
||||
define('EC_LAN_RECUR_105', 'Friday in month');
|
||||
define('EC_LAN_RECUR_106', 'Saturday in month');
|
||||
|
||||
define('EC_LAN_RECUR_1100', 'First');
|
||||
define('EC_LAN_RECUR_1200', 'Second');
|
||||
define('EC_LAN_RECUR_1300', 'Third');
|
||||
define('EC_LAN_RECUR_1400', 'Fourth');
|
||||
|
||||
|
||||
// Notify
|
||||
define('NT_LAN_EC_1', 'Event Calendar Events');
|
||||
define('NT_LAN_EC_2', 'Event Updated');
|
||||
define('NT_LAN_EC_3', 'Update by');
|
||||
define('NT_LAN_EC_4', 'IP Address');
|
||||
define('NT_LAN_EC_5', 'Message');
|
||||
define('NT_LAN_EC_6', 'Event Calendar - Event added');
|
||||
define('NT_LAN_EC_7', 'New event posted');
|
||||
define('NT_LAN_EC_8', 'Event Calendar - Event modified');
|
||||
*/
|
||||
|
||||
// Prefs - language defines can be used in various places where text is set through the admin screens
|
||||
define('EC_MAILOUT_SUBJECT', "Advice of calendar event"); // Use shortcode EC_MAIL_SUBJECT
|
||||
|
||||
|
||||
?>
|
@@ -1,395 +1,228 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Messages for admin pages of event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - 'admin' pages
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('EC_ADLAN_1', 'Event Calendar');
|
||||
|
||||
define('EC_LAN_12', "Monday");
|
||||
define('EC_LAN_13', "Tuesday");
|
||||
define('EC_LAN_14', "Wednesday");
|
||||
define('EC_LAN_15', "Thursday");
|
||||
define('EC_LAN_16', "Friday");
|
||||
define('EC_LAN_17', "Saturday");
|
||||
define('EC_LAN_18', "Sunday");
|
||||
define('EC_LAN_19', "Mon");
|
||||
define('EC_LAN_20', "Tue");
|
||||
define('EC_LAN_21', "Wed");
|
||||
define('EC_LAN_22', "Thu");
|
||||
define('EC_LAN_23', "Fri");
|
||||
define('EC_LAN_24', "Sat");
|
||||
define('EC_LAN_25', "Sun");
|
||||
/*
|
||||
Following are LANs from user pages - probably not needed in ADMIN
|
||||
define('EC_LAN_26', "Events this Month");
|
||||
define('EC_LAN_27', "No events for this month.");
|
||||
define('EC_LAN_28', "Enter New Event");
|
||||
define('EC_LAN_29', "When:");
|
||||
define('EC_LAN_30', "Category:");
|
||||
define('EC_LAN_31', "Posted by:");
|
||||
define('EC_LAN_32', "Location:");
|
||||
define('EC_LAN_33', "Contact:");
|
||||
define('EC_LAN_34', "Jump to");
|
||||
define('EC_LAN_35', "Edit");
|
||||
define('EC_LAN_36', "Delete");
|
||||
define('EC_LAN_37', "None Listed.");
|
||||
define('EC_LAN_38', "Not specified");
|
||||
define('EC_LAN_39', "Click here for more information");
|
||||
define('EC_LAN_40', "Current Month");
|
||||
define('EC_LAN_41', "Total -NUM- individual events created");
|
||||
define('EC_LAN_42', "Event cannot end before it starts.");
|
||||
define('EC_LAN_43', "You left required field(s) blank.");
|
||||
define('EC_LAN_44', "New event created and entered into database.");
|
||||
define('EC_LAN_45', "Event updated in database.");
|
||||
define('EC_LAN_46', "Confirm Delete Event");
|
||||
define('EC_LAN_47', "Delete cancelled.");
|
||||
define('EC_LAN_48', "Please confirm you wish to delete this event - once deleted it cannot be retrieved");
|
||||
define('EC_LAN_49', "Cancel");
|
||||
define('EC_LAN_50', "Confirm Delete");
|
||||
define('EC_LAN_51', "Event deleted.");
|
||||
define('EC_LAN_52', "Event Category:");
|
||||
define('EC_LAN_53', "Create new category?:");
|
||||
define('EC_LAN_54', "Name:");
|
||||
define('EC_LAN_55', "Icon:");
|
||||
define('EC_LAN_56', "Create");
|
||||
define('EC_LAN_57', "Event:");
|
||||
define('EC_LAN_58', "source info URL:");
|
||||
define('EC_LAN_59', "Contact email:");
|
||||
define('EC_LAN_60', "Update Event");
|
||||
define('EC_LAN_61', "Go");
|
||||
define('EC_LAN_62', "Next -NUM- Events ...");
|
||||
define('EC_LAN_63', "Select repeating events between start and end dates. Start and end time as set");
|
||||
define('EC_LAN_64', "Check for an all-day event");
|
||||
define('EC_LAN_65', "Recurring:");
|
||||
define('EC_LAN_66', "Edit Event");
|
||||
define('EC_LAN_67', "Start:");
|
||||
define('EC_LAN_68', "All day event:");
|
||||
define('EC_LAN_69', "Ends:");
|
||||
define('EC_LAN_70', "Event Title:");
|
||||
define('EC_LAN_71', "Event Time:");
|
||||
define('EC_LAN_72', "Event Date:");
|
||||
define('EC_LAN_73', "End:");
|
||||
define('EC_LAN_74', "View Category");
|
||||
define('EC_LAN_76', "Events can be added by:");
|
||||
define('EC_LAN_77', "Update Settings");
|
||||
define('EC_LAN_78', "Calendar Settings");
|
||||
define('EC_LAN_79', "Calendar View");
|
||||
define('EC_LAN_80', "Event List");
|
||||
define('EC_LAN_81', "Configure Event Calendar");
|
||||
define('EC_LAN_83', "Calendar");
|
||||
define('EC_LAN_84', " from ");
|
||||
define('EC_LAN_85', " until ");
|
||||
define('EC_LAN_86', "Individual events from entry");
|
||||
define('EC_LAN_87', "By checking this box you may generate a large number of individual events, which you will have to edit or delete individually if they are wrong");
|
||||
define('EC_LAN_88', "You have chosen to generate -NUM- individual events.");
|
||||
define('EC_LAN_89', "If the entry is wrong, you will have to edit or delete the entries individually");
|
||||
|
||||
define('EC_LAN_90', "Choose");
|
||||
define('EC_LAN_91', "Admin must define first");
|
||||
define('EC_LAN_92', "View Category");
|
||||
define('EC_LAN_93', "View Events List");
|
||||
define('EC_LAN_94', "Enter New Event");
|
||||
define('EC_LAN_95', "Today");
|
||||
define('EC_LAN_96', "View Calendar");
|
||||
define('EC_LAN_97', "All");
|
||||
define('EC_LAN_98', "Required fields left blank");
|
||||
define('EC_LAN_99', "Event must either be an all day event or finish after it starts");
|
||||
define('EC_LAN_100', "Invalid Category Selection");
|
||||
//define('EC_LAN_101', "Set to inactive to disable on the new event form.");
|
||||
define('EC_LAN_102', "Show link to 'more information' with events");
|
||||
//define('EC_LAN_103', "On new event entry form.");
|
||||
define('EC_LAN_104', "Calendar Administrator Class");
|
||||
define('EC_LAN_105', "* Required Field");
|
||||
define('EC_LAN_106', "Events");
|
||||
define('EC_LAN_107', "This plugin is a fully featured event calendar with calendar menu.");
|
||||
define('EC_LAN_108', "Event Calendar Upgraded. See the 'readme.pdf' file for detailed information.");
|
||||
define('EC_LAN_109', "Unable to delete this event.");
|
||||
define('EC_LAN_110', "Event Number ");
|
||||
define('EC_LAN_111', "All the events on ");
|
||||
define('EC_LAN_112', "All the Events in ");
|
||||
define('EC_LAN_113', "Event form already submitted.");
|
||||
define('EC_LAN_114', "Week starts with:");
|
||||
define('EC_LAN_115', "Sunday");
|
||||
define('EC_LAN_116', "Monday");
|
||||
define('EC_LAN_117', "Length of daynames (characters)");
|
||||
define('EC_LAN_118', "Date format in calendar header:");
|
||||
define('EC_LAN_119', "month/year");
|
||||
define('EC_LAN_120', "year/month");
|
||||
define('EC_LAN_121', "Show Calendar");
|
||||
|
||||
define('EC_LAN_123', "Subscriptions");
|
||||
define('EC_LAN_124', "Calendar Subscriptions");
|
||||
define('EC_LAN_125', "Categories available for subscription");
|
||||
define('EC_LAN_126', "Subscribed");
|
||||
define('EC_LAN_127', "Category");
|
||||
define('EC_LAN_128', "No categories available to subscribe to");
|
||||
define('EC_LAN_129', "Update");
|
||||
define('EC_LAN_130', "Subscriptions updated");
|
||||
define('EC_LAN_131', "Return");
|
||||
define('EC_LAN_132', "Expand details");
|
||||
define('EC_LAN_133', "[read more]");
|
||||
define('EC_LAN_134', "You have to provide a category name");
|
||||
define('EC_LAN_135', "Event");
|
||||
define('EC_LAN_136', "Category Description");
|
||||
define('EC_LAN_137', "Future Events");
|
||||
|
||||
define('EC_LAN_140', "Forthcoming Events");
|
||||
define('EC_LAN_141', "No forthcoming events");
|
||||
define('EC_LAN_142', "Only registered and logged in users can subscribe to events");
|
||||
define('EC_LAN_143', "Facility not available");
|
||||
define('EC_LAN_144', " at ");
|
||||
|
||||
define('EC_LAN_145', "You must specify a category for the event");
|
||||
define('EC_LAN_146', "Advance notice of calendar event");
|
||||
define('EC_LAN_147', "Calendar event today or tomorrow");
|
||||
define('EC_LAN_148', "No events in specified date range");
|
||||
define('EC_LAN_149', "Invalid date format");
|
||||
define('EC_LAN_150', "Enter start and end date for list");
|
||||
define('EC_LAN_151', "End date after start date");
|
||||
define('EC_LAN_152', "Maximum one year's events");
|
||||
define('EC_LAN_153', "Start Date (first day of): ");
|
||||
define('EC_LAN_154', "End Date (last day of): ");
|
||||
define('EC_LAN_155', "Category: ");
|
||||
define('EC_LAN_156', "Create List");
|
||||
define('EC_LAN_157', "Layout Options:");
|
||||
define('EC_LAN_158', "Output: ");
|
||||
define('EC_LAN_159', "Display ");
|
||||
define('EC_LAN_160', "Print ");
|
||||
define('EC_LAN_161', "PDF ");
|
||||
define('EC_LAN_162', "Print this page");
|
||||
*/
|
||||
define('EC_LAN_163', "Event Listing");
|
||||
/*
|
||||
define('EC_LAN_164', "Printable Lists");
|
||||
define('EC_LAN_165', "Default Listing");
|
||||
define('EC_LAN_166', "Tabular List no lines");
|
||||
define('EC_LAN_167', "Tabular List with lines");
|
||||
define('EC_LAN_168', "From: ");
|
||||
define('EC_LAN_169', "To: ");
|
||||
define('EC_LAN_170', "Printed on: ");
|
||||
define('EC_LAN_171', "List including category");
|
||||
define('EC_LAN_172', "Event Categories: ");
|
||||
define('EC_LAN_173', "First event starts: ");
|
||||
define('EC_LAN_174', "Last event ends: ");
|
||||
define('EC_LAN_175', "All Day");
|
||||
define('EC_LAN_176', "Recurring pattern: ");
|
||||
define('EC_LAN_177', "Cancel Entry");
|
||||
define('EC_LAN_178', "Accept Entries");
|
||||
define('EC_LAN_179', "Confirmation of multiple event entry");
|
||||
define('EC_LAN_180', " RECORDS NOT SAVED - DB UPDATE ERROR");
|
||||
|
||||
define('EC_LAN_VIEWCALENDAR', "View Calendar");
|
||||
define('EC_LAN_VIEWALLEVENTS', "View all events");
|
||||
define('EC_LAN_ALLEVENTS', "All events");
|
||||
*/
|
||||
|
||||
define('EC_ADLAN_A09', 'Main Calendar');
|
||||
define('EC_ADLAN_A10', "Configuration");
|
||||
define('EC_ADLAN_A11', "Categories");
|
||||
define('EC_ADLAN_A12', "Calendar");
|
||||
define('EC_ADLAN_A13', "Edit");
|
||||
define('EC_ADLAN_A14', "New");
|
||||
define('EC_ADLAN_A15', "Delete");
|
||||
define('EC_ADLAN_A16', "Confirm");
|
||||
define('EC_ADLAN_A17', "Proceed");
|
||||
define('EC_ADLAN_A18', "Action");
|
||||
define('EC_ADLAN_A19', "Administer Categories");
|
||||
define('EC_ADLAN_A20', "Calendar Categories");
|
||||
define('EC_ADLAN_A21', "Category name");
|
||||
define('EC_ADLAN_A22', "Adds a field to be used as a link to a forum thread or external site");
|
||||
define('EC_ADLAN_A23', "Create category");
|
||||
define('EC_ADLAN_A24', "Edit category");
|
||||
define('EC_ADLAN_A25', "Save");
|
||||
define('EC_ADLAN_A26', "Category created");
|
||||
define('EC_ADLAN_A27', "Unable to create category");
|
||||
define('EC_ADLAN_A28', "Changes Saved");
|
||||
define('EC_ADLAN_A29', "Unable to save changes");
|
||||
|
||||
define('EC_ADLAN_A30', "Category Deleted");
|
||||
define('EC_ADLAN_A31', "Tick the confirm box to delete");
|
||||
define('EC_ADLAN_A32', "Unable to delete this category");
|
||||
define('EC_ADLAN_A33', "None defined");
|
||||
define('EC_ADLAN_A34', "Calendar Administrator Class");
|
||||
//define('EC_ADLAN_A35', "");
|
||||
define('EC_ADLAN_A59', "Category is in use. Can not delete.");
|
||||
|
||||
define('EC_ADLAN_A80', "Visible to");
|
||||
define('EC_ADLAN_A81', "Allow subscription");
|
||||
define('EC_ADLAN_A82', "Forced notification class");
|
||||
define('EC_ADLAN_A83', "Days ahead to notify of event");
|
||||
define('EC_ADLAN_A84', "Advanced message");
|
||||
define('EC_ADLAN_A85', "Message on the day");
|
||||
define('EC_ADLAN_A86', "Send email");
|
||||
define('EC_ADLAN_A87', "None");
|
||||
define('EC_ADLAN_A88', "Only advanced");
|
||||
define('EC_ADLAN_A89', "Only on the day");
|
||||
define('EC_ADLAN_A90', "Advanced and on the day");
|
||||
define('EC_ADLAN_A91', "Email Subject");
|
||||
define('EC_ADLAN_A92', "Email from (name)");
|
||||
define('EC_ADLAN_A93', "Email from email address");
|
||||
define('EC_ADLAN_A94', "Add new event class");
|
||||
define('EC_ADLAN_A95', "Enable manual subscriptions");
|
||||
define('EC_ADLAN_A96', "Disabling this removes the subscriptions button and overrides the category manual subscription setting.");
|
||||
|
||||
|
||||
define('EC_ADLAN_A100', "Forthcoming Events");
|
||||
define('EC_ADLAN_A101', "Days to look forward:");
|
||||
define('EC_ADLAN_A102', "Number of events to display:");
|
||||
define('EC_ADLAN_A103', "Include recurring events:");
|
||||
define('EC_ADLAN_A104', "Title is link to events list:");
|
||||
define('EC_ADLAN_A105', "Configure Forthcoming Events Menu");
|
||||
define('EC_ADLAN_A106', "Menu has to be enabled on the 'Menu' page");
|
||||
define('EC_ADLAN_A107', "Hide menu if no events to show");
|
||||
define('EC_ADLAN_A108', "Menu Heading");
|
||||
define('EC_ADLAN_A109', "Forthcoming Events preferences updated");
|
||||
|
||||
define('EC_ADLAN_A110', "Only on previous day");
|
||||
define('EC_ADLAN_A111', "Advanced and previous day");
|
||||
define('EC_ADLAN_A112', "Previous day and on the day");
|
||||
define('EC_ADLAN_A113', "Advanced, previous day and on the day");
|
||||
|
||||
define('EC_ADLAN_A114', "Logging of Emails");
|
||||
define('EC_ADLAN_A115', "Summary");
|
||||
define('EC_ADLAN_A116', "Detailed");
|
||||
define('EC_ADLAN_A117', "Message on the day or the previous day");
|
||||
define('EC_ADLAN_A118', "Categories to display");
|
||||
define('EC_ADLAN_A119', "No categories defined, or error reading database");
|
||||
define('EC_ADLAN_A120', "Show category icon in menu");
|
||||
define('EC_ADLAN_A121', "Category Description");
|
||||
define('EC_ADLAN_A122', "Calendar time reference");
|
||||
define('EC_ADLAN_A123', "Calendar time format");
|
||||
define('EC_ADLAN_A124', "Current server time: ");
|
||||
define('EC_ADLAN_A125', "Current site time: ");
|
||||
define('EC_ADLAN_A126', "Current user time: ");
|
||||
define('EC_ADLAN_A127', "Determines time display format throughout event calendar.");
|
||||
define('EC_ADLAN_A128', "Custom time uses the format in the box on the right");
|
||||
define('EC_ADLAN_A129', '"Site Time" uses the offset defined in preferences');
|
||||
define('EC_ADLAN_A130', "Event name is link to:");
|
||||
define('EC_ADLAN_A131', "Calendar Event");
|
||||
define('EC_ADLAN_A132', "Source Info URL");
|
||||
define('EC_ADLAN_A133', "Date format for event entry: ");
|
||||
define('EC_ADLAN_A134', "Level of logging to main admin log:");
|
||||
define('EC_ADLAN_A135', "Edit/delete");
|
||||
define('EC_ADLAN_A136', "All changes");
|
||||
define('EC_ADLAN_A137', "Can cover additions, updates to and deletions from the event list");
|
||||
define('EC_ADLAN_A138', "Event start/end times on 5-minute boundaries");
|
||||
define('EC_ADLAN_A139', "(Reduces number of entries in drop-down list)");
|
||||
define('EC_ADLAN_A140', "Show number of events for this month in Calendar Menu");
|
||||
define('EC_ADLAN_A141', "Maintenance");
|
||||
define('EC_ADLAN_A142', "Remove past events ending more than x months ago");
|
||||
define('EC_ADLAN_A143', "timed from beginning of current month");
|
||||
//define('EC_ADLAN_A144', "Event Calendar Maintenance");
|
||||
define('EC_ADLAN_A145', "Delete old entries");
|
||||
define('EC_ADLAN_A146', "Events older than ");
|
||||
define('EC_ADLAN_A147', " deleted");
|
||||
define('EC_ADLAN_A148', "Parameter error - nothing deleted");
|
||||
define('EC_ADLAN_A149', "No old events to delete, or delete of past events failed");
|
||||
define('EC_ADLAN_A150', "Confirm delete events older than ");
|
||||
|
||||
define('EC_ADLAN_A151', "e107 Web Site");
|
||||
define('EC_ADLAN_A152', "calendar@yoursite.com");
|
||||
define('EC_ADLAN_A153', "Log directory must be created manually - create a subdirectory 'log' off your event calendar plugin directory, with '666' access rights");
|
||||
define('EC_ADLAN_A154', "Could not change log directory permissions");
|
||||
define('EC_ADLAN_A155', "Log directory permissions may require manual update to 0666 or 0766, although depending on your server setup they may work");
|
||||
define('EC_ADLAN_A156', "Database upgraded");
|
||||
define('EC_ADLAN_A157', "this is the rss feed for the calendar entries");
|
||||
define('EC_ADLAN_A158', "Could not create log directory");
|
||||
|
||||
define('EC_ADLAN_A159', "Cache Management");
|
||||
define('EC_ADLAN_A160', "(Only relevant if cache enabled)");
|
||||
define('EC_ADLAN_A161', "Empty Calendar Cache");
|
||||
define('EC_ADLAN_A162', "Confirm Empty Cache");
|
||||
define('EC_ADLAN_A163', "Cache emptied");
|
||||
|
||||
define('EC_ADLAN_A164', "Update completed");
|
||||
define('EC_ADLAN_A165', "Calendar menu header links to:");
|
||||
define('EC_ADLAN_A166', "Date display in Event List:");
|
||||
define('EC_ADLAN_A167', "Date display in Forthcoming Events:");
|
||||
define('EC_ADLAN_A168', "Custom date uses the format in the box on the right");
|
||||
define('EC_ADLAN_A169', "Determines date display format for event listings");
|
||||
define('EC_ADLAN_A170', "Determines date display format for forthcoming events menu");
|
||||
define('EC_ADLAN_A171', "Flag recently added/updated events");
|
||||
define('EC_ADLAN_A172', "Value is time from update in hours; zero to disable, 'LV' to show from user's last visit");
|
||||
|
||||
define('EC_ADLAN_A173', "Subscriptions");
|
||||
define('EC_ADLAN_A174', "No subscription entries found");
|
||||
define('EC_ADLAN_A175', "UID");
|
||||
define('EC_ADLAN_A176', "User Name");
|
||||
define('EC_ADLAN_A177', "Category");
|
||||
define('EC_ADLAN_A178', "Problems");
|
||||
define('EC_ADLAN_A179', "Actions");
|
||||
define('EC_ADLAN_A180', "Deleted subscription record no ");
|
||||
define('EC_ADLAN_A181', "Delete failed for record no ");
|
||||
define('EC_ADLAN_A182', "Total --NUM-- entries in database");
|
||||
define('EC_ADLAN_A183', "Calendar Menu mouseover shows event title");
|
||||
define('EC_ADLAN_A184', "may not work with all browsers");
|
||||
define('EC_ADLAN_A185', "Nothing");
|
||||
define('EC_ADLAN_A186', "Update settings\nand send test\nemail to self");
|
||||
define('EC_ADLAN_A187', "Test email sent - ");
|
||||
define('EC_ADLAN_A188', "Error sending test email - ");
|
||||
define('EC_ADLAN_A189', "If the message is left blank, the message from the 'Default' category will be used");
|
||||
define('EC_ADLAN_A190', "Default category - mailout messages are used if none defined for any other category");
|
||||
define('EC_ADLAN_A191', "Details of event for test email");
|
||||
define('EC_ADLAN_A192', "Test event location");
|
||||
define('EC_ADLAN_A193', "Allow users to display/print/PDF lists");
|
||||
define('EC_ADLAN_A194', "None");
|
||||
define('EC_ADLAN_A195', "Display/Print");
|
||||
define('EC_ADLAN_A196', "Display/Print/PDF");
|
||||
define('EC_ADLAN_A197', "No class membership");
|
||||
define('EC_ADLAN_A198', "Invalid User");
|
||||
define('EC_ADLAN_A199', "Show 'recent' icon");
|
||||
define('EC_ADLAN_A200', "Editor for events");
|
||||
define('EC_ADLAN_A201', "BBCode (Standard)");
|
||||
define('EC_ADLAN_A202', "BBCode with help");
|
||||
define('EC_ADLAN_A203', "WYSIWYG");
|
||||
define('EC_ADLAN_A204', 'Calendar settings updated.');
|
||||
define('EC_ADLAN_A205', 'Confirm Delete');
|
||||
define('EC_ADLAN_A206', 'This plugin is a fully featured event calendar with calendar menu.');
|
||||
define('EC_ADLAN_A207', 'Calendar Settings');
|
||||
define('EC_ADLAN_A208', 'Events can be added by:');
|
||||
define('EC_ADLAN_A209', 'Event List');
|
||||
define('EC_ADLAN_A210', 'Calendar');
|
||||
define('EC_ADLAN_A211', 'Calendar Administrator Class');
|
||||
define('EC_ADLAN_A212', 'Week starts with:');
|
||||
define('EC_ADLAN_A213', 'Show link to \'more information\' with events');
|
||||
define('EC_ADLAN_A214', 'Length of daynames (characters)');
|
||||
define('EC_ADLAN_A215', 'Date format in calendar header:');
|
||||
define('EC_ADLAN_A216', 'month/year');
|
||||
define('EC_ADLAN_A217', 'year/month');
|
||||
//define('EC_ADLAN_A218', 'Update Settings');
|
||||
define('EC_ADLAN_A219', 'Icon:');
|
||||
define('EC_ADLAN_A220', 'Choose');
|
||||
|
||||
|
||||
/*
|
||||
// Notify
|
||||
define("NT_LAN_EC_1", "Event Calendar Events");
|
||||
define("NT_LAN_EC_2", "Event Updated");
|
||||
define("NT_LAN_EC_3", "Update by");
|
||||
define("NT_LAN_EC_4", "IP Address");
|
||||
define("NT_LAN_EC_5", "Message");
|
||||
define("NT_LAN_EC_6", "Event Calendar - Event added");
|
||||
define("NT_LAN_EC_7", "New event posted");
|
||||
define("NT_LAN_EC_8", "Event Calendar - Event modified");
|
||||
*/
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Messages for admin pages of event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_admin_calendar_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - 'admin' pages
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('EC_ADLAN_1', 'Event Calendar');
|
||||
|
||||
define('EC_LAN_12', "Monday");
|
||||
define('EC_LAN_13', "Tuesday");
|
||||
define('EC_LAN_14', "Wednesday");
|
||||
define('EC_LAN_15', "Thursday");
|
||||
define('EC_LAN_16', "Friday");
|
||||
define('EC_LAN_17', "Saturday");
|
||||
define('EC_LAN_18', "Sunday");
|
||||
define('EC_LAN_19', "Mon");
|
||||
define('EC_LAN_20', "Tue");
|
||||
define('EC_LAN_21', "Wed");
|
||||
define('EC_LAN_22', "Thu");
|
||||
define('EC_LAN_23', "Fri");
|
||||
define('EC_LAN_24', "Sat");
|
||||
define('EC_LAN_25', "Sun");
|
||||
define('EC_LAN_163', "Event Listing");
|
||||
// If any 'EC_LAN_xxx' not found, look in language file for user pages.
|
||||
|
||||
define('EC_ADLAN_A09', 'Main Calendar');
|
||||
define('EC_ADLAN_A10', "Configuration");
|
||||
define('EC_ADLAN_A11', "Categories");
|
||||
define('EC_ADLAN_A12', "Calendar");
|
||||
define('EC_ADLAN_A13', "Edit");
|
||||
define('EC_ADLAN_A14', "New");
|
||||
define('EC_ADLAN_A15', "Delete");
|
||||
define('EC_ADLAN_A16', "Confirm");
|
||||
define('EC_ADLAN_A17', "Proceed");
|
||||
define('EC_ADLAN_A18', "Action");
|
||||
define('EC_ADLAN_A19', "Administer Categories");
|
||||
define('EC_ADLAN_A20', "Calendar Categories");
|
||||
define('EC_ADLAN_A21', "Category name");
|
||||
define('EC_ADLAN_A22', "Adds a field to be used as a link to a forum thread or external site");
|
||||
define('EC_ADLAN_A23', "Create category");
|
||||
define('EC_ADLAN_A24', "Edit category");
|
||||
define('EC_ADLAN_A25', "Save");
|
||||
define('EC_ADLAN_A26', "Category created");
|
||||
define('EC_ADLAN_A27', "Unable to create category");
|
||||
define('EC_ADLAN_A28', "Changes Saved");
|
||||
define('EC_ADLAN_A29', "Unable to save changes");
|
||||
|
||||
define('EC_ADLAN_A30', "Category Deleted");
|
||||
define('EC_ADLAN_A31', "Tick the confirm box to delete");
|
||||
define('EC_ADLAN_A32', "Unable to delete this category");
|
||||
define('EC_ADLAN_A33', "None defined");
|
||||
define('EC_ADLAN_A34', "Calendar Administrator Class");
|
||||
//define('EC_ADLAN_A35', "");
|
||||
define('EC_ADLAN_A59', "Category is in use. Can not delete.");
|
||||
|
||||
define('EC_ADLAN_A80', "Visible to");
|
||||
define('EC_ADLAN_A81', "Allow subscription");
|
||||
define('EC_ADLAN_A82', "Forced notification class");
|
||||
define('EC_ADLAN_A83', "Days ahead to notify of event");
|
||||
define('EC_ADLAN_A84', "Advanced message");
|
||||
define('EC_ADLAN_A85', "Message on the day");
|
||||
define('EC_ADLAN_A86', "Send email");
|
||||
define('EC_ADLAN_A87', "None");
|
||||
define('EC_ADLAN_A88', "Only advanced");
|
||||
define('EC_ADLAN_A89', "Only on the day");
|
||||
define('EC_ADLAN_A90', "Advanced and on the day");
|
||||
define('EC_ADLAN_A91', "Email Subject");
|
||||
define('EC_ADLAN_A92', "Email from (name)");
|
||||
define('EC_ADLAN_A93', "Email from email address");
|
||||
define('EC_ADLAN_A94', "Add new event class");
|
||||
define('EC_ADLAN_A95', "Enable manual subscriptions");
|
||||
define('EC_ADLAN_A96', "Disabling this removes the subscriptions button and overrides the category manual subscription setting.");
|
||||
|
||||
|
||||
define('EC_ADLAN_A100', "Forthcoming Events");
|
||||
define('EC_ADLAN_A101', "Days to look forward:");
|
||||
define('EC_ADLAN_A102', "Number of events to display:");
|
||||
define('EC_ADLAN_A103', "Include recurring events:");
|
||||
define('EC_ADLAN_A104', "Title is link to events list:");
|
||||
define('EC_ADLAN_A105', "Configure Forthcoming Events Menu");
|
||||
define('EC_ADLAN_A106', "Menu has to be enabled on the 'Menu' page");
|
||||
define('EC_ADLAN_A107', "Hide menu if no events to show");
|
||||
define('EC_ADLAN_A108', "Menu Heading");
|
||||
define('EC_ADLAN_A109', "Forthcoming Events preferences updated");
|
||||
|
||||
define('EC_ADLAN_A110', "Only on previous day");
|
||||
define('EC_ADLAN_A111', "Advanced and previous day");
|
||||
define('EC_ADLAN_A112', "Previous day and on the day");
|
||||
define('EC_ADLAN_A113', "Advanced, previous day and on the day");
|
||||
|
||||
define('EC_ADLAN_A114', "Logging of Emails");
|
||||
define('EC_ADLAN_A115', "Summary");
|
||||
define('EC_ADLAN_A116', "Detailed");
|
||||
define('EC_ADLAN_A117', "Message on the day or the previous day");
|
||||
define('EC_ADLAN_A118', "Categories to display");
|
||||
define('EC_ADLAN_A119', "No categories defined, or error reading database");
|
||||
define('EC_ADLAN_A120', "Show category icon in menu");
|
||||
define('EC_ADLAN_A121', "Category Description");
|
||||
define('EC_ADLAN_A122', "Calendar time reference");
|
||||
define('EC_ADLAN_A123', "Calendar time format");
|
||||
define('EC_ADLAN_A124', "Current server time: ");
|
||||
define('EC_ADLAN_A125', "Current site time: ");
|
||||
define('EC_ADLAN_A126', "Current user time: ");
|
||||
define('EC_ADLAN_A127', "Determines time display format throughout event calendar.");
|
||||
define('EC_ADLAN_A128', "Custom time uses the format in the box on the right");
|
||||
define('EC_ADLAN_A129', '"Site Time" uses the offset defined in preferences');
|
||||
define('EC_ADLAN_A130', "Event name is link to:");
|
||||
define('EC_ADLAN_A131', "Calendar Event");
|
||||
define('EC_ADLAN_A132', "Source Info URL");
|
||||
define('EC_ADLAN_A133', "Date format for event entry: ");
|
||||
define('EC_ADLAN_A134', "Level of logging to main admin log:");
|
||||
define('EC_ADLAN_A135', "Edit/delete");
|
||||
define('EC_ADLAN_A136', "All changes");
|
||||
define('EC_ADLAN_A137', "Can cover additions, updates to and deletions from the event list");
|
||||
define('EC_ADLAN_A138', "Event start/end times on 5-minute boundaries");
|
||||
define('EC_ADLAN_A139', "(Reduces number of entries in drop-down list)");
|
||||
define('EC_ADLAN_A140', "Show number of events for this month in Calendar Menu");
|
||||
define('EC_ADLAN_A141', "Maintenance");
|
||||
define('EC_ADLAN_A142', "Remove past events ending more than x months ago");
|
||||
define('EC_ADLAN_A143', "timed from beginning of current month");
|
||||
//define('EC_ADLAN_A144', "Event Calendar Maintenance");
|
||||
define('EC_ADLAN_A145', "Delete old entries");
|
||||
define('EC_ADLAN_A146', "Events older than ");
|
||||
define('EC_ADLAN_A147', " deleted");
|
||||
define('EC_ADLAN_A148', "Parameter error - nothing deleted");
|
||||
define('EC_ADLAN_A149', "No old events to delete, or delete of past events failed");
|
||||
define('EC_ADLAN_A150', "Confirm delete events older than ");
|
||||
|
||||
define('EC_ADLAN_A151', "e107 Web Site");
|
||||
define('EC_ADLAN_A152', "calendar@yoursite.com");
|
||||
define('EC_ADLAN_A153', "Log directory must be created manually - create a subdirectory 'log' off your event calendar plugin directory, with '666' access rights");
|
||||
define('EC_ADLAN_A154', "Could not change log directory permissions");
|
||||
define('EC_ADLAN_A155', "Log directory permissions may require manual update to 0666 or 0766, although depending on your server setup they may work");
|
||||
define('EC_ADLAN_A156', "Database upgraded");
|
||||
define('EC_ADLAN_A157', "this is the rss feed for the calendar entries");
|
||||
define('EC_ADLAN_A158', "Could not create log directory");
|
||||
|
||||
define('EC_ADLAN_A159', "Cache Management");
|
||||
define('EC_ADLAN_A160', "(Only relevant if cache enabled)");
|
||||
define('EC_ADLAN_A161', "Empty Calendar Cache");
|
||||
define('EC_ADLAN_A162', "Confirm Empty Cache");
|
||||
define('EC_ADLAN_A163', "Cache emptied");
|
||||
|
||||
define('EC_ADLAN_A164', "Update completed");
|
||||
define('EC_ADLAN_A165', "Calendar menu header links to:");
|
||||
define('EC_ADLAN_A166', "Date display in Event List:");
|
||||
define('EC_ADLAN_A167', "Date display in Forthcoming Events:");
|
||||
define('EC_ADLAN_A168', "Custom date uses the format in the box on the right");
|
||||
define('EC_ADLAN_A169', "Determines date display format for event listings");
|
||||
define('EC_ADLAN_A170', "Determines date display format for forthcoming events menu");
|
||||
define('EC_ADLAN_A171', "Flag recently added/updated events");
|
||||
define('EC_ADLAN_A172', "Value is time from update in hours; zero to disable, 'LV' to show from user's last visit");
|
||||
|
||||
define('EC_ADLAN_A173', "Subscriptions");
|
||||
define('EC_ADLAN_A174', "No subscription entries found");
|
||||
define('EC_ADLAN_A175', "UID");
|
||||
define('EC_ADLAN_A176', "User Name");
|
||||
define('EC_ADLAN_A177', "Category");
|
||||
define('EC_ADLAN_A178', "Problems");
|
||||
define('EC_ADLAN_A179', "Actions");
|
||||
define('EC_ADLAN_A180', "Deleted subscription record no ");
|
||||
define('EC_ADLAN_A181', "Delete failed for record no ");
|
||||
define('EC_ADLAN_A182', "Total --NUM-- entries in database");
|
||||
define('EC_ADLAN_A183', "Calendar Menu mouseover shows event title");
|
||||
define('EC_ADLAN_A184', "may not work with all browsers");
|
||||
define('EC_ADLAN_A185', "Nothing");
|
||||
define('EC_ADLAN_A186', "Update settings\nand send test\nemail to self");
|
||||
define('EC_ADLAN_A187', "Test email sent - ");
|
||||
define('EC_ADLAN_A188', "Error sending test email - ");
|
||||
define('EC_ADLAN_A189', "If the message is left blank, the message from the 'Default' category will be used");
|
||||
define('EC_ADLAN_A190', "Default category - mailout messages are used if none defined for any other category");
|
||||
define('EC_ADLAN_A191', "Details of event for test email");
|
||||
define('EC_ADLAN_A192', "Test event location");
|
||||
define('EC_ADLAN_A193', "Allow users to display/print/PDF lists");
|
||||
define('EC_ADLAN_A194', "None");
|
||||
define('EC_ADLAN_A195', "Display/Print");
|
||||
define('EC_ADLAN_A196', "Display/Print/PDF");
|
||||
define('EC_ADLAN_A197', "No class membership");
|
||||
define('EC_ADLAN_A198', "Invalid User");
|
||||
define('EC_ADLAN_A199', "Show 'recent' icon");
|
||||
define('EC_ADLAN_A200', "Editor for events");
|
||||
define('EC_ADLAN_A201', 'BBCode (Standard)');
|
||||
define('EC_ADLAN_A202', 'BBCode with help');
|
||||
define('EC_ADLAN_A203', 'WYSIWYG');
|
||||
define('EC_ADLAN_A204', 'Calendar settings updated.');
|
||||
define('EC_ADLAN_A205', 'Confirm Delete');
|
||||
define('EC_ADLAN_A206', 'This plugin is a fully featured event calendar with calendar menu.');
|
||||
define('EC_ADLAN_A207', 'Calendar Settings');
|
||||
define('EC_ADLAN_A208', 'Events can be added by:');
|
||||
define('EC_ADLAN_A209', 'Event List');
|
||||
define('EC_ADLAN_A210', 'Calendar');
|
||||
define('EC_ADLAN_A211', 'Calendar Administrator Class');
|
||||
define('EC_ADLAN_A212', 'Week starts with:');
|
||||
define('EC_ADLAN_A213', 'Show link to \'more information\' with events');
|
||||
define('EC_ADLAN_A214', 'Length of daynames (characters)');
|
||||
define('EC_ADLAN_A215', 'Date format in calendar header:');
|
||||
define('EC_ADLAN_A216', 'month/year');
|
||||
define('EC_ADLAN_A217', 'year/month');
|
||||
//define('EC_ADLAN_A218', 'Update Settings');
|
||||
define('EC_ADLAN_A219', 'Icon:');
|
||||
define('EC_ADLAN_A220', 'Choose');
|
||||
define('EC_ADLAN_A221', 'Event Calendar - add event ');
|
||||
define('EC_ADLAN_A222', 'Event Calendar - edit event ');
|
||||
define('EC_ADLAN_A223', 'Event Calendar - delete event ');
|
||||
define('EC_ADLAN_A224', 'Event Calendar - Bulk Delete');
|
||||
define('EC_ADLAN_A225', 'Event Calendar - multiple add ');
|
||||
define('EC_ADLAN_A226', '');
|
||||
define('EC_ADLAN_A227', '');
|
||||
|
@@ -1,62 +1,62 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* These messages are for the 'user' pages of the event calendar (including event entry/editing)
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_class.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - anything called up in ecal_class.php and similar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
// Recurring events texts - the numeric part of each define is the internal value assigned
|
||||
define('EC_LAN_RECUR_00', 'no');
|
||||
define('EC_LAN_RECUR_01', 'annual');
|
||||
define('EC_LAN_RECUR_02', 'biannual');
|
||||
define('EC_LAN_RECUR_03', 'quarterly');
|
||||
define('EC_LAN_RECUR_04', 'monthly');
|
||||
define('EC_LAN_RECUR_05', 'four weekly');
|
||||
define('EC_LAN_RECUR_06', 'fortnightly');
|
||||
define('EC_LAN_RECUR_07', 'weekly');
|
||||
define('EC_LAN_RECUR_08', 'daily');
|
||||
define('EC_LAN_RECUR_100', 'Sunday in month');
|
||||
define('EC_LAN_RECUR_101', 'Monday in month');
|
||||
define('EC_LAN_RECUR_102', 'Tuesday in month');
|
||||
define('EC_LAN_RECUR_103', 'Wednesday in month');
|
||||
define('EC_LAN_RECUR_104', 'Thursday in month');
|
||||
define('EC_LAN_RECUR_105', 'Friday in month');
|
||||
define('EC_LAN_RECUR_106', 'Saturday in month');
|
||||
|
||||
define('EC_LAN_RECUR_1100', 'First');
|
||||
define('EC_LAN_RECUR_1200', 'Second');
|
||||
define('EC_LAN_RECUR_1300', 'Third');
|
||||
define('EC_LAN_RECUR_1400', 'Fourth');
|
||||
|
||||
|
||||
// Notify
|
||||
define('NT_LAN_EC_1', 'Event Calendar Events');
|
||||
define('NT_LAN_EC_2', 'Event Updated');
|
||||
define('NT_LAN_EC_3', 'Update by');
|
||||
define('NT_LAN_EC_4', 'IP Address');
|
||||
define('NT_LAN_EC_5', 'Message');
|
||||
define('NT_LAN_EC_6', 'Event Calendar - Event added');
|
||||
define('NT_LAN_EC_7', 'New event posted');
|
||||
define('NT_LAN_EC_8', 'Event Calendar - Event modified');
|
||||
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* These messages are for the event entry/editing functions on the 'user' pages of the event calendar. Also 'notify'
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_class.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - anything called up in ecal_class.php, notify and similar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
// Recurring events texts - the numeric part of each define is the internal value assigned
|
||||
define('EC_LAN_RECUR_00', 'no');
|
||||
define('EC_LAN_RECUR_01', 'annual');
|
||||
define('EC_LAN_RECUR_02', 'biannual');
|
||||
define('EC_LAN_RECUR_03', 'quarterly');
|
||||
define('EC_LAN_RECUR_04', 'monthly');
|
||||
define('EC_LAN_RECUR_05', 'four weekly');
|
||||
define('EC_LAN_RECUR_06', 'fortnightly');
|
||||
define('EC_LAN_RECUR_07', 'weekly');
|
||||
define('EC_LAN_RECUR_08', 'daily');
|
||||
define('EC_LAN_RECUR_100', 'Sunday in month');
|
||||
define('EC_LAN_RECUR_101', 'Monday in month');
|
||||
define('EC_LAN_RECUR_102', 'Tuesday in month');
|
||||
define('EC_LAN_RECUR_103', 'Wednesday in month');
|
||||
define('EC_LAN_RECUR_104', 'Thursday in month');
|
||||
define('EC_LAN_RECUR_105', 'Friday in month');
|
||||
define('EC_LAN_RECUR_106', 'Saturday in month');
|
||||
|
||||
define('EC_LAN_RECUR_1100', 'First');
|
||||
define('EC_LAN_RECUR_1200', 'Second');
|
||||
define('EC_LAN_RECUR_1300', 'Third');
|
||||
define('EC_LAN_RECUR_1400', 'Fourth');
|
||||
|
||||
|
||||
// Notify
|
||||
define('NT_LAN_EC_1', 'Event Calendar Events');
|
||||
define('NT_LAN_EC_2', 'Event Updated');
|
||||
define('NT_LAN_EC_3', 'Update by');
|
||||
define('NT_LAN_EC_4', 'IP Address');
|
||||
define('NT_LAN_EC_5', 'Message');
|
||||
define('NT_LAN_EC_6', 'Event Calendar - Event added');
|
||||
define('NT_LAN_EC_7', 'New event posted');
|
||||
define('NT_LAN_EC_8', 'Event Calendar - Event modified');
|
||||
|
||||
|
||||
?>
|
@@ -1,27 +1,41 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* These constants are used solely during install/uninstall - in some cases to set defaults into the database
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_install.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
// Install
|
||||
define('EC_ADINST_LAN_01', "Forthcoming event:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n
|
||||
{EC_MAIL_DETAILS}\n\nFor further details: {EC_EVENT_LINK=Click Here}\n\nor {EC_MAIL_CONTACT} for further information.");
|
||||
define('EC_ADINST_LAN_02', "Calendar event imminent:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n{EC_MAIL_DETAILS}\n\n
|
||||
For further details see the calendar entry on the web site:\n{EC_MAIL_LINK=Click Here}\n\n {EC_MAIL_CONTACT} for further details");
|
||||
define('EC_ADINST_LAN_03', 'Default category - mailout messages are used if none defined for any other category');
|
||||
define('EC_ADINST_LAN_04', 'To activate please go to your menus screen and select the calendar_menu into one of your menu areas.');
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* These constants are used solely during install/uninstall - in some cases to set defaults into the database
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_install.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - installation
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
// Install
|
||||
define('EC_ADINST_LAN_01', "Forthcoming event:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n
|
||||
{EC_MAIL_DETAILS}\n\nFor further details: {EC_EVENT_LINK=Click Here}\n\nor {EC_MAIL_CONTACT} for further information.");
|
||||
define('EC_ADINST_LAN_02', "Calendar event imminent:\n\n{EC_MAIL_CATEGORY}\n\n{EC_MAIL_TITLE} on {EC_MAIL_HEADING_DATE}{EC_MAIL_TIME_START}\n\n{EC_MAIL_DETAILS}\n\n
|
||||
For further details see the calendar entry on the web site:\n{EC_MAIL_LINK=Click Here}\n\n {EC_MAIL_CONTACT} for further details");
|
||||
define('EC_ADINST_LAN_03', 'Default category - mailout messages are used if none defined for any other category');
|
||||
define('EC_ADINST_LAN_04', 'To activate please go to your menus screen and select the calendar_menu into one of your menu areas.');
|
||||
// define('EC_ADINST_LAN_05', 'Configure Event Calendar');
|
||||
define('EC_ADINST_LAN_06', 'Default category entered');
|
||||
define('EC_ADINST_LAN_07', 'Error adding default category');
|
||||
define('EC_ADINST_LAN_08', 'Default category already in DB');
|
||||
define('EC_ADINST_LAN_06', 'Default category entered');
|
||||
define('EC_ADINST_LAN_07', 'Error adding default category');
|
||||
define('EC_ADINST_LAN_08', 'Default category already in DB');
|
||||
define('EC_ADINST_LAN_09', 'Preferences already converted for 2.0');
|
||||
define('EC_ADINST_LAN_10', 'Preferences converted ready for 2.0');
|
||||
|
||||
|
@@ -1,27 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - messages for admin log titles
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_log.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
define('LAN_AL_EC_ADM_01', 'Event Calendar - add event');
|
||||
define('LAN_AL_EC_ADM_02', 'Event Calendar - edit event');
|
||||
define('LAN_AL_EC_ADM_03', 'Event Calendar - delete event');
|
||||
define('LAN_AL_EC_ADM_04', 'Event Calendar - Bulk Delete');
|
||||
define('LAN_AL_EC_ADM_05', 'Event Calendar - Multiple Add');
|
||||
define('LAN_AL_EC_ADM_06', 'Event Calendar - Main options changed');
|
||||
define('LAN_AL_EC_ADM_07', 'Event Calendar - FE options changed');
|
||||
define('LAN_AL_EC_ADM_08', 'Event Calendar - Category added');
|
||||
define('LAN_AL_EC_ADM_09', 'Event Calendar - Category edited');
|
||||
define('LAN_AL_EC_ADM_10', 'Event Calendar - Category deleted');
|
||||
define('LAN_AL_EC_ADM_11', 'Event Calendar - Old events deleted');
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - messages for admin log titles
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_log.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - admin log titles
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('LAN_AL_EC_ADM_01', 'Event Calendar - add event');
|
||||
define('LAN_AL_EC_ADM_02', 'Event Calendar - edit event');
|
||||
define('LAN_AL_EC_ADM_03', 'Event Calendar - delete event');
|
||||
define('LAN_AL_EC_ADM_04', 'Event Calendar - Bulk Delete');
|
||||
define('LAN_AL_EC_ADM_05', 'Event Calendar - Multiple Add');
|
||||
define('LAN_AL_EC_ADM_06', 'Event Calendar - Main options changed');
|
||||
define('LAN_AL_EC_ADM_07', 'Event Calendar - FE options changed');
|
||||
define('LAN_AL_EC_ADM_08', 'Event Calendar - Category added');
|
||||
define('LAN_AL_EC_ADM_09', 'Event Calendar - Category edited');
|
||||
define('LAN_AL_EC_ADM_10', 'Event Calendar - Category deleted');
|
||||
define('LAN_AL_EC_ADM_11', 'Event Calendar - Old events deleted');
|
||||
|
@@ -1,44 +1,54 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - language file for mailout related routines
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_mailer.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
define('LAN_EC_MAIL_01', 'Event Calendar Subscribers');
|
||||
define('LAN_EC_MAIL_02', 'No categories defined, or database error');
|
||||
define('LAN_EC_MAIL_03', 'Category: ');
|
||||
define('LAN_EC_MAIL_04', 'Calendar Subscriptions');
|
||||
define('LAN_EC_MAIL_05', 'Process notifications of events on the calendar');
|
||||
define('LAN_EC_MAIL_06', 'Mail subscriptions run started at ');
|
||||
define('LAN_EC_MAIL_07', 'Event calendar mail --REF--');
|
||||
define('LAN_EC_MAIL_08', '');
|
||||
define('LAN_EC_MAIL_09', '');
|
||||
define('LAN_EC_MAIL_10', '');
|
||||
|
||||
|
||||
// Following messages used in mailout template
|
||||
define('LAN_EC_MAIL_100', 'Location:');
|
||||
define('LAN_EC_MAIL_101', 'Posted by:');
|
||||
define('LAN_EC_MAIL_102', 'Contact:');
|
||||
define('LAN_EC_MAIL_103', 'All day event:');
|
||||
define('LAN_EC_MAIL_104', 'When:');
|
||||
define('LAN_EC_MAIL_105', ' at ');
|
||||
define('LAN_EC_MAIL_106', 'Ends:');
|
||||
define('LAN_EC_MAIL_107', '');
|
||||
define('LAN_EC_MAIL_108', '');
|
||||
define('LAN_EC_MAIL_109', '');
|
||||
define('LAN_EC_MAIL_110', '');
|
||||
|
||||
|
||||
?>
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar - language file for mailout related routines
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English_mailer.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Language file - mailer
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
define('LAN_EC_MAIL_01', 'Event Calendar Subscribers');
|
||||
define('LAN_EC_MAIL_02', 'No categories defined, or database error');
|
||||
define('LAN_EC_MAIL_03', 'Category: ');
|
||||
define('LAN_EC_MAIL_04', 'Calendar Subscriptions');
|
||||
define('LAN_EC_MAIL_05', 'Process notifications of events on the calendar');
|
||||
define('LAN_EC_MAIL_06', 'Mail subscriptions run started at ');
|
||||
define('LAN_EC_MAIL_07', 'Event calendar mail --REF--');
|
||||
define('LAN_EC_MAIL_08', '');
|
||||
define('LAN_EC_MAIL_09', '');
|
||||
define('LAN_EC_MAIL_10', '');
|
||||
|
||||
|
||||
// Following messages used in mailout template
|
||||
define('LAN_EC_MAIL_100', 'Location:');
|
||||
define('LAN_EC_MAIL_101', 'Posted by:');
|
||||
define('LAN_EC_MAIL_102', 'Contact:');
|
||||
define('LAN_EC_MAIL_103', 'All day event:');
|
||||
define('LAN_EC_MAIL_104', 'When:');
|
||||
define('LAN_EC_MAIL_105', ' at ');
|
||||
define('LAN_EC_MAIL_106', 'Ends:');
|
||||
define('LAN_EC_MAIL_107', '');
|
||||
define('LAN_EC_MAIL_108', '');
|
||||
define('LAN_EC_MAIL_109', '');
|
||||
define('LAN_EC_MAIL_110', '');
|
||||
|
||||
|
||||
?>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
define("CM_SCH_LAN_1", "Calendar");
|
||||
|
||||
<?php
|
||||
|
||||
define('CM_SCH_LAN_1', 'Calendar');
|
||||
|
||||
?>
|
@@ -1,112 +1,113 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Forthcoming events menu handler for event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/next_event_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
if (!$e107->isInstalled('calendar_menu')) return '';
|
||||
|
||||
|
||||
if (!isset($ecal_class) || !is_object($ecal_class))
|
||||
{
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
}
|
||||
|
||||
// See if the page is already in the cache
|
||||
$cache_tag = 'nq_event_cal_next';
|
||||
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
|
||||
{
|
||||
echo $cacheData;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
|
||||
if (is_readable(THEME.'calendar_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'calendar_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require(e_PLUGIN.'calendar_menu/calendar_template.php');
|
||||
}
|
||||
|
||||
global $pref;
|
||||
|
||||
// Values defined through admin pages
|
||||
$menu_title = varset($pref['eventpost_menuheading'],EC_LAN_140);
|
||||
$days_ahead = varset($pref['eventpost_daysforward'],30); // Number of days ahead to go
|
||||
$show_count = varset($pref['eventpost_numevents'],3); // Number of events to show
|
||||
$show_recurring = varset($pref['eventpost_checkrecur'],1); // Zero to exclude recurring events
|
||||
$link_in_heading = varset($pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link
|
||||
|
||||
|
||||
$start_time = $ecal_class->cal_timedate;
|
||||
$end_time = $start_time + (86400 * $days_ahead) - 1;
|
||||
|
||||
|
||||
$cal_text = '';
|
||||
|
||||
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
|
||||
|
||||
$ev_list = $ecal_class->get_n_events($show_count, $start_time, $end_time, varset($pref['eventpost_fe_set'],FALSE), $show_recurring,
|
||||
'event_id,event_start, event_thread, event_title, event_recurring, event_allday, event_category', 'event_cat_icon');
|
||||
|
||||
$cal_totev = count($ev_list);
|
||||
if ($cal_totev > 0)
|
||||
{
|
||||
foreach ($ev_list as $thisEvent)
|
||||
{
|
||||
$cal_totev --; // Can use this to modify inter-event gap
|
||||
$calSc->numEvents = $cal_totev; // Number of events to display
|
||||
$calSc->event = $thisEvent; // Give shortcodes the event data
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_FE_LINE,FALSE, $calSc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($pref['eventpost_fe_hideifnone']) return '';
|
||||
$cal_text.= EC_LAN_141;
|
||||
}
|
||||
|
||||
$calendar_title = $e107->tp->toHTML($menu_title,FALSE,'TITLE'); // Allows multi-language title, shortcodes
|
||||
if ($link_in_heading == 1)
|
||||
{
|
||||
$calendar_title = "<a class='forumlink' href='".e_PLUGIN_ABS."calendar_menu/event.php' >".$calendar_title."</a>";
|
||||
}
|
||||
|
||||
// Now handle the data, cache as well
|
||||
ob_start(); // Set up a new output buffer
|
||||
$e107->ns->tablerender($calendar_title, $cal_text, 'next_event_menu');
|
||||
$cache_data = ob_get_flush(); // Get the page content, and display it
|
||||
$e107->ecache->set($cache_tag, $cache_data); // Save to cache
|
||||
|
||||
unset($ev_list);
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Forthcoming events menu handler for event calendar
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/next_event_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Forthcoming events menu handler for event calendar
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
if (!$e107->isInstalled('calendar_menu')) return '';
|
||||
|
||||
|
||||
if (!isset($ecal_class) || !is_object($ecal_class))
|
||||
{
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
$ecal_class = new ecal_class;
|
||||
}
|
||||
|
||||
// See if the page is already in the cache
|
||||
$cache_tag = 'nq_event_cal_next';
|
||||
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
|
||||
{
|
||||
echo $cacheData;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
|
||||
$calSc = new event_calendar_shortcodes();
|
||||
|
||||
if (is_readable(THEME.'calendar_template.php'))
|
||||
{ // Has to be require
|
||||
require(THEME.'calendar_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require(e_PLUGIN.'calendar_menu/calendar_template.php');
|
||||
}
|
||||
|
||||
|
||||
// Values defined through admin pages
|
||||
$menu_title = varset($this->ecal_class->pref['eventpost_menuheading'],EC_LAN_140);
|
||||
$days_ahead = varset($this->ecal_class->pref['eventpost_daysforward'],30); // Number of days ahead to go
|
||||
$show_count = varset($this->ecal_class->pref['eventpost_numevents'],3); // Number of events to show
|
||||
$show_recurring = varset($this->ecal_class->pref['eventpost_checkrecur'],1); // Zero to exclude recurring events
|
||||
$link_in_heading = varset($this->ecal_class->pref['eventpost_linkheader'],0); // Zero for simple heading, 1 to have clickable link
|
||||
|
||||
|
||||
$start_time = $ecal_class->cal_timedate;
|
||||
$end_time = $start_time + (86400 * $days_ahead) - 1;
|
||||
|
||||
|
||||
$cal_text = '';
|
||||
|
||||
$calSc->ecalClass = &$ecal_class; // Give shortcodes a pointer to calendar class
|
||||
|
||||
$ev_list = $ecal_class->get_n_events($show_count, $start_time, $end_time, varset($this->ecal_class->pref['eventpost_fe_set'],FALSE), $show_recurring,
|
||||
'event_id,event_start, event_thread, event_title, event_recurring, event_allday, event_category', 'event_cat_icon');
|
||||
|
||||
$cal_totev = count($ev_list);
|
||||
if ($cal_totev > 0)
|
||||
{
|
||||
foreach ($ev_list as $thisEvent)
|
||||
{
|
||||
$cal_totev --; // Can use this to modify inter-event gap
|
||||
$calSc->numEvents = $cal_totev; // Number of events to display
|
||||
$calSc->event = $thisEvent; // Give shortcodes the event data
|
||||
$cal_text .= $e107->tp->parseTemplate($EVENT_CAL_FE_LINE,FALSE, $calSc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->ecal_class->pref['eventpost_fe_hideifnone']) return '';
|
||||
$cal_text.= EC_LAN_141;
|
||||
}
|
||||
|
||||
$calendar_title = $e107->tp->toHTML($menu_title,FALSE,'TITLE'); // Allows multi-language title, shortcodes
|
||||
if ($link_in_heading == 1)
|
||||
{
|
||||
$calendar_title = "<a class='forumlink' href='".e_PLUGIN_ABS."calendar_menu/event.php' >".$calendar_title."</a>";
|
||||
}
|
||||
|
||||
// Now handle the data, cache as well
|
||||
ob_start(); // Set up a new output buffer
|
||||
$e107->ns->tablerender($calendar_title, $cal_text, 'next_event_menu');
|
||||
$cache_data = ob_get_flush(); // Get the page content, and display it
|
||||
$e107->ecache->set($cache_tag, $cache_data); // Save to cache
|
||||
|
||||
unset($ev_list);
|
||||
|
||||
?>
|
@@ -22,7 +22,7 @@
|
||||
<pref name="eventpost_showmouseover">0</pref>
|
||||
<pref name="eventpost_showeventcount">1</pref>
|
||||
<pref name="eventpost_forum">1</pref>
|
||||
<pref name="eventpost_recentshow">0</pref>
|
||||
<pref name="eventpost_recentshow">LV</pref>
|
||||
<pref name="eventpost_weekstart">sun</pref>
|
||||
<pref name="eventpost_lenday">1</pref>
|
||||
<pref name="eventpost_dateformat">1</pref>
|
||||
|
@@ -1,39 +1,51 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/search/search_parser.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$return_fields = 'event_id, event_start, event_title, event_location, event_details';
|
||||
$search_fields = array('event_title', 'event_location', 'event_details');
|
||||
$weights = array('1.2', '0.6', '0.6');
|
||||
$no_results = LAN_198;
|
||||
$where = "";
|
||||
$order = array('event_start' => DESC);
|
||||
|
||||
$ps = $sch -> parsesearch('event', $return_fields, $search_fields, $weights, 'search_events', $no_results, $where, $order);
|
||||
$text .= $ps['text'];
|
||||
$results = $ps['results'];
|
||||
|
||||
function search_events($row) {
|
||||
global $con;
|
||||
$res['link'] = e_PLUGIN."calendar_menu/event.php?".time().".event.".$row['event_id'];
|
||||
$res['title'] = $row['event_title'];
|
||||
$res['summary'] = $row['event_details'];
|
||||
$res['detail'] = $row['event_location']." | ".$con -> convert_date($row['event_start'], "long");
|
||||
return $res;
|
||||
}
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/search/search_parser.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Search parser
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$return_fields = 'event_id, event_start, event_title, event_location, event_details';
|
||||
$search_fields = array('event_title', 'event_location', 'event_details');
|
||||
$weights = array('1.2', '0.6', '0.6');
|
||||
$no_results = LAN_198;
|
||||
$where = '';
|
||||
$order = array('event_start' => DESC);
|
||||
|
||||
$ps = $sch -> parsesearch('event', $return_fields, $search_fields, $weights, 'search_events', $no_results, $where, $order);
|
||||
$text .= $ps['text'];
|
||||
$results = $ps['results'];
|
||||
|
||||
function search_events($row)
|
||||
{
|
||||
global $con;
|
||||
$res['link'] = e_PLUGIN."calendar_menu/event.php?".time().".event.".$row['event_id'];
|
||||
$res['title'] = $row['event_title'];
|
||||
$res['summary'] = $row['event_details'];
|
||||
$res['detail'] = $row['event_location']." | ".$con -> convert_date($row['event_start'], "long");
|
||||
return $res;
|
||||
}
|
||||
|
||||
?>
|
@@ -1,117 +1,123 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - mail subscription to events notification
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/subscribe.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
if (!$e107->isInstalled('calendar_menu'))
|
||||
{
|
||||
header('Location: '.e_BASE.'index.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
include_lan(e_PLUGIN .'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
global $pref;
|
||||
define('PAGE_NAME', EC_LAN_80);
|
||||
require_once(HEADERF);
|
||||
|
||||
|
||||
if ((USER) && (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1')))
|
||||
{
|
||||
$cal_db = new db; // Probably best to keep this
|
||||
|
||||
if (isset($_POST['upsubs']))
|
||||
{
|
||||
$cal_cats = $e107->tp->toDB($_POST['event_list']); // IDs of allowed categories
|
||||
$cal_subs = $e107->tp->toDB($_POST['event_subd']); // Checkbox results
|
||||
$cal_db->db_Delete('event_subs', "event_userid='" . USERID . "'"); // Delete all for this user to start
|
||||
foreach($cal_cats as $cal_row)
|
||||
{ // Now add in a subscription for each allowed category
|
||||
if ($cal_subs[$cal_row])
|
||||
{
|
||||
$cal_inargs = "0,'" . USERID . "','" . $cal_row . "'";
|
||||
$cal_db->db_Insert('event_subs', $cal_inargs);
|
||||
}
|
||||
// print $cal_row . $cal_subs[$cal_row] . "<br />";
|
||||
}
|
||||
$caltext = "<table class='fborder' width='97%'>
|
||||
<tr><td class='fcaption' >" . EC_LAN_130 . "</td></tr>
|
||||
<tr><td class='forumheader3' ><a href='calendar.php'>" . EC_LAN_131 . "</a></tr>
|
||||
<tr><td class='fcaption' > </td></tr></table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$caltext = "<form id='calsubs' action='" . e_SELF . "' method='post' >
|
||||
<table class='fborder' width='97%'>
|
||||
<tr><td class='fcaption' colspan='3'>" . EC_LAN_125 . "</td></tr>
|
||||
<tr><td class='forumheader2' >" . EC_LAN_126 . "</td><td class='forumheader2' >" . EC_LAN_127 . "</td><td class='forumheader2' >" . EC_LAN_136 . "</td></tr>";
|
||||
// Get list of currently subscribed
|
||||
$cal_db->db_Select('event_subs', 'event_cat', "where event_userid='" . USERID . "'", "nowhere");
|
||||
while ($cal_s = $cal_db->db_Fetch())
|
||||
{
|
||||
extract($cal_s);
|
||||
$cal_array[] = $event_cat;
|
||||
} // while
|
||||
|
||||
// Get list of categories that have subscriptions and are visible to this member
|
||||
$cal_args = "select * from #event_cat
|
||||
where event_cat_subs>0 and (find_in_set(event_cat_class,'".USERCLASS_LIST."') OR find_in_set(event_cat_force_class,'".USERCLASS_LIST."'))";
|
||||
if ($cal_db->db_Select_gen($cal_args))
|
||||
{
|
||||
// echo $cal_args."<br />";
|
||||
while ($cal_row = $cal_db->db_Fetch())
|
||||
{
|
||||
extract($cal_row);
|
||||
$caltext .= "<tr><td class='forumheader3' style='width:10%;'>";
|
||||
if (check_class($event_cat_force_class))
|
||||
{
|
||||
$caltext .= EC_LAN_126;
|
||||
}
|
||||
else
|
||||
{
|
||||
$caltext .= "<input type='hidden' name='event_list[]' value='" . $event_cat_id . "' />
|
||||
<input type='checkbox' class='tbox' value='1' name='event_subd[$event_cat_id]' " . (in_array($event_cat_id, $cal_array)?"checked='checked' ":"") . " /> </td>";
|
||||
}
|
||||
$caltext .= "<td class='forumheader3'>{$event_cat_name}</td><td class='forumheader3'>{$event_cat_description}</td></tr>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$caltext .= "<tr><td class='forumheader3' colspan='3'>" . EC_LAN_128 . "</td></tr>";
|
||||
}
|
||||
$caltext .= "<tr><td class='forumheader3' colspan='3'><input class='tbox' type='submit' value='" . EC_LAN_129 . "' name='upsubs' /></td></tr>";
|
||||
$caltext .= "</table></form>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($pref['eventpost_asubs']) && ($pref['eventpost_asubs'] == '1'))
|
||||
$caltext = EC_LAN_142; // Register or log in
|
||||
else
|
||||
$caltext = EC_LAN_143; // No facility
|
||||
}
|
||||
$e107->ns->tablerender(EC_LAN_124, $caltext);
|
||||
require_once(FOOTERF);
|
||||
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Event calendar plugin - mail subscription to events notification
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/subscribe.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Event calendar plugin
|
||||
*
|
||||
* Event calendar plugin - mail subscription to events notification
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage event_calendar
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
if (!$e107->isInstalled('calendar_menu'))
|
||||
{
|
||||
header('Location: '.e_BASE.'index.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
|
||||
|
||||
if (!is_object($ecal_class)) $ecal_class = new ecal_class;
|
||||
|
||||
include_lan(e_PLUGIN .'calendar_menu/languages/'.e_LANGUAGE.'.php');
|
||||
define('PAGE_NAME', EC_LAN_80);
|
||||
require_once(HEADERF);
|
||||
|
||||
|
||||
if ((USER) && (isset($ecal_class->pref['eventpost_asubs']) && ($ecal_class->pref['eventpost_asubs'] == '1')))
|
||||
{
|
||||
$cal_db = new db; // Probably best to keep this
|
||||
|
||||
if (isset($_POST['upsubs']))
|
||||
{
|
||||
$cal_cats = $e107->tp->toDB($_POST['event_list']); // IDs of allowed categories
|
||||
$cal_subs = $e107->tp->toDB($_POST['event_subd']); // Checkbox results
|
||||
$cal_db->db_Delete('event_subs', "event_userid='" . USERID . "'"); // Delete all for this user to start
|
||||
foreach($cal_cats as $cal_row)
|
||||
{ // Now add in a subscription for each allowed category
|
||||
if ($cal_subs[$cal_row])
|
||||
{
|
||||
$cal_inargs = "0,'" . USERID . "','" . $cal_row . "'";
|
||||
$cal_db->db_Insert('event_subs', $cal_inargs);
|
||||
}
|
||||
// print $cal_row . $cal_subs[$cal_row] . "<br />";
|
||||
}
|
||||
$caltext = "<table class='fborder' width='97%'>
|
||||
<tr><td class='fcaption' >" . EC_LAN_130 . "</td></tr>
|
||||
<tr><td class='forumheader3' ><a href='calendar.php'>" . EC_LAN_131 . "</a></tr>
|
||||
<tr><td class='fcaption' > </td></tr></table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$caltext = "<form id='calsubs' action='" . e_SELF . "' method='post' >
|
||||
<table class='fborder' width='97%'>
|
||||
<tr><td class='fcaption' colspan='3'>" . EC_LAN_125 . "</td></tr>
|
||||
<tr><td class='forumheader2' >" . EC_LAN_126 . "</td><td class='forumheader2' >" . EC_LAN_127 . "</td><td class='forumheader2' >" . EC_LAN_136 . "</td></tr>";
|
||||
|
||||
// Get list of currently subscribed
|
||||
$cal_db->db_Select('event_subs', 'event_cat', "where event_userid='" . USERID . "'", "nowhere");
|
||||
while ($cal_s = $cal_db->db_Fetch())
|
||||
{
|
||||
extract($cal_s);
|
||||
$cal_array[] = $event_cat;
|
||||
} // while
|
||||
|
||||
// Get list of categories that have subscriptions and are visible to this member
|
||||
$cal_args = "select * from #event_cat
|
||||
where event_cat_subs>0 and (find_in_set(event_cat_class,'".USERCLASS_LIST."') OR find_in_set(event_cat_force_class,'".USERCLASS_LIST."'))";
|
||||
if ($cal_db->db_Select_gen($cal_args))
|
||||
{
|
||||
// echo $cal_args."<br />";
|
||||
while ($cal_row = $cal_db->db_Fetch())
|
||||
{
|
||||
extract($cal_row);
|
||||
$caltext .= "<tr><td class='forumheader3' style='width:10%;'>";
|
||||
if (check_class($event_cat_force_class))
|
||||
{
|
||||
$caltext .= EC_LAN_126;
|
||||
}
|
||||
else
|
||||
{
|
||||
$caltext .= "<input type='hidden' name='event_list[]' value='" . $event_cat_id . "' />
|
||||
<input type='checkbox' class='tbox' value='1' name='event_subd[$event_cat_id]' " . (in_array($event_cat_id, $cal_array)?"checked='checked' ":"") . " /> </td>";
|
||||
}
|
||||
$caltext .= "<td class='forumheader3'>{$event_cat_name}</td><td class='forumheader3'>{$event_cat_description}</td></tr>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$caltext .= "<tr><td class='forumheader3' colspan='3'>" . EC_LAN_128 . "</td></tr>";
|
||||
}
|
||||
$caltext .= "<tr><td class='forumheader3' colspan='3'><input class='tbox' type='submit' value='" . EC_LAN_129 . "' name='upsubs' /></td></tr>";
|
||||
$caltext .= "</table></form>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($ecal_class->pref['eventpost_asubs']) && ($ecal_class->pref['eventpost_asubs'] == '1'))
|
||||
$caltext = EC_LAN_142; // Register or log in
|
||||
else
|
||||
$caltext = EC_LAN_143; // No facility
|
||||
}
|
||||
$e107->ns->tablerender(EC_LAN_124, $caltext);
|
||||
require_once(FOOTERF);
|
||||
|
||||
?>
|
Reference in New Issue
Block a user