set special_index_page [ad_parameter SpecialIndexPage content] if ![empty_string_p $special_index_page] { set full_filename "[ns_info pageroot]$special_index_page" if [file exists $full_filename] { ns_returnfile 200 [ns_guesstype $full_filename] $full_filename return } } # publisher didn't have any special directive for the top-level # page, so let's generate something set old_login_process [ad_parameter "SeparateEmailPasswordPagesP" "" "0"] ReturnHeaders ns_write "[ad_header [ad_system_name]]

[ad_system_name]


Login

[export_form_vars return_url] " if { !$old_login_process } { ns_write "\n" if [ad_parameter AllowPersistentLoginP "" 1] { if [ad_parameter PersistentLoginDefaultP "" 1] { set checked_option "CHECKED" } else { set checked_option "" } ns_write "\n" } } ns_write "
Your email address:
Your password:
Remember this address and password? (help)
" set user_id [ad_get_user_id] set db [ns_db gethandle] if { $user_id != 0 } { # they've got a cookie if ![catch { set user_name [database_to_tcl_string $db "select first_names || ' ' || last_name as name from users where user_id = $user_id and user_state <> 'deleted'"] } errmsg] { # no errors ns_write "If you like, you can go directly to $user_name's [ad_pvt_home_name] in [ad_system_name]." } set requires_registration_p_clause "" } else { # not logged in set requires_registration_p_clause "\nand requires_registration_p <> 't'" } ns_write " [ad_footer] "