-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit_abstract.php
executable file
·261 lines (195 loc) · 12.1 KB
/
edit_abstract.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<?php
/********************************************************
*
* phpAbstracts
* http://www.phpabstracts.com
*
* For copyright and license information, see readme.txt
*
*********************************************************/
//Include header template
include('header.php');
//Only ADMINs can view this page
if ($admin) {
//Grab abstract_id passed in
$abstract_id = $_POST['abstract_id'];
//Database Connection Variables
include('db.php');
//Connect to database
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
//Select all users
$query = "SELECT * FROM abstracts WHERE abstract_id = '$abstract_id'";
$result = mysql_query($query);
$i = 0;
$name = mysql_result($result,$i,"name");
$address = mysql_result($result,$i,"address");
$city = mysql_result($result,$i,"city");
$state = mysql_result($result,$i,"state");
$zip = mysql_result($result,$i,"zip");
$email = mysql_result($result,$i,"email");
$phone = mysql_result($result,$i,"phone");
$title = mysql_result($result,$i,"title");
$length = mysql_result($result,$i,"length");
$summary = mysql_result($result,$i,"summary");
$gap = mysql_result($result,$i,"gap");
$need = mysql_result($result,$i,"need");
$change = mysql_result($result,$i,"change");
$word_count = mysql_result($result,$i,"word_count");
$master_status = mysql_result($result, $i, "master_status");
$last_edit = mysql_result($result,$i,"last_edit");
//Output breadcrumbs
$goback_abstract = "<form method='post' style='display:inline;' action='detail.php' name='goback_abstract_form' id='goback_abstract_form'>" .
"<input type='hidden' id='abstract_id' name='abstract_id' value='" . $abstract_id . "' />" .
"<a href='#' onclick='javascript:document.goback_abstract_form.submit();'>View Abstract " . $abstract_id . "</a>" .
"</form>";
echo "<div class='breadcrumbs'><a href='list.php'>" . $home_title . "</a> /" . $goback_abstract . " /Edit Abstract</div>";
//Output title
echo "<h1>Edit Abstract " . $abstract_id . "</h1>";
//Output date of last edit
if ($last_edit) echo "<p>Last Edited: " . $last_edit . "</p>";
?>
<br />
<form method="post" action="edit_abstract_process.php" class="aform">
<h3>Abstract Title</h3>
<p>Enter the title of the abstract.</p>
<label for="title">Title</label>
<input type="text" name="title" id="title" size="60" maxlength="250" value="<?php echo $title; ?>" />
<br />
<br />
<h3>Author(s)</h3>
<p>Enter in format: Family Name, Given Name</p>
<label for "name">Name</label>
<input type="text" id="name" name="name" size="50" value="<?php echo $name; ?>" /><br />
<label for "clinic">Practice</label>
<input type="text" id="clinic" name="clinic" size="50" value="<?php echo $clinic; ?>" /><br />
<br />
<br />
<h3>Presentation</h3>
<p>Enter information about the presentation at the conference.</p>
<label for="format">Preferred Format</label>
<select id="format" name="format">
<option value="Poster" <?php if ($format == "Poster") echo "selected"; ?>>Poster</option>
<option value="Panel" <?php if ($format == "Panel") echo "selected"; ?>>Panel</option>
</select>
<br /><br />
<label for="language">Language of Presentation</label>
<select id="language" name="language">
<?php
$t = 1;
while ($custom_language[$t]) {
echo "<option value='" . $custom_language[$t] . "'";
if ($language == $custom_language[$t]) echo " selected";
echo ">" . $custom_language[$t] . "</option>";
$t = $t+1;
}
?>
</select>
<br /><br />
<label for="presenter">Name of Presenting Author</label>
<input type="text" name="presenter" id="presenter" size="40" value="<?php echo $presenter; ?>" />
<br />
<br />
<br />
<br />
<h3>Abstract Content</h3>
<p>Please select the main topic area of your abstract, and the location where the
primary work was carried out.</p>
<label for="topic">Topic</label>
<select id="topic" name="topic">
<?php
$t = 1;
while ($custom_topic[$t]) {
echo "<option value='" . $custom_topic[$t] . "'";
if ($topic == $custom_topic[$t]) echo " selected";
echo ">" . $custom_topic[$t] . "</option>";
$t = $t+1;
}
?>
</select>
<br /><br />
<label for="country">Location</label>
<select id="country" name="country">
<?php
$t = 1;
while ($custom_country[$t]) {
echo "<option value='" . $custom_country[$t] . "'";
if ($country == $custom_country[$t]) echo " selected";
echo ">" . $custom_country[$t] . "</option>";
$t = $t+1;
}
?>
</select>
<br /><br />
<p>Briefly describe the context for the work and explain why this study or programme was needed.</p>
<label for="background">Background
<span class="suggested_words">Suggested<br /><?php echo $background_words_limit; ?> words</span>
</label>
<textarea name="background" wrap="hard" cols="50" rows="10"><?php echo $background; ?></textarea>
<br /><br />
<p>What did you aim to achieve with this study or programme?</p>
<label for="purpose">Purpose of Study or Programme
<span class="suggested_words">Suggested<br /><?php echo $purpose_words_limit; ?> words</span>
</label>
<textarea name="purpose" wrap="hard" cols="50" rows="10"><?php echo $purpose; ?></textarea>
<br /><br />
<p>Describe the key activities that define the work. For example, provide
information that answers questions such as: With whom did you work?
How did you identify / select these people? What was your intervention? How did you
measure it?</p>
<label for="methods">Study or Programme Design and Methods
<span class="suggested_words">Suggested:<br /><?php echo $methods_words_limit; ?> words</span>
</label>
<textarea name="methods" wrap="hard" cols="50" rows="12"><?php echo $methods; ?></textarea>
<br /><br />
<p>What did you discover from doing this work?</p>
<label for="findings">Findings of Study or Programme
<span class="suggested_words">Suggested<br /><?php echo $findings_words_limit; ?> words</span>
</label>
<textarea name="findings" wrap="hard" cols="50" rows="15"><?php echo $findings; ?></textarea>
<br /><br />
<p>What can you conclude about this field? How might this information be used by other organisations?</p>
<label for="conclusion">Conclusions and Programme Implications
<span class="suggested_words">Suggested<br /><?php echo $conclusion_words_limit; ?> words</span>
</label>
<textarea name="conclusion" wrap="hard" cols="40" rows="10"><?php echo $conclusion; ?></textarea>
<br /><br />
<p>Note: the complete abstract should not exceed <?php echo $total_words_limit; ?> words</p>
<span style="color:gray">Suggested Total: <?php echo $total_words_limit; ?> words</span>
<br /><br />
<h3>Contact Person</h3>
<p>Enter contact details for corresponding author.</p>
<label for="name">Name</label>
<input type="text" name="name" id="name" size="40" value="<?php echo $name; ?>" />
<br />
<label for="email1">E-mail #1</label>
<input type="text" name="email1" id="email1" size="40" value="<?php echo $email1; ?>" />
<br />
<label for="email2">E-mail #2</label>
<input type="text" name="email2" id="email2" size="40" value="<?php echo $email2; ?>" />
<br />
<label for="phone1">Office Phone</label>
<input type="text" name="phone1" id="phone1" size="40" value="<?php echo $phone1; ?>" />
<br />
<label for="phone2">Cell Phone</label>
<input type="text" name="phone2" id="phone2" size="40" value="<?php echo $phone2; ?>" />
<br />
<label for="fax">Fax</label>
<input type="text" name="fax" id="fax" size="40" value="<?php echo $fax; ?>" />
<br />
<label for="address">Mailing Address</label>
<textarea name="address" id="address" wrap="hard" cols="40" rows="3" /><?php echo $address; ?></textarea>
<br />
<br /><br /><br />
<p>Please note that once you click on the button below, the changes above will overwrite the previous abstract permanently. </p>
<br />
<input type='hidden' id='abstract_id' name='abstract_id' value="<?php echo $abstract_id; ?>" />
<input id="submitform" name="submit" type="submit" value="Save Changes"
style="width:250px;height:25px;color:black;" />
</form>
<br /><br /><br /><br />
<?php
} //end if
//Include footer template
include('footer.php');
?>