Exemple #1
0
 public function notice()
 {
     $res = $this->Office_hours->list_('', '', "a_end like '" . date("Y.m.d", strtotime("-1 day")) . "%'");
     for ($i = 0; $i < sizeof($res); $i++) {
         $mento = $this->Office_mento->get_by_member($res[$i]["mento_id"]);
         $m = new TF_mailer($this->settings);
         $m->mailto = $mento["email"];
         $m->subject = "[D.CAMP] " . date_to_kr($res[$i]["e_start"]) . " 진행 예정인 Office hours의 신청자 접수가 마감되었습니다.";
         $m->tpl_name = "mail-officehours-notify";
         $m->assigns["title"] = date_to_kr($res[$i]["e_start"]) . " 진행 예정인 Office hours의 신청자 접수가 마감되었습니다. 상담을 진행할 기업 선정을 부탁드립니다.";
         $m->assigns["oh"] = $res[$i];
         $m->assigns["m"] = $mento;
         $m->assigns["main_service_url"] = $this->globals->my_host;
         $m->assigns["main_service_domain"] = $_SERVER['SERVER_NAME'];
         $m->send();
     }
     $this->layout = "";
     $this->tpl_name = "";
 }
Exemple #2
0
 public function dormant($_i)
 {
     $this->layout = "";
     $this->tpl_name = "";
     if ($_i == 7) {
         // // mailling
         $day = date("Y-m-d", strtotime(date(date("Y-m-d", strtotime(date("Y-m-d") . " -1 year"))) . " +7 day"));
         $res = $this->Members->list_m('', '', "last_login LIKE '" . $day . "%'");
         $len_res = sizeof($res);
         for ($i = 0; $i < $len_res; $i++) {
             if ($res[$i]["email"]) {
                 $m = new TF_mailer($this->settings);
                 $m->mailto = $res[$i]["email"];
                 $m->subject = "D.CAMP 장기 미사용 계정의 회원정보 휴면 파기안내";
                 $m->tpl_name = "dormant-account";
                 $m->assigns["day"] = date_to_kr(date("Y-m-d", strtotime(date(date("Y-m-d", strtotime(date("Y-m-d") . " -1 year"))) . " +7 day")));
                 $m->assigns["t_day"] = date_to_kr(date("Y-m-d", strtotime(date("Y-m-d") . " +7 day")));
                 $m->send();
             }
         }
     } else {
         if ($_i == 1) {
             // q
             $d_day = date("Y-m-d", strtotime(date(date("Y-m-d", strtotime(date("Y-m-d") . " -1 year"))) . " -2 day"));
             $this->Members->dormant($d_day);
             // mailling
             $day = date("Y-m-d", strtotime(date(date("Y-m-d", strtotime(date("Y-m-d") . " -1 year"))) . " +1 day"));
             $res = $this->Members->list_m('', '', "last_login LIKE '" . $day . "%'");
             $len_res = sizeof($res);
             for ($i = 0; $i < $len_res; $i++) {
                 if ($res[$i]["email"]) {
                     $m = new TF_mailer($this->settings);
                     $m->mailto = $res[$i]["email"];
                     $m->subject = "D.CAMP 장기 미사용 계정의 회원정보 휴면 파기안내";
                     $m->tpl_name = "dormant-account";
                     $m->assigns["day"] = date_to_kr(date("Y-m-d", strtotime(date(date("Y-m-d", strtotime(date("Y-m-d") . " -1 year"))) . " +1 day")));
                     $m->assigns["t_day"] = date_to_kr(date("Y-m-d", strtotime(date("Y-m-d") . " +1 day")));
                     $m->send();
                 }
             }
         }
     }
 }