-
Notifications
You must be signed in to change notification settings - Fork 1
/
apply.php
43 lines (38 loc) · 1.15 KB
/
apply.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
<?php
require_once('../inc/util.inc');
function form() {
page_head('Apply to BOINC Central');
form_start('apply.php', 'get');
form_input_hidden('submit', 1);
form_input_text('Institution:', 'institution');
form_input_text('URL of page identifying you there:', 'url');
form_input_text('Where did you hear about BOINC Central?', 'hear');
form_input_textarea('Research for which you need computing', 'research');
form_submit('OK');
page_tail();
}
function action($user) {
$subject = 'BOINC Central application';
$body = sprintf('User: %s (%d)
institution: %s
URL: %s
research: %s
heard about us from: %s
',
$user->email_addr, $user->id,
get_str('institution', true),
get_str('url', true),
get_str('research', true),
get_str('hear', true)
);
send_email(null, $subject, $body, null, 'davea@berkeley.edu lestat.de.lionkur@gmail.com');
page_head('Message sent');
echo "We'll review your application and get back to you in a day or two.";
page_tail();
}
$user = get_logged_in_user();
if (get_str('submit', true)) {
action($user);
} else {
form();
}