-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmail_recievers.php
56 lines (50 loc) · 2.22 KB
/
mail_recievers.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
include("header.php");
if(isset($_POST['submit']))
{
$uid = uniqid();
$user = $_POST['user'];
$mail = $_POST['mail'];
protocol_add('Dem Nutzer "'.fetch("users","last_name","id",$user).'" wurde die E-Mail-Adresse "'.$mail.'" zugewiesen.');
$strSQL = "INSERT INTO email_recievers (id,user_id,mail_id) VALUES ('$uid','$user','$mail')";
$rs=mysqli_query($link,$strSQL);
echo '<meta http-equiv="refresh" content="0; url=/mail_recievers" />';
}
echo '
<div id="fade_in"><h1>Email Empfänger</h1></div>
<div id="content_fade_in">
<form action="/mail_recievers" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<center>
<div class="content_box_s">
<h2>E-Mail Link Eintragen</h2>
<br>
<select name="user" class="selectbox_m t_selectbox">
';
$strSQL = "SELECT * FROM users";
$rs=mysqli_query($link,$strSQL);
while($row=mysqli_fetch_assoc($rs))
{
echo '<option value="'.$row['id'].'">'.$row['first_name'].' '.$row['last_name'].'</option>';
}
echo '
</select>
<br>Erhält Mails von<br>
<select name="mail" class="selectbox_m t_selectbox">
';
$strSQL = "SELECT * FROM emails";
$rs=mysqli_query($link,$strSQL);
while($row=mysqli_fetch_assoc($rs))
{
echo '<option value="'.$row['id'].'">'.$row['email'].'</option>';
}
echo '
</select>
<br><br>
<button type="submit" name="submit" class="button_m t_button">Link Hinzufügen</button>
</div>
</center>
</form>
</div>
';
include("footer.php");
?>