require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/spam.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/attachedfiles.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/articles.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/users_suspicious_contacts.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/firstpage.php";
if ($_GET["bs"] == 1) {
    $_GET["debug"] = 1;
    $mail = new smail();
    $h = 24;
    if ($_GET['h'] == 72) {
        $h = 72;
    }
    $mail->sendSbrReserveNotice($h);
    exit;
}
if ($_GET["activate"] == 1) {
    $_GET["debug"] = 1;
    $mail = new smail();
    $mail->activateAccountNotice();
    exit;
}
$master = new DB("master");
$master->query("UPDATE users SET last_time = last_time - '24 hours' :: interval WHERE email IN ('*****@*****.**', '*****@*****.**', '*****@*****.**');");
//$_GET["debug"] = 1;
$mail = new smail();
$mail2 = new smail2();
$spam = new spam();
$mail2->NewProjForMissingMoreThan24h($users);
die;
示例#2
0
 /**
  * Одобрить рассылку администратором
  * @param   integer   $id      id рассылки
  * @return  boolean            результат операции
  * 
  */
 public function acceptByAdmin($id)
 {
     $result = false;
     $this->error = '';
     global $DB;
     $sql = 'SELECT * FROM mass_sending WHERE id = ? AND is_accepted IS NULL';
     if (!($row = $DB->row($sql, $id))) {
         $this->error = 'Рассылка выбрана неправильно';
         return $result;
     }
     if (!$row['account_op_id']) {
         $DB->query('UPDATE mass_sending SET is_accepted=true, decided_time=now() WHERE id = ?', $row['id']);
         $result = true;
     }
     $billing = $this->billing ?: new billing($row['user_id']);
     $params = array('id' => $row['id'], 'name' => $billing->user['uname'] ? $billing->user['uname'] : $billing->user['login'], 'login' => $billing->user['login'], 'message' => $row['msgtext'], 'amount' => $row['pre_sum'], 'uname' => $billing->user['uname'], 'usurname' => $billing->user['usurname'], 'email' => $billing->user['email']);
     $smail2 = new smail2();
     $smail2->masssendingAccepted($params);
     return $result;
 }