You are here

function simple_adsense_settings_submit in Simple AdSense 7

Form submit.

File

./simple_adsense.admin.inc, line 110
Configuration form.

Code

function simple_adsense_settings_submit($form, &$form_state) {
  $slots = array();
  for ($i = 1; $i <= $form_state['num_slots']; $i++) {
    $slots[$i] = $form_state['values']['slot'][$i];
  }
  $client = $form_state['values']['client'];
  variable_set('simple_adsense_slots', $slots);
  variable_set('simple_adsense_client', $client);
  $output = t("Settings have been saved successfully, go to !blocks next.", array(
    "!blocks" => l(t("Blocks administration Page"), "admin/structure/block"),
  ));
  drupal_set_message($output);
}