-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp-cleaning-email.php
69 lines (44 loc) · 2.52 KB
/
php-cleaning-email.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
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php include 'begin.php'; ?>
<?
$array = unserialize(base64_decode($_POST['array']));
$to = '[email protected]';
$subject = 'Mojostuff.com - Cleaning Schedule';
$message = '<b>Mens</b><br>'.$array[0]. "<br>";
mysql_query("UPDATE users SET mens = mens + 1 WHERE email = '".$array[0]."'");
$message.= ''.$array[1]."<br><br>";
mysql_query("UPDATE users SET mens = mens + 1 WHERE email = '".$array[1]."'");
$message.= "<b>Womens</b><br>";
$message.= $array[2]."<br>";
mysql_query("UPDATE users SET womens = womens + 1 WHERE email = '".$array[2]."'");
$message.= $array[3]."<br><br>";
mysql_query("UPDATE users SET womens = womens + 1 WHERE email = '".$array[3]."'");
$message.= '<b>Phoneroom</b><br>'.$array[4]. "<br>";
mysql_query("UPDATE users SET phoneroom = phoneroom + 1 WHERE email = '".$array[4]."'");
$message.= $array[5]. "<br><br>";
mysql_query("UPDATE users SET phoneroom = phoneroom + 1 WHERE email = '".$array[5]."'");
$message.= '<b>Warehouse</b><br>'.$array[6]."<br>";
mysql_query("UPDATE users SET warehouse = warehouse + 1 WHERE email = '".$array[6]."'");
$message.= $array[7]."<br>";
mysql_query("UPDATE users SET warehouse = warehouse + 1 WHERE email = '".$array[7]."'");
$message.= $array[8]."<br><br>";
mysql_query("UPDATE users SET warehouse = warehouse + 1 WHERE email = '".$array[8]."'");
$message.= '<b>Pickup Room</b><br>'.$array[9]. "<br>";
mysql_query("UPDATE users SET pickuproom = pickuproom + 1 WHERE email = '".$array[9]."'");
$message.= $array[10]. "<br><br>";
mysql_query("UPDATE users SET pickuproom = pickuproom + 1 WHERE email = '".$array[10]."'");
$message.= '<b>Breakroom</b><br>'.$array[11]. "<br>";
mysql_query("UPDATE users SET breakroom = breakroom + 1 WHERE email = '".$array[11]."'");
$message.= $array[12]. "<br><br>";
mysql_query("UPDATE users SET breakroom = breakroom + 1 WHERE email = '".$array[12]."'");
$message.= '<b>Hallways</b><br>'.$array[13]. "<br>";
mysql_query("UPDATE users SET hallways = hallways + 1 WHERE email = '".$array[13]."'");
$message.= $array[14]. "";
mysql_query("UPDATE users SET hallways = hallways + 1 WHERE email = '".$array[14]."'");
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers.= 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//mail($to, $subject, $message, $headers);
mysql_query("INSERT INTO cleaning (text) VALUES ('".htmlspecialchars($message)."')");
?>