Various changes including contact messages in database, contact message notifications, notification emails, bugfixes and more
This commit is contained in:
@@ -19,29 +19,7 @@
|
||||
public function index()
|
||||
{
|
||||
// TODO: Add twitch, instagram and 500px as further services
|
||||
// TODO: Receive posts async
|
||||
// $this->SocialMediaModel->getTwitterPosts();
|
||||
// $this->SocialMediaModel->getYouTubeVideos();
|
||||
|
||||
// $this->load->library('email');
|
||||
// $config['protocol'] = 'sendmail';
|
||||
// $config['mailpath'] = '/sendmail';
|
||||
// $config['charset'] = 'iso-8859-1';
|
||||
// $config['wordwrap'] = TRUE;
|
||||
//
|
||||
// $this->email->initialize($config);
|
||||
//
|
||||
// $this->email->from('info@kingofdog.eu', 'KingOfDog.de');
|
||||
// $this->email->to('struckatmarcel@gmail.com');
|
||||
//
|
||||
// $this->email->subject('Email Test');
|
||||
// $this->email->message('Testing the email class.');
|
||||
//
|
||||
// $this->email->send();
|
||||
|
||||
// ini_set('SMTP', 'smtp.gmail.com');
|
||||
// ini_set('smtp_port', '465');
|
||||
//
|
||||
$video = $this->YoutubePlayerModel->newestVids(1)[0];
|
||||
|
||||
$currentlyActiveUsers = $this->UserModel->getActiveUsers(5);
|
||||
@@ -100,6 +78,11 @@
|
||||
$email = $this->UserModel->getUser($_SESSION['user']['username'])[0]['email'];
|
||||
if (preg_match("/[A-Za-z._]+@[A-Za-z._]+\.[A-Za-z._]+/", $email)) {
|
||||
// TODO: Send contact mail
|
||||
|
||||
$userID = isset($_SESSION['user']) ? $_SESSION['user']['ID'] : null;
|
||||
|
||||
$this->GeneralModel->addContactMessage($email, $userID, $message);
|
||||
|
||||
$notice['type'] = true;
|
||||
$notice['message'] = "Deine Nachricht wurde versendet!";
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user