public static function GetAreaCodeById($id) { if (!empty($id)) { $code = AreaCode::model()->findByPk($id); if (!empty($code->area_code)) { return $code->area_code; } else { return '0'; } } else { return '0'; } }
public static function sendMailRegisterProgramme($model) { $param = array('{SURNAME}' => $model->surname, '{GIVEN_NAME}' => $model->given_name, '{OTHER_NAME}' => $model->other_name, '{MOBILE_NUMBER}' => $model->mobile_number, '{EMAIL_ADDRESS}' => $model->email_address, '{STREET}' => $model->street, '{HOUSE_NUMBER}' => $model->house_number, '{CITY}' => $model->city, '{COUNTRY}' => $model->country, '{POSTAL_CODE}' => $model->postal_code, '{SURNAME_STUDENT}' => $model->surname_student, '{GIVEN_NAME_STUDENT}' => $model->given_name_student, '{OTHER_NAME_STUDENT}' => $model->other_name_student, '{SCHOOL_LEVEL}' => $model->school_level, '{PROGRAMME_TITLE}' => $model->programme_title, '{PROGRAME_FEE}' => $model->programme_fee, '{GST}' => $model->GST, '{TOTAL_PROGRAMME_FEE}' => $model->total_programme_fee, '{PAYMENT_MODE}' => $model->payment_mode); EmailHelper::bindEmailContent(EMAIL_REGISTER_PROGRAMME, $param, Yii::app()->params['adminEmail']); } public static function sendmailpayment($model, $list_product) {