-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeedback.php
More file actions
88 lines (81 loc) · 2.92 KB
/
feedback.php
File metadata and controls
88 lines (81 loc) · 2.92 KB
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
<?php
include_once 'header.php';
if ($_POST['building']){ $building = $_POST['building'];}
if ($_POST['name']){ $name = $_POST['name'];}
if ($_POST['email']){ $email = $_POST['email'];}
if ($_POST['feedback']){ $feedback = $_POST['feedback'];}
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
require_once("common/class.phpmailer.php");
$mail = new phpmailer();
$mail->IsSMTP();
$mail->Host = $smtp_server;
$mail->AddAddress("" . $email ."", "" . $from . "");
$mail->AddAddress("" . $admin_email . "", "Administrator");
//Configure email...
$mail->From = $email;
$mail->FromName = $from;
if ($priority == 1)
{
$mail->Priority = 1;
$mail->AddAddress("fletcher@smithville.k12.mo.us", "Richard Fletcher");
}
$mail->Subject = "Technology Department Workorder System - Feedback";
$mail->Body = "Name: " . $name . "\r\n";
$mail->Body .= "Building: " . $building . "\r\n";
$mail->Body .= "Email: " . $email . "\r\n";
$mail->Body .= "Comments: " . $feedback . "\r\n";
if(!$mail->Send())
{
$error_message .= "<li>".$mail->ErrorInfo;
}
?>
<div data-role="dialog">
<div data-role="header" data-theme="a">
<h1>Thanks!!</h1>
</div><!-- /header -->
<div data-role="content">
<p>Thank you for your comments! We'll be in touch soon!</p>
<script language="javascript"><!--
setTimeout("self.location.href='index.php'",3000);
//-->
</script>
</div>
</div>
<?php
} else {
?>
<div data-role="dialog">
<div data-role="header" data-theme="a">
<h1>Send Feedback</h1>
</div><!-- /header -->
<div data-role="content" class="mybg">
<label for="basic"><b>We value your comments!!</b></label><br />
<label for="basic">Please submit any comments, suggestions, or ideas for new features that you would find useful, innovative, or intuitive on the workorder webpage! We will be back in touch soon! Thanks!</label>
<br />
<br />
<form action="feedback.php" method="post">
<label for="basic"><b>Building:</b></label>
<select name="building" onChange="sendForm()">
<option value="">Select Building</option>
<option value="High">High</option>
<option value="Middle">Middle</option>
<option value="Upper">Upper</option>
<option value="Primary">Primary</option>
<option value="Central">Central</option>
</select>
<label for="basic"><b>Your Name:</b></label>
<input type="text" name="name" value="" data-mini="true" maxlength="255" />
<label for="basic"><b>Email:</b></label>
<input type="text" name="email" value="" data-mini="true" maxlength="255" />
<label for="basic"><b>Feedback:</b></label>
<textarea name="feedback"></textarea>
<input type="button" value="Back" class="button" title="Go back" onClick="history.go(-1)" data-inline="true">
<input type="submit" name="Submit" value="Submit" class="button" title="Submit Feedback" data-inline="true" data-theme="d">
</form>
</div> <!-- content -->
</div><!-- dialog -->
<?php
}
include_once 'footer.php';
include_once 'common/end.inc.php';
?>