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 {
|
||||
|
@@ -16,8 +16,8 @@ class Twitch extends MY_Controller {
|
||||
|
||||
// $data =
|
||||
|
||||
$result = $this->load->view('twitch_result', ['json' => $this->TwitchModel->getTwitchInfos($channel), 'stream' => $this->TwitchModel->getTwitchStream($channel), 'videos' => $this->TwitchModel->getTwitchVideos($channel)], true);
|
||||
$this->load->view('twitch', ['result' => $result]);
|
||||
$result = $this->load->view('tools/twitch_result', ['json' => $this->TwitchModel->getTwitchInfos($channel), 'stream' => $this->TwitchModel->getTwitchStream($channel), 'videos' => $this->TwitchModel->getTwitchVideos($channel)], true);
|
||||
$this->load->view('tools/twitch', ['result' => $result]);
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user