You are here

function merci_rro_new_submit in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6

1 string reference to 'merci_rro_new_submit'
merci_rro_add_new_override in modules/merci_rro/merci_rro.admin.inc

File

modules/merci_rro/merci_rro.admin.inc, line 234
Admin section functions for MERCI Role Rule Override

Code

function merci_rro_new_submit($form_id, $form_values) {
  $values = $form_values['values'];
  $sql = "INSERT INTO {merci_rro}\n  (\n    rid,\ttype, max_hours_per_reservation,\n    allow_overnight, allow_weekends, late_fee_per_hour,\n    rate_per_hour, fee_free_hours, min_cancel_hours,\n    hours_mon, hours_tue, hours_wed,\n    hours_thu, hours_fri, hours_sat,\n    hours_sun\n  )\n  VALUES\n  (\n    %d, '%s', %d,\n    %d, %d, %d,\n    %d, %d, %d,\n    '%s', '%s', '%s',\n    '%s', '%s', '%s',\n    '%s'\n  )";
  db_query($sql, $values['merci_rro_roles'], $values['merci_rro_type'], $values['merci_rro_max_hours_per_reservation'], $values['merci_rro_allow_overnight'], $values['merci_rro_allow_weekends'], $values['merci_rro_rate_per_hour'], $values['merci_rro_late_fee_per_hour'], $values['merci_rro_fee_free_hours'], $values['merci_rro_min_cancel_hours'], $values['merci_hours_mon'], $values['merci_hours_tue'], $values['merci_hours_wed'], $values['merci_hours_thu'], $values['merci_hours_fri'], $values['merci_hours_sat'], $values['merci_hours_sun']);
  $role = merci_rro_role_name_from_rid($values['merci_rro_roles']);
  drupal_set_message('Override added for ' . $role);
}