registry_new_stuff db since_when only_from_new_users_p purposeWhat it does:
Only produces a report for the site administrator; the assumption is that random users won't want to see stolen equipment reports.Defined in: /web/philip/tcl/registry-defs.tcl
Source code:
if { $purpose != "site_admin" } { return "" } if { $only_from_new_users_p == "t" } { set users_table "users_new" } else { set users_table "users" } set query "select sr.stolen_id, sr.manufacturer, sr.model, ut.email from stolen_registry sr, $users_table ut where posted > '$since_when' and sr.user_id = ut.user_id " set result_items "" set selection [ns_db select $db $query] while { [ns_db getrow $db $selection] } { set_variables_after_query append result_items "<li><a href=\"/admin/registry/one-case?[export_url_vars stolen_id]\">$manufacturer $model</a> (from $email)" } if { ![empty_string_p $result_items] } { return "<ul>\n\n$result_items\n</ul>\n" } else { return "" }