Exemple #1
0
                } else {
                    $result = DB_query("SELECT * FROM {$_TABLES['events']} WHERE eid ='{$eid}'");
                    $A = DB_fetchArray($result);
                }
                $display .= CALENDAR_editEvent($mode, $A);
                $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG_CAL_ADMIN[1]));
            } else {
                if ($mode == 'batchdelete') {
                    // list_old
                    if (isset($_REQUEST['msg'])) {
                        $display .= COM_showMessage(COM_applyFilter($_REQUEST['msg'], true), 'calendar');
                    }
                    $display .= CALENDAR_listOld();
                    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG_CAL_ADMIN[11]));
                } elseif ($mode == 'batchdeleteexec' && SEC_checkToken()) {
                    $msg = CALENDAR_deleteOld();
                    $display .= COM_showMessage($msg) . CALENDAR_listOld();
                    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG_CAL_ADMIN[11]));
                } else {
                    // 'cancel' or no mode at all
                    if (isset($_REQUEST['msg'])) {
                        $display .= COM_showMessage(COM_applyFilter($_REQUEST['msg'], true), 'calendar');
                    }
                    $display .= CALENDAR_listevents();
                    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG_CAL_ADMIN[11]));
                }
            }
        }
    }
}
COM_output($display);
Exemple #2
0
                    $A = DB_fetchArray($result);
                }
                $display .= COM_siteHeader('menu', $LANG_CAL_ADMIN[1]);
                $display .= CALENDAR_editEvent($mode, $A);
                $display .= COM_siteFooter();
            } else {
                if ($mode == 'batchdelete') {
                    // list_old
                    $display .= COM_siteHeader('menu', $LANG_CAL_ADMIN[11]);
                    if (isset($_REQUEST['msg'])) {
                        $display .= COM_showMessage(COM_applyFilter($_REQUEST['msg'], true), 'calendar');
                    }
                    $display .= CALENDAR_listOld();
                    $display .= COM_siteFooter();
                } elseif ($mode == 'batchdeleteexec' && SEC_checkToken()) {
                    $msg = CALENDAR_deleteOld();
                    $display .= COM_siteHeader('menu', $LANG_CAL_ADMIN[11]) . COM_showMessage($msg) . CALENDAR_listOld() . COM_siteFooter();
                } else {
                    // 'cancel' or no mode at all
                    $display .= COM_siteHeader('menu', $LANG_CAL_ADMIN[11]);
                    if (isset($_REQUEST['msg'])) {
                        $display .= COM_showMessage(COM_applyFilter($_REQUEST['msg'], true), 'calendar');
                    }
                    $display .= CALENDAR_listevents();
                    $display .= COM_siteFooter();
                }
            }
        }
    }
}
COM_output($display);