Kontakte erstellen Mailsystem
This commit is contained in:
parent
c69b2b8b5e
commit
717fa932c2
@ -1,279 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../config.inc.php");
|
|
||||||
$function = $_POST['function'];
|
|
||||||
|
|
||||||
if ($function == 'checkuser') {
|
|
||||||
$mail = $_POST['mail'];
|
|
||||||
|
|
||||||
if (filter_var($mail, FILTER_VALIDATE_EMAIL)) {
|
|
||||||
$mail = $_POST['mail'];
|
|
||||||
$result = $db->query("SELECT count(*) Anz FROM jumi_chor_saenger WHERE mail = '$mail'");
|
|
||||||
$row = $result->fetch_array();
|
|
||||||
|
|
||||||
if ($row['Anz'] == "0") {
|
|
||||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Mailadresse ist noch nicht vorhanden!</div>';
|
|
||||||
} else {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Mailadresse ist im System bereits vorhanden!</div>';
|
|
||||||
}
|
|
||||||
#}else{
|
|
||||||
# echo ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#echo "Funktion: $function";
|
|
||||||
if ($function == 'membersave') {
|
|
||||||
$vorname = trim($_POST['vorname']);
|
|
||||||
$nachname = trim($_POST['nachname']);
|
|
||||||
$mail = trim($_POST['mail']);
|
|
||||||
$singstimme = $_POST['singstimme'];
|
|
||||||
$bemerkung = $db->real_escape_string(stripslashes( $_POST['bemerkung'] ));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$result = $db->query("SELECT count(*) Anz FROM jumi_chor_saenger WHERE mail = '$mail'");
|
|
||||||
$row = $result->fetch_array();
|
|
||||||
|
|
||||||
#Fehlercheck
|
|
||||||
if ($row['Anz'] != "0") {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> User ist im System bereits vorhanden!</div>|***|error';
|
|
||||||
}
|
|
||||||
if ($singstimme == '' or $vorname == '' or $nachname == '' or $mail == '') {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es müssen alle Felder ausgefüllt werden!</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Geben Sie eine gültige Mailadresse ein!</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$sql1 = $db->query("INSERT INTO jumi_chor_saenger ( vorname
|
|
||||||
, nachname
|
|
||||||
, mail
|
|
||||||
, singstimme
|
|
||||||
, bemerkung
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
( '$vorname'
|
|
||||||
, '$nachname'
|
|
||||||
, '$mail'
|
|
||||||
, '$singstimme'
|
|
||||||
, '$bemerkung'
|
|
||||||
)
|
|
||||||
");
|
|
||||||
$csid = $db->insert_id;
|
|
||||||
if (!$sql1) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Insert Member</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}else{
|
|
||||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> SängerIn wurde erfasst.</div>|***|success';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
if ($function == 'userupdate') {
|
|
||||||
|
|
||||||
$vorname = trim($_POST['vorname']);
|
|
||||||
$nachname = trim($_POST['nachname']);
|
|
||||||
$mail = trim($_POST['mail']);
|
|
||||||
$rollen = $_POST['rollen'];
|
|
||||||
$pwdback = $_POST['pwdback'];
|
|
||||||
$uid = $_POST['uid'];
|
|
||||||
|
|
||||||
|
|
||||||
if (isset($pwdback)) {
|
|
||||||
if ($pwdback == '1') {
|
|
||||||
$pwdback = '1';
|
|
||||||
} else {
|
|
||||||
$pwdback = '0';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$pwdback = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($uid == '') {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die BenutzerID wurde nicht übertragen</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
if ($rollen == '' or $vorname == '' or $nachname == '' or $mail == '') {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es müssen alle Felder ausgefüllt werden!</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Geben Sie eine gültige Mailadresse ein!</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$error = 0;
|
|
||||||
|
|
||||||
if($pwdback == 1){
|
|
||||||
require_once("func_genPwd.php");
|
|
||||||
$password = generateStrongPassword();
|
|
||||||
$password_md5 = md5($password);
|
|
||||||
}else{
|
|
||||||
$result_pwd = $db->query("SELECT passwort FROM jumi_admin WHERE uid = $uid");
|
|
||||||
$row_pwd = $result_pwd->fetch_array();
|
|
||||||
$password_md5 = $row_pwd['passwort'];
|
|
||||||
}
|
|
||||||
$sql1 = $db->query("UPDATE jumi_admin
|
|
||||||
SET vorname = '$vorname'
|
|
||||||
,nachname = '$nachname'
|
|
||||||
,mail = '$mail'
|
|
||||||
,passwort = '$password_md5'
|
|
||||||
WHERE uid = $uid");
|
|
||||||
if (!$sql1) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Update User</div>|***|error';
|
|
||||||
exit;
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql2 = $db->query("DELETE FROM jumi_admin_rollen_user_zuord WHERE uid = $uid");
|
|
||||||
for ($i = 0; $i < sizeof($rollen); $i++) {
|
|
||||||
$sql2 = $db->query("INSERT INTO jumi_admin_rollen_user_zuord ( rid
|
|
||||||
, uid
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
( '$rollen[$i]'
|
|
||||||
, '$uid'
|
|
||||||
)
|
|
||||||
");
|
|
||||||
}
|
|
||||||
if (!$sql2) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Insert Rollenzuordnung</div>|***|error';
|
|
||||||
exit;
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if($pwdback == 1){
|
|
||||||
$empfaenger = "$mail";
|
|
||||||
$betreff = "Update JU & MI Portal";
|
|
||||||
$text = "
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Update JU & MI Portal</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
Guten Tag $vorname $nachname!<br><br>
|
|
||||||
Sie wurden im JU & MI Portal geändert!<br>
|
|
||||||
Nachfolgend finden Sie Ihre Zugangsdaten:
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
<b>Benutzerkennung:</b>
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
<td valign='top'>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
$mail
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
<b>Passwort:</b>
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
<td valign='top'>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
$password
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
<b>Login:</b>
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
<td valign='top'>
|
|
||||||
<font face='Arial' size='2'>
|
|
||||||
<a href='http://admin.ju-and-mi.de'>http://admin.ju-and-mi.de</a>
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
Bitte beachten Sie, dass das Passwort zwischen Groß- und<br>
|
|
||||||
Kleinschreibung unterscheidet.
|
|
||||||
<p>
|
|
||||||
Ändern Sie bitte zu Ihrer eigenen Sicherheit das<br>
|
|
||||||
Passwort nach dem ersten Login unter dem Benutzericon in der Kopfleiste.
|
|
||||||
<p>
|
|
||||||
Vielen Dank
|
|
||||||
</body>
|
|
||||||
</html>";
|
|
||||||
$result_absender = $db->query("SELECT wert FROM jumi_parameter WHERE pid = 1");
|
|
||||||
$row_absender = $result_absender->fetch_array();
|
|
||||||
if ($row_absender['wert'] == '') {
|
|
||||||
$absender = 'info@ju-and-mi.de';
|
|
||||||
} else {
|
|
||||||
$absender = $row_absender['wert'];
|
|
||||||
}
|
|
||||||
$headers = "MIME-Version: 1.0\n";
|
|
||||||
$headers .= "Content-type: text/html; charset=utf-8\n";
|
|
||||||
$headers .= "From: Info JU & MI <$absender>\n";
|
|
||||||
|
|
||||||
$return = @mail($empfaenger, $betreff, $text, $headers);
|
|
||||||
|
|
||||||
if (!$return) { // Abfrage ob Mailversand funktioniert hat
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> BenutzerIn wurde aktualisiert. Es konnte allerdings <b>keine Mail</b> verschickt werden!</div>|***|success';
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> BenutzerIn wurde aktualisiert. Eine Mail mit den Zugangsdaten wurde zugestellt.</div>|***|success';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if ($error == 0) {
|
|
||||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> BenutzerIn wurde aktualisiert.</div>|***|success';
|
|
||||||
exit;
|
|
||||||
}else{
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> BenutzerIn wurde nicht aktualisiert.</div>|***|success';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($function == 'disableuser') {
|
|
||||||
$uid = $_POST['uid'];
|
|
||||||
|
|
||||||
$sql1 = $db->query("UPDATE jumi_admin
|
|
||||||
SET aktiv = '0'
|
|
||||||
WHERE uid = $uid");
|
|
||||||
if (!$sql1) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Disable User</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}else{
|
|
||||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> BenutzerIn wurde gesperrt.</div>|***|success';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($function == 'enableuser') {
|
|
||||||
$uid = $_POST['uid'];
|
|
||||||
|
|
||||||
$sql1 = $db->query("UPDATE jumi_admin
|
|
||||||
SET aktiv = '1'
|
|
||||||
WHERE uid = $uid");
|
|
||||||
if (!$sql1) {
|
|
||||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Enable User</div>|***|error';
|
|
||||||
exit;
|
|
||||||
}else{
|
|
||||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> BenutzerIn wurde aktiviert.</div>|***|success';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
?>
|
|
166
controller/admin_create_verteileruser.php
Normal file
166
controller/admin_create_verteileruser.php
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
<?php
|
||||||
|
require_once("../config.inc.php");
|
||||||
|
$function = $_POST['function'];
|
||||||
|
|
||||||
|
if ($function == 'checkuser') {
|
||||||
|
$mail = $_POST['mail'];
|
||||||
|
|
||||||
|
if (filter_var($mail, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
$mail = $_POST['mail'];
|
||||||
|
$result = $db->query("SELECT count(*) Anz FROM jumi_mailverteiler_entries WHERE mail = '$mail'");
|
||||||
|
$row = $result->fetch_array();
|
||||||
|
|
||||||
|
if ($row['Anz'] == "0") {
|
||||||
|
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Kontakt ist im System nicht vorhanden!</div>';
|
||||||
|
} else {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Kontakt ist im System bereits vorhanden!</div>';
|
||||||
|
}
|
||||||
|
#}else{
|
||||||
|
# echo ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($function == 'contactsave') {
|
||||||
|
$vorname = trim($_POST['vorname']);
|
||||||
|
$nachname = trim($_POST['nachname']);
|
||||||
|
$mail = trim($_POST['mail']);
|
||||||
|
$verteiler = $_POST['verteiler'];
|
||||||
|
|
||||||
|
$result = $db->query("SELECT count(*) Anz FROM jumi_mailverteiler_entries WHERE mail = '$mail'");
|
||||||
|
$row = $result->fetch_array();
|
||||||
|
|
||||||
|
#Fehlercheck
|
||||||
|
if ($row['Anz'] != "0") {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Kontakt ist im System bereits vorhanden!</div>|***|error';
|
||||||
|
}
|
||||||
|
if ($vorname == '' or $nachname == '' or $mail == '') {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es müssen alle Felder ausgefüllt werden!</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Geben Sie eine gültige Mailadresse ein!</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql1 = $db->query("INSERT INTO jumi_mailverteiler_entries ( vorname
|
||||||
|
, nachname
|
||||||
|
, mail
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
( '$vorname'
|
||||||
|
, '$nachname'
|
||||||
|
, '$mail'
|
||||||
|
)
|
||||||
|
");
|
||||||
|
$mveid = $db->insert_id;
|
||||||
|
if(sizeof($verteiler) > 0){
|
||||||
|
for ($i = 0; $i < sizeof($verteiler); $i++) {
|
||||||
|
$sql2 = $db->query("INSERT INTO jumi_mailverteiler_user_zuord ( mvid
|
||||||
|
, mveid
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
( '$verteiler[$i]'
|
||||||
|
, '$mveid'
|
||||||
|
)
|
||||||
|
");
|
||||||
|
}
|
||||||
|
if (!$sql2) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Insert Kontaktzuordnung</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$sql1) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Insert Kontakt</div>|***|error';
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Kontakt wurde angelegt!</div>|***|success';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($function == 'contactupdate') {
|
||||||
|
|
||||||
|
$vorname = trim($_POST['vorname']);
|
||||||
|
$nachname = trim($_POST['nachname']);
|
||||||
|
$mail = trim($_POST['mail']);
|
||||||
|
$verteiler = $_POST['verteiler'];
|
||||||
|
$pwdback = $_POST['pwdback'];
|
||||||
|
$mveid = $_POST['mveid'];
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($pwdback)) {
|
||||||
|
if ($pwdback == '1') {
|
||||||
|
$pwdback = '1';
|
||||||
|
} else {
|
||||||
|
$pwdback = '0';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$pwdback = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($mveid == '') {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die KontaktID wurde nicht übertragen</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($vorname == '' or $nachname == '' or $mail == '') {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es müssen alle Felder ausgefüllt werden!</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Geben Sie eine gültige Mailadresse ein!</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql1 = $db->query("UPDATE jumi_mailverteiler_entries
|
||||||
|
SET vorname = '$vorname'
|
||||||
|
,nachname = '$nachname'
|
||||||
|
,mail = '$mail'
|
||||||
|
WHERE mveid = $mveid");
|
||||||
|
if(sizeof($verteiler) > 0){
|
||||||
|
$sql2 = $db->query("DELETE FROM jumi_mailverteiler_user_zuord WHERE mveid = $mveid");
|
||||||
|
for ($i = 0; $i < sizeof($verteiler); $i++) {
|
||||||
|
$sql2 = $db->query("INSERT INTO jumi_mailverteiler_user_zuord ( mvid
|
||||||
|
, mveid
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
( '$verteiler[$i]'
|
||||||
|
, '$mveid'
|
||||||
|
)
|
||||||
|
");
|
||||||
|
}
|
||||||
|
if (!$sql2) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Insert Kontaktzuordnung</div>|***|error';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$sql1) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: Update Kontakt</div>|***|error';
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Kontakt wurde aktualisiert!</div>|***|success';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($function == 'deleteContact') {
|
||||||
|
$mveid = $_POST['mveid'];
|
||||||
|
|
||||||
|
$sql1 = $db->query("DELETE FROM jumi_mailverteiler_user_zuord WHERE mveid = $mveid");
|
||||||
|
$sql2 = $db->query("DELETE FROM jumi_mailverteiler_entries WHERE mveid = $mveid");
|
||||||
|
if (!$sql1 or !$sql2) {
|
||||||
|
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Es gab ein Fehler in der Datenbank: deleteContact</div>|***|error';
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Kontakt wurde entfernt.</div>|***|success';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
117
dashboard/create_verteileruser.php
Normal file
117
dashboard/create_verteileruser.php
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
if (!isset($_SESSION)) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
# Fuer debugging
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
#echo __LINE__."<br>";
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||||
|
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
|
||||||
|
require_once("../config.inc.php");
|
||||||
|
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||||
|
$smarty = new SmartyAdmin();
|
||||||
|
if(!rechte(basename(__FILE__), $uid)){
|
||||||
|
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
require_once "../language/german.inc.php";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#require_once "func_genUser.php";
|
||||||
|
|
||||||
|
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen
|
||||||
|
if(isset($_GET['new']) AND $_GET['new'] == 1){;
|
||||||
|
$search_prefix = 'anlegen_';
|
||||||
|
$search_len = strlen($search_prefix);
|
||||||
|
foreach( $_SESSION as $key => $value){
|
||||||
|
if ( substr( $key, 0, $search_len) == $search_prefix) {
|
||||||
|
unset( $_SESSION[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Rechteüberprüfung
|
||||||
|
#$db = dbconnect();
|
||||||
|
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||||
|
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
|
||||||
|
#// Rechteüberprüfung ende
|
||||||
|
|
||||||
|
if(isset($_GET['action'])){
|
||||||
|
$action = $_GET['action'];
|
||||||
|
}else{
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($action == ''){
|
||||||
|
/*
|
||||||
|
# Daten aufbereiten für Zurückbutton
|
||||||
|
if(isset($_SESSION["anlegen_vorname"])){
|
||||||
|
$smarty->assign('contact_anlegen_vorname', $_SESSION["anlegen_vorname"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_SESSION["anlegen_nachname"])){
|
||||||
|
$smarty->assign('contact_anlegen_nachname', $_SESSION["anlegen_nachname"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_SESSION["anlegen_mail"])){
|
||||||
|
$smarty->assign('contact_anlegen_mail', $_SESSION["anlegen_mail"]);
|
||||||
|
}
|
||||||
|
# Daten aufbereiten für Zurückbutton ENDE
|
||||||
|
*/
|
||||||
|
if(isset($_GET['editmveid']) and $_GET['editmveid'] != ''){
|
||||||
|
# Aus externer Seite edit_user.php
|
||||||
|
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
|
||||||
|
$mveid = $_GET['editmveid'];
|
||||||
|
$smarty->assign('create_edit', $mveid);
|
||||||
|
|
||||||
|
$result0 = $db->query("SELECT vorname, nachname, mail
|
||||||
|
FROM jumi_mailverteiler_entries
|
||||||
|
WHERE mveid = $mveid;");
|
||||||
|
$row0 = $result0->fetch_array();
|
||||||
|
$smarty->assign('contact_anlegen_vorname', $row0['vorname']);
|
||||||
|
$smarty->assign('contact_anlegen_nachname', $row0['nachname']);
|
||||||
|
$smarty->assign('contact_anlegen_mail', $row0['mail']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT mvid, bezeichnung FROM jumi_mailverteiler ORDER BY mvid ASC";
|
||||||
|
$result = $db->query( $query)
|
||||||
|
or die ("Cannot execute query1");
|
||||||
|
|
||||||
|
while ($row = $result->fetch_array()){
|
||||||
|
if(isset($_GET['editmveid']) and $_GET['editmveid'] != ''){
|
||||||
|
# Aus externer Seite edit_user.php
|
||||||
|
$mveid = $_GET['editmveid'];
|
||||||
|
$result1 = $db->query("SELECT count(*) Anz
|
||||||
|
FROM jumi_mailverteiler_user_zuord
|
||||||
|
WHERE mveid = $mveid
|
||||||
|
AND mvid = $row[mvid]");
|
||||||
|
$row1 = $result1->fetch_array();
|
||||||
|
if($row1['Anz'] > 0){
|
||||||
|
$selected = 1;
|
||||||
|
}else{
|
||||||
|
$selected = 0;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$selected = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$row['selected'] = $selected;
|
||||||
|
$value[] = $row;
|
||||||
|
}
|
||||||
|
$smarty->assign('table_data', $value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$smarty->assign('action', "$action");
|
||||||
|
$smarty->display("$template/dashboard/$templatename");
|
||||||
|
?>
|
||||||
|
|
69
dashboard/edit_verteileruser.php
Normal file
69
dashboard/edit_verteileruser.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
if (!isset($_SESSION)) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
# Fuer debugging
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
#echo __LINE__."<br>";
|
||||||
|
*/
|
||||||
|
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||||
|
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
|
||||||
|
require_once("../config.inc.php");
|
||||||
|
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||||
|
$smarty = new SmartyAdmin();
|
||||||
|
if(!rechte(basename(__FILE__), $uid)){
|
||||||
|
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
require_once "../language/german.inc.php";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#require_once "func_genUser.php";
|
||||||
|
|
||||||
|
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen
|
||||||
|
if(isset($_GET['new']) AND $_GET['new'] == 1){;
|
||||||
|
$search_prefix = 'anlegen_';
|
||||||
|
$search_len = strlen($search_prefix);
|
||||||
|
foreach( $_SESSION as $key => $value){
|
||||||
|
if ( substr( $key, 0, $search_len) == $search_prefix) {
|
||||||
|
unset( $_SESSION[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Rechteüberprüfung
|
||||||
|
#$db = dbconnect();
|
||||||
|
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||||
|
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
|
||||||
|
#// Rechteüberprüfung ende
|
||||||
|
|
||||||
|
if(isset($_GET['action'])){
|
||||||
|
$action = $_GET['action'];
|
||||||
|
}else{
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($action == ''){
|
||||||
|
|
||||||
|
$query = "SELECT mveid, vorname, nachname, mail FROM jumi_mailverteiler_entries ORDER BY nachname ASC, vorname ASC";
|
||||||
|
$result = $db->query( $query)
|
||||||
|
or die ("Cannot execute query1");
|
||||||
|
|
||||||
|
while ($row = $result->fetch_array()){
|
||||||
|
$value[] = $row;
|
||||||
|
}
|
||||||
|
$smarty->assign('table_data', $value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$smarty->assign('action', "$action");
|
||||||
|
$smarty->display("$template/dashboard/$templatename");
|
||||||
|
?>
|
||||||
|
|
134
js/components/admin_create_verteileruser.js
Normal file
134
js/components/admin_create_verteileruser.js
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
function checkUser(){
|
||||||
|
var mail = document.getElementById("mail").value;
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '../controller/admin_create_verteileruser.php',
|
||||||
|
data: {
|
||||||
|
'function': 'checkuser',
|
||||||
|
'mail': mail
|
||||||
|
},
|
||||||
|
success: function(result) { //we got the response
|
||||||
|
if(result!=''){
|
||||||
|
$('#msg').show().delay(5000).fadeOut(500);
|
||||||
|
$('#msg').html(result);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, exception) {
|
||||||
|
console.log(xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function contactsave(){
|
||||||
|
var vorname = document.getElementById("vorname").value;
|
||||||
|
var nachname = document.getElementById("nachname").value;
|
||||||
|
var mail = document.getElementById("mail").value;
|
||||||
|
//var my_data = $("form").serialize();
|
||||||
|
|
||||||
|
//komma getrennte Werte bei Mehrfachauswahl
|
||||||
|
var verteiler = $("#verteiler").val();
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '../controller/admin_create_verteileruser.php',
|
||||||
|
data: {
|
||||||
|
'function': 'contactsave',
|
||||||
|
'vorname': vorname,
|
||||||
|
'nachname': nachname,
|
||||||
|
'mail': mail,
|
||||||
|
'verteiler': verteiler
|
||||||
|
},
|
||||||
|
success: function(result) { //we got the response
|
||||||
|
|
||||||
|
if(result!=''){
|
||||||
|
var a = result.split('|***|');
|
||||||
|
if(a[1]=="success"){
|
||||||
|
document.getElementById("vorname").value ="";
|
||||||
|
document.getElementById("nachname").value ="";
|
||||||
|
document.getElementById("mail").value ="";
|
||||||
|
var elements = document.getElementById("verteiler").options;
|
||||||
|
for(var i = 0; i < elements.length; i++){
|
||||||
|
elements[i].selected = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#msg1').show().delay(10000).fadeOut(500);
|
||||||
|
$('#msg1').html(a[0]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, exception) {
|
||||||
|
console.log(xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function contactupdate(mveid){
|
||||||
|
var vorname = document.getElementById("vorname").value;
|
||||||
|
var nachname = document.getElementById("nachname").value;
|
||||||
|
var mail = document.getElementById("mail").value;
|
||||||
|
//var my_data = $("form").serialize();
|
||||||
|
|
||||||
|
//komma getrennte Werte bei Mehrfachauswahl
|
||||||
|
var verteiler = $("#verteiler").val();
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '../controller/admin_create_verteileruser.php',
|
||||||
|
data: {
|
||||||
|
'function': 'contactupdate',
|
||||||
|
'vorname': vorname,
|
||||||
|
'nachname': nachname,
|
||||||
|
'mail': mail,
|
||||||
|
'verteiler': verteiler,
|
||||||
|
'mveid': mveid
|
||||||
|
},
|
||||||
|
success: function(result) { //we got the response
|
||||||
|
if(result!=''){
|
||||||
|
var a = result.split('|***|');
|
||||||
|
if(a[1]=="success"){
|
||||||
|
$(document).ajaxStop(function(){
|
||||||
|
setTimeout(() => { window.location = "edit_verteileruser.php"; }, 1000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$('#msg1').show().delay(10000).fadeOut(500);
|
||||||
|
$('#msg1').html(a[0]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, exception) {
|
||||||
|
console.log(xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteContact(mveid){
|
||||||
|
r = confirm('Kontakt löschen?');
|
||||||
|
if (r) {
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '../controller/admin_create_verteileruser.php',
|
||||||
|
data: {
|
||||||
|
'function': 'deleteContact',
|
||||||
|
'mveid': mveid
|
||||||
|
},
|
||||||
|
success: function(result) { //we got the response
|
||||||
|
if(result!=''){
|
||||||
|
var a = result.split('|***|');
|
||||||
|
if(a[1]=="success"){
|
||||||
|
$(document).ajaxStop(function(){
|
||||||
|
setTimeout(() => { window.location = "edit_verteileruser.php"; }, 1000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$('#msg').show().delay(10000).fadeOut(500);
|
||||||
|
$('#msg').html(a[0]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, exception) {
|
||||||
|
console.log(xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
222
templates/modern/dashboard/create_verteileruser.html
Normal file
222
templates/modern/dashboard/create_verteileruser.html
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
{if $action == ''}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
|
||||||
|
{if $create_edit == ''}
|
||||||
|
<title>JU & MI Kontakt erstellen</title>
|
||||||
|
{else}
|
||||||
|
<title>JU & MI Kontakt bearbeiten</title>
|
||||||
|
{/if}
|
||||||
|
<link rel="stylesheet" href="../jquery/jquery-ui.css">
|
||||||
|
<link rel="stylesheet" href="../jquery/jquery.timepicker.min.css">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
|
||||||
|
<link href="css/styles.css" rel="stylesheet" />
|
||||||
|
<!-- icons in nav-->
|
||||||
|
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||||
|
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||||
|
<style>
|
||||||
|
.multiselect-container {
|
||||||
|
position: absolute;
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 5px 0 0 0;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 0;
|
||||||
|
border: none;
|
||||||
|
-webkit-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
-moz-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14); }
|
||||||
|
|
||||||
|
.multiselect-container .input-group {
|
||||||
|
margin: 5px; }
|
||||||
|
|
||||||
|
.multiselect-container > li {
|
||||||
|
padding: 0;
|
||||||
|
font-size: 14px; }
|
||||||
|
|
||||||
|
.multiselect-container > li > a.multiselect-all label {
|
||||||
|
font-weight: 700;
|
||||||
|
color: gray; }
|
||||||
|
|
||||||
|
.multiselect-container > li.multiselect-group label {
|
||||||
|
margin: 0;
|
||||||
|
padding: 3px 20px 3px 20px;
|
||||||
|
height: 100%;
|
||||||
|
font-weight: 700; }
|
||||||
|
|
||||||
|
.multiselect-container > li.multiselect-group-clickable label {
|
||||||
|
cursor: pointer; }
|
||||||
|
|
||||||
|
.multiselect-container > li > a {
|
||||||
|
padding: 5px 0;
|
||||||
|
color: #000;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
|
.multiselect-container > li > a > label {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none; }
|
||||||
|
.multiselect-container > li > a > label:before {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: transparent;
|
||||||
|
margin-right: 15px;
|
||||||
|
vertical-align: middle; }
|
||||||
|
|
||||||
|
.multiselect-container > li.active > a > label:before {
|
||||||
|
font-family: 'fontAwesome';
|
||||||
|
content: "\f00c";
|
||||||
|
color: #fff;
|
||||||
|
background-color: #52de97;
|
||||||
|
border: 0;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1.2;
|
||||||
|
padding-left: 2px; }
|
||||||
|
|
||||||
|
.multiselect-container > li > a > label.radio, .multiselect-container > li > a > label.checkbox {
|
||||||
|
margin: 0; }
|
||||||
|
|
||||||
|
.multiselect-container > li > a > label > input[type=checkbox] {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 0;
|
||||||
|
width: 0; }
|
||||||
|
|
||||||
|
.btn-group > .btn-group:nth-child(2) > .multiselect.btn {
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
border-bottom-left-radius: 4px; }
|
||||||
|
|
||||||
|
.form-inline .multiselect-container label.checkbox, .form-inline .multiselect-container label.radio {
|
||||||
|
padding: 3px 20px 3px 40px; }
|
||||||
|
|
||||||
|
.form-inline .multiselect-container li a label.checkbox input[type=checkbox],
|
||||||
|
.form-inline .multiselect-container li a label.radio input[type=radio] {
|
||||||
|
margin-left: -20px;
|
||||||
|
margin-right: 0; }
|
||||||
|
|
||||||
|
.btn-group {
|
||||||
|
height: 52px;
|
||||||
|
width: calc(100% - 150px); }
|
||||||
|
.btn-group button {
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #fff;
|
||||||
|
-webkit-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
-moz-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
padding: 0 10px;
|
||||||
|
text-align: left;
|
||||||
|
position: relative; }
|
||||||
|
.btn-group button:after {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 20px;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
-ms-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: #999999; }
|
||||||
|
.btn-group button:focus {
|
||||||
|
-webkit-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
-moz-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
|
||||||
|
padding: 0 10px; }
|
||||||
|
|
||||||
|
.sl {
|
||||||
|
color: gray;
|
||||||
|
width: 150px; }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="sb-nav-fixed">
|
||||||
|
<div id="navtop"></div>
|
||||||
|
{literal}
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
// im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht
|
||||||
|
$("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');});
|
||||||
|
$("#navleft").load("nav.php");
|
||||||
|
$("#footer").load("footer.php");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
<div id="layoutSidenav">
|
||||||
|
<!-- Navigation left -->
|
||||||
|
<div id="navleft"></div>
|
||||||
|
<div id="layoutSidenav_content">
|
||||||
|
<main>
|
||||||
|
<!--Anwendung-->
|
||||||
|
<script src="../js/components/admin_create_verteileruser.js"></script>
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fas fa-edit me-1"></i>
|
||||||
|
{if $create_edit == ''}
|
||||||
|
Kontakt erstellen
|
||||||
|
{else}
|
||||||
|
Kontakt bearbeiten
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||||
|
<div class="col-12 col-md-4">Vorname:</div>
|
||||||
|
<div class="col-12 col-md-8"><input type="text" class="form-control" name="vorname" id="vorname" value="{$contact_anlegen_vorname}"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||||
|
<div class="col-12 col-md-4">Nachname:</div>
|
||||||
|
<div class="col-12 col-md-8"><input type="text" class="form-control" name="nachname" id="nachname" value="{$contact_anlegen_nachname}"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||||
|
<div class="col-12 col-md-4">Mailadresse:</div>
|
||||||
|
<div class="col-12 col-md-8"><input type="email" class="form-control" name="mail" id="mail" value="{$contact_anlegen_mail}" onkeyup="checkUser()"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||||
|
<div class="col-12 col-md-4">Verteilerliste zuweisen:</div>
|
||||||
|
<div class="col-12 col-md-8">
|
||||||
|
<select name="verteiler[]"class="form-control" id="verteiler" multiple="multiple">
|
||||||
|
{section name=table_data loop=$table_data}
|
||||||
|
<option value="{$table_data[table_data].mvid}" {if $table_data[table_data].selected == 1} selected {/if}>{$table_data[table_data].bezeichnung}</option>
|
||||||
|
{/section}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p align='center'>
|
||||||
|
{if $create_edit == ''}
|
||||||
|
<button class="col-6 btn btn-primary btn-sm mt-3" id="save" onclick="contactsave();">Speichern</button>
|
||||||
|
{else}
|
||||||
|
<button class="col-6 btn btn-primary btn-sm mt-3" id="save" onclick="contactupdate({$create_edit});">Update</button>
|
||||||
|
{/if}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="msg"></div>
|
||||||
|
<div id="msg1"></div>
|
||||||
|
</main>
|
||||||
|
<!-- footer -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{/if}
|
||||||
|
|
110
templates/modern/dashboard/edit_verteileruser.html
Normal file
110
templates/modern/dashboard/edit_verteileruser.html
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{if $action == ''}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<title>JU & MI Kontakt bearbeiten</title>
|
||||||
|
<link rel="stylesheet" href="../jquery/jquery-ui.css">
|
||||||
|
<link rel="stylesheet" href="../jquery/jquery.timepicker.min.css">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
|
||||||
|
<link href="css/styles.css" rel="stylesheet" />
|
||||||
|
<!-- icons in nav-->
|
||||||
|
|
||||||
|
<!-- data Table: https://datatables.net/ -->
|
||||||
|
<script src="../bootstrap/data-table/jquery.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../bootstrap/data-table/dataTables.bootstrap5.min.css"></style>
|
||||||
|
<link rel="stylesheet" href="../bootstrap/data-table/rowReorder.dataTables.min.css"></style>
|
||||||
|
<script type="text/javascript" src="../bootstrap/data-table/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../bootstrap/data-table/dataTables.rowReorder.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../bootstrap/data-table/jumistyle.css"></style>
|
||||||
|
|
||||||
|
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||||
|
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="sb-nav-fixed">
|
||||||
|
<div id="navtop"></div>
|
||||||
|
{literal}
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
// im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht
|
||||||
|
$("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');});
|
||||||
|
$("#navleft").load("nav.php");
|
||||||
|
$("#footer").load("footer.php");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
<div id="layoutSidenav">
|
||||||
|
<!-- Navigation left -->
|
||||||
|
<div id="navleft"></div>
|
||||||
|
<div id="layoutSidenav_content">
|
||||||
|
<main>
|
||||||
|
<!--Anwendung-->
|
||||||
|
<script src="../js/components/admin_create_verteileruser.js"></script>
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fas fa-edit me-1"></i>
|
||||||
|
Kontakt bearbeiten
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- https://datatables.net/download/release -->
|
||||||
|
<table id="myTable" class="table table-striped table-bordered table-hover" >
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Vorname</th>
|
||||||
|
<th>Nachname</th>
|
||||||
|
<th>Mail</th>
|
||||||
|
<th>Aktion</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{section name=table_data loop=$table_data}
|
||||||
|
<tr>
|
||||||
|
<td>{$table_data[table_data].vorname}</td>
|
||||||
|
<td>{$table_data[table_data].nachname}</td>
|
||||||
|
<td>{$table_data[table_data].mail}</td>
|
||||||
|
<td>
|
||||||
|
<a href="create_verteileruser.php?editmveid={$table_data[table_data].mveid}" class="settings" title="Edit User" data-toggle="tooltip"><i class="fas fa fa-cog"></i></a>
|
||||||
|
|
||||||
|
<a href="#" class="settings text-danger" id="disable" onclick="deleteContact({$table_data[table_data].mveid});" title="Kontalt entfernen" data-toggle="tooltip"><i class="fa fa-minus-circle"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/section}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="msg"></div>
|
||||||
|
</main>
|
||||||
|
<!-- footer -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var table = new DataTable('#myTable', {
|
||||||
|
rowReorder: true,
|
||||||
|
pageLength: 5,
|
||||||
|
language: {
|
||||||
|
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
|
||||||
|
search: "",
|
||||||
|
lengthMenu: "_MENU_ Zeilen",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
|
{/if}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user