Index: openacs-4/packages/ecommerce/www/admin/tools/form-custom.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/tools/Attic/form-custom.tcl,v diff -u -N --- openacs-4/packages/ecommerce/www/admin/tools/form-custom.tcl 1 Mar 2005 00:01:35 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ -# form-custom.tcl,v 3.0 2000/02/06 03:54:42 ron Exp -# -# Takes the data generated from ad_table_sort_form function -# and inserts into the user_custom table -# -# on succes it does an ns_returnredirect to return_url -# -# davis@xarg.net 20000105 - -set internals {item item_group return_url item_original delete_the_set} -ad_page_variables {item item_group return_url {item_original {}} {delete_the_set 0}} - -set db [ns_db gethandle] -set user_id [ad_conn user_id] -auth::require_login -set item_type {slider_custom} -set value_type {keyval} - -if {$delete_the_set && ![empty_string_p $item]} { - util_dbq {item item_type value_type item_group} - if {[catch {ns_db dml $db "delete user_custom - where user_id = $user_id and item = $DBQitem and item_group = $DBQitem_group - and item_type = $DBQitem_type"} errmsg]} { - ad_return_complaint 1 "
  • I was unable to delete the defaults. The database said
    $errmsg
    \n" - ad_script_abort - } - ad_returnredirect "$return_url" - ad_script_abort -} - - - -if {[empty_string_p $item]} { - ad_return_complaint 1 "
  • You did not specify a name for this default set." - ad_script_abort -} - -set form [ns_getform] -for {set i 0} { $i < [ns_set size $form]} {incr i} { - if {[lsearch $internals [ns_set key $form $i]] < 0} { - lappend data [list [ns_set key $form $i] [ns_set value $form $i]] - } -} - - -if {[empty_string_p $data]} { - ad_return_complaint 1 "
  • You did not specify any default data." - ad_script_abort -} - -util_dbq {item item_original item_type value_type item_group} -with_transaction $db { - ns_db dml $db "delete user_custom - where user_id = $user_id and item = $DBQitem_original and item_group = $DBQitem_group - and item_type = $DBQitem_type" - - ns_ora clob_dml $db "insert into user_custom (user_id, item, item_group, item_type, value_type, value) - values ($user_id, $DBQitem, $DBQitem_group, $DBQitem_type, 'list', empty_clob()) - returning value into :1" $data -} { - ad_return_complaint 1 "
  • I was unable to insert your defaults. The database said
    $errmsg
    \n" - ad_script_abort -} - -ad_returnredirect "$return_url" Index: openacs-4/packages/ecommerce/www/admin/tools/sort-custom.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/tools/Attic/sort-custom.tcl,v diff -u -N --- openacs-4/packages/ecommerce/www/admin/tools/sort-custom.tcl 1 Mar 2005 00:01:35 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,73 +0,0 @@ -# sort-custom.tcl,v 3.0 2000/02/06 03:54:43 ron Exp -# -# Takes the data generated from ad_table_sort_form function -# and inserts into the user_custom table -# -# on succes it does an ad_returnredirect to return_url&$item_group=$item -# -# davis@xarg.net 20000105 - -ad_page_variables {item item_group return_url {delete_the_sort 0} {col -multiple-list} {dir -multiple-list} {item_original {}}} - -set db [ns_db gethandle] -set user_id [ad_conn user_id] -auth::require_login -set item_type {table_sort} -set value_type {list} - -if {$delete_the_sort && ![empty_string_p $item]} { - util_dbq {item item_type value_type item_group} - if {[catch {ns_db dml $db "delete user_custom - where user_id = $user_id and item = $DBQitem and item_group = $DBQitem_group - and item_type = $DBQitem_type"} errmsg]} { - ad_return_complaint 1 "
  • I was unable to delete the sort. The database said
    $errmsg
    \n" - return - } - ad_returnredirect "$return_url" - ad_script_abort -} - - - -if {[empty_string_p $item]} { - ad_return_complaint 1 "
  • You did not specify a name for this sort" - ad_script_abort -} - - -set col_clean {} -set direction(asc) {} -set direction(desc) {*} - -# Strip the blank columns... -set i 0 -foreach c $col { - if {![empty_string_p $c]} { - lappend col_clean "$c$direction([lindex $dir $i])" - } - incr i -} - -if {[empty_string_p $col_clean]} { - ad_return_complaint 1 "
  • You did not specify any columns to sort by" - ad_script_abort -} - -set col_clean [join $col_clean ","] - -util_dbq {item item_original item_type value_type item_group} -with_transaction $db { - ns_db dml $db "delete user_custom - where user_id = $user_id and item = $DBQitem_original and item_group = $DBQitem_group - and item_type = $DBQitem_type" - - ns_ora clob_dml $db "insert into user_custom (user_id, item, item_group, item_type, value_type, value) - values ($user_id, $DBQitem, $DBQitem_group, $DBQitem_type, 'list', empty_clob()) - returning value into :1" $col_clean -} { - ad_return_complaint 1 "
  • I was unable to insert your table customizations. The database said
    $errmsg
    \n" - ad_script_abort -} - -ad_returnredirect "$return_url&$item_group=[ns_urlencode $item]" - Index: openacs-4/packages/ecommerce/www/admin/tools/table-custom.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/tools/Attic/table-custom.tcl,v diff -u -N --- openacs-4/packages/ecommerce/www/admin/tools/table-custom.tcl 1 Mar 2005 00:01:35 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ -# table-custom.tcl,v 3.0 2000/02/06 03:54:47 ron Exp -# Takes the data generated from ad_table_form function -# and inserts into the user_custom table -# -# on succes it does an ns_returnredirect to return_url&$item_group=$item -# -# davis@xarg.net 20000105 - -ad_page_variables {item item_group return_url {delete_the_view 0} {col -multiple-list} {item_original {}}} - -set db [ns_db gethandle] -set user_id [ad_conn user_id] -auth::require_login - -set item_type {table_view} -set value_type {list} - -if {$delete_the_view && ![empty_string_p $item]} { - util_dbq {item item_type value_type item_group} - if {[catch {ns_db dml $db "delete user_custom - where user_id = $user_id and item = $DBQitem and item_group = $DBQitem_group - and item_type = $DBQitem_type"} errmsg]} { - ad_return_complaint 1 "
  • I was unable to delete the view. The database said
    $errmsg
    \n" - ad_script_abort - } - ad_returnredirect "$return_url" - ad_script_abort -} - - -if {[empty_string_p $item]} { - ad_return_complaint 1 "
  • You did not specify a name for this table view" - ad_script_abort -} - -set col_clean [list] - -# Strip the blank columns... -foreach c $col { - if {![empty_string_p $c]} { - lappend col_clean $c - } -} - -if {[empty_string_p $col_clean]} { - ad_return_complaint 1 "
  • You did not specify any columns to display" - ad_script_abort -} - -util_dbq {item item_original item_type value_type item_group} -with_transaction $db { - ns_db dml $db "delete user_custom - where user_id = $user_id and item = $DBQitem_original and item_group = $DBQitem_group - and item_type = $DBQitem_type" - - ns_ora clob_dml $db "insert into user_custom (user_id, item, item_group, item_type, value_type, value) - values ($user_id, $DBQitem, $DBQitem_group, $DBQitem_type, 'list', empty_clob()) - returning value into :1" $col_clean -} { - ad_return_complaint 1 "
  • I was unable to insert your table customizations. The database said
    $errmsg
    \n" - ad_script_abort -} - -ad_returnredirect "$return_url&$item_group=[ns_urlencode $item]" -