Guildford Sub-Aqua ClubAdvertisement
Friday, 20 April 2018
registerFunction( 'onAfterUserUpdate','GBSACAfterUserUpdate' ); $_PLUGINS->registerFunction( 'onBeforeUserUpdate','GBSACBeforeUserUpdate' ); function GBSACAfterUserUpdate ($row, $rowExtras, $true) { $letters = $rowExtras->cb_emailletters ? 'Yes' : 'No'; $medical = $rowExtras->cb_medicalcert ? $rowExtras->cb_certdate : 'No'; $memblet = " Membership Details Update Notification ====================================== Membership details have been changed on the web site for $rowExtras->firstname $rowExtras->lastname. The new details are: First name: $rowExtras->firstname Last Name: $rowExtras->lastname Address: $rowExtras->cb_address Postcode: $rowExtras->cb_postcode Birth date: $rowExtras->cb_birthdate Diver grade: $rowExtras->cb_grade Instructor grade: $rowExtras->cb_instructorgrade Instructor No: $rowExtras->cb_instno Computer normally used: $rowExtras->cb_computer Occupation: $rowExtras->cb_occupation Home phone number: $rowExtras->cb_hometel Work phone number: $rowExtras->cb_worktel Mobile phone number: $rowExtras->cb_mobile Email address: $row->email Email club letters: $letters Web site: $rowExtras->cb_website Next of kin: $rowExtras->cb_nextofkin Medical self certify: $medical "; mail('', 'Membership details update', $memblet, "From:"); mail('', 'Membership details update', $memblet, "From:"); return true; } function GBSACBeforeUserUpdate (&$row, &$rowExtras) { if ($rowExtras->cb_medicalcert) { $today = date('Y-m-d'); if ($rowExtras->cb_certdate == '' || $rowExtras->cb_certdate > $today) { $rowExtras->cb_certdate = $today; } $date = split('-', $rowExtras->cb_certdate); ++$date[0]; $sdate = join('-', $date); if ($sdate > $rowExtras->cb_medical) { $rowExtras->cb_medical = $sdate; } } else { $rowExtras->cb_certdate = ''; } return true; }
Lost your Password?
Please enter your Username and e-mail address then click on the Send Password button.
You will receive a new password shortly. Use this new password to access the site.
E-mail Address:
Top! Top!