Index: openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.adp 25 Aug 2008 00:00:29 -0000 1.1 @@ -0,0 +1,29 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

The following users will be spammed:

+ + +
+ @form_action_html;noquote@ + + + + + + +
From@customer_service_email@
Subject Line
Message
Gift Certificate*Amount (@currency@)     Expires @expires_html@
Issue Type**@issue_type_widget_html;noquote@
+
+
+ +
+
+

Notes:

+

* You can issue a gift certificate to each user you are spamming (if you don't want to, just leave the amount blank).

+

** A customer service issue is created whenever an email is +sent. The issue is automatically closed unless the customer replies to +the issue, in which case it should be reopened.

Index: openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.tcl 9 Mar 2004 00:59:47 -0000 1.7 +++ openacs-4/packages/ecommerce/www/admin/customer-service/spam-2.tcl 25 Aug 2008 00:00:29 -0000 1.8 @@ -1,5 +1,4 @@ # spam-2.tcl - ad_page_contract { @param mailing_list:optional @param user_class_id:optional @@ -32,44 +31,38 @@ set return_url "[ad_conn url]?[export_entire_form_as_url_vars]" set customer_service_rep [ad_get_user_id] - if {$customer_service_rep == 0} { ad_returnredirect "/register.tcl?[export_url_vars return_url]" ad_script_abort } -append doc_body "[ad_admin_header "Spam Users, Cont."] -

Spam Users, Cont.

+set title "Spam Users, continued" +set context [list [list index "Customer Service"] $title] -[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] "Spam Users, Cont."] - -
-" - if { [info exists show_users_p] && $show_users_p == "t" } { if { [info exists user_id_list] } { set sql [db_map mailing_list] # select user_id, first_names, last_name from cc_users where user_id in ([join $user_id_list ", "]) } elseif { [info exists mailing_list] } { if { [llength $mailing_list] == 0 } { set search_criteria [db_map null_categories] - # (category_id is null and subcategory_id is null and subsubcategory_id is null) + # (category_id is null and subcategory_id is null and subsubcategory_id is null) } elseif { [llength $mailing_list] == 1 } { set search_criteria [db_map null_subcategory] - # (category_id=$mailing_list and subcategory_id is null) + # (category_id=$mailing_list and subcategory_id is null) } elseif { [llength $mailing_list] == 2 } { set search_criteria [db_map null_subsubcategory] - # (subcategory_id=[lindex $mailing_list 1] and subsubcategory_id is null) + # (subcategory_id=[lindex $mailing_list 1] and subsubcategory_id is null) } else { set search_criteria [db_map subsubcategory] - # subsubcategory_id=[lindex $mailing_list 2] + # subsubcategory_id=[lindex $mailing_list 2] } set sql "[db_map null_categories] and $search_criteria" - # select users.user_id, first_names, last_name from cc_users, ec_cat_mailing_lists where users.user_id=ec_cat_mailing_lists.user_id + # select users.user_id, first_names, last_name from cc_users, ec_cat_mailing_lists where users.user_id=ec_cat_mailing_lists.user_id } elseif { [info exists user_class_id] } { if { ![empty_string_p $user_class_id]} { set sql [db_map user_class] - # select users.user_id, first_names, last_name from cc_users, ec_user_class_user_map m where m.user_class_id=:user_class_id and m.user_id=users.user_id + # select users.user_id, first_names, last_name from cc_users, ec_user_class_user_map m where m.user_class_id=:user_class_id and m.user_id=users.user_id } else { set sql [db_map all_users] # select user_id, first_names, last_name from cc_users @@ -84,63 +77,33 @@ set sql [db_map viewed_category] # select unique u.user_id, first_names, last_name from cc_users u, ec_user_session_info ui, ec_user_sessions us where us.user_session_id=ui.user_session_id and us.user_id=u.user_id and ui.category_id=:category_id } elseif { [info exists start_date] } { - set start $start_date(date) - set end $end_date(date) + set start $start_date(date) + set end $end_date(date) set sql [db_map last_visit] # select user_id, first_names, last_name from cc_users where last_visit >= to_date(:start,'YYYY-MM-DD HH24:MI:SS') and last_visit <= to_date(:end,'YYYY-MM-DD HH24:MI:SS') } else { - - set start "" - set end "" - ad_return_complaint 1 "
  • I could not determine who you wanted to spam. Please go back and make a selection." + set start "" + set end "" + ad_return_complaint 1 "
  • I could not determine who you wanted to spam. Please go back to previous page and make a selection.
  • " ad_script_abort - } - append doc_body "The following users will be spammed: - " } set spam_id [db_nextval ec_spam_id_sequence] # will export start_date and end_date separately so that they don't have to be re-put-together # in spam-3.tcl -append doc_body " -
    -[ec_hidden_input var_to_spellcheck "message"] +set form_action_html "[ec_hidden_input var_to_spellcheck "message"] [ec_hidden_input target_url "[ec_url_concat [ec_url] /admin]/customer-service/spam-3.tcl"] [export_entire_form] -[export_form_vars spam_id start end] - - - - - - - - - - - - -
    From[ad_parameter -package_id [ec_id] CustomerServiceEmailAddress ecommerce]
    Subject Line
    Message
    Gift Certificate*Amount ([ad_parameter -package_id [ec_id] Currency ecommerce])     Expires [ec_gift_certificate_expires_widget "in 1 year"]
    Issue Type**[ec_issue_type_widget "spam"]
    -

    -

    - -
    -
    +[export_form_vars spam_id start end]" -* Note: You can optionally issue a gift certificate to each user you're spamming (if you don't want to, just leave the amount blank). -

    -** Note: A customer service issue is created whenever an email is sent. The issue is automatically closed unless the customer replies to the issue, in which case it is reopened. - -[ad_admin_footer] -" - -doc_return 200 text/html $doc_body \ No newline at end of file +set customer_service_email [parameter::get -package_id [ec_id] -parameter CustomerServiceEmailAddress] +set currency [parameter::get -package_id [ec_id] -parameter Currency -default "USD"] +set expires_html [ec_gift_certificate_expires_widget "in 1 year"] +set issue_type_widget_html [ec_issue_type_widget "spam"]