/** * Отправляет предупреждению юзеру о том, что аккаунт ПРО истекает в ближайшие дни. Вызывается из hourly.php. * * @return string возможная ошибка. */ public function SendWarnings() { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/payed.php'; $t_user = new payed(); $all = $t_user->GetWarnings(); if ($all) { foreach ($all as $ikey => $recp) { $page = substr($recp['role'], 0, 1) != 1 ? 'payed' : 'payed-emp'; $body = 'Напоминаем, что ' . date('d ' . monthtostr(date('m', strtotime($recp['to_date']))) . ' Y в H:i ', strtotime($recp['to_date'])) . "заканчивается время действия приобретенного вами аккаунта PRO на сайте FL.ru. \n Вы можете <a href='{$GLOBALS['host']}/{$page}/{$this->_addUrlParams('b')}'>продлить</a> срок действия профессионального аккаунта."; $this->message = $this->GetHtml($recp['uname'], $body, array('header' => 'simple', 'footer' => 'simple_adv')); //$this->recipient = "\"".$recp['uname']." ".$recp['usurname']." [".$recp['login']."]\"<".$recp['email'].">"; $this->recipient = $recp['uname'] . ' ' . $recp['usurname'] . ' [' . $recp['login'] . '] <' . $recp['email'] . '>'; $this->subject = 'Заканчивается срок действия вашего аккаунта PRO на FL.ru'; $this->SmtpMail('text/html'); } } return ''; }