function __setBodyAdmin($data, $scheduleData) { $schoolyear = viewSchoolYear($data['school_year']); $mail_status = viewMailStatus($data['mail_status']); $route = viewBus($scheduleData['Schedule']['bus']); $type = viewType($this->data['Experience']['type']); $date = sprintf('%04d年%02d月%02d日', date('Y'), date('m'), date('d')); /* * @体験入学 */ $experience = formDate($scheduleData['Schedule']['day']) . ' ' . $scheduleData['Schedule']['name'] . ' ' . viewTime($scheduleData['Schedule']['time']); /* * @バス乗車地点 */ $optionsBus = busArray($scheduleData['Schedule']['bus']); if (is_numeric($this->data['Experience']['bus'])) { $bus = $optionsBus[$this->data['Experience']['bus']]; } else { $bus = $this->data['Experience']['bus']; } /* * @体験授業 */ $open_campuses = array(); $events = unserialize($data['event']); foreach ($events as $e) { $event = array_shift($e) . " "; foreach ($e as $o) { $event .= " " . $o; } $open_campuses[] = $event; } $open_campus = implode("\n", $open_campuses); /* * @ご家族 */ if (!empty($data['family'])) { $family = implode(" ", $data['family']); } return <<<EOM …………………………………………………………………………………………………… ◎から体験入学申し込み …………………………………………………………………………………………………… ◎送信日 {$date} ◎キャリア {$type} ◎登録番号 {$data['reg_num']} ◎氏名 {$data['name']} {$data['furigana']} ◎メールアドレス {$data['mail']} ◎住所 {$data['zip01']}-{$data['zip02']} {$data['pref']}{$data['address01']}{$data['address02']}{$data['address03']} ◎生年月日 {$data["birthday"]} ◎電話番号 {$data['tel01']}-{$data['tel02']}-{$data['tel03']} ◎高校名 {$data['highschool']}高校 {$schoolyear} ◎体験入学 {$experience} ◎バス乗車地点 {$route} {$bus} ◎体験授業 {$open_campus} ◎ご家族が参加される場合 {$family} ◎保護者説明会 {$data['briefing_session']} EOM; }
function __setBodyAdmin($data) { $doc = ""; if (!empty($data['doc'])) { $doc = implode(" ", $data['doc']); } $schoolyear = viewSchoolYear($data['school_year']); $mail_status = viewMailStatus($data['mail_status']); $type = viewType($data['type']); $date = sprintf('%04d年%02d月%02d日', date('Y'), date('m'), date('d')); return <<<EOM …………………………………………………………………………………………………… ◎からメールマガジン申し込み …………………………………………………………………………………………………… ◎送信日 {$date} ◎キャリア {$type} ◎氏名 {$data['name']} {$data['furigana']} ◎メールアドレス {$data['mail']} ◎住所 {$data['zip01']}-{$data['zip02']} {$data['pref']}{$data['address01']}{$data['address02']}{$data['address03']} ◎生年月日 {$data["birthday"]} ◎電話番号 {$data['tel01']}-{$data['tel02']}-{$data['tel03']} ◎高校名 {$data['highschool']}高校 {$schoolyear} EOM; }