| 1 |
<?php |
<?php |
| 2 |
// $Id: volunteer.module,v 1.48 2005/11/29 23:04:21 robinmonks Exp $ |
// $Id: volunteer.module,v 1.49 2005/12/02 03:21:46 killes Exp $ |
| 3 |
|
|
| 4 |
|
|
| 5 |
/** |
/** |
| 115 |
} |
} |
| 116 |
|
|
| 117 |
$group = form_textarea (t('Volunteer message'), 'volunteer_message_sign_up', variable_get('volunteer_message_sign_up', t('Fill out this quick form to volunteer for this event.')), 75, 5, t('Message to display when volunteers are signing up')); |
$group = form_textarea (t('Volunteer message'), 'volunteer_message_sign_up', variable_get('volunteer_message_sign_up', t('Fill out this quick form to volunteer for this event.')), 75, 5, t('Message to display when volunteers are signing up')); |
| 118 |
$group .= form_textarea (t('Volunteer thank you message'), 'volunteer_message_thanks', variable_get('volunteer_message_thanks','Thank you for offering to volunteer! Someone will be in touch with you shortly with details.'), 75, 5, t('Message to display to user after they have signed up to volunteer for an event.')); |
$group .= form_textarea (t('Volunteer thank you message'), 'volunteer_message_thanks', variable_get('volunteer_message_thanks', t('Thank you for offering to volunteer! Someone will be in touch with you shortly with details.')), 75, 5, t('Message to display to user after they have signed up to volunteer for an event.')); |
| 119 |
$group .= '<p>'. t("NOTE - wildcards are <b>inactive</b> for these messages.") .'</p>'; |
$group .= '<p>'. t("NOTE - wildcards are <b>inactive</b> for these messages.") .'</p>'; |
| 120 |
$output .= form_group(t('Message Settings'), $group); |
$output .= form_group(t('Message Settings'), $group); |
| 121 |
|
|
| 403 |
$stage = $wait_list ? 1 : 2; |
$stage = $wait_list ? 1 : 2; |
| 404 |
db_query('INSERT INTO {volunteer_contact_event} (cid, nid, timestamp, stage) VALUES (%d, %d, %d, %d)', $contact->contact_type_object->contact_id, $nid, time(), $stage); |
db_query('INSERT INTO {volunteer_contact_event} (cid, nid, timestamp, stage) VALUES (%d, %d, %d, %d)', $contact->contact_type_object->contact_id, $nid, time(), $stage); |
| 405 |
volunteer_mail($contact->id, $nid, 'new_volunteer'); |
volunteer_mail($contact->id, $nid, 'new_volunteer'); |
| 406 |
drupal_set_message(variable_get('volunteer_message_thanks','')); |
drupal_set_message(variable_get('volunteer_message_thanks', t('Thank you for offering to volunteer! Someone will be in touch with you shortly with details.'))); |
| 407 |
drupal_goto('node/'. $nid); |
drupal_goto('node/'. $nid); |
| 408 |
} |
} |
| 409 |
else { |
else { |
| 718 |
} |
} |
| 719 |
|
|
| 720 |
function volunteer_approve_volunteer($cid, $nid) { |
function volunteer_approve_volunteer($cid, $nid) { |
| 721 |
if (!volunteer_check_overload($nid) || $_POST[op] == 'Overload') { |
if (!volunteer_check_overload($nid) || $_POST['op'] == 'Overload') { |
| 722 |
db_query('UPDATE {volunteer_contact_event} SET stage = %d WHERE cid = %d AND nid = %d', 3, $cid, $nid); |
db_query('UPDATE {volunteer_contact_event} SET stage = %d WHERE cid = %d AND nid = %d', 3, $cid, $nid); |
| 723 |
volunteer_mail($cid, $nid,'approve'); |
volunteer_mail($cid, $nid,'approve'); |
| 724 |
drupal_set_message(t('Volunteer status approved')); |
drupal_set_message(t('Volunteer status approved')); |