-
Notifications
You must be signed in to change notification settings - Fork 0
/
confirm_clinics.php
182 lines (152 loc) · 6.38 KB
/
confirm_clinics.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?php
require_once('access.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Confirm <?php require_once('access.php'); echo $event_tools_event_name; ?> Clinic(s)</title>
<link href="../css/clinicsPHP.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>Confirm <?php
include_once('mysql2i.class.php'); // migration step
require_once('access.php'); echo $event_tools_event_name; ?> Clinic(s)</h3>
<p>
<?php
mysql_connect($opts['hn'],$opts['un'],$opts['pw']);
@mysql_select_db($opts['db']) or die( "Unable to select database");
// confirm_clinics.php and verify_clinics.php work together.
// confirm_clinics present the web page with info for the clinician to confirm
// verify_clinics sends the emails that point to
// Prod test URL: eventtools/confirm_clinics.php?key=2153
// Local test URL: eventtools/confirm_clinics.php?key=1565
// find the user name from the ID
parse_str($_SERVER["QUERY_STRING"], $args);
// check for submission
//foreach ($_POST as $a) echo $a."<br/>";
if ($_POST['submit']) {
echo "Submission received, ";
// send the email
//$to = "[email protected]";
//$to = "[email protected]";
$body = "email: ".$_POST['email']."\n\n".
"OK: ".$_POST['OK']."\n\n".
"Comment: ".$_POST['clinic-comment']."\n\n".
"Cell: ".$_POST['cell-number']."\n\n".
"AV: ".$_POST['av']." ".$_POST['av-comment']."\n\n";
$subject = "X2011 Clinic Confirmation Update";
$headers = "from: [email protected]\nbcc: [email protected]";
mail($to,$subject,$body,$headers);
// do the insert
$query = "UPDATE ".$event_tools_db_prefix."eventtools_clinics
SET clinic_ok = '".$_POST['OK']."',
clinic_presenter_cell_number = '".$_POST['cell-number']."',
clinic_presenter_confirm_comment = '".$_POST['clinic-comment']."',
clinic_presenter_av_comment = '".$_POST['av-comment']."',
clinic_presenter_av_request = '".$_POST['av']."'
WHERE id = '".$_POST['id']."'
;";
//echo $query;
mysql_query($query);
echo "thanks!";
return;
}
// process 1st display
if (! $args["key"]) {
echo "No key, therefore no information";
return;
}
$id = ($args["key"]-1445)/12;
//echo '['.$id.']';
$query="
SELECT *
FROM ".$event_tools_db_prefix."eventtools_clinics_with_tags
WHERE ".$id." = `id`
";
//echo $query;
$result=mysql_query($query);
$num=mysql_numrows($result);
$email = mysql_result($result,0,"clinic_presenter_email");
if ($email == "") {
echo "<b>Failure retrieving email for ID ".$id."</b>";
return;
}
echo "Dear ".mysql_result($result,0,"clinic_presenter").":<p>";
echo "
In less than two months, the NMRA National Convention will kick
off in Sacramento, California.
<p>
We're in the process of finalizing the clinics schedule
for the convention this summer.
You are receiving this email because you've volunteered to present
a clinic and have previously been in contact with the show organizers to
arrange this.
<p>
Below you will find a summary of your clinics, and the current scheduled time:
";
require_once('utilities.php');
require_once('formatting.php');
$where = " id = '".$id."' ";
//echo $where;
format_all_clinics_as_3table($where, "");
echo "
<FORM action=\"confirm_clinics.php\" method=\"post\">
<input type=\"hidden\" name=\"email\" value=\"".$email."\">
<input type=\"hidden\" name=\"id\" value=\"".$id."\">
<p>
Please look it over carefully.
If everything is OK, check the the box here and click
"Submit" below.<p>
<input type=\"checkbox\" name=\"OK\" value=\"Y\" /><b>OK</b>
<p>
If you have any corrections,
additions or deletions, please describe there here and
click "Submit" below.<br/>
<TEXTAREA name=\"clinic-comment\" cols=\"80\" wrap=\"virtual\" rows=\"5\">".mysql_result($result,0,"clinic_presenter_confirm_comment")."</TEXTAREA>
<p>";
echo "<b>Cell Number</b><p>
Please provide your cell phone number so that we
can contact you during the Convention if needed.
This will not be released to the public.<p>
<TEXTAREA name=\"cell-number\" cols=\"20\" wrap=\"virtual\" rows=\"1\"/>".mysql_result($result,0,"clinic_presenter_cell_number")."</TEXTAREA>
<p>
";
$checkcw = (mysql_result($result,0,"clinic_presenter_av_request") == "conventionwindows") ? " checked " : "" ;
$checkmw = (mysql_result($result,0,"clinic_presenter_av_request") == "mywindows") ? " checked " : "" ;
$checkmm = (mysql_result($result,0,"clinic_presenter_av_request") == "mymac") ? " checked " : "" ;
$checkml = (mysql_result($result,0,"clinic_presenter_av_request") == "mylinunx") ? " checked " : "" ;
$checknn = (mysql_result($result,0,"clinic_presenter_av_request") == "none") ? " checked " : "" ;
echo "<b>Presentation Equipment</b><p>
X2011West will be providing a VGA-based computer projection system for all
clinic rooms, as well as audio equipment for larger clinic rooms.
<p>
We will have PC laptops available for use,
but we will also allow presenters to attach their personal
laptop to our projection equipment provided it is compatible.
We will have a projector set up in the clinics office to verify
proper operation. Please select which type of equipment you'd like to use:<p>
<input type=\"radio\" name=\"av\" value=\"conventionwindows\" ".$checkcw." />Convention Windows computer<br />
<input type=\"radio\" name=\"av\" value=\"mywindows\" ".$checkmw." />My Windows computer<br />
<input type=\"radio\" name=\"av\" value=\"mymac\" ".$checkmm." />My Mac computer<br />
<input type=\"radio\" name=\"av\" value=\"mylinunx\" ".$checkml." />My Linux computer<br />
<input type=\"radio\" name=\"av\" value=\"none\" ".$checknn." />None<br />
<p>";
echo "If you have any needs for additional presentation equipment,
please use the form below to make requests.<p>
<TEXTAREA name=\"av-comment\" cols=\"80\" wrap=\"virtual\" rows=\"5\"/>".mysql_result($result,0,"clinic_presenter_av_request")."</TEXTAREA>
";
echo "<br/><b>Recording Policy</b><p>
X2011West will not be allowing any video or audio recording of
clinic presentations at the convention.
<p>
<p>
Sincerely,<br/>
David Falkenburg and Anthony Thompson X2011West Clinics Coordinators
<p>
<INPUT type=\"submit\" name=\"submit\" value=\"Submit\">
</form>";
?>
</body>
</html>