/** * @access private * @return string */ function _deletePage() { $confirmation = GetPostOrGet('confirmation'); $dateID = GetPostOrGet('dateID'); $dates = new Dates($this->_SqlConnection, $this->_ComaLib, $this->_User, $this->_Config); // has the user confirmed that he is sure to delete the date? if ($confirmation == 1 && is_numeric($dateID)) { $dates->DeleteDate($dateID); } else { if (is_numeric($dateID)) { $dateEntry = $dates->GetDate($dateID); if (count($dateEntry) > 0) { $out = "<h2>{$this->_Lang['delete_date']}</h2>\r\n"; $out .= sprintf($this->_Lang['Do_you_really_want_to_delete_the_date_%date_topic%_for_the_%date%_at_%time%_o_clock'], $dateEntry['DATE_TOPIC'], date("d.m.Y", $dateEntry['DATE_DATE']), date("H:i", $dateEntry['DATE_DATE'])); $out .= "<br />\r\n\t\t\t<a class=\"button\" href=\"admin.php?page=module_dates&action=delete&dateID={$dateID}&confirmation=1\" title=\"Wirklich Löschen\">{$this->_Lang['yes']}</a>\r\n\t\t\t<a class=\"button\" href=\"admin.php?page=module_dates\" title=\"Nicht Löschen\">{$this->_Lang['no']}</a>"; return $out; } } } return $this->_homePage(); }
/** * @access private * @return string */ function _DeleteDatePage() { $confirmation = GetPostOrGet('confirmation'); $eventID = GetPostOrGet('eventID'); $dates = new Dates($this->_SqlConnection, $this->_ComaLib, $this->_User, $this->_Config); if ($confirmation == 1 && is_numeric($eventID)) { $dates->DeleteDate($eventID); } else { if (is_numeric($eventID)) { $dateEntry = $dates->GetDate($eventID); $this->_ComaLate->SetReplacement('LANG_EVENTS', $this->_Translation->GetTranslation('events')); $this->_ComaLate->SetReplacement('LANG_YES', $this->_Translation->GetTranslation('yes')); $this->_ComaLate->SetReplacement('LANG_NO', $this->_Translation->GetTranslation('no')); $this->_ComaLate->SetReplacement('LANG_REMOVE_EVENT', $this->_Translation->GetTranslation('remove_event')); $this->_ComaLate->SetReplacement('LANG_DONT_REMOVE_THIS_EVENT', $this->_Translation->GetTranslation('dont_remove_this_event')); $this->_ComaLate->SetReplacement('LANG_REMOVE_THIS_EVENT', $this->_Translation->GetTranslation('remove_this_event')); $question = sprintf($this->_Translation->GetTranslation('Do_you_really_want_to_delete_the_date_%date_topic%_for_the_%date%_at_%time%_o_clock'), $dateEntry['EVENT_TOPIC'], date("d.m.Y", $dateEntry['EVENT_DATE']), date("H:i", $dateEntry['EVENT_DATE'])); $this->_ComaLate->SetReplacement('REMOVE_QUESTION', $question); $this->_ComaLate->SetReplacement('EVENT_ID', $eventID); $template = '<h2>{LANG_EVENTS}</h2> <fieldset> <legend>{LANG_REMOVE_EVENT}</legend> {REMOVE_QUESTION} <br /> <a class="button" href="admin.php?page=module_dates&action=delete&eventID={EVENT_ID}&confirmation=1" title="{LANG_REMOVE_THIS_EVENT}">{LANG_YES}</a> <a class="button" href="admin.php?page=module_dates" title="{LANG_DONT_REMOVE_THIS_EVENT}">{LANG_NO}</a> </fieldset>'; return $template; } } return $this->_mainPage(); }