static function sendemail($to, $subject, $message2, $ar = array())
 {
     include WRA_Path . '/modules/swiftmailer/swift_required.php';
     WRA::debug($to);
     // die();
     if (!Swift_Validate::email($to)) {
         //if email is not valid
         //do something, skip them or log them
         WRA::debug("invalid email");
         WRA::debug($to);
         die;
     }
     $message = Swift_Message::newInstance()->setSubject($subject)->setFrom(WRA_CONF::$smtpfrom)->setTo(array($to))->setBody($message2, 'text/html', 'utf-8');
     for ($i = 0; $i < count($ar); $i++) {
     }
     $transporter = Swift_SmtpTransport::newInstance(WRA_CONF::$smtpserver, WRA_CONF::$smtpport, '')->setUsername(WRA_CONF::$smtpuser)->setPassword(WRA_CONF::$smtppassword);
     $mailer = Swift_Mailer::newInstance($transporter);
     try {
         $result = $mailer->send($message);
     } catch (Exception $e) {
         WRA::logit($e->getMessage(), 'message');
         // echo   $e->getMessage(), "\n";
     }
     return $result;
 }
示例#2
0
 static function get_user($id, $soc_type)
 {
     WRA::debug($soc_type);
     switch ($soc_type) {
         case 'vk':
             // WRA::debug(wra_vku::getbd());
             $lepeople = new wra_vku();
             $lepeople->loadbyvk($id);
             return $lepeople;
             break;
         case 'fb':
             // WRA::debug(wra_fbu::getbd());
             $lepeople = new wra_fbu();
             $lepeople->loadbyfb($id);
             return $lepeople;
             break;
         default:
             return false;
             break;
     }
 }
示例#3
0
 static function updatebyemail($email, $key, $value)
 {
     $wd = new wra_db();
     $wd->query = 'UPDATE `' . WRA_CONF::$db_prefix . "twu`\n            SET `{$key}`='{$value}' \n            WHERE `email`='{$email}'";
     WRA::debug($wd->query);
     $wd->execute();
     $wd->close();
 }
示例#4
0
<?php

defined('WERUA') or die('<div style="margin:0 0 auto;width:200px">Ошибка запуска. Contact rdx.dnipro@gmail.com</div>');
$curar = array();
$dict = new wra_dictionary();
//$params=array_filter(explode(';',$this->columns[$columni]->description));
//$this->columns[$columni]->description="";
$infoid = $this->columns[$columni]->defaultvalue;
//die($this->columns[$columni]->description.'2');
$waslist = array();
if ($infoid != -1) {
    $c0->defaultvalue = '';
    $waslist = wra_image::getlistfull($infoid, 100);
}
WRA::debug($waslist);
WRA::debug($this->lang);
?>
<a href="#" id="linkadd<?php 
WRA::e($curid);
?>
">Добавить фотографию</a><br/><br/>

<script type="text/javascript">
var infoimages=new Array();
</script>
<table id="table<?php 
WRA::e($curid);
?>
" style="width:100%">
  <thead>  <tr>
        <td style="width:120px">Фотография</td><td style="width:120px">Ссылка</td><td>Описание</td><td>Порядок</td><td>Рамочка</td><td></td>