#-----------------------------------------------------------------------------
# register.tcl
#
# Display registration form for new users
# Optional argument: email
#-----------------------------------------------------------------------------
ns_share Gui
ns_share Config
set_the_usual_form_variables 0
if {![info exists email]} {set email ""}
set db [ns_db gethandle]
# Before displaying the registration form, process their email address.
# Check if they have already registered.
set sql "SELECT user_id, clearance FROM oct2_users WHERE email = '$email'"
set selection [ns_db select $db $sql]
if {[ns_db getrow $db $selection]} {
set_variables_after_query
switch -- $clearance {
"0" {set msg "Someone has already begun, but not finished, the registration
process by using the email, $email. If this is you, then complete your
registration process by clicking here."
}
default {set msg "You have already registered, so please use the Login form
(to the left of the Registration form).
Perhaps you are trying to change your name or address. You can do that from the
My Profile page."
}
}
ReturnHeaders
ns_write "
[Header "Registration Unsuccessful"]
$msg
[Footer]
"
return
}
ReturnHeaders
ns_write "
[Header "Institute for Medical Engineering and Science Senior Position: Register"]
Please note that this registration page is intended to be completed by Faculty Search applicants only. Do not complete the registration if you are a Reference Letter Provider for a candidate. if you are uploading a letter of recommendation for an applicant, please click here . You will need the Candidate's Name and Email to complete the upload of the letter.
Faculty Applicants: If you have already registered, please do not complete this form again.
[Footer] "