function dynamicload_submit in Javascript Tools 5
Register settings.
File
- dynamicload/
dynamicload.module, line 312 - Enable AJAX-based loading of selected page elements.
Code
function dynamicload_submit($form_id, $form_values) {
if (db_num_rows(db_query("SELECT * FROM {dynamicload_blocks} WHERE module = '%s' AND delta = '%s'", $form_values['module'], $form_values['delta']))) {
db_query("UPDATE {dynamicload_blocks} SET refresh = %d, refresh_interval = %d, scroll = %d, apply = %d, target = '%s', method = %d WHERE module = '%s' AND delta = '%s'", $form_values['dynamicload_refresh'], $form_values['dynamicload_refresh_interval'], $form_values['dynamicload_scroll'], $form_values['dynamicload_apply'], $form_values['dynamicload_target'], $form_values['dynamicload_method'], $form_values['module'], $form_values['delta']);
drupal_set_message(t('Dynamic loading block data updated.'));
}
else {
db_query("INSERT INTO {dynamicload_blocks} (module, delta, refresh, refresh_interval, scroll, apply, target, method) VALUES ('%s', '%s', %d, %d, %d, %d, '%s', %d)", $form_values['module'], $form_values['delta'], $form_values['dynamicload_refresh'], $form_values['dynamicload_refresh_interval'], $form_values['dynamicload_scroll'], $form_values['dynamicload_apply'], $form_values['dynamicload_target'], $form_values['dynamicload_method']);
drupal_set_message(t('Dynamic loading block data saved.'));
}
}