Esempio n. 1
0
 public function __construct(&$system)
 {
     parent::__construct($system);
     $system->config->ucenter();
     if (!defined('UC_API')) {
         K::M('system/logs')->error('Ucenter已经开启,但未能正确配置');
     }
     Import::L('uc_client/client.php');
 }
Esempio n. 2
0
<?php

/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */
Import::L('weibo/SaeTOAuthV2.php');
class Mdl_Member_Weibo extends Model
{
    protected $_type_id = 2;
    //微博是2
    public function weibo_url()
    {
        $cfg = K::$system->config->get('connect');
        if (defined('IN_MOBILE')) {
            $mobile = K::$system->config->get('mobile');
            $callback = $mobile['url'] . '/' . K::M('helper/link')->mklink('passport:weibocallback');
        } else {
            $site = K::$system->config->get('site');
            $callback = $site['siteurl'] . '/' . K::M('helper/link')->mklink('passport:weibocallback');
        }
        if (empty($cfg['weibo_is_open'])) {
            $this->err->add('很抱歉网站管理员还未开启微博登录功能', 201);
        } else {
            $o = new SaeTOAuthV2($cfg['weibo_app_id'], $cfg['weibo_app_key']);
            $code_url = $o->getAuthorizeURL($callback);
            return $code_url;
        }
        return false;
    }
Esempio n. 3
0
<?php

/**
 * Copy Right TTPET.COM
 * Each engineer has a duty to keep the code elegant
 * $Id mail.mdl.php shzhrui<*****@*****.**>$
 */
Import::L('phpmailer/class.phpmailer.php');
class Mdl_Helper_Mail extends PHPMailer
{
    protected $from_mail = '*****@*****.**';
    protected $from_name = '江湖婚庆门户系统';
    private $_datetime;
    private $_email = null;
    public function __construct(&$system)
    {
        parent::__construct(true);
        $this->CharSet = 'UTF-8';
        $cfg = $system->config->get('mail');
        $site = $system->config->get('site');
        if (strtolower($cfg['mode']) == 'smtp') {
            $this->IsSMTP();
            $this->Host = $cfg['smtp']['host'];
            $this->Port = $cfg['smtp']['port'];
            $this->SMTPAuth = true;
            $this->Username = $cfg['smtp']['uname'];
            $this->Password = $cfg['smtp']['passwd'];
        } else {
            $this->IsMail();
        }
        $this->from_mail = $cfg['sender'];