function uc_recurring_admin_edit_form_submit in UC Recurring Payments and Subscriptions 6
Same name and namespace in other branches
- 6.2 uc_recurring.admin.inc \uc_recurring_admin_edit_form_submit()
- 7.2 uc_recurring.admin.inc \uc_recurring_admin_edit_form_submit()
File
- ./
uc_recurring.admin.inc, line 203 - Recurring payments administration menu items.
Code
function uc_recurring_admin_edit_form_submit($form, &$form_state) {
$interval = $form_state['values']['regular_interval_value'] . ' ' . $form_state['values']['regular_interval_unit'];
db_query("UPDATE {uc_recurring_users} SET fee_amount = %f, regular_interval = '%s', " . "remaining_intervals = %d WHERE rfid = %d", $form_state['values']['fee_amount'], $interval, $form_state['values']['remaining_intervals'], arg(4));
if ($form_state['values']['reset_next_charge']) {
$next_charge = strtotime('+' . $interval);
db_query("UPDATE {uc_recurring_users} SET next_charge = %d WHERE rfid = %d", $next_charge, arg(4));
}
drupal_set_message(t('The changes to the fee have been saved.'));
$form_state['redirect'] = 'admin/store/orders/recurring/view/fee/' . arg(4);
}