-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathemailEB.php
executable file
·108 lines (69 loc) · 3.13 KB
/
emailEB.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php require_once('Connections/equip.php'); ?>
<HTML>
<head>
<style>
div.content {
border: 1px dotted #000000;
padding: 0.7em;
margin: 0.5em 0em 0.5em 0em;
}
.bodyText {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.bodyBorder {
border: 1px dotted #000000;
}
</style>
</head>
<BODY>
<?php
//EMAIL FOR TESTING
$ToEmail = "**********";
$Start = $_REQUEST[Start];
$State = $_REQUEST[State];
mysql_select_db($database_equip, $equip);
$query_email = "SELECT * FROM students ORDER BY email";
$email = mysql_query($query_email, $equip) or die(mysql_error());
$row_email = mysql_fetch_assoc($email);
$totalRows_email = mysql_num_rows($email);
do {
$ToEmail = $row_email['Email'] . "@**********.com";
$conName = $row_email['Name'];
if($ToEmail != $previousEmail){
if(strlen($ToEmail)>6){
echo $conName . " - " . $ToEmail . "<br>";
// MOVE MESSAGE AND MAIL FUNCTION HERE
//MESSAGE
$message = "\r\n" .
"In the rush to get a second equipment checkout created in the Service Bureau at he beginning of the semester, we weren't able to get policies in place to charge fines for equipment that is returned late. We now have that in place as well correcting the default 24 hour checkout period. Student can now see the equipment they are allowed to checkout based on their classes as well as when that equipment is expected to be returned.\r\n" .
"http://gcc.bradley.edu/labs/students.php\r\n" .
"Before being able to checkout equipment after Spring Break, students must sign a contract that includes these policies and provide local contact information.\r\n" .
"The new policies are...\r\n" .
"1) Fees will be assessed for equipment that is not returned before it is due at a rate of $5 every 15 minutes up to $100 a day. If equipment is more than 24 hours late, the student will be contacted by phone and email. If it is not returned within 48 hours, it will be reported stolen with Campus Police.\r\n" .
"2) Students will not be able to check additional equipment out if they owe fines. Fines can only be paid using QuickCash. Once the fine is paid, the Service Bureau employee will contact me and I will remove the block on the student's account within 24 hours.\r\n" .
"Service Bureau student employees CANNOT remove a hold on a students checkout privileges. Fines are automatically assessed by the software. If you return something late, there is nothing the Service Bureau students can do to restore your checkout privileges.\r\n" .
"If you have questions about the new policies, let me know.\r\n" .
"---\r\n".
"Kevin Reynen\r".
"Director of Instructional Technology\r" .
"Slane College of Communications and Fine Arts\r" .
"Bradley University - Peoria, IL 61625\r";
//START EMAIL ACTION
mail("$ToEmail", "Changes to Equipment Checkout", $message,
"From: ********** <**********>\r\n" .
"Reply-To: **********\r\n" .
"Return-Path: **********\r\n".
"Return-Receipt-To: [email protected]\r\n".
"X-Mailer: PHP/" . phpversion());
//END EMAIL ACTION
$previousEmail = $ToEmail;
$i++;
}
}
} while ($row_email = mysql_fetch_assoc($email));
echo "Count =" . $i;
mysql_free_result($email);
?>
</BODY>
</HTML>