head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2000.01.08.02.08.37; author tarik; state Exp; branches; next 1.1; 1.1 date 2000.01.08.00.22.42; author tarik; state Exp; branches; next ; desc @@ 1.2 log @*** empty log message *** @ text @# File: /groups/group/index.tcl # Date: mid-1998 # Contact: teadams@@arsdigita.com, tarik@@arsdigita.com # Purpose: this is the group public page # # Note: group_id, group_name, short_name, admin_email, scope, ug_navbar_list and ug_context_bar_list # are already set up in the environment by the ug_serve_section set db [ns_db gethandle] set selection [ns_db 1row $db " select ug.approved_p, ug.creation_user, ug.registration_date, ug.group_type, ug.new_member_policy, u.first_names, u.last_name from user_groups ug, users u where group_id = $group_id and ug.creation_user = u.user_id"] set_variables_after_query ReturnHeaders ns_write " [ug_header "Main Page" $db $group_id] [ug_page_title "Main Page" $db $group_id $group_name] [ad_scope_context_bar_ws_or_index $group_name]
this group is awaiting approval by [ad_system_owner][ug_footer $admin_email] " } # get group sections set selection [ns_db select $db " select section_key, section_pretty_name, section_type from content_sections where scope='group' and group_id=$group_id and section_type!='admin' and module_key!='custom-sections' and enabled_p='t' order by sort_key "] set system_section_counter 0 set non_system_section_counter 0 while { [ns_db getrow $db $selection] } { set_variables_after_query if { [string compare $section_type system]==0 } { append system_sections_html " $section_pretty_name
"
}
# let's look for administrators
set selection [ns_db select $db "select map.user_id, first_names || ' ' || last_name as name
from user_group_map map, users
where map.user_id = users.user_id
and role = 'administrator'
and group_id=$group_id"]
while { [ns_db getrow $db $selection] } {
set_variables_after_query
append administrator_items "$name
\n"
}
if [info exists administrator_items] {
append html "
$html[ad_style_bodynote "Created by $first_names $last_name on [util_AnsiDatetoPrettyDate $registration_date]"] [ug_footer $admin_email] " @ 1.1 log @Initial revision @ text @d45 1 a45 1 from content_sections_temp d51 1 @