commit 4974cc531c811e096cf391acb1f305de1fd89310 Author: Jan_Hill Date: Thu Dec 19 03:54:54 2024 +0100 Project 1.0 diff --git a/database-mysql/database_import.sql b/database-mysql/database_import.sql new file mode 100644 index 0000000..9b3ee02 --- /dev/null +++ b/database-mysql/database_import.sql @@ -0,0 +1,355 @@ +-- phpMyAdmin SQL Dump +-- version 5.2.0 +-- https://www.phpmyadmin.net/ +-- +-- Host: localhost +-- Erstellungszeit: 09. Mrz 2023 um 03:54 +-- Server-Version: 10.5.18-MariaDB-0+deb11u1 +-- PHP-Version: 7.4.33 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Datenbank: `janh_db2` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `admin_ticket` +-- + +CREATE TABLE `admin_ticket` ( + `id` int(255) NOT NULL, + `reply` text NOT NULL, + `toticket` int(255) NOT NULL, + `ticket_answer` int(255) NOT NULL, + `byuser` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `email_server` +-- + +CREATE TABLE `email_server` ( + `id` int(11) NOT NULL, + `host` varchar(255) NOT NULL, + `account` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `secure` varchar(255) NOT NULL, + `port` int(255) NOT NULL, + `type` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `musicbot` +-- + +CREATE TABLE `musicbot` ( + `id` int(255) NOT NULL, + `name` varchar(255) NOT NULL, + `ts3ip` varchar(255) NOT NULL, + `ts3port` varchar(255) NOT NULL, + `ts3password` varchar(255) NOT NULL, + `user` varchar(255) NOT NULL, + `node` int(255) NOT NULL, + `botid` int(255) NOT NULL, + `template_id` int(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `news` +-- + +CREATE TABLE `news` ( + `id` int(255) NOT NULL, + `author` varchar(255) NOT NULL, + `date` varchar(255) NOT NULL, + `title` varchar(500) NOT NULL, + `text` text NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `nodes` +-- + +CREATE TABLE `nodes` ( + `id` int(255) NOT NULL, + `name` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `port` int(255) NOT NULL, + `uid` varchar(255) NOT NULL, + `token` varchar(255) NOT NULL, + `status` set('active','locked','','') NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `password_reset` +-- + +CREATE TABLE `password_reset` ( + `id` int(255) NOT NULL, + `username` varchar(255) NOT NULL, + `token` varchar(500) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `quicklinks` +-- + +CREATE TABLE `quicklinks` ( + `id` int(255) NOT NULL, + `name` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `support` +-- + +CREATE TABLE `support` ( + `id` int(255) NOT NULL, + `title` varchar(255) NOT NULL, + `text` text NOT NULL, + `byuser` varchar(255) NOT NULL, + `status` set('open','wait','closed','') NOT NULL, + `toticketuser` varchar(255) NOT NULL, + `ticket_answer` int(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `ticket-system` +-- + +CREATE TABLE `ticket-system` ( + `id` int(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `tickets` +-- + +CREATE TABLE `tickets` ( + `id` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `msg` text NOT NULL, + `user` varchar(255) NOT NULL, + `created` datetime NOT NULL DEFAULT current_timestamp(), + `status` enum('open','closed','resolved') NOT NULL DEFAULT 'open' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `tickets_comments` +-- + +CREATE TABLE `tickets_comments` ( + `id` int(11) NOT NULL, + `ticket_id` int(11) NOT NULL, + `msg` text NOT NULL, + `user` varchar(255) NOT NULL, + `created` datetime NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `users` +-- + +CREATE TABLE `users` ( + `id` int(255) NOT NULL, + `username` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `session_token` varchar(255) NOT NULL, + `session_expire` int(255) NOT NULL, + `max_bots` int(255) NOT NULL, + `email` varchar(255) NOT NULL, + `verify_token` varchar(300) NOT NULL, + `status` set('active','blocked') NOT NULL, + `role` set('admin','moderator','user') NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `admin_ticket` +-- +ALTER TABLE `admin_ticket` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `email_server` +-- +ALTER TABLE `email_server` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `musicbot` +-- +ALTER TABLE `musicbot` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `news` +-- +ALTER TABLE `news` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `nodes` +-- +ALTER TABLE `nodes` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `password_reset` +-- +ALTER TABLE `password_reset` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `quicklinks` +-- +ALTER TABLE `quicklinks` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `support` +-- +ALTER TABLE `support` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `ticket-system` +-- +ALTER TABLE `ticket-system` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `tickets` +-- +ALTER TABLE `tickets` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `tickets_comments` +-- +ALTER TABLE `tickets_comments` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `users` +-- +ALTER TABLE `users` + ADD PRIMARY KEY (`id`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `admin_ticket` +-- +ALTER TABLE `admin_ticket` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45346; + +-- +-- AUTO_INCREMENT für Tabelle `email_server` +-- +ALTER TABLE `email_server` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=767; + +-- +-- AUTO_INCREMENT für Tabelle `musicbot` +-- +ALTER TABLE `musicbot` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=996591; + +-- +-- AUTO_INCREMENT für Tabelle `news` +-- +ALTER TABLE `news` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39916; + +-- +-- AUTO_INCREMENT für Tabelle `nodes` +-- +ALTER TABLE `nodes` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=913893; + +-- +-- AUTO_INCREMENT für Tabelle `password_reset` +-- +ALTER TABLE `password_reset` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=78398676; + +-- +-- AUTO_INCREMENT für Tabelle `quicklinks` +-- +ALTER TABLE `quicklinks` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18588; + +-- +-- AUTO_INCREMENT für Tabelle `support` +-- +ALTER TABLE `support` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=954253; + +-- +-- AUTO_INCREMENT für Tabelle `ticket-system` +-- +ALTER TABLE `ticket-system` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `tickets` +-- +ALTER TABLE `tickets` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; + +-- +-- AUTO_INCREMENT für Tabelle `tickets_comments` +-- +ALTER TABLE `tickets_comments` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=357; + +-- +-- AUTO_INCREMENT für Tabelle `users` +-- +ALTER TABLE `users` + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=940789; +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/src/admin/email/css/bootstrap-modal-bs3patch.css b/src/admin/email/css/bootstrap-modal-bs3patch.css new file mode 100644 index 0000000..6e33141 --- /dev/null +++ b/src/admin/email/css/bootstrap-modal-bs3patch.css @@ -0,0 +1,45 @@ +/*! + * Bootstrap Modal + * + * Copyright Jordan Schroter + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Boostrap 3 patch for for bootstrap-modal. Include BEFORE bootstrap-modal.css! + */ + +body.modal-open, +.modal-open .navbar-fixed-top, +.modal-open .navbar-fixed-bottom { + margin-right: 0; +} + +.modal { + left: 50%; + bottom: auto; + right: auto; + z-index: 1050; + padding: 0; + width: 500px; + margin-left: -250px; + background-color: #ffffff; + border: 1px solid #999999; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + background-clip: padding-box; +} + +.modal.container { + max-width: none; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; +} \ No newline at end of file diff --git a/src/admin/email/css/bootstrap-modal.css b/src/admin/email/css/bootstrap-modal.css new file mode 100644 index 0000000..76e3be2 --- /dev/null +++ b/src/admin/email/css/bootstrap-modal.css @@ -0,0 +1,214 @@ +/*! + * Bootstrap Modal + * + * Copyright Jordan Schroter + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +.modal-open { + overflow: hidden; +} + + +/* add a scroll bar to stop page from jerking around */ +.modal-open.page-overflow .page-container, +.modal-open.page-overflow .page-container .navbar-fixed-top, +.modal-open.page-overflow .page-container .navbar-fixed-bottom, +.modal-open.page-overflow .modal-scrollable { + overflow-y: scroll; +} + +@media (max-width: 979px) { + .modal-open.page-overflow .page-container .navbar-fixed-top, + .modal-open.page-overflow .page-container .navbar-fixed-bottom { + overflow-y: visible; + } +} + + +.modal-scrollable { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + overflow: auto; +} + +.modal { + outline: none; + position: absolute; + margin-top: 0; + top: 50%; + overflow: visible; /* allow content to popup out (i.e tooltips) */ +} + +.modal.fade { + top: -100%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; +} + +.modal.fade.in { + top: 50%; +} + +.modal-body { + max-height: none; + overflow: visible; +} + +.modal.modal-absolute { + position: absolute; + z-index: 950; +} + +.modal .loading-mask { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #fff; + border-radius: 6px; +} + +.modal-backdrop.modal-absolute{ + position: absolute; + z-index: 940; +} + +.modal-backdrop, +.modal-backdrop.fade.in{ + opacity: 0.7; + filter: alpha(opacity=70); + background: #fff; +} + +.modal.container { + width: 940px; + margin-left: -470px; +} + +/* Modal Overflow */ + +.modal-overflow.modal { + top: 1%; +} + +.modal-overflow.modal.fade { + top: -100%; +} + +.modal-overflow.modal.fade.in { + top: 1%; +} + +.modal-overflow .modal-body { + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +/* Responsive */ + +@media (min-width: 1200px) { + .modal.container { + width: 1170px; + margin-left: -585px; + } +} + +@media (max-width: 979px) { + .modal, + .modal.container, + .modal.modal-overflow { + top: 1%; + right: 1%; + left: 1%; + bottom: auto; + width: auto !important; + height: auto !important; + margin: 0 !important; + padding: 0 !important; + } + + .modal.fade.in, + .modal.container.fade.in, + .modal.modal-overflow.fade.in { + top: 1%; + bottom: auto; + } + + .modal-body, + .modal-overflow .modal-body { + position: static; + margin: 0; + height: auto !important; + max-height: none !important; + overflow: visible !important; + } + + .modal-footer, + .modal-overflow .modal-footer { + position: static; + } +} + +.loading-spinner { + position: absolute; + top: 50%; + left: 50%; + margin: -12px 0 0 -12px; +} + +/* +Animate.css - http://daneden.me/animate +Licensed under the ☺ license (http://licence.visualidiot.com/) + +Copyright (c) 2012 Dan Eden*/ + +.animated { + -webkit-animation-duration: 1s; + -moz-animation-duration: 1s; + -o-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; +} + +@-webkit-keyframes shake { + 0%, 100% {-webkit-transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);} + 20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);} +} + +@-moz-keyframes shake { + 0%, 100% {-moz-transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);} + 20%, 40%, 60%, 80% {-moz-transform: translateX(10px);} +} + +@-o-keyframes shake { + 0%, 100% {-o-transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);} + 20%, 40%, 60%, 80% {-o-transform: translateX(10px);} +} + +@keyframes shake { + 0%, 100% {transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);} + 20%, 40%, 60%, 80% {transform: translateX(10px);} +} + +.shake { + -webkit-animation-name: shake; + -moz-animation-name: shake; + -o-animation-name: shake; + animation-name: shake; +} diff --git a/src/admin/email/css/multi-step-modal.js b/src/admin/email/css/multi-step-modal.js new file mode 100644 index 0000000..ff626c2 --- /dev/null +++ b/src/admin/email/css/multi-step-modal.js @@ -0,0 +1,127 @@ ++function($) { + 'use strict'; + + var modals = $('.modal.multi-step'); + + modals.each(function(idx, modal) { + var $modal = $(modal); + var $bodies = $modal.find('div.modal-body'); + var total_num_steps = $bodies.length; + var $progress = $modal.find('.m-progress'); + var $progress_bar = $modal.find('.m-progress-bar'); + var $progress_stats = $modal.find('.m-progress-stats'); + var $progress_current = $modal.find('.m-progress-current'); + var $progress_total = $modal.find('.m-progress-total'); + var $progress_complete = $modal.find('.m-progress-complete'); + var reset_on_close = $modal.attr('reset-on-close') === 'true'; + + function reset() { + $modal.find('.step').hide(); + $modal.find('[data-step]').hide(); + } + + function completeSteps() { + $progress_stats.hide(); + $progress_complete.show(); + $modal.find('.progress-text').animate({ + top: '-2em' + }); + $modal.find('.complete-indicator').animate({ + top: '-2em' + }); + $progress_bar.addClass('completed'); + } + + function getPercentComplete(current_step, total_steps) { + return Math.min(current_step / total_steps * 100, 100) + '%'; + } + + function updateProgress(current, total) { + $progress_bar.animate({ + width: getPercentComplete(current, total) + }); + if (current - 1 >= total_num_steps) { + completeSteps(); + } else { + $progress_current.text(current); + } + + $progress.find('[data-progress]').each(function() { + var dp = $(this); + if (dp.data().progress <= current - 1) { + dp.addClass('completed'); + } else { + dp.removeClass('completed'); + } + }); + } + + function goToStep(step) { + reset(); + var to_show = $modal.find('.step-' + step); + if (to_show.length === 0) { + // at the last step, nothing else to show + return; + } + to_show.show(); + var current = parseInt(step, 10); + updateProgress(current, total_num_steps); + findFirstFocusableInput(to_show).focus(); + } + + function findFirstFocusableInput(parent) { + var candidates = [parent.find('input'), parent.find('select'), + parent.find('textarea'),parent.find('button')], + winner = parent; + $.each(candidates, function() { + if (this.length > 0) { + winner = this[0]; + return false; + } + }); + return $(winner); + } + + function bindEventsToModal($modal) { + var data_steps = []; + $('[data-step]').each(function() { + var step = $(this).data().step; + if (step && $.inArray(step, data_steps) === -1) { + data_steps.push(step); + } + }); + + $.each(data_steps, function(i, v) { + window.addEventListener('next.m.' + v, function (evt) { + goToStep(evt.detail.step); + }, false); + }); + } + + function initialize() { + reset(); + updateProgress(1, total_num_steps); + $modal.find('.step-1').show(); + $progress_complete.hide(); + $progress_total.text(total_num_steps); + bindEventsToModal($modal, total_num_steps); + $modal.data({ + total_num_steps: $bodies.length, + }); + if (reset_on_close){ + //Bootstrap 2.3.2 + $modal.on('hidden', function () { + reset(); + $modal.find('.step-1').show(); + }) + //Bootstrap 3 + $modal.on('hidden.bs.modal', function () { + reset(); + $modal.find('.step-1').show(); + }) + } + } + + initialize(); + }) +}(jQuery); diff --git a/src/admin/email/index.php b/src/admin/email/index.php new file mode 100644 index 0000000..28c7b93 --- /dev/null +++ b/src/admin/email/index.php @@ -0,0 +1,457 @@ + + + + + + MeinRadio.eu - Email Server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +prepare("SELECT * FROM `users` WHERE `session_token` = ?"); +$SQL->execute([$_SESSION['session_token']]); + +$stmt = $conn->prepare("SELECT * FROM `users` WHERE `session_token` = ?"); +$stmt->execute([$_SESSION['session_token']]); +$row_check = $stmt->fetch(); +if (!$row_check) { // here! as simple as that + header('Location: ../../login?expire=1'); + session_destroy(); + exit; +} else { + +$stmt = $conn->prepare("SELECT * FROM `users` WHERE `username` = ?"); +$stmt->execute([$_SESSION['userid']]); +$row_check = $stmt->fetch(); +if (!$row_check) { // here! as simple as that + header('Location: ../../login?expire=1'); + session_destroy(); + exit; + +} else { + +while($row = $SQL->fetch(PDO::FETCH_ASSOC)): + +$time = 3600; // Set expire time with secends. +// Star session here +if (isset($_SESSION['session_expire']) && (time() - $_SESSION['session_expire']) > $time) { + // Your Code Here to logout + header('location: ../login?expire=1'); + exit(); +} else { + $_SESSION['session_expire'] = time(); + } + + if ($_SESSION['userid'] === $row['username']): + + else: + + header('Location: ../../login?expire=1'); + session_destroy(); + exit; + + endif; + + if ($_SESSION['session_token'] === $row['session_token']): + + else: + header('Location: ../../login?expire=1'); + session_destroy(); + exit; + endif; + + + if ($row['role'] === "admin"): + + else: + header('Location: ../../login?expire=1'); + session_destroy(); + exit; + + endif; + +endwhile; + + } + +} + +?> + + + + + +
+ +
+
+ Loading... +
+
+ + + + + + + + +
+ + + + +
+
+ + prepare($sql); + + if ($_POST['security'] === "1"): + + $stmt->execute([rand(1, 1000), $_POST['email'], $_POST['password'], "ssl", $_POST['port']]); + + elseif ( $_POST['security'] === "2" ): + $stmt->execute([rand(1, 1000), $_POST['email'], $_POST['password'], "tls", $_POST['port']]); + else: + $stmt->execute([rand(1, 1000), $_POST['email'], $_POST['password'], "none", $_POST['port']]); + endif; + + header('refresh: 1; url=../'); + + echo ''; + + endif; + + ?> + + +
+
+
+
+
Add Mailserver Account
+ +
+ + +
+ +
+ + +
+ + + + +
+ + +
+ +
+ +
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+ MeinRadio.eu, Powered by AnuaCP.de +
+
+ +
+
+
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ Loading... +
+
+ + + + + + + + +
+ + + + + + prepare($sql); + $stmt->execute([$_POST['del']]); + + header('refresh: 1; url=../'); + + echo ''; + + endif; + + ?> + + +
+
+
+
+
Mail Accounts
+
+ +
+ + + + + + + + + + + + + prepare("SELECT * FROM `email_server`"); + $SQL->execute(); + while($row = $SQL->fetch(PDO::FETCH_ASSOC)): + + + echo ' + + + + + + + '; + endwhile; + + ?> + + + +
AccountSecuritySMTP PortAction
'.$row['account'].''.$row['secure'].''.$row['port'].' +
+
+
+
+
+
+ + +
+
+ + + + + + +
+
+
+
+ MeinRadio.eu, Powered by AnuaCP.de +
+
+ +
+
+
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/admin/email/js/bootstrap-modal.js b/src/admin/email/js/bootstrap-modal.js new file mode 100644 index 0000000..58da13a --- /dev/null +++ b/src/admin/email/js/bootstrap-modal.js @@ -0,0 +1,378 @@ +/* =========================================================== + * bootstrap-modal.js v2.2.5 + * =========================================================== + * Copyright 2012 Jordan Schroter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (element, options) { + this.init(element, options); + }; + + Modal.prototype = { + + constructor: Modal, + + init: function (element, options) { + var that = this; + + this.options = options; + + this.$element = $(element) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)); + + this.options.remote && this.$element.find('.modal-body').load(this.options.remote, function () { + var e = $.Event('loaded'); + that.$element.trigger(e); + }); + + var manager = typeof this.options.manager === 'function' ? + this.options.manager.call(this) : this.options.manager; + + manager = manager.appendModal ? + manager : $(manager).modalmanager().data('modalmanager'); + + manager.appendModal(this); + }, + + toggle: function () { + return this[!this.isShown ? 'show' : 'hide'](); + }, + + show: function () { + var e = $.Event('show'); + + if (this.isShown) return; + + this.$element.trigger(e); + + if (e.isDefaultPrevented()) return; + + this.escape(); + + this.tab(); + + this.options.loading && this.loading(); + }, + + hide: function (e) { + e && e.preventDefault(); + + e = $.Event('hide'); + + this.$element.trigger(e); + + if (!this.isShown || e.isDefaultPrevented()) return; + + this.isShown = false; + + this.escape(); + + this.tab(); + + this.isLoading && this.loading(); + + $(document).off('focusin.modal'); + + this.$element + .removeClass('in') + .removeClass('animated') + .removeClass(this.options.attentionAnimation) + .removeClass('modal-overflow') + .attr('aria-hidden', true); + + $.support.transition && this.$element.hasClass('fade') ? + this.hideWithTransition() : + this.hideModal(); + }, + + layout: function () { + var prop = this.options.height ? 'height' : 'max-height', + value = this.options.height || this.options.maxHeight; + + if (this.options.width){ + this.$element.css('width', this.options.width); + + var that = this; + this.$element.css('margin-left', function () { + if (/%/ig.test(that.options.width)){ + return -(parseInt(that.options.width) / 2) + '%'; + } else { + return -($(this).width() / 2) + 'px'; + } + }); + } else { + this.$element.css('width', ''); + this.$element.css('margin-left', ''); + } + + this.$element.find('.modal-body') + .css('overflow', '') + .css(prop, ''); + + if (value){ + this.$element.find('.modal-body') + .css('overflow', 'auto') + .css(prop, value); + } + + var modalOverflow = $(window).height() - 10 < this.$element.height(); + + if (modalOverflow || this.options.modalOverflow) { + this.$element + .css('margin-top', 0) + .addClass('modal-overflow'); + } else { + this.$element + .css('margin-top', 0 - this.$element.height() / 2) + .removeClass('modal-overflow'); + } + }, + + tab: function () { + var that = this; + + if (this.isShown && this.options.consumeTab) { + this.$element.on('keydown.tabindex.modal', '[data-tabindex]', function (e) { + if (e.keyCode && e.keyCode == 9){ + var elements = [], + tabindex = Number($(this).data('tabindex')); + + that.$element.find('[data-tabindex]:enabled:visible:not([readonly])').each(function (ev) { + elements.push(Number($(this).data('tabindex'))); + }); + elements.sort(function(a,b){return a-b}); + + var arrayPos = $.inArray(tabindex, elements); + if (!e.shiftKey){ + arrayPos < elements.length-1 ? + that.$element.find('[data-tabindex='+elements[arrayPos+1]+']').focus() : + that.$element.find('[data-tabindex='+elements[0]+']').focus(); + } else { + arrayPos == 0 ? + that.$element.find('[data-tabindex='+elements[elements.length-1]+']').focus() : + that.$element.find('[data-tabindex='+elements[arrayPos-1]+']').focus(); + } + + e.preventDefault(); + } + }); + } else if (!this.isShown) { + this.$element.off('keydown.tabindex.modal'); + } + }, + + escape: function () { + var that = this; + if (this.isShown && this.options.keyboard) { + if (!this.$element.attr('tabindex')) this.$element.attr('tabindex', -1); + + this.$element.on('keyup.dismiss.modal', function (e) { + e.which == 27 && that.hide(); + }); + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.modal') + } + }, + + hideWithTransition: function () { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end); + that.hideModal(); + }, 500); + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout); + that.hideModal(); + }); + }, + + hideModal: function () { + var prop = this.options.height ? 'height' : 'max-height'; + var value = this.options.height || this.options.maxHeight; + + if (value){ + this.$element.find('.modal-body') + .css('overflow', '') + .css(prop, ''); + } + + this.$element + .hide() + .trigger('hidden'); + }, + + removeLoading: function () { + this.$loading.remove(); + this.$loading = null; + this.isLoading = false; + }, + + loading: function (callback) { + callback = callback || function () {}; + + var animate = this.$element.hasClass('fade') ? 'fade' : ''; + + if (!this.isLoading) { + var doAnimate = $.support.transition && animate; + + this.$loading = $('
') + .append(this.options.spinner) + .appendTo(this.$element); + + if (doAnimate) this.$loading[0].offsetWidth; // force reflow + + this.$loading.addClass('in'); + + this.isLoading = true; + + doAnimate ? + this.$loading.one($.support.transition.end, callback) : + callback(); + + } else if (this.isLoading && this.$loading) { + this.$loading.removeClass('in'); + + var that = this; + $.support.transition && this.$element.hasClass('fade')? + this.$loading.one($.support.transition.end, function () { that.removeLoading() }) : + that.removeLoading(); + + } else if (callback) { + callback(this.isLoading); + } + }, + + focus: function () { + var $focusElem = this.$element.find(this.options.focusOn); + + $focusElem = $focusElem.length ? $focusElem : this.$element; + + $focusElem.focus(); + }, + + attention: function (){ + // NOTE: transitionEnd with keyframes causes odd behaviour + + if (this.options.attentionAnimation){ + this.$element + .removeClass('animated') + .removeClass(this.options.attentionAnimation); + + var that = this; + + setTimeout(function () { + that.$element + .addClass('animated') + .addClass(that.options.attentionAnimation); + }, 0); + } + + + this.focus(); + }, + + + destroy: function () { + var e = $.Event('destroy'); + + this.$element.trigger(e); + + if (e.isDefaultPrevented()) return; + + this.$element + .off('.modal') + .removeData('modal') + .removeClass('in') + .attr('aria-hidden', true); + + if (this.$parent !== this.$element.parent()) { + this.$element.appendTo(this.$parent); + } else if (!this.$parent.length) { + // modal is not part of the DOM so remove it. + this.$element.remove(); + this.$element = null; + } + + this.$element.trigger('destroyed'); + } + }; + + + /* MODAL PLUGIN DEFINITION + * ======================= */ + + $.fn.modal = function (option, args) { + return this.each(function () { + var $this = $(this), + data = $this.data('modal'), + options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option); + + if (!data) $this.data('modal', (data = new Modal(this, options))); + if (typeof option == 'string') data[option].apply(data, [].concat(args)); + else if (options.show) data.show() + }) + }; + + $.fn.modal.defaults = { + keyboard: true, + backdrop: true, + loading: false, + show: true, + width: null, + height: null, + maxHeight: null, + modalOverflow: false, + consumeTab: true, + focusOn: null, + replace: false, + resize: false, + attentionAnimation: 'shake', + manager: 'body', + spinner: '
', + backdropTemplate: '