/** * @see Form::save() */ public function save() { MessageForm::save(); //create date $date = (string) $this->dateValues['year'] . '-' . (string) $this->dateValues['month'] . '-' . (string) $this->dateValues['day'] . (MESSAGE_NEWSLETTERSYSTEM_GENERAL_HOURLYCRONJOB ? ' ' . (string) $this->dateValues['hour'] . ':00:00' : ''); //convert date to timestamp $unixTime = strtotime($date); $newsletter = new NewsletterEditor($this->newsletterID); $newsletter->update(WCF::getUser()->userID, WCF::getUser()->username, $unixTime, $this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes); $this->saved(); if ($this->sendTestmail) { $this->sendTestmail($newsletter); } $this->success = true; //resetting cache $cacheName = 'newsletter-' . PACKAGE_ID; WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.' . $cacheName . '.php'); }
/** * @see Form::save() */ public function save() { parent::save(); //create date $date = (string) $this->dateValues['year'] . '-' . (string) $this->dateValues['month'] . '-' . (string) $this->dateValues['day'] . (MESSAGE_NEWSLETTERSYSTEM_GENERAL_HOURLYCRONJOB ? ' ' . (string) $this->dateValues['hour'] . ':00:00' : ''); //convert date to timestamp $unixTime = strtotime($date); $newsletter = NewsletterEditor::create($unixTime, $this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes); $this->saved(); if ($this->sendTestmail) { $this->sendTestmail($newsletter); } //resetting cache $cacheName = 'newsletter-' . PACKAGE_ID; WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.' . $cacheName . '.php'); HeaderUtil::redirect('index.php?form=NewsletterAdd&result=success&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED); exit; }
?page=newslettermanagement'> <?php echo $this->text->get_text("newsletter_admin_section_01"); ?> </a> </li> <li<?php if ($current_page == 'usermanagement') { echo " class='active_menu_entry'"; } ?> > <a href='<?php echo basename($_SERVER['PHP_SELF']); ?> ?page=usermanagement'> <?php echo $this->text->get_text("newsletter_admin_section_02"); ?> </a> </li> </ul> <?php // ggf. Inhalte eines der Bereiche der Website anzeigen if ($current_page == 'usermanagement') { $tmp = new NewsletterUsermanagement(); } else { $tmp = new NewsletterEditor(); } echo $tmp->show();