% # domain-add-2.adp -- add a new domain to the the glassroom_domains # table. # (this is an ADP as opposed to a .tcl file so that # it's consistent naming with domain-add.adp) set_the_usual_form_variables # Expects domain_name, by_whom_paid, last_paid, expires, ns_db magic vars that # can be stitched together to form expires if {[ad_read_only_p]} { ad_return_read_only_maintenance_message return } # check for user set user_id [ad_verify_and_get_user_id] if { $user_id == 0 } { ns_returnredirect "/register.tcl?return_url=[ns_urlencode [ns_conn url]]" return } # check for bad input # set happy_p [glassroom_check_domain_args $domainname $ip_address $further_docs_url] set happy_p 1 if [catch { ns_dbformvalue [ns_conn form] expires date expires } errmsg] { ad_return_complaint 1 "