im_recent_employees db { coverage " " } { report_date " " } { purpose " " }What it does:
Retuns a string that gives a list of recent employeesDefined in: /web/philip/tcl/intranet-status-report-defs.tcl
Source code:
if { [empty_string_p $coverage] } { set coverage 1 } if { [empty_string_p $report_date] } { set report_date sysdate } else { set report_date "'$report_date'" } set selection [ns_db select $db "select first_names, last_name, email, start_date, user_id from im_employees_active where trunc(start_date) <= trunc(sysdate) and start_date + $coverage > $report_date order by start_date"] set return_list [list] while {[ns_db getrow $db $selection]} { set_variables_after_query if {$purpose == "web_display"} { lappend return_list "<a href=[im_url_stub]/users/view.tcl?[export_url_vars user_id]>$first_names $last_name</a> ($email) - [util_IllustraDatetoPrettyDate $start_date]" } else { lappend return_list "$first_names $last_name ($email) - [util_IllustraDatetoPrettyDate $start_date], " } } if {[llength $return_list] == 0} { return "None \n" } if {$purpose == "web_display"} { return "<ul><li>[join $return_list "<li>"]</ul>" } else { return "[join $return_list ", "] " }