Beispiel #1
0
 private function send_notification($message)
 {
     if ($this->settings->guestbook_maintainers == "") {
         return;
     }
     $maintainers = users_with_role($this->db, $this->settings->guestbook_maintainers);
     $guestbook_url = "http://" . $_SERVER["SERVER_NAME"] . "/" . $this->page->module;
     $email = new email("Guestbook message posted", $this->settings->webmaster_email);
     foreach ($maintainers as $maintainer) {
         $cms_url = "http://" . $_SERVER["SERVER_NAME"] . "/cms/guestbook";
         if (($key = one_time_key($this->db, $maintainer["id"])) !== false) {
             $cms_url .= "?login="******"<body>" . "<p>The following message has been added to the guestbook on the '" . $this->settings->head_title . "' website.</p>" . "<p>\"<i>" . $message . "</i>\"</p>" . "<p>Click <a href=\"" . $guestbook_url . "\">here</a> to visit the guestbook page or <a href=\"" . $cms_url . "\">here</a> to visit the guestbook CMS page.</p>" . "</body>";
         $email->message($message);
         $email->send($maintainer["email"], $maintainer["fullname"]);
     }
 }
Beispiel #2
0
 private function send_notifications($message, $topic_id, $message_id = null)
 {
     if ($this->user->logged_in) {
         return;
     } else {
         if ($this->settings->forum_maintainers == null) {
             return;
         }
     }
     $maintainers = users_with_role($this->db, $this->settings->forum_maintainers);
     $topic_url = "http://" . $_SERVER["SERVER_NAME"] . "/" . $this->page->module . "/topic/" . $topic_id;
     if ($message_id !== null) {
         $topic_url .= "#" . $message_id;
     }
     $email = new email("Forum message posted", $this->settings->webmaster_email);
     foreach ($maintainers as $maintainer) {
         $cms_url = "http://" . $_SERVER["SERVER_NAME"] . "/cms/forum";
         if (($key = one_time_key($this->db, $maintainer["id"])) !== false) {
             $cms_url .= "?login="******"<body>" . "<p>The following message has been added to the forum on the '" . $this->settings->head_title . "' website.</p>" . "<p>\"<i>" . $message . "</i>\"</p>" . "<p>Click <a href=\"" . $topic_url . "\">here</a> to visit the forum topic page or <a href=\"" . $cms_url . "\">here</a> to visit the forum CMS page.</p>" . "</body>";
         $email->message($message);
         $email->send($maintainer["email"], $maintainer["fullname"]);
     }
 }
Beispiel #3
0
 private function send_notification($weblog_id, $comment)
 {
     if (($weblog = $this->db->entry("weblogs", $weblog_id)) === false) {
         return false;
     } else {
         if (($author = $this->db->entry("users", $weblog["user_id"])) === false) {
             return false;
         }
     }
     $weblog_url = "http://" . $_SERVER["SERVER_NAME"] . "/" . $this->page->module . "/" . $weblog_id;
     $cms_url = "http://" . $_SERVER["SERVER_NAME"] . "/cms/weblog/" . $weblog_id;
     if (($key = one_time_key($this->db, $author["id"])) !== false) {
         $cms_url .= "?login="******"<body>" . "<p>The following comment has been added to your weblog post on the '" . $this->settings->head_title . "' website.</p>" . "<p>\"<i>" . $comment . "</i>\"</p>" . "<p>Click <a href=\"" . $weblog_url . "\">here</a> to visit the weblog page or <a href=\"" . $cms_url . "\">here</a> to visit the weblog CMS page.</p>" . "</body>";
     $email = new email("Weblog comment posted", $this->settings->webmaster_email);
     $email->message($message);
     $email->send($author["email"], $author["fullname"]);
 }