Esempio n. 1
0
$getCatId = admFuncVariableIsValid($_GET, 'cat_id', 'numeric');
// prüfen ob das Modul überhaupt aktiviert ist
if ($gPreferences['enable_dates_module'] == 0) {
    // das Modul ist deaktiviert
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // nur eingelochte Benutzer dürfen auf das Modul zugreifen
    require_once '../../system/login_valid.php';
}
// Nachschauen ob ical ueberhaupt aktiviert ist bzw. das Modul oeffentlich zugaenglich ist
if ($gPreferences['enable_dates_ical'] != 1) {
    $gMessage->setForwardUrl($gHomepage);
    $gMessage->show($gL10n->get('SYS_ICAL_DISABLED'));
}
//create Object
$dates = new ModuleDates();
// get parameters fom $_GET Array stored in class
$parameter = $dates->getParameters();
// set mode, viewmode, startdate and enddate manually
$parameter['mode'] = 2;
$parameter['view_mode'] = 'period';
$parameter['date_from'] = date('Y-m-d', time() - $gPreferences['dates_ical_days_past'] * 86400);
$parameter['date_to'] = date('Y-m-d', time() + $gPreferences['dates_ical_days_future'] * 86400);
// read events for output
$datesResult = $dates->getDataset();
//Headline für Dateinamen
if ($dates->getCatId() > 0) {
    $calendar = new TableCategory($gDb, $dates->getCatId());
    $getHeadline .= '_' . $calendar->getValue('cat_name');
}
$date = new TableDate($gDb);
Esempio n. 2
0
$endDate = date('Y-m-d', time() + $gPreferences['dates_ical_days_future'] * 60 * 60 * 24);
// Message if module is disabled
if ($gPreferences['enable_dates_module'] == 0) {
    // Module disabled
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // only with valid login
    require_once '../../system/login_valid.php';
}
// If Ical enabled and module is public
if ($gPreferences['enable_dates_ical'] != 1) {
    $gMessage->setForwardUrl($gHomepage);
    $gMessage->show($gL10n->get('SYS_ICAL_DISABLED'));
}
// create Object
$dates = new ModuleDates();
// set mode, viewmode, calendar, startdate and enddate manually
$dates->setParameter('mode', 2);
$dates->setParameter('view_mode', 'period');
$dates->setParameter('cat_id', $getCatId);
$dates->setDaterange($startDate, $endDate);
// read events for output
$datesResult = $dates->getDataset(0, 0);
// get parameters fom $_GET Array stored in class
$parameter = $dates->getParameters();
// Headline for file name
if ($getCatId > 0) {
    $calendar = new TableCategory($gDb, $dates->getCatId());
    $getHeadline .= '_' . $calendar->getValue('cat_name');
}
$date = new TableDate($gDb);
Esempio n. 3
0
$getShow = admFuncVariableIsValid($_GET, 'show', 'string', array('defaultValue' => 'all', 'validValues' => array('all', 'maybe_participate', 'only_participate')));
$getDateFrom = admFuncVariableIsValid($_GET, 'date_from', 'date');
$getDateTo = admFuncVariableIsValid($_GET, 'date_to', 'date');
$getViewMode = admFuncVariableIsValid($_GET, 'view_mode', 'string', array('defaultValue' => 'html', 'validValues' => array('html', 'print')));
$getView = admFuncVariableIsValid($_GET, 'view', 'string', array('defaultValue' => $gPreferences['dates_view'], 'validValues' => array('detail', 'compact', 'room', 'participants', 'description')));
// check if module is active
if ($gPreferences['enable_dates_module'] == 0) {
    // Module is not active
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // module only for valid Users
    require_once '../../system/login_valid.php';
}
// create object and get recordset of available dates
try {
    $dates = new ModuleDates();
    $dates->setParameter('mode', $getMode);
    $dates->setParameter('cat_id', $getCatId);
    $dates->setParameter('id', $getId);
    $dates->setParameter('show', $getShow);
    $dates->setParameter('view_mode', $getViewMode);
    $dates->setDateRange($getDateFrom, $getDateTo);
} catch (AdmException $e) {
    $e->showHtml();
}
if ($getCatId > 0) {
    $calendar = new TableCategory($gDb, $getCatId);
}
// Number of events each page for default view 'html' or 'compact' view
if ($gPreferences['dates_per_page'] > 0 && $getViewMode === 'html') {
    $datesPerPage = $gPreferences['dates_per_page'];
Esempio n. 4
0
 *****************************************************************************/
require_once '../../system/common.php';
// Initialize and check the parameters
$getHeadline = admFuncVariableIsValid($_GET, 'headline', 'string', array('defaultValue' => $gL10n->get('DAT_DATES')));
// Nachschauen ob RSS ueberhaupt aktiviert ist bzw. das Modul oeffentlich zugaenglich ist
if ($gPreferences['enable_rss'] != 1) {
    $gMessage->setForwardUrl($gHomepage);
    $gMessage->show($gL10n->get('SYS_RSS_DISABLED'));
}
// pruefen ob das Modul ueberhaupt aktiviert ist
if ($gPreferences['enable_dates_module'] != 1) {
    // das Modul ist deaktiviert
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
}
// create Object
$dates = new ModuleDates();
// read events for output
$datesResult = $dates->getDataset(0, 10);
// ab hier wird der RSS-Feed zusammengestellt
// create RSS feed object with channel information
$rss = new RSSfeed($gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline, $gCurrentOrganization->getValue('org_homepage'), $gL10n->get('DAT_CURRENT_DATES_OF_ORGA', $gCurrentOrganization->getValue('org_longname')), $gCurrentOrganization->getValue('org_longname'));
$date = new TableDate($gDb);
// Dem RSSfeed-Objekt jetzt die RSSitems zusammenstellen und hinzufuegen
if ($datesResult['numResults'] > 0) {
    $date = new TableDate($gDb);
    foreach ($datesResult['recordset'] as $row) {
        // ausgelesene Termindaten in Date-Objekt schieben
        $date->clear();
        $date->setArray($row);
        // set data for attributes of this entry
        $title = $date->getValue('dat_begin', $gPreferences['system_date']);
Esempio n. 5
0
$getShow = admFuncVariableIsValid($_GET, 'show', 'string', array('defaultValue' => 'all', 'validValues' => array('all', 'maybe_participate', 'only_participate')));
$getCatId = admFuncVariableIsValid($_GET, 'cat_id', 'numeric');
$getDateFrom = admFuncVariableIsValid($_GET, 'date_from', 'date');
$getDateTo = admFuncVariableIsValid($_GET, 'date_to', 'date');
$getViewMode = admFuncVariableIsValid($_GET, 'view_mode', 'string', array('defaultValue' => $gPreferences['dates_viewmode'], 'validValues' => array('html', 'compact', 'print')));
// check if module is active
if ($gPreferences['enable_dates_module'] == 0) {
    // Module is not active
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // module only for valid Users
    require_once '../../system/login_valid.php';
}
// create object and get recordset of available dates
try {
    $dates = new ModuleDates();
    $dates->setParameter('mode', $getMode);
    $dates->setParameter('cat_id', $getCatId);
    $dates->setParameter('id', $getId);
    $dates->setParameter('show', $getShow);
    $dates->setParameter('view_mode', $getViewMode);
    $dates->setDateRange($getDateFrom, $getDateTo);
} catch (AdmException $e) {
    $e->showHtml();
}
if ($getCatId > 0) {
    $calendar = new TableCategory($gDb, $getCatId);
}
// Number of events each page for default view 'html' or 'compact' view
if ($gPreferences['dates_per_page'] > 0 && ($getViewMode === 'html' || $getViewMode === 'compact')) {
    $datesPerPage = $gPreferences['dates_per_page'];
Esempio n. 6
0
$getCatId = admFuncVariableIsValid($_GET, 'cat_id', 'numeric');
// prüfen ob das Modul überhaupt aktiviert ist
if ($gPreferences['enable_dates_module'] == 0) {
    // das Modul ist deaktiviert
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // nur eingelochte Benutzer dürfen auf das Modul zugreifen
    require_once '../../system/login_valid.php';
}
// Nachschauen ob ical ueberhaupt aktiviert ist bzw. das Modul oeffentlich zugaenglich ist
if ($gPreferences['enable_dates_ical'] != 1) {
    $gMessage->setForwardUrl($gHomepage);
    $gMessage->show($gL10n->get('SYS_ICAL_DISABLED'));
}
// create Object
$dates = new ModuleDates();
// get parameters fom $_GET Array stored in class
$parameter = $dates->getParameters();
// set mode, viewmode, startdate and enddate manually
$parameter['mode'] = 2;
$parameter['view_mode'] = 'period';
$parameter['date_from'] = date('Y-m-d', time() - $gPreferences['dates_ical_days_past'] * 86400);
$parameter['date_to'] = date('Y-m-d', time() + $gPreferences['dates_ical_days_future'] * 86400);
// set date range
$dates->setDaterange($parameter['date_from'], $parameter['date_to']);
// read events for output
$datesResult = $dates->getDataset(0, 0);
// Headline für Dateinamen
if ($dates->getCatId() > 0) {
    $calendar = new TableCategory($gDb, $dates->getCatId());
    $getHeadline .= '_' . $calendar->getValue('cat_name');
Esempio n. 7
0
}
if (isset($plg_link_target)) {
    $plg_link_target = strip_tags($plg_link_target);
} else {
    $plg_link_target = '_self';
}
if (!isset($plg_kal_cat)) {
    $plg_kal_cat = array('all');
}
// Prüfen ob the Link-URL gesetzt wurde oder leer ist
// wenn leer, dann Standardpfad zum Admidio-Modul
if (!isset($plg_link_url) || $plg_link_url === '') {
    $plg_link_url = $g_root_path . '/adm_program/modules/dates/dates.php';
}
// create Object
$plgDates = new ModuleDates();
// read events for output
$plgDatesResult = $plgDates->getDataSet(0, $plg_dates_count);
$plg_date = new TableDate($gDb);
echo '<div id="plugin_' . $plugin_folder . '" class="admidio-plugin-content">';
if ($plg_show_headline == 1) {
    echo '<h3>' . $gL10n->get('PLG_DATES_HEADLINE') . '</h3>';
}
if ($plgDatesResult['numResults'] > 0) {
    foreach ($plgDatesResult['recordset'] as $plg_row) {
        $plg_date->clear();
        $plg_date->setArray($plg_row);
        $plg_html_end_date = '';
        echo '<div>' . $plg_date->getValue('dat_begin', $gPreferences['system_date']) . '&nbsp;&nbsp;';
        if ($plg_date->getValue('dat_all_day') != 1) {
            echo $plg_date->getValue('dat_begin', $gPreferences['system_time']);
Esempio n. 8
0
}
if (isset($plg_link_target)) {
    $plg_link_target = strip_tags($plg_link_target);
} else {
    $plg_link_target = '_self';
}
if (!isset($plg_kal_cat)) {
    $plg_kal_cat = array('all');
}
// Prüfen ob the Link-URL gesetzt wurde oder leer ist
// wenn leer, dann Standardpfad zum Admidio-Modul
if (!isset($plg_link_url) || $plg_link_url === '') {
    $plg_link_url = $g_root_path . '/adm_program/modules/dates/dates.php';
}
// create Object
$plgDates = new ModuleDates();
// read events for output
$plgDates->setDateRange();
$plgDatesResult = $plgDates->getDataSet(0, $plg_dates_count);
$plg_date = new TableDate($gDb);
echo '<div id="plugin_' . $plugin_folder . '" class="admidio-plugin-content">';
if ($plg_show_headline == 1) {
    echo '<h3>' . $gL10n->get('PLG_DATES_HEADLINE') . '</h3>';
}
if ($plgDatesResult['numResults'] > 0) {
    foreach ($plgDatesResult['recordset'] as $plg_row) {
        $plg_date->clear();
        $plg_date->setArray($plg_row);
        $plg_html_end_date = '';
        echo '<div>' . $plg_date->getValue('dat_begin', $gPreferences['system_date']) . '&nbsp;&nbsp;';
        if ($plg_date->getValue('dat_all_day') != 1) {
$endDate = date('Y-m-d', time() + $gPreferences['dates_ical_days_future'] * 60 * 60 * 24);
// Message if module is disabled
if ($gPreferences['enable_dates_module'] == 0) {
    // Module disabled
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // only with valid login
    require_once '../../system/login_valid.php';
}
// If Ical enabled and module is public
if ($gPreferences['enable_dates_ical'] != 1) {
    $gMessage->setForwardUrl($gHomepage);
    $gMessage->show($gL10n->get('SYS_ICAL_DISABLED'));
}
// create Object
$dates = new ModuleDates();
// set mode, viewmode, calendar, startdate and enddate manually
$dates->setParameter('mode', 2);
$dates->setParameter('view_mode', 'period');
$dates->setParameter('cat_id', $getCatId);
$dates->setDaterange($startDate, $endDate);
// read events for output
$datesResult = $dates->getDataset(0, 0);
// get parameters fom $_GET Array stored in class
$parameter = $dates->getParameters();
// Headline for file name
// @ptabaden: Admidio 3.1.3 change
if ($getCatId > 0) {
    $calendar = new TableCategory($gDb, $getCatId);
    $getHeadline .= '_' . $calendar->getValue('cat_name');
}
Esempio n. 10
0
$getShow = admFuncVariableIsValid($_GET, 'show', 'string', array('defaultValue' => 'all', 'validValues' => array('all', 'maybe_participate', 'only_participate')));
$getDateFrom = admFuncVariableIsValid($_GET, 'date_from', 'date');
$getDateTo = admFuncVariableIsValid($_GET, 'date_to', 'date');
$getViewMode = admFuncVariableIsValid($_GET, 'view_mode', 'string', array('defaultValue' => 'html', 'validValues' => array('html', 'print')));
$getView = admFuncVariableIsValid($_GET, 'view', 'string', array('defaultValue' => $gPreferences['dates_view'], 'validValues' => array('detail', 'compact', 'room', 'participants', 'description')));
// check if module is active
if ($gPreferences['enable_dates_module'] == 0) {
    // Module is not active
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
    // module only for valid Users
    require_once '../../system/login_valid.php';
}
// create object and get recordset of available dates
try {
    $dates = new ModuleDates();
    $dates->setParameter('mode', $getMode);
    $dates->setParameter('cat_id', $getCatId);
    $dates->setParameter('id', $getId);
    $dates->setParameter('show', $getShow);
    $dates->setParameter('view_mode', $getViewMode);
    $dates->setDateRange($getDateFrom, $getDateTo);
} catch (AdmException $e) {
    $e->showHtml();
}
if ($getCatId > 0) {
    $calendar = new TableCategory($gDb, $getCatId);
}
// Number of events each page for default view 'html' or 'compact' view
if ($gPreferences['dates_per_page'] > 0 && $getViewMode === 'html') {
    $datesPerPage = $gPreferences['dates_per_page'];